diff options
-rw-r--r-- | writerfilter/source/dmapper/DomainMapper_Impl.cxx | 2 | ||||
-rw-r--r-- | writerfilter/source/dmapper/OLEHandler.cxx | 5 | ||||
-rw-r--r-- | writerfilter/source/dmapper/OLEHandler.hxx | 2 |
3 files changed, 5 insertions, 4 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index cbb502454c45..9a90ce7a1f27 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -1319,7 +1319,7 @@ void DomainMapper_Impl::appendOLE( const OUString& rStreamName, OLEHandlerPtr pO uno::Reference< text::XTextContent > xOLE( m_xTextFactory->createInstance(sEmbeddedService), uno::UNO_QUERY_THROW ); uno::Reference< beans::XPropertySet > xOLEProperties(xOLE, uno::UNO_QUERY_THROW); - OUString aCLSID = pOLEHandler->getCLSID(); + OUString aCLSID = pOLEHandler->getCLSID(m_xComponentContext); if (aCLSID.isEmpty()) xOLEProperties->setPropertyValue(PropertyNameSupplier::GetPropertyNameSupplier().GetName( PROP_STREAM_NAME ), uno::makeAny( rStreamName )); diff --git a/writerfilter/source/dmapper/OLEHandler.cxx b/writerfilter/source/dmapper/OLEHandler.cxx index 7e6ee6dffd1b..addb2b2bdd8c 100644 --- a/writerfilter/source/dmapper/OLEHandler.cxx +++ b/writerfilter/source/dmapper/OLEHandler.cxx @@ -25,6 +25,7 @@ #include <ooxml/resourceids.hxx> #include <rtl/ustring.hxx> #include <unotools/mediadescriptor.hxx> +#include <officecfg/Office/Common.hxx> #include <com/sun/star/beans/PropertyValue.hpp> #include <com/sun/star/container/XNameAccess.hpp> #include <com/sun/star/document/XEmbeddedObjectResolver.hpp> @@ -247,11 +248,11 @@ void OLEHandler::importStream(uno::Reference<uno::XComponentContext> xComponentC saveInteropProperties(xTextDocument, xPropertySet->getPropertyValue("StreamName").get<OUString>(), m_aURL); } -OUString OLEHandler::getCLSID() +OUString OLEHandler::getCLSID(uno::Reference<uno::XComponentContext> xComponentContext) const { OUString aRet; - if (m_sProgId == "Word.Document.12") + if (officecfg::Office::Common::Filter::Microsoft::Import::WinWordToWriter::get(xComponentContext) && m_sProgId == "Word.Document.12") aRet = "8BC6B165-B1B2-4EDD-aa47-dae2ee689dd6"; return aRet; diff --git a/writerfilter/source/dmapper/OLEHandler.hxx b/writerfilter/source/dmapper/OLEHandler.hxx index 64677bb560a0..551b8df4784d 100644 --- a/writerfilter/source/dmapper/OLEHandler.hxx +++ b/writerfilter/source/dmapper/OLEHandler.hxx @@ -94,7 +94,7 @@ public: css::uno::Reference<css::text::XTextContent> xOLE); /// Get the CLSID of the OLE object, in case we can find one based on m_sProgId. - OUString getCLSID(); + OUString getCLSID(css::uno::Reference<css::uno::XComponentContext> xComponentContext) const; OUString copyOLEOStream( ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextDocument > const & xTextDocument ); |