Kaydet (Commit) 399f0041 authored tarafından Ariel Constenla-Haile's avatar Ariel Constenla-Haile

i95421 - Set MediaType when storing thumbnail.png

üst 0056d3aa
......@@ -3705,16 +3705,20 @@ sal_Bool SfxObjectShell::GenerateAndStoreThumbnail( sal_Bool bEncrypted,
try {
uno::Reference< embed::XStorage > xThumbnailStor =
xStor->openStorageElement( ::rtl::OUString::createFromAscii( "Thumbnails" ),
xStor->openStorageElement( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Thumbnails")),
embed::ElementModes::READWRITE );
if ( xThumbnailStor.is() )
{
uno::Reference< io::XStream > xStream = xThumbnailStor->openStreamElement(
::rtl::OUString::createFromAscii( "thumbnail.png" ),
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("thumbnail.png")),
embed::ElementModes::READWRITE );
if ( xStream.is() && WriteThumbnail( bEncrypted, bSigned, bIsTemplate, xStream ) )
{
uno::Reference< beans::XPropertySet > xPropSet( xStream, uno::UNO_QUERY );
if ( xPropSet.is() )
xPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("MediaType")),
uno::makeAny( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("image/png"))));
uno::Reference< embed::XTransactedObject > xTransact( xThumbnailStor, uno::UNO_QUERY_THROW );
xTransact->commit();
bResult = sal_True;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment