summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--framework/source/services/substitutepathvars.cxx4
-rw-r--r--unotest/source/python/org/libreoffice/unotest.py9
2 files changed, 3 insertions, 10 deletions
diff --git a/framework/source/services/substitutepathvars.cxx b/framework/source/services/substitutepathvars.cxx
index 67fde1a9e92e..3a55a2dd324a 100644
--- a/framework/source/services/substitutepathvars.cxx
+++ b/framework/source/services/substitutepathvars.cxx
@@ -1250,7 +1250,9 @@ void SubstitutePathVariables::SetPredefinedPathVariables()
//TODO: Is that still the case? (With OOo 3.4, "unopkg sync" was run as part
// of the setup. Then no user installation was required.)
//Therefore we do not assert here.
- if( aState == ::utl::Bootstrap::PATH_EXISTS ) {
+ // 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")) {
m_aPreDefVars.m_FixedVar[ PREDEFVAR_USERPATH ] = ConvertOSLtoUCBURL( sVal );
}
diff --git a/unotest/source/python/org/libreoffice/unotest.py b/unotest/source/python/org/libreoffice/unotest.py
index 1991b79d29da..4ae21c1f7ac8 100644
--- a/unotest/source/python/org/libreoffice/unotest.py
+++ b/unotest/source/python/org/libreoffice/unotest.py
@@ -174,15 +174,6 @@ class UnoInProcess:
def getDoc(self):
return self.xDoc
def setUp(self):
- # set UserInstallation to user profile dir in test/user-template:
- path = os.getenv("WORKDIR")
- if os.name == "nt":
- # do not quote drive letter - it must be "X:"
- url = "file:///" + path
- else:
- url = "file://" + quote(path)
- os.putenv("UserInstallation", url + "/unittest")
-
self.xContext = pyuno.getComponentContext()
pyuno.private_initTestEnvironment()
def openEmptyWriterDoc(self):