merge the formfield patch from ooo-build
[ooovba.git] / applied_patches / 0576-mail-document-subject.diff
blob608defc5017910ce63d67880c93c50bf158a912a
1 --- sfx2/source/dialog/mailmodel.cxx.original
2 +++ sfx2/source/dialog/mailmodel.cxx
3 @@ -851,7 +851,13 @@
5 Sequence< OUString > aAttachmentSeq(&(maAttachedDocuments[0]),maAttachedDocuments.size());
7 - xSimpleMailMessage->setSubject( maSubject );
8 + if ( xSimpleMailMessage->getSubject().getLength() == 0 ) {
9 + OUString baseName( maAttachedDocuments[0].copy( maAttachedDocuments[0].lastIndexOf( '/' ) + 1 ) );
10 + OUString subject( baseName );
11 + if ( maAttachedDocuments.size() > 1 )
12 + subject += OUString::createFromAscii( ", ..." );
13 + xSimpleMailMessage->setSubject( subject );
14 + }
15 xSimpleMailMessage->setAttachement( aAttachmentSeq );
17 sal_Bool bSend( sal_False );