summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThorsten Behrens <tbehrens@suse.com>2012-11-14 16:37:40 +0100
committerThorsten Behrens <tbehrens@suse.com>2012-11-14 16:44:35 +0100
commit38a2e86db2d1f23b95f705bfe1b626f419f4e290 (patch)
treebdff8e1b0bcf484d188ee9ff1641e1ffaa8d5d18
parent9b2440f985f8676393094140cfd919ef82161e31 (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
-rw-r--r--reportdesign/inc/ReportDefinition.hxx3
-rw-r--r--reportdesign/source/core/api/ReportDefinition.cxx24
2 files changed, 9 insertions, 18 deletions
diff --git a/reportdesign/inc/ReportDefinition.hxx b/reportdesign/inc/ReportDefinition.hxx
index ebe30d867aaf..caa054e392df 100644
--- a/reportdesign/inc/ReportDefinition.hxx
+++ b/reportdesign/inc/ReportDefinition.hxx
@@ -129,8 +129,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 6374ef3f1ca7..2588fbc026a5 100644
--- a/reportdesign/source/core/api/ReportDefinition.cxx
+++ b/reportdesign/source/core/api/ReportDefinition.cxx
@@ -1520,7 +1520,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 )
{
@@ -1536,7 +1536,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 )
{
@@ -1552,7 +1552,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 )
{
@@ -1568,7 +1568,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"));
@@ -1666,8 +1666,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!" );
@@ -1700,16 +1699,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