[Libreoffice-commits] core.git: Branch 'distro/vector/vector-7.0' - emfio/source
Miklos Vajna (via logerrit)
logerrit at kemper.freedesktop.org
Tue Dec 8 14:18:21 UTC 2020
emfio/source/reader/emfreader.cxx | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
New commits:
commit a9b042dd4554764eb5cef336c35d615d009806d6
Author: Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Tue Dec 8 15:15:47 2020 +0100
Commit: Miklos Vajna <vmiklos at collabora.com>
CommitDate: Tue Dec 8 15:17:22 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.
Conflicts:
emfio/source/reader/emfreader.cxx
Change-Id: I76e82b77d70910ba4843db6ab998b0b1ea4a31f5
diff --git a/emfio/source/reader/emfreader.cxx b/emfio/source/reader/emfreader.cxx
index 5d2749d16356..c9dd15bc1879 100644
--- a/emfio/source/reader/emfreader.cxx
+++ b/emfio/source/reader/emfreader.cxx
@@ -24,6 +24,7 @@
#include <o3tl/safeint.hxx>
#include <tools/stream.hxx>
#include <memory>
+#include <rtl/bootstrap.hxx>
#ifdef DBG_UTIL
#include <vcl/pngwrite.hxx>
@@ -724,7 +725,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"));
More information about the Libreoffice-commits
mailing list