ooo-build r15071 - in trunk: . patches/dev300



Author: tml
Date: Wed Jan 14 15:28:40 2009
New Revision: 15071
URL: http://svn.gnome.org/viewvc/ooo-build?rev=15071&view=rev

Log:
2009-01-14  Tor Lillqvist  <tml novell com>

	* patches/dev300/mail-document-subject.diff
	(sfx2/source/dialog/mailmodel.cxx): New file. Tentative fix for
	bnc#459176. If no subject has been set, use the basename of the
	first attached document as the subject, and in case there are
	several attached documents, append a comma and an ellipsis. I
	don't know if it is actually possible to send several documents as
	mail from OOo at the same time, though.

	Not yet added to the apply file.



Added:
   trunk/patches/dev300/mail-document-subject.diff
Modified:
   trunk/ChangeLog

Added: trunk/patches/dev300/mail-document-subject.diff
==============================================================================
--- (empty file)
+++ trunk/patches/dev300/mail-document-subject.diff	Wed Jan 14 15:28:40 2009
@@ -0,0 +1,17 @@
+--- sfx2/source/dialog/mailmodel.cxx.original
++++ sfx2/source/dialog/mailmodel.cxx
+@@ -851,7 +851,13 @@
+ 
+ 					Sequence< OUString > aAttachmentSeq(&(maAttachedDocuments[0]),maAttachedDocuments.size());
+  
+-				    xSimpleMailMessage->setSubject( maSubject );
++					if ( xSimpleMailMessage->getSubject().getLength() == 0 ) {
++						OUString baseName( maAttachedDocuments[0].copy( maAttachedDocuments[0].lastIndexOf( '/' ) + 1 ) );
++						OUString subject( baseName );
++						if ( maAttachedDocuments.size() > 1 )
++							subject += OUString::createFromAscii( ", ..." );
++						xSimpleMailMessage->setSubject( subject );
++					}
+ 				    xSimpleMailMessage->setAttachement( aAttachmentSeq );
+ 
+ 	                sal_Bool bSend( sal_False );



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]