emfio/source/reader/emfreader.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
New commits: commit 71a1ea29b8793a8db012dd3452ef0dd87f1be36a Author: Miklos Vajna <[email protected]> AuthorDate: Tue Dec 8 15:15:47 2020 +0100 Commit: Miklos Vajna <[email protected]> CommitDate: Tue Dec 8 16:43:25 2020 +0100 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 <[email protected]> Tested-by: Jenkins 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")); _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
