[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - framework/source

Pranav Kant pranavk at collabora.co.uk
Tue Oct 3 08:01:37 UTC 2017


 framework/source/services/substitutepathvars.cxx |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit c04499bce3783b39b3636db4ff8b2807424ee497
Author: Pranav Kant <pranavk at collabora.co.uk>
Date:   Tue Oct 3 11:48:34 2017 +0530

    framework, lok: It's okay to have valid non-existent user inst. path
    
    Change-Id: I3b9f00adb76fc702e1847d9fab866b7796cfd942
    Reviewed-on: https://gerrit.libreoffice.org/43061
    Reviewed-by: Jan Holesovsky <kendy at collabora.com>
    Tested-by: Jenkins <ci at libreoffice.org>
    (cherry picked from commit 9127d1a89cbfba89eb9df6755ea7b9e161cfc67a)
    Reviewed-on: https://gerrit.libreoffice.org/43064
    Tested-by: Jan Holesovsky <kendy at collabora.com>

diff --git a/framework/source/services/substitutepathvars.cxx b/framework/source/services/substitutepathvars.cxx
index 0bbc05563b8d..bda288e26097 100644
--- a/framework/source/services/substitutepathvars.cxx
+++ b/framework/source/services/substitutepathvars.cxx
@@ -19,6 +19,7 @@
 
 #include <config_folders.h>
 
+#include <comphelper/lok.hxx>
 #include <cppuhelper/basemutex.hxx>
 #include <cppuhelper/compbase.hxx>
 #include <cppuhelper/supportsservice.hxx>
@@ -638,7 +639,10 @@ void SubstitutePathVariables::SetPredefinedPathVariables()
     //Therefore we do not assert here.
     // It's not possible to detect when an empty value would actually be used.
     // (note: getenv is a hack to detect if we're running in a unit test)
-    if (aState == ::utl::Bootstrap::PATH_EXISTS || getenv("SRC_ROOT")) {
+    // Also, it's okay to have an empty user installation path in case of LOK
+    if (aState == ::utl::Bootstrap::PATH_EXISTS || getenv("SRC_ROOT") ||
+        (comphelper::LibreOfficeKit::isActive() && aState == ::utl::Bootstrap::PATH_VALID))
+    {
         m_aPreDefVars.m_FixedVar[ PREDEFVAR_USERPATH ] = sVal;
     }
 


More information about the Libreoffice-commits mailing list