From a32dea330e5767a68754b19f6005a78618765c1a Mon Sep 17 00:00:00 2001 From: Jan Holesovsky <kendy@collabora.com> Date: Fri, 9 Nov 2018 19:20:31 +0100 Subject: custom widgets: Use only with LibreOfficeKit. Change-Id: I9f8f25ee72e93fdf575312b6b0c5d32be9ea45cc --- vcl/headless/svpgdi.cxx | 4 +++- vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx | 3 --- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'vcl') diff --git a/vcl/headless/svpgdi.cxx b/vcl/headless/svpgdi.cxx index 39f9176a8d64..0ae7cbd6ba11 100644 --- a/vcl/headless/svpgdi.cxx +++ b/vcl/headless/svpgdi.cxx @@ -41,6 +41,7 @@ #include <basegfx/matrix/b2dhommatrix.hxx> #include <basegfx/utils/systemdependentdata.hxx> #include <basegfx/matrix/b2dhommatrixtools.hxx> +#include <comphelper/lok.hxx> #include <unx/gendata.hxx> #if ENABLE_CAIRO_CANVAS @@ -600,7 +601,8 @@ SvpSalGraphics::SvpSalGraphics() , m_ePaintMode(PaintMode::Over) , m_aTextRenderImpl(*this) { - m_pWidgetDraw.reset(new vcl::CustomWidgetDraw(*this)); + if (comphelper::LibreOfficeKit::isActive()) + m_pWidgetDraw.reset(new vcl::CustomWidgetDraw(*this)); } SvpSalGraphics::~SvpSalGraphics() diff --git a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx index af2b5fd0e1a0..31c665e1af05 100644 --- a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx +++ b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx @@ -3389,9 +3389,6 @@ GtkSalGraphics::GtkSalGraphics( GtkSalFrame *pFrame, GtkWidget *pWindow ) mpFrame( pFrame ), mpWindow( pWindow ) { - /* Set Custom Widget Draw*/ - m_pWidgetDraw.reset(new vcl::CustomWidgetDraw(*this)); - if (style_loaded) return; -- cgit