summaryrefslogtreecommitdiff
path: root/comphelper
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2014-05-15 23:28:55 +0200
committerMichael Stahl <mstahl@redhat.com>2014-05-15 23:39:13 +0200
commit0b3d0fb2d9256dc6bae6af69ed494487004def75 (patch)
treeee99d38e11eea3e44172778a051efe735278db96 /comphelper
parent68741d0055f3b76f88ca225b0ebe4991d6cb2f7f (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
Diffstat (limited to 'comphelper')
-rw-r--r--comphelper/source/misc/mimeconfighelper.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/comphelper/source/misc/mimeconfighelper.cxx b/comphelper/source/misc/mimeconfighelper.cxx
index 6f25f001c1a9..249f47466a40 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