From 81ad1652136f48cd3bc7f9de32f506a840d0751e Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Sun, 28 Aug 2011 15:36:26 +0300 Subject: Get the file: URIs right --- i18npool/qa/cppunit/i18npool_cppunittester_all.cxx | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) (limited to 'i18npool') diff --git a/i18npool/qa/cppunit/i18npool_cppunittester_all.cxx b/i18npool/qa/cppunit/i18npool_cppunittester_all.cxx index 3a5d2827cf48..f56002f16ec3 100644 --- a/i18npool/qa/cppunit/i18npool_cppunittester_all.cxx +++ b/i18npool/qa/cppunit/i18npool_cppunittester_all.cxx @@ -43,6 +43,7 @@ #include "rtl/string.h" #include "rtl/string.hxx" #include "rtl/textcvt.h" +#include "rtl/uri.hxx" #include "rtl/ustrbuf.hxx" #include "rtl/ustring.hxx" #include "sal/main.h" @@ -124,20 +125,16 @@ SAL_IMPLEMENT_MAIN() { rtl::OUString sServices(RTL_CONSTASCII_USTRINGPARAM("UNO_SERVICES")); rtl::OUString sTypes(RTL_CONSTASCII_USTRINGPARAM("UNO_TYPES")); - rtl::OUString sBrandLocation(RTL_CONSTASCII_USTRINGPARAM("$BRAND_BASE_DIR/")); + rtl::OUString base; + osl::Module::getUrlFromAddress((oslGenericFunction)sal_main, base); - rtl::Bootstrap::expandMacros(sBrandLocation); - - rtl::OUString sServicesValue = rtl::OUStringBuffer(sBrandLocation) - . append(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("services.rdb"))).makeStringAndClear(); + rtl::OUString sServicesValue = rtl::Uri::convertRelToAbs(base, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("services.rdb"))); osl_setEnvironment(sServices.pData, sServicesValue.pData); - rtl::OUString sTypesValue = rtl::OUStringBuffer(sBrandLocation) - .append(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("types.rdb"))) - .append(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" "))) - .append(sBrandLocation) - .append(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("udkapi.rdb"))) - .toString(); + rtl::OUString sTypesValue = + rtl::Uri::convertRelToAbs(base, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("types.rdb"))) + + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" ")) + + rtl::Uri::convertRelToAbs(base, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("udkapi.rdb"))); osl_setEnvironment(sTypes.pData, sTypesValue.pData); TestPlugInSignature plugs[] = { -- cgit