summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThorsten Behrens <tbehrens@suse.com>2012-11-14 16:42:11 +0100
committerThorsten Behrens <tbehrens@suse.com>2013-01-14 19:33:30 +0100
commit577dd810d94374d634b46515a19127bc26dae516 (patch)
tree45b08a6c26fcf82f0733bd5504eac584a98dfacc
parent959ce73b266d3639ff1ced9cb980adf5fe643ad5 (diff)
Fix fdo#51121 OWA misbehaviour with uncompressed meta.xml
Change Writer and Math to save ODF with compressed meta.xml as well, since there's no reason not to. Change-Id: Idde0dc9eafb03f0c84e52353289d857615aa3748 Signed-off-by: Michael Meeks <michael.meeks@suse.com>
-rw-r--r--starmath/source/mathmlexport.cxx16
-rw-r--r--starmath/source/mathmlexport.hxx3
-rw-r--r--sw/source/filter/xml/wrtxml.cxx18
-rw-r--r--sw/source/filter/xml/wrtxml.hxx3
4 files changed, 10 insertions, 30 deletions
diff --git a/starmath/source/mathmlexport.cxx b/starmath/source/mathmlexport.cxx
index 34cbf54acf7c..b543f2d4ef18 100644
--- a/starmath/source/mathmlexport.cxx
+++ b/starmath/source/mathmlexport.cxx
@@ -216,8 +216,7 @@ sal_Bool SmXMLExportWrapper::Export(SfxMedium &rMedium)
bRet = WriteThroughComponent(
xStg, xModelComp, "meta.xml", xServiceFactory, xInfoSet,
(bOASIS ? "com.sun.star.comp.Math.XMLOasisMetaExporter"
- : "com.sun.star.comp.Math.XMLMetaExporter"),
- sal_False);
+ : "com.sun.star.comp.Math.XMLMetaExporter"));
}
if ( bRet )
{
@@ -326,8 +325,7 @@ sal_Bool SmXMLExportWrapper::WriteThroughComponent(
const sal_Char* pStreamName,
Reference<lang::XMultiServiceFactory> & rFactory,
Reference<beans::XPropertySet> & rPropSet,
- const sal_Char* pComponentName,
- sal_Bool bCompress
+ const sal_Char* pComponentName
)
{
OSL_ENSURE(xStorage.is(), "Need storage!");
@@ -355,15 +353,7 @@ sal_Bool SmXMLExportWrapper::WriteThroughComponent(
uno::Reference < beans::XPropertySet > xSet( xStream, uno::UNO_QUERY );
xSet->setPropertyValue( aPropName, aAny );
- if ( !bCompress )
- {
- aPropName = "Compressed";
- sal_Bool bFalse = sal_False;
- aAny.setValue( &bFalse, ::getBooleanCppuType() );
- xSet->setPropertyValue( aPropName, aAny );
- }
-
- // even plain stream must be encrypted in encrypted document
+ // all streams must be encrypted in encrypted document
OUString aTmpPropName( "UseCommonStoragePasswordEncryption" );
sal_Bool bTrue = sal_True;
aAny.setValue( &bTrue, ::getBooleanCppuType() );
diff --git a/starmath/source/mathmlexport.hxx b/starmath/source/mathmlexport.hxx
index 4ab602bad8b3..daf935651373 100644
--- a/starmath/source/mathmlexport.hxx
+++ b/starmath/source/mathmlexport.hxx
@@ -80,8 +80,7 @@ public:
::com::sun::star::lang::XMultiServiceFactory > & rFactory,
::com::sun::star::uno::Reference<
::com::sun::star::beans::XPropertySet > & rPropSet,
- const sal_Char* pComponentName,
- sal_Bool bCompress=sal_True );
+ const sal_Char* pComponentName );
};
////////////////////////////////////////////////////////////
diff --git a/sw/source/filter/xml/wrtxml.cxx b/sw/source/filter/xml/wrtxml.cxx
index ec13da0a2a09..58913bf320fc 100644
--- a/sw/source/filter/xml/wrtxml.cxx
+++ b/sw/source/filter/xml/wrtxml.cxx
@@ -378,7 +378,7 @@ pGraphicHelper = SvXMLGraphicHelper::Create( xStg,
xModelComp, "meta.xml", xServiceFactory,
(bOASIS ? "com.sun.star.comp.Writer.XMLOasisMetaExporter"
: "com.sun.star.comp.Writer.XMLMetaExporter"),
- aEmptyArgs, aProps, sal_True ) )
+ aEmptyArgs, aProps ) )
{
bWarn = sal_True;
sWarnFile = String( RTL_CONSTASCII_STRINGPARAM("meta.xml"),
@@ -394,7 +394,7 @@ pGraphicHelper = SvXMLGraphicHelper::Create( xStg,
xModelComp, "settings.xml", xServiceFactory,
(bOASIS ? "com.sun.star.comp.Writer.XMLOasisSettingsExporter"
: "com.sun.star.comp.Writer.XMLSettingsExporter"),
- aEmptyArgs, aProps, sal_False ) )
+ aEmptyArgs, aProps ) )
{
if( !bWarn )
{
@@ -410,7 +410,7 @@ pGraphicHelper = SvXMLGraphicHelper::Create( xStg,
xModelComp, "styles.xml", xServiceFactory,
(bOASIS ? "com.sun.star.comp.Writer.XMLOasisStylesExporter"
: "com.sun.star.comp.Writer.XMLStylesExporter"),
- aFilterArgs, aProps, sal_False ) )
+ aFilterArgs, aProps ) )
{
bErr = sal_True;
sErrFile = String( RTL_CONSTASCII_STRINGPARAM("styles.xml"),
@@ -424,7 +424,7 @@ pGraphicHelper = SvXMLGraphicHelper::Create( xStg,
xModelComp, "content.xml", xServiceFactory,
(bOASIS ? "com.sun.star.comp.Writer.XMLOasisContentExporter"
: "com.sun.star.comp.Writer.XMLContentExporter"),
- aFilterArgs, aProps, sal_False ) )
+ aFilterArgs, aProps ) )
{
bErr = sal_True;
sErrFile = String( RTL_CONSTASCII_STRINGPARAM("content.xml"),
@@ -524,8 +524,7 @@ sal_Bool SwXMLWriter::WriteThroughComponent(
const uno::Reference<lang::XMultiServiceFactory> & rFactory,
const sal_Char* pServiceName,
const Sequence<Any> & rArguments,
- const Sequence<beans::PropertyValue> & rMediaDesc,
- sal_Bool bPlainStream )
+ const Sequence<beans::PropertyValue> & rMediaDesc )
{
OSL_ENSURE( xStg.is(), "Need storage!" );
OSL_ENSURE( NULL != pStreamName, "Need stream name!" );
@@ -555,13 +554,6 @@ sal_Bool SwXMLWriter::WriteThroughComponent(
xSet->setPropertyValue( aPropName, aAny );
OUString aUseCommonPassPropName( RTL_CONSTASCII_USTRINGPARAM("UseCommonStoragePasswordEncryption") );
- if( bPlainStream )
- {
- OUString aCompressPropName( RTL_CONSTASCII_USTRINGPARAM("Compressed") );
- sal_Bool bFalse = sal_False;
- aAny.setValue( &bFalse, ::getBooleanCppuType() );
- xSet->setPropertyValue( aCompressPropName, aAny );
- }
// even plain stream should be encrypted in encrypted documents
sal_Bool bTrue = sal_True;
diff --git a/sw/source/filter/xml/wrtxml.hxx b/sw/source/filter/xml/wrtxml.hxx
index b53b952db616..db790d90e5bb 100644
--- a/sw/source/filter/xml/wrtxml.hxx
+++ b/sw/source/filter/xml/wrtxml.hxx
@@ -82,8 +82,7 @@ private:
::com::sun::star::uno::Any> & rArguments,
/// output descriptor
const ::com::sun::star::uno::Sequence<
- ::com::sun::star::beans::PropertyValue> & rMediaDesc,
- sal_Bool bPlainStream ); /// neither compress nor encrypt
+ ::com::sun::star::beans::PropertyValue> & rMediaDesc );
/// write a single output stream
/// (to be called either directly or by WriteThroughComponent(...))