diff options
author | Thorsten Behrens <tbehrens@suse.com> | 2012-11-14 16:37:40 +0100 |
---|---|---|
committer | Thorsten Behrens <tbehrens@suse.com> | 2013-01-14 19:33:31 +0100 |
commit | 28e6acb724671e72bd4e2e207a61fee0c94c432b (patch) | |
tree | e82f89224c19c600c969f78b113146c896403b73 | |
parent | 553724beeb7710e9dbfb70d53913fe9b37d87eed (diff) |
Fix fdo#51121 OWA misbehaviour with uncompressed meta.xml
Change reportdesigner to save ODF with compressed meta.xml as well,
since there's no reason not to.
Change-Id: I9129f83ea8e5e8a20e3b6395643e8ca93c32f04a
Signed-off-by: Michael Meeks <michael.meeks@suse.com>
-rw-r--r-- | reportdesign/inc/ReportDefinition.hxx | 3 | ||||
-rw-r--r-- | reportdesign/source/core/api/ReportDefinition.cxx | 24 |
2 files changed, 9 insertions, 18 deletions
diff --git a/reportdesign/inc/ReportDefinition.hxx b/reportdesign/inc/ReportDefinition.hxx index fe7fc36d83e8..912e57dabca2 100644 --- a/reportdesign/inc/ReportDefinition.hxx +++ b/reportdesign/inc/ReportDefinition.hxx @@ -140,8 +140,7 @@ namespace reportdesign /// output descriptor const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue> & rMediaDesc, - sal_Bool bPlainStream - , const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& _xStorageToSaveTo); /// neither compress nor encrypt + const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& _xStorageToSaveTo); /// write a single output stream /// (to be called either directly or by WriteThroughComponent(...)) diff --git a/reportdesign/source/core/api/ReportDefinition.cxx b/reportdesign/source/core/api/ReportDefinition.cxx index 202567b1f40f..c5189dc0c15c 100644 --- a/reportdesign/source/core/api/ReportDefinition.cxx +++ b/reportdesign/source/core/api/ReportDefinition.cxx @@ -1529,7 +1529,7 @@ void SAL_CALL OReportDefinition::storeToStorage( const uno::Reference< embed::XS if( !WriteThroughComponent( xCom, "settings.xml", "com.sun.star.comp.report.XMLSettingsExporter", - aDelegatorArguments, aProps, sal_True,_xStorageToSaveTo ) ) + aDelegatorArguments, aProps, _xStorageToSaveTo ) ) { if( !bWarn ) { @@ -1545,7 +1545,7 @@ void SAL_CALL OReportDefinition::storeToStorage( const uno::Reference< embed::XS if( !WriteThroughComponent( xCom, "meta.xml", "com.sun.star.comp.report.XMLMetaExporter", - aDelegatorArguments, aProps, sal_True,_xStorageToSaveTo ) ) + aDelegatorArguments, aProps, _xStorageToSaveTo ) ) { if( !bWarn ) { @@ -1561,7 +1561,7 @@ void SAL_CALL OReportDefinition::storeToStorage( const uno::Reference< embed::XS if( !WriteThroughComponent( xCom, "styles.xml", "com.sun.star.comp.report.XMLStylesExporter", - aDelegatorArguments, aProps, sal_True,_xStorageToSaveTo ) ) + aDelegatorArguments, aProps, _xStorageToSaveTo ) ) { if( !bWarn ) { @@ -1577,7 +1577,7 @@ void SAL_CALL OReportDefinition::storeToStorage( const uno::Reference< embed::XS if( !WriteThroughComponent( xCom, "content.xml", "com.sun.star.comp.report.ExportFilter", - aDelegatorArguments, aProps, sal_True,_xStorageToSaveTo ) ) + aDelegatorArguments, aProps, _xStorageToSaveTo ) ) { bErr = sal_True; sErrFile = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("content.xml")); @@ -1675,8 +1675,7 @@ sal_Bool OReportDefinition::WriteThroughComponent( const sal_Char* pServiceName, const uno::Sequence<uno::Any> & rArguments, const uno::Sequence<beans::PropertyValue> & rMediaDesc, - sal_Bool bPlainStream - ,const uno::Reference<embed::XStorage>& _xStorageToSaveTo) + const uno::Reference<embed::XStorage>& _xStorageToSaveTo) { OSL_ENSURE( NULL != pStreamName, "Need stream name!" ); OSL_ENSURE( NULL != pServiceName, "Need service name!" ); @@ -1709,16 +1708,9 @@ sal_Bool OReportDefinition::WriteThroughComponent( aAny <<= aMime; xStreamProp->setPropertyValue( aPropName, aAny ); - if( bPlainStream ) - { - aAny <<= sal_False; - xStreamProp->setPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Compressed") ), aAny ); - } - else - { - xStreamProp->setPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Encrypted") ), uno::makeAny(sal_True) ); - } - + // encrypt all streams + xStreamProp->setPropertyValue( "UseCommonStoragePasswordEncryption", + uno::makeAny( (sal_Bool)sal_True ) ); // set buffer and create outputstream |