summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThorsten Behrens <tbehrens@suse.com>2012-11-14 16:42:11 +0100
committerThorsten Behrens <tbehrens@suse.com>2012-11-14 16:44:35 +0100
commit899c338ccde3053aaa9751cd932fc0bdefca9d95 (patch)
treed67c7a47f7a28696ae642e4267d68cefd65c9d41
parent54ba550c31c7de1e7d1bf99042883aa4ae6863c6 (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
-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 33628915c80a..6e34b32e96dc 100644
--- a/starmath/source/mathmlexport.cxx
+++ b/starmath/source/mathmlexport.cxx
@@ -209,8 +209,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 )
{
@@ -318,8 +317,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!");
@@ -347,15 +345,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 c0e7743e14ee..c4cc22eaa605 100644
--- a/starmath/source/mathmlexport.hxx
+++ b/starmath/source/mathmlexport.hxx
@@ -70,8 +70,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 48f7953c32ed..0a82b8e7cead 100644
--- a/sw/source/filter/xml/wrtxml.cxx
+++ b/sw/source/filter/xml/wrtxml.cxx
@@ -379,7 +379,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"),
@@ -395,7 +395,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 )
{
@@ -411,7 +411,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"),
@@ -425,7 +425,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!" );
@@ -554,13 +553,6 @@ sal_Bool SwXMLWriter::WriteThroughComponent(
xSet->setPropertyValue( rtl::OUString("MediaType"), 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(...))