Kaydet (Commit) 9b2440f9 authored tarafından Thorsten Behrens's avatar Thorsten Behrens

Fix fdo#51121 OWA misbehaviour with uncompressed meta.xml

Change draw/impress to save ODF with compressed meta.xml as well,
since there's no reason not to.

Change-Id: I856e716b1e673cffe3b483628d934ab2c7d7271b
üst 4e7f9650
......@@ -162,7 +162,6 @@ struct XML_SERVICEMAP
{
const sal_Char* mpService;
const sal_Char* mpStream;
sal_Bool mbPlain;
};
struct XML_SERVICES
......@@ -1003,22 +1002,18 @@ sal_Bool SdXMLFilter::Export()
XML_SERVICEMAP aServices[5]; sal_uInt16 i = 0;
aServices[i ].mpService = pServiceNames->mpStyles;
aServices[i ].mpStream = sXML_styleStreamName;
aServices[i++].mbPlain = sal_False;
aServices[i++].mpStream = sXML_styleStreamName;
aServices[i ].mpService = pServiceNames->mpContent;
aServices[i ].mpStream = sXML_contentStreamName;
aServices[i++].mbPlain = sal_False;
aServices[i++].mpStream = sXML_contentStreamName;
aServices[i ].mpService = pServiceNames->mpSettings;
aServices[i ].mpStream = sXML_settingsStreamName;
aServices[i++].mbPlain = sal_False;
aServices[i++].mpStream = sXML_settingsStreamName;
if( mrDocShell.GetCreateMode() != SFX_CREATE_MODE_EMBEDDED )
{
aServices[i ].mpService = pServiceNames->mpMeta;
aServices[i ].mpStream = sXML_metaStreamName;
aServices[i++].mbPlain = sal_True;
aServices[i++].mpStream = sXML_metaStreamName;
};
aServices[i].mpService = NULL;
......@@ -1051,11 +1046,9 @@ sal_Bool SdXMLFilter::Export()
uno::Any aAny; aAny <<= OUString( "text/xml");
xProps->setPropertyValue( "MediaType" , aAny);
OUString aUseCommonPassPropName( "UseCommonStoragePasswordEncryption");
if( pServices->mbPlain )
xProps->setPropertyValue( "Compressed" , uno::makeAny( (sal_Bool) sal_False ) );
// if the document is encrypted even the plain streams should be encrypted
xProps->setPropertyValue( aUseCommonPassPropName, uno::makeAny( (sal_Bool)sal_True ) );
// encrypt all streams
xProps->setPropertyValue( "UseCommonStoragePasswordEncryption",
uno::makeAny( (sal_Bool)sal_True ) );
const OUString sStreamName( "StreamName");
xInfoSet->setPropertyValue( sStreamName, Any( sDocName ) );
......
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