summaryrefslogtreecommitdiff
path: root/writerfilter/source/dmapper/OLEHandler.cxx
diff options
context:
space:
mode:
authorTamás Zolnai <tamas.zolnai@collabora.com>2017-08-09 21:43:09 +0200
committerTamás Zolnai <tamas.zolnai@collabora.com>2017-08-10 02:26:05 +0200
commit368b583b992f2e9cad46c2362c9529a07c36d7a9 (patch)
tree1074851ebde990cafae61f6efd409f29a9eb7376 /writerfilter/source/dmapper/OLEHandler.cxx
parent622347b913dd0aedaec1d0a4658e5dc7801f6bde (diff)
Avoid warning in OleHandler
Related to ActiveX controls. Change-Id: Ief7ee67ca8e4f086a1d5e0400d0eaf3ebc8cdaaf Reviewed-on: https://gerrit.libreoffice.org/40934 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Diffstat (limited to 'writerfilter/source/dmapper/OLEHandler.cxx')
-rw-r--r--writerfilter/source/dmapper/OLEHandler.cxx7
1 files changed, 7 insertions, 0 deletions
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 );