diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2020-12-08 15:15:47 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2020-12-08 16:43:25 +0100 |
commit | 71a1ea29b8793a8db012dd3452ef0dd87f1be36a (patch) | |
tree | ec18a37124e34c6086793c08ffa400786172ec43 /emfio | |
parent | 5fa2182d3b5c79bc4cf8ec9621228ddc00283a1f (diff) |
emfio: allow disabling EMF+ via a bootstrap variable
Bootstrap variables have multiple sources, so the environment variable
way continues to work. This also allows disabling EMF+ using the
-env:EMF_PLUS_DISABLE=1 cmdline parameter, which is useful when soffice
is not started in a shell.
Change-Id: I76e82b77d70910ba4843db6ab998b0b1ea4a31f5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107421
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'emfio')
-rw-r--r-- | emfio/source/reader/emfreader.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/emfio/source/reader/emfreader.cxx b/emfio/source/reader/emfreader.cxx index b1d3ae4394da..69916939fa26 100644 --- a/emfio/source/reader/emfreader.cxx +++ b/emfio/source/reader/emfreader.cxx @@ -26,6 +26,7 @@ #include <memory> #include <vcl/graph.hxx> #include <vcl/pdfread.hxx> +#include <rtl/bootstrap.hxx> #ifdef DBG_UTIL #include <vcl/pngwrite.hxx> @@ -799,7 +800,9 @@ namespace emfio bool bStatus = ReadHeader(); bool bHaveDC = false; - static bool bEnableEMFPlus = ( getenv( "EMF_PLUS_DISABLE" ) == nullptr ); + OUString aEMFPlusDisable; + rtl::Bootstrap::get("EMF_PLUS_DISABLE", aEMFPlusDisable); + bool bEnableEMFPlus = aEMFPlusDisable.isEmpty(); SAL_INFO("emfio", "EMF_PLUS_DISABLE is " << (bEnableEMFPlus ? "enabled" : "disabled")); |