diff options
author | Michael Stahl <mstahl@redhat.com> | 2014-05-15 23:28:55 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2014-05-15 23:39:13 +0200 |
commit | 0b3d0fb2d9256dc6bae6af69ed494487004def75 (patch) | |
tree | ee99d38e11eea3e44172778a051efe735278db96 /embeddedobj | |
parent | 68741d0055f3b76f88ca225b0ebe4991d6cb2f7f (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 '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 2db77f657062..4d2ddc841cb2 100644 --- a/embeddedobj/source/commonembedding/persistence.cxx +++ b/embeddedobj/source/commonembedding/persistence.cxx @@ -1165,6 +1165,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 { @@ -1294,6 +1300,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 { @@ -1579,6 +1591,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, true ); |