diff options
author | Michael Stahl <mstahl@redhat.com> | 2014-05-15 23:28:55 +0200 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2014-05-18 22:12:45 +0200 |
commit | c251144bc13a659b6ea5a0c0a30e239618ef9626 (patch) | |
tree | 95793c232c229c273a1d03a4be6219903f0b430a /comphelper | |
parent | 48681f1cae6f8fdb975afdea9bb546b6b564b7a7 (diff) |
fdo#78159: fix import of OOoXML embedded objects
MimeConfigurationHelper::GetDefaultFilterFromServiceName() checks that
there is both an import and an export filter, and for OOoXML the export
has been removed; tweak the check to require only import for OOoXML.
Currently it still works invoke the OOoXML filter, but it is clearly
better to store the embedded documents only in ODF, so tweak
OCommonEmbeddedObject::store* methods to do that.
(regression from aeeaccf59abbc485d7786486f1accc1cb4d4dbf7)
Change-Id: Ib71f23fd110cbd4b570517f2dde2c53e3aa6301d
(cherry picked from commit 0b3d0fb2d9256dc6bae6af69ed494487004def75)
Reviewed-on: https://gerrit.libreoffice.org/9365
Tested-by: David Tardon <dtardon@redhat.com>
Reviewed-by: David Tardon <dtardon@redhat.com>
Diffstat (limited to 'comphelper')
-rw-r--r-- | comphelper/source/misc/mimeconfighelper.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/comphelper/source/misc/mimeconfighelper.cxx b/comphelper/source/misc/mimeconfighelper.cxx index 0c6ffb7d2870..6e096030222d 100644 --- a/comphelper/source/misc/mimeconfighelper.cxx +++ b/comphelper/source/misc/mimeconfighelper.cxx @@ -743,7 +743,12 @@ OUString MimeConfigurationHelper::GetDefaultFilterFromServiceName( const OUStrin sal_Int32 nFlags = aPropsHM.getUnpackedValueOrDefault( "Flags", (sal_Int32)0 ); // that should be import, export, own filter and not a template filter ( TemplatePath flag ) - sal_Int32 nRequired = ( SFX_FILTER_OWN | SFX_FILTER_EXPORT | SFX_FILTER_IMPORT ); + sal_Int32 const nRequired = (SFX_FILTER_OWN + // fdo#78159 for OOoXML, there is code to convert + // to ODF in OCommonEmbeddedObject::store* + // so accept it even though there's no export + | (SOFFICE_FILEFORMAT_60 == nVersion ? 0 : SFX_FILTER_EXPORT) + | SFX_FILTER_IMPORT ); if ( ( ( nFlags & nRequired ) == nRequired ) && !( nFlags & SFX_FILTER_TEMPLATEPATH ) ) { // if there are more than one filter the preffered one should be used |