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
commit62c0947bfc47357a97ccba359769406b657a351a (patch)
treedcc5347a08e1bdb8171bdd3dbfbe268d3899fc2f /sfx2
parent09fd8aa400c174c09ace962f2b3830119a3d4cca (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 7cc9fea484..ab89ae88cc 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(