diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2019-01-10 07:38:59 +0100 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2019-03-04 12:29:02 +0100 |
commit | ffc0493902542277211d2653bf7bc81186df83fc (patch) | |
tree | ca2dcfb6278f3a722d01210a906c91ff7dda4b1e /vcl/headless/svpgdi.cxx | |
parent | 3fc464ae8571f1eb4df3556149914848fd9c8e9d (diff) |
WidgetDrawInterface impl. to draw widgets from file definitions
This adds FileDefinitionWidgetDraw which extends the
WidgetDrawInterface and is responsible to draw the widgets from
the definition gathered from an external file. The file must be
(currently) in the user folder named definition.xml.
It instantiates the WidgetDefinitionReader to get the definitions
and sets the style colors when updateSettings is called. Later
more definitions will be implemented.
Change-Id: Id02111e8aed4648e5a306b0f5dbc9a02c9b2fcb0
Reviewed-on: https://gerrit.libreoffice.org/68645
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'vcl/headless/svpgdi.cxx')
-rw-r--r-- | vcl/headless/svpgdi.cxx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/vcl/headless/svpgdi.cxx b/vcl/headless/svpgdi.cxx index fafa73fa3c56..a2b7e7933c22 100644 --- a/vcl/headless/svpgdi.cxx +++ b/vcl/headless/svpgdi.cxx @@ -27,6 +27,8 @@ #include <headless/CustomWidgetDraw.hxx> #include <saldatabasic.hxx> +#include <FileDefinitionWidgetDraw.hxx> + #include <sal/log.hxx> #include <tools/helpers.hxx> #include <o3tl/safeint.hxx> @@ -599,7 +601,11 @@ SvpSalGraphics::SvpSalGraphics() , m_ePaintMode(PaintMode::Over) , m_aTextRenderImpl(*this) { - if (comphelper::LibreOfficeKit::isActive()) + bool bFileDefinitionsWidgetDraw = !!getenv("VCL_DRAW_WIDGETS_FROM_FILE"); + + if (bFileDefinitionsWidgetDraw) + m_pWidgetDraw.reset(new vcl::FileDefinitionWidgetDraw(*this)); + else if (comphelper::LibreOfficeKit::isActive()) m_pWidgetDraw.reset(new vcl::CustomWidgetDraw(*this)); } |