diff options
-rw-r--r-- | scripting/source/provider/URIHelper.cxx | 9 | ||||
-rw-r--r-- | scripting/source/pyprov/pythonscript.py | 2 |
2 files changed, 6 insertions, 5 deletions
diff --git a/scripting/source/provider/URIHelper.cxx b/scripting/source/provider/URIHelper.cxx index d155d0d70d9b..3fcad686ac59 100644 --- a/scripting/source/provider/URIHelper.cxx +++ b/scripting/source/provider/URIHelper.cxx @@ -52,12 +52,12 @@ static const char SHARE_URI[] = "vnd.sun.star.expand:${$BRAND_BASE_DIR/program/" SAL_CONFIGFILE( "bootstrap") "::BaseInstallation}"; static const char SHARE_UNO_PACKAGES[] = "share:uno_packages"; -static const char SHARE_UNO_PACKAGES_DIR[] = - "/share/uno_packages/cache"; +static const char SHARE_UNO_PACKAGES_URI[] = + "vnd.sun.star.expand:$UNO_SHARED_PACKAGES_CACHE"; static const char USER[] = "user"; static const char USER_URI[] = - "vnd.sun.star.expand:${$BRAND_BASE_DIR/program/" SAL_CONFIGFILE( "bootstrap") ":::UserInstallation}"; + "vnd.sun.star.expand:${$BRAND_BASE_DIR/program/" SAL_CONFIGFILE( "bootstrap") "::UserInstallation}"; static const char USER_UNO_PACKAGES[] = "user:uno_packages"; static const char USER_UNO_PACKAGES_DIR[] = @@ -164,8 +164,7 @@ ScriptingFrameworkURIHelper::initBaseURI() else if (m_sLocation.equalsAscii(SHARE_UNO_PACKAGES)) { test = OUString::createFromAscii("uno_packages"); - uri = OUString::createFromAscii(SHARE_URI); - uri = uri.concat(OUString::createFromAscii(SHARE_UNO_PACKAGES_DIR)); + uri = OUString::createFromAscii(SHARE_UNO_PACKAGES_URI); } else if (m_sLocation.indexOf(OUString::createFromAscii(TDOC_SCHEME)) == 0) { diff --git a/scripting/source/pyprov/pythonscript.py b/scripting/source/pyprov/pythonscript.py index bcc6f6c85541..9580f2ca9beb 100644 --- a/scripting/source/pyprov/pythonscript.py +++ b/scripting/source/pyprov/pythonscript.py @@ -662,6 +662,8 @@ def expandUri( uri ): uri = uri.replace( "vnd.sun.star.expand:", "",1) uri = uno.getComponentContext().getByName( "/singletons/com.sun.star.util.theMacroExpander" ).expandMacros( uri ) + if uri.startswith( "file:" ): + uri = uno.absolutize("",uri) # necessary to get rid of .. in uri return uri #-------------------------------------------------------------- |