summaryrefslogtreecommitdiffstats
path: root/cppuhelper/source/paths.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'cppuhelper/source/paths.cxx')
-rw-r--r--cppuhelper/source/paths.cxx15
1 files changed, 13 insertions, 2 deletions
diff --git a/cppuhelper/source/paths.cxx b/cppuhelper/source/paths.cxx
index 0f59fb1272da..79bb929183e4 100644
--- a/cppuhelper/source/paths.cxx
+++ b/cppuhelper/source/paths.cxx
@@ -20,12 +20,14 @@
#include <config_folders.h>
#include <sal/config.h>
+#include <sal/log.hxx>
#include <cassert>
#include <com/sun/star/uno/DeploymentException.hpp>
#include <osl/file.hxx>
#include <osl/module.hxx>
+#include <osl/thread.h>
#include <rtl/ustring.hxx>
#include <sal/types.h>
@@ -62,7 +64,14 @@ OUString cppu::getUnoIniUri() {
// clean here is hardish.
OUString uri("file:///assets/program");
#else
- OUString uri(get_this_libpath());
+
+ OUString uri;
+ static const char* uno_home = getenv("UNO_HOME");
+ if (!uno_home)
+ uri = get_this_libpath();
+ else
+ uri = OStringToOUString(uno_home, osl_getThreadTextEncoding());
+
#ifdef MACOSX
// We keep both the LO and URE dylibs directly in "Frameworks"
// (that is, LIBO_LIB_FOLDER) and rc files in "Resources"
@@ -77,7 +86,9 @@ OUString cppu::getUnoIniUri() {
}
#endif
#endif
- return uri + "/" SAL_CONFIGFILE("uno");
+ uri += "/" SAL_CONFIGFILE("uno");
+ SAL_INFO("cppuhelper", "expected uno config: " << uri);
+ return uri;
}
bool cppu::nextDirectoryItem(osl::Directory & directory, OUString * url) {