diff options
author | Michael Stahl <mstahl@redhat.com> | 2014-05-15 23:28:55 +0200 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2014-05-16 08:10:14 +0000 |
commit | da62ab5783e548c5785b3950c03d078b1f3e849d (patch) | |
tree | 90290527c626e609919670410f5ca94f28d8b874 /embeddedobj | |
parent | 5caa2548f837c54aac44fde0fdbb145145b60091 (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 'embeddedobj')
-rw-r--r-- | embeddedobj/source/commonembedding/persistence.cxx | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/embeddedobj/source/commonembedding/persistence.cxx b/embeddedobj/source/commonembedding/persistence.cxx index b3e920884fba..36741eba63dd 100644 --- a/embeddedobj/source/commonembedding/persistence.cxx +++ b/embeddedobj/source/commonembedding/persistence.cxx @@ -1169,6 +1169,12 @@ void SAL_CALL OCommonEmbeddedObject::storeToEntry( const uno::Reference< embed:: { SAL_WARN( "embeddedobj.common", "Can not retrieve target storage media type!" ); } + if (nTargetStorageFormat == SOFFICE_FILEFORMAT_60) + { + SAL_INFO("embeddedobj.common", "fdo#78159: Storing OOoXML as ODF"); + nTargetStorageFormat = SOFFICE_FILEFORMAT_CURRENT; + // setting MediaType is done later anyway, no need to do it here + } try { @@ -1300,6 +1306,12 @@ void SAL_CALL OCommonEmbeddedObject::storeAsEntry( const uno::Reference< embed:: { SAL_WARN( "embeddedobj.common", "Can not retrieve target storage media type!" ); } + if (nTargetStorageFormat == SOFFICE_FILEFORMAT_60) + { + SAL_INFO("embeddedobj.common", "fdo#78159: Storing OOoXML as ODF"); + nTargetStorageFormat = SOFFICE_FILEFORMAT_CURRENT; + // setting MediaType is done later anyway, no need to do it here + } try { @@ -1589,6 +1601,12 @@ void SAL_CALL OCommonEmbeddedObject::storeOwn() { SAL_WARN( "embeddedobj.common", "Can not retrieve storage media type!" ); } + if (nStorageFormat == SOFFICE_FILEFORMAT_60) + { + SAL_INFO("embeddedobj.common", "fdo#78159: Storing OOoXML as ODF"); + nStorageFormat = SOFFICE_FILEFORMAT_CURRENT; + // setting MediaType is done later anyway, no need to do it here + } aGuard.clear(); StoreDocToStorage_Impl( m_xObjectStorage, nStorageFormat, GetBaseURL_Impl(), m_aEntryName, sal_True ); |