[Libreoffice-commits] core.git: writerfilter/source

Tamás Zolnai tamas.zolnai at collabora.com
Thu Aug 10 00:26:52 UTC 2017


 writerfilter/source/dmapper/OLEHandler.cxx |    7 +++++++
 1 file changed, 7 insertions(+)

New commits:
commit 368b583b992f2e9cad46c2362c9529a07c36d7a9
Author: Tamás Zolnai <tamas.zolnai at collabora.com>
Date:   Wed Aug 9 21:43:09 2017 +0200

    Avoid warning in OleHandler
    
    Related to ActiveX controls.
    
    Change-Id: Ief7ee67ca8e4f086a1d5e0400d0eaf3ebc8cdaaf
    Reviewed-on: https://gerrit.libreoffice.org/40934
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Tamás Zolnai <tamas.zolnai at collabora.com>

diff --git a/writerfilter/source/dmapper/OLEHandler.cxx b/writerfilter/source/dmapper/OLEHandler.cxx
index 24ec24c8f844..ae1e13a0041b 100644
--- a/writerfilter/source/dmapper/OLEHandler.cxx
+++ b/writerfilter/source/dmapper/OLEHandler.cxx
@@ -43,6 +43,7 @@
 #include <com/sun/star/lang/XComponent.hpp>
 #include <com/sun/star/lang/XInitialization.hpp>
 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
 #include <com/sun/star/text/XTextDocument.hpp>
 #include <com/sun/star/text/WrapTextMode.hpp>
 #include <com/sun/star/uno/XComponentContext.hpp>
@@ -100,6 +101,12 @@ void OLEHandler::lcl_attribute(Id rName, Value & rVal)
         {
             uno::Reference< drawing::XShape > xTempShape;
             rVal.getAny() >>= xTempShape;
+
+            // Control shape is handled on a different code path
+            uno::Reference< lang::XServiceInfo > xSInfo( xTempShape, uno::UNO_QUERY_THROW );
+            if(xSInfo->supportsService("com.sun.star.drawing.ControlShape"))
+                break;
+
             if( xTempShape.is() )
             {
                 m_xShape.set( xTempShape );


More information about the Libreoffice-commits mailing list