ooo-build r15069 - in branches/ooo-build-3-0-1: . patches/dev300



Author: tml
Date: Wed Jan 14 15:25:44 2009
New Revision: 15069
URL: http://svn.gnome.org/viewvc/ooo-build?rev=15069&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 command and 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:
   branches/ooo-build-3-0-1/patches/dev300/mail-document-subject.diff
Modified:
   branches/ooo-build-3-0-1/ChangeLog

Added: branches/ooo-build-3-0-1/patches/dev300/mail-document-subject.diff
==============================================================================
--- (empty file)
+++ branches/ooo-build-3-0-1/patches/dev300/mail-document-subject.diff	Wed Jan 14 15:25:44 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]