[Libreoffice-commits] core.git: emfio/source

Miklos Vajna (via logerrit) logerrit at kemper.freedesktop.org
Tue Dec 8 15:44:06 UTC 2020


 emfio/source/reader/emfreader.cxx |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 71a1ea29b8793a8db012dd3452ef0dd87f1be36a
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 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 <vmiklos at collabora.com>
    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"));
 


More information about the Libreoffice-commits mailing list