diff options
| author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2019-01-10 07:38:59 +0100 |
|---|---|---|
| committer | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2019-03-11 12:12:53 +0100 |
| commit | 8d5c15d1684e41ee2fa0838001278997208df0ea (patch) | |
| tree | 19f0e01f96180670530b5b3e014808769f8c8369 /vcl/headless | |
| parent | 0daf6377d4316374f2306d54b84515ba1d06c45d (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.
Reviewed-on: https://gerrit.libreoffice.org/68645
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
(cherry picked from commit ffc0493902542277211d2653bf7bc81186df83fc)
Change-Id: Id02111e8aed4648e5a306b0f5dbc9a02c9b2fcb0
Diffstat (limited to 'vcl/headless')
| -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 26b0312ed74a..75dd5995c28b 100644 --- a/vcl/headless/svpgdi.cxx +++ b/vcl/headless/svpgdi.cxx @@ -25,6 +25,8 @@ #include <headless/CustomWidgetDraw.hxx> #include <saldatabasic.hxx> +#include <FileDefinitionWidgetDraw.hxx> + #include <o3tl/safeint.hxx> #include <vcl/sysdata.hxx> #include <config_cairo_canvas.h> @@ -560,7 +562,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)); } |
