writerfilter/source/dmapper/DomainMapper_Impl.cxx |    2 +-
 writerfilter/source/dmapper/OLEHandler.cxx        |    5 +++--
 writerfilter/source/dmapper/OLEHandler.hxx        |    2 +-
 3 files changed, 5 insertions(+), 4 deletions(-)

New commits:
commit 4034d96aeee07f069a6fb9e0445436577a6065e3
Author: Miklos Vajna <vmik...@collabora.co.uk>
Date:   Thu Aug 28 17:05:14 2014 +0200

    writerfilter: respect WinWordToWriter config setting
    
    The binary filter uses this setting to decide if the embedded object is
    converted into a native Writer document (so it can be edited) or not (so
    it's preserved better), let's do the same.
    
    Change-Id: I47b48867b3d0abf6cd8de2430513587a6776461e

diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx 
b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index cbb5024..9a90ce7 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 7e6ee6d..addb2b2 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 64677bb..551b8df 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 );
 
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to