1 --- sfx2/source/dialog/mailmodel.cxx.original
2 +++ sfx2/source/dialog/mailmodel.cxx
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 );
15 xSimpleMailMessage->setAttachement( aAttachmentSeq );
17 sal_Bool bSend( sal_False );