summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorThorsten Behrens <tbehrens@novell.com>2010-10-16 01:02:47 +0200
committerThorsten Behrens <tbehrens@novell.com>2010-10-16 01:11:45 +0200
commite0a2bb01d55f7fc9af210ab3df237cd41ad7a29b (patch)
tree4e871f6464d55750ff67019649366cc1ac147ecb /sfx2
parent39ab4ede2af1eaff00c23e66711a2502040f10bf (diff)
Fix missing media-type for ODF thumbnails
As per ODF 1.2 Part 3, 4.8.10: A manifest:media-type attribute should be present for all files and directories where a MIME media type exists for the content of the file... So added "image/png" for the thumbnails there.
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/doc/objstor.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index 12e32b494ff8..e52a926fbc1d 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -3684,6 +3684,10 @@ sal_Bool SfxObjectShell::WriteThumbnail( sal_Bool bEncrypted,
uno::Reference< io::XTruncate > xTruncate( xStream->getOutputStream(), uno::UNO_QUERY_THROW );
xTruncate->truncate();
+ uno::Reference < beans::XPropertySet > xSet( xStream, uno::UNO_QUERY );
+ if ( xSet.is() )
+ xSet->setPropertyValue( ::rtl::OUString::createFromAscii("MediaType"),
+ uno::makeAny( ::rtl::OUString::createFromAscii("image/png") ) );
if ( bEncrypted )
{
sal_uInt16 nResID = GraphicHelper::getThumbnailReplacementIDByFactoryName_Impl(