diff options
author | Norbert Thiebaud <nthiebaud@gmail.com> | 2012-06-01 06:17:05 -0500 |
---|---|---|
committer | Norbert Thiebaud <nthiebaud@gmail.com> | 2012-06-01 06:30:57 -0500 |
commit | 55bfc3b62a0ffd38bec682b03856505cf8cb7172 (patch) | |
tree | ed285b9fa4a66f3621f1e7fea7e6b72fec931c93 /sal | |
parent | 08dedb5ea1acf78ab355c5444ab68a3dc522b1a4 (diff) |
targeted string re-work
Change-Id: I6b23bd671c3c090a7c3b60d5301c59da5f9354d5
Diffstat (limited to 'sal')
-rw-r--r-- | sal/qa/rtl/bootstrap/rtl_Bootstrap.cxx | 122 | ||||
-rw-r--r-- | sal/test/unloading/samplelib1.cxx | 48 | ||||
-rw-r--r-- | sal/test/unloading/samplelib2.cxx | 36 | ||||
-rw-r--r-- | sal/workben/t_osl_getVolInfo.cxx | 12 | ||||
-rw-r--r-- | sal/workben/t_osl_joinProcess.cxx | 6 |
5 files changed, 109 insertions, 115 deletions
diff --git a/sal/qa/rtl/bootstrap/rtl_Bootstrap.cxx b/sal/qa/rtl/bootstrap/rtl_Bootstrap.cxx index 38ffcd44026f..8f6c929c23bc 100644 --- a/sal/qa/rtl/bootstrap/rtl_Bootstrap.cxx +++ b/sal/qa/rtl/bootstrap/rtl_Bootstrap.cxx @@ -94,7 +94,7 @@ inline ::rtl::OUString getModulePath( void ) suDirPath = suDirPath.copy( 0, suDirPath.lastIndexOf('/') ); suDirPath = suDirPath.copy( 0, suDirPath.lastIndexOf('/') + 1); - suDirPath += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("bin")); + suDirPath += rtl::OUString("bin"); return suDirPath; } @@ -121,12 +121,12 @@ inline rtl::OUString t_getSourcePath(rtl::OString const& _sFilename) { rtl::OUString aDirURL(getExecutableDirectory()); - aDirURL += OUString(RTL_CONSTASCII_USTRINGPARAM("/")); + aDirURL += OUString("/"); aDirURL += OUString::createFromAscii( _sFilename.getStr() ); #if defined(WNT) - aDirURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".ini")); + aDirURL += rtl::OUString(".ini"); #else - aDirURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("rc")); + aDirURL += rtl::OUString("rc"); #endif return aDirURL; } @@ -211,7 +211,7 @@ namespace rtl_Bootstrap { Bootstrap aBootstrap; rtl::OUString suValue; - rtl::OUString suValuename (RTL_CONSTASCII_USTRINGPARAM("SOLAR_JAVA")); + rtl::OUString suValuename ("SOLAR_JAVA"); //aBootstrap.getFrom( suValuename, suValue ); aBootstrap.getFrom( suValuename, suValue ); sal_Char * pStr = getenv("SOLAR_JAVA"); @@ -223,7 +223,7 @@ namespace rtl_Bootstrap { Bootstrap aBootstrap; rtl::OUString suValue; - rtl::OUString suValuename (RTL_CONSTASCII_USTRINGPARAM("SRC_ROOT")); + rtl::OUString suValuename ("SRC_ROOT"); //aBootstrap.getFrom( suValuename, suValue ); aBootstrap.getFrom( suValuename, suValue ); sal_Char * pStr = getenv("SRC_ROOT"); @@ -244,7 +244,7 @@ namespace rtl_Bootstrap rtl::OUString suIniname = t_getSourcePath(TESTSHL2_INI); Bootstrap aBootstrap( suIniname ); rtl::OUString suGetname; - rtl::OUString suValuename (RTL_CONSTASCII_USTRINGPARAM("INHERITED_VALUE")); + rtl::OUString suValuename ("INHERITED_VALUE"); aBootstrap.getFrom( suValuename, suGetname ); printUString( suGetname ); CPPUNIT_ASSERT_MESSAGE("get the value of a variable in ini file.", suGetname.getLength() != 0 ); @@ -256,8 +256,8 @@ namespace rtl_Bootstrap rtl::OUString suIniname = t_getSourcePath(TESTSHL2_INI); Bootstrap aBootstrap( suIniname ); rtl::OUString suGetname; - rtl::OUString suValuename(RTL_CONSTASCII_USTRINGPARAM("MY_VALUE")); - rtl::OUString myDefault(RTL_CONSTASCII_USTRINGPARAM("2")); + rtl::OUString suValuename("MY_VALUE"); + rtl::OUString myDefault("2"); aBootstrap.getFrom( suValuename, suGetname, myDefault ); CPPUNIT_ASSERT_MESSAGE("getFrom use default.", suGetname.compareTo( myDefault ) == 0 ); } @@ -274,26 +274,26 @@ namespace rtl_Bootstrap aBootstrap.getIniName( suGetIniName ); printUString(suGetIniName, "Current bootstrap file"); - sal_Int32 nIndex = suGetIniName.indexOf(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("pseudo"))); + sal_Int32 nIndex = suGetIniName.indexOf(rtl::OUString("pseudo")); CPPUNIT_ASSERT_MESSAGE("ini name must have 'pseudo' in name.", nIndex > 0); rtl::OUString suValue; - rtl::OUString suKeyName(RTL_CONSTASCII_USTRINGPARAM("FILE")); + rtl::OUString suKeyName("FILE"); aBootstrap.getFrom( suKeyName, suValue ); printUString( suValue ); - sal_Int32 nCompare = suValue.compareTo( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("pseudo file")) ); + sal_Int32 nCompare = suValue.compareTo( rtl::OUString("pseudo file") ); CPPUNIT_ASSERT_MESSAGE("<Bootstrap('pseudo')>.getFrom('FILE', ...) result is unexpected.", nCompare == 0); } void getFrom_004_1() { // get the same key out of the default context - rtl::OUString suKeyName(RTL_CONSTASCII_USTRINGPARAM("FILE")); + rtl::OUString suKeyName("FILE"); rtl::OUString suGetValue; Bootstrap::get( suKeyName, suGetValue ); printUString( suGetValue ); - CPPUNIT_ASSERT_MESSAGE("Bootstrap::get('FILE', ...)", suGetValue.compareTo( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("testshl2 file")) ) == 0 ); + CPPUNIT_ASSERT_MESSAGE("Bootstrap::get('FILE', ...)", suGetValue.compareTo( rtl::OUString("testshl2 file") ) == 0 ); } /** helper function: return the child process's ret value( typedef sal_uInt32 oslProcessExitCode;) @@ -304,14 +304,14 @@ namespace rtl_Bootstrap rtl::OUString suCWD = getModulePath(); oslProcess hProcess = NULL; rtl::OUString suFileURL = suCWD; - suFileURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")) + rtl::OUString::createFromAscii(process_name) ; + suFileURL += rtl::OUString("/") + rtl::OUString::createFromAscii(process_name) ; #if defined(WNT) - suFileURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".exe")); + suFileURL += rtl::OUString(".exe"); #endif const int nParameterCount = 3; rtl_uString* pParameters[ nParameterCount ]; OUString suFlag( OUString::createFromAscii(flag) ); - OUString suEnv1( RTL_CONSTASCII_USTRINGPARAM("-env:UNO_SERVICES=service.rdb") ); + OUString suEnv1( "-env:UNO_SERVICES=service.rdb" ); OUString suIniname = t_getSourcePath("rtl"); printUString( suIniname, "rtl path:"); @@ -446,7 +446,7 @@ namespace rtl_Bootstrap Bootstrap::setIniFilename( suIniname ); rtl::OUString suGetname; - rtl::OUString suValuename(RTL_CONSTASCII_USTRINGPARAM("INHERITED_VALUE")); + rtl::OUString suValuename("INHERITED_VALUE"); Bootstrap::get( suValuename, suGetname ); printUString( suGetname ); CPPUNIT_ASSERT_MESSAGE("setIniFilename and get value of the argument.", suGetname.getLength() != 0 ); @@ -486,7 +486,7 @@ namespace rtl_Bootstrap CPPUNIT_ASSERT_MESSAGE("getHandle return NULL!", bsHandle != 0); rtl::OUString suValue; - rtl::OUString suKeyName(RTL_CONSTASCII_USTRINGPARAM("PSEUDOFILE")); + rtl::OUString suKeyName("PSEUDOFILE"); rtl_bootstrap_get_from_handle(bsHandle, suKeyName.pData, &suValue.pData, NULL); printUString( suValue); @@ -516,8 +516,8 @@ namespace rtl_Bootstrap //in ini fle, INHERITED_VALUE=inherited_value rtl::OUString suIniname = t_getSourcePath(TESTSHL2_INI); Bootstrap aBootstrap( suIniname); - rtl::OUString suName(RTL_CONSTASCII_USTRINGPARAM("INHERITED_VALUE")); - rtl::OUString suValue(RTL_CONSTASCII_USTRINGPARAM("ok")); + rtl::OUString suName("INHERITED_VALUE"); + rtl::OUString suValue("ok"); // set to another value Bootstrap::set( suName, suValue ); rtl::OUString suGetValue; @@ -528,13 +528,13 @@ namespace rtl_Bootstrap { rtl::OUString suIniname = t_getSourcePath(TESTSHL2_INI); Bootstrap myBootstrap( suIniname); - rtl::OUString suName(RTL_CONSTASCII_USTRINGPARAM("INHERITED_VALUE")); + rtl::OUString suName("INHERITED_VALUE"); rtl::OUString suGetOrientValue; Bootstrap::get( suName, suGetOrientValue); // ?? INHERITED_VALUE = ok now, which is set in set_001 printUString( suGetOrientValue ); - rtl::OUString suValue(RTL_CONSTASCII_USTRINGPARAM( TESTSHL2_INI )); + rtl::OUString suValue( TESTSHL2_INI ); // set to another value Bootstrap::set( suName, suValue ); rtl::OUString suGetValue; @@ -562,10 +562,10 @@ namespace rtl_Bootstrap { rtl::OUString suIniname = t_getSourcePath(TESTSHL2_INI); Bootstrap aBootstrap( suIniname); - rtl::OUString suMacro(RTL_CONSTASCII_USTRINGPARAM("$MYVAR/expand1")); + rtl::OUString suMacro("$MYVAR/expand1"); //expandMacro now aBootstrap.expandMacrosFrom( suMacro ); - rtl::OUString suExpectedMacro(RTL_CONSTASCII_USTRINGPARAM("src680_test/expand1")); + rtl::OUString suExpectedMacro("src680_test/expand1"); CPPUNIT_ASSERT_MESSAGE("expandMacrosFrom failed.", suMacro.compareTo(suExpectedMacro) == 0 ); } @@ -583,26 +583,26 @@ namespace rtl_Bootstrap t_print("inifile is:"); printUString( suIniname ); Bootstrap aBootstrap( suIniname) ; - rtl::OUString suMacro(RTL_CONSTASCII_USTRINGPARAM("${")); //rtlrc:Bootstrap:RTLVALUE}"); + rtl::OUString suMacro("${"); //rtlrc:Bootstrap:RTLVALUE}"); - rtl::OUString aDirURL(RTL_CONSTASCII_USTRINGPARAM("$ORIGIN")); - aDirURL += OUString(RTL_CONSTASCII_USTRINGPARAM("/")); - aDirURL += OUString(RTL_CONSTASCII_USTRINGPARAM("rtl")); + rtl::OUString aDirURL("$ORIGIN"); + aDirURL += OUString("/"); + aDirURL += OUString("rtl"); #if defined(WNT) - aDirURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".ini")); + aDirURL += rtl::OUString(".ini"); #else - aDirURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("rc")); + aDirURL += rtl::OUString("rc"); #endif suMacro += aDirURL;//t_getSourcePath("rtl"); - suMacro += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("::RTLVALUE}")); + suMacro += rtl::OUString("::RTLVALUE}"); t_print("created macro is: "); printUString( suMacro ); aBootstrap.expandMacrosFrom( suMacro ); t_print("expanded macro is:"); printUString( suMacro ); - rtl::OUString suExpectedMacro(RTL_CONSTASCII_USTRINGPARAM("qadev17")); + rtl::OUString suExpectedMacro("qadev17"); CPPUNIT_ASSERT_MESSAGE("failed, can't expand '${file:///.../" SAL_CONFIGFILE("rtl") "::RTLVALUE}' to 'qadev17'", suMacro.compareTo(suExpectedMacro) == 0 ); } void expandMacrosFrom_002_1() @@ -614,19 +614,19 @@ namespace rtl_Bootstrap rtl::OUString suMacro; // just a simple test, if this really work. - aBootstrap.getFrom(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SOFROMVALUE2")), suMacro ); + aBootstrap.getFrom(rtl::OUString("SOFROMVALUE2"), suMacro ); t_print("SOFROMVALUE2:"); printUString( suMacro ); CPPUNIT_ASSERT_MESSAGE("'SOFROMVALUE2' seems to do not exist.", suMacro.getLength() > 0 ); - aBootstrap.getFrom(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SOFROMVALUE")), suMacro ); + aBootstrap.getFrom(rtl::OUString("SOFROMVALUE"), suMacro ); t_print("SOFROMVALUE:"); printUString( suMacro ); //expandMacro now // seems to be, that getFrom() already expand the string - rtl::OUString suExpectedMacro(RTL_CONSTASCII_USTRINGPARAM("src680_qadev")); + rtl::OUString suExpectedMacro("src680_qadev"); CPPUNIT_ASSERT_MESSAGE("failed, can't expand '${" SAL_CONFIGFILE("rtl") "::SOVALUE}' to 'src680_qadev'", suMacro.compareTo(suExpectedMacro) == 0 ); } void expandMacrosFrom_002_2() @@ -640,7 +640,7 @@ namespace rtl_Bootstrap Bootstrap aBootstrap( suIniname); rtl::OUString suMacro; - aBootstrap.getFrom(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SOFROMVALUE3")), suMacro ); + aBootstrap.getFrom(rtl::OUString("SOFROMVALUE3"), suMacro ); t_print("SOFROMVALUE3:"); printUString( suMacro ); @@ -659,10 +659,10 @@ namespace rtl_Bootstrap rtl::OUString suIniname = t_getSourcePath(TESTSHL2_INI); Bootstrap aBootstrap( suIniname); rtl::OUString suMacro[4]; - suMacro[0] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("$SYSUSERCONFIG")); - suMacro[1] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("$SYSUSERHOME")); - suMacro[2] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("$SYSBINDIR")); - suMacro[3] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("$ORIGIN")); + suMacro[0] = rtl::OUString("$SYSUSERCONFIG"); + suMacro[1] = rtl::OUString("$SYSUSERHOME"); + suMacro[2] = rtl::OUString("$SYSBINDIR"); + suMacro[3] = rtl::OUString("$ORIGIN"); for ( int i = 0; i < 4; i++ ) { @@ -676,34 +676,28 @@ namespace rtl_Bootstrap } void testRecursion() { - rtl::OUString t(RTL_CONSTASCII_USTRINGPARAM("$RECURSIVE")); + rtl::OUString t("$RECURSIVE"); Bootstrap(t_getSourcePath(TESTSHL2_INI)).expandMacrosFrom(t); CPPUNIT_ASSERT_MESSAGE( "recursion detection", t == "***RECURSION DETECTED***" ); } void testLink() { - rtl::OUString t(RTL_CONSTASCII_USTRINGPARAM("$LINKED")); + rtl::OUString t("$LINKED"); Bootstrap(t_getSourcePath(TESTSHL2_INI)).expandMacrosFrom(t); CPPUNIT_ASSERT_MESSAGE( "link file", t == "qadev17"); } void testOverride() { - rtl::OUString t1( - RTL_CONSTASCII_USTRINGPARAM( - "${.override:$ORIGIN/" SAL_CONFIGFILE("rtl") ":ORIGIN}")); + rtl::OUString t1( "${.override:$ORIGIN/" SAL_CONFIGFILE("rtl" ":ORIGIN}")); Bootstrap(t_getSourcePath("rtl")).expandMacrosFrom(t1); CPPUNIT_ASSERT_MESSAGE( "override ORIGIN", t1 == "direct" ); - rtl::OUString t2( - RTL_CONSTASCII_USTRINGPARAM( - "${.override:$ORIGIN/" SAL_CONFIGFILE("none") ":MYVAR}")); + rtl::OUString t2( "${.override:$ORIGIN/" SAL_CONFIGFILE("none" ":MYVAR}")); Bootstrap::expandMacros(t2); CPPUNIT_ASSERT_MESSAGE( "override MYVAR", t2 == "src680_test" ); } void testNonexisting() { - rtl::OUString t( - RTL_CONSTASCII_USTRINGPARAM( - "${$ORIGIN/" SAL_CONFIGFILE("none") ":MYVAR}")); + rtl::OUString t( "${$ORIGIN/" SAL_CONFIGFILE("none" ":MYVAR}")); Bootstrap::expandMacros(t); CPPUNIT_ASSERT_MESSAGE( "nonexisting", t == "src680_test" ); } @@ -757,13 +751,13 @@ namespace rtl_Bootstrap { rtl::OUString suIniname = t_getSourcePath(TESTSHL2_INI); Bootstrap aBootstrap( suIniname) ; - rtl::OUString suMacro(RTL_CONSTASCII_USTRINGPARAM("$INHERITED_VALUE/well")); + rtl::OUString suMacro("$INHERITED_VALUE/well"); Bootstrap::expandMacros( suMacro ); - rtl::OUString suName(RTL_CONSTASCII_USTRINGPARAM("INHERITED_VALUE")); + rtl::OUString suName("INHERITED_VALUE"); OUString suGetValue; Bootstrap::get( suName, suGetValue ); - suGetValue += OUString(RTL_CONSTASCII_USTRINGPARAM("/well")); + suGetValue += OUString("/well"); CPPUNIT_ASSERT_MESSAGE("expandMacros failed.", suGetValue.compareTo(suMacro) == 0 ); } @@ -821,9 +815,9 @@ static void create_rtlrc() { rtl::OUString aFileURL(getExecutableDirectory()); #if defined(WNT) - aFileURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/rtl.ini")); + aFileURL += rtl::OUString("/rtl.ini"); #else - aFileURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/rtlrc")); + aFileURL += rtl::OUString("/rtlrc"); #endif rtl::OString sLines; @@ -844,9 +838,9 @@ static void create_testshl2rc() { rtl::OUString aFileURL(getExecutableDirectory()); #if defined(WNT) - aFileURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/testshl2.ini")); + aFileURL += rtl::OUString("/testshl2.ini"); #else - aFileURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/testshl2rc")); + aFileURL += rtl::OUString("/testshl2rc"); #endif rtl::OString sLines; sLines += "[Bootstrap]\n"; @@ -874,7 +868,7 @@ static void create_testshl2rc() removeAndCreateFile( (getExecutableDirectory() + - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/testshl2-link"))), + rtl::OUString("/testshl2-link")), SAL_CONFIGFILE("rtl")); } @@ -884,9 +878,9 @@ static void create_pseudorc() { rtl::OUString aFileURL(getExecutableDirectory()); #if defined(WNT) - aFileURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/pseudo.ini")); + aFileURL += rtl::OUString("/pseudo.ini"); #else - aFileURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/pseudorc")); + aFileURL += rtl::OUString("/pseudorc"); #endif rtl::OString sLines; sLines += "[Bootstrap]\n"; @@ -901,9 +895,9 @@ void create_bootstrap_processrc() { rtl::OUString aDirURL(getModulePath()); #if defined(WNT) - aDirURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/bootstrap_process.ini")); + aDirURL += rtl::OUString("/bootstrap_process.ini"); #else - aDirURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/bootstrap_processrc")); + aDirURL += rtl::OUString("/bootstrap_processrc"); #endif rtl::OString sLines; sLines += "[Bootstrap]\n"; diff --git a/sal/test/unloading/samplelib1.cxx b/sal/test/unloading/samplelib1.cxx index 78835cdcc7fe..19ec2e28c6e1 100644 --- a/sal/test/unloading/samplelib1.cxx +++ b/sal/test/unloading/samplelib1.cxx @@ -106,29 +106,29 @@ static Reference<XInterface> SAL_CALL test1_createInstance(const Reference<XMult throw (RuntimeException) { return Reference<XInterface>( static_cast<XWeak*>( new TestService( - OUString( RTL_CONSTASCII_USTRINGPARAM( IMPLNAME1)), - OUString( RTL_CONSTASCII_USTRINGPARAM( SERVICENAME1)) )), UNO_QUERY); + OUString( IMPLNAME1), + OUString( SERVICENAME1) )), UNO_QUERY); } static Reference<XInterface> SAL_CALL test2_createInstance(const Reference<XMultiServiceFactory> & rSMgr) throw (RuntimeException) { return Reference<XInterface>( static_cast<XWeak*>( new TestService( - OUString( RTL_CONSTASCII_USTRINGPARAM( IMPLNAME2)), - OUString( RTL_CONSTASCII_USTRINGPARAM( SERVICENAME2)) )), UNO_QUERY); + OUString( IMPLNAME2), + OUString( SERVICENAME2) )), UNO_QUERY); } static Reference<XInterface> SAL_CALL test3_createInstance(const Reference<XMultiServiceFactory> & rSMgr) throw (RuntimeException) { return Reference<XInterface>( static_cast<XWeak*>( new TestService( - OUString( RTL_CONSTASCII_USTRINGPARAM( IMPLNAME3)), - OUString( RTL_CONSTASCII_USTRINGPARAM( SERVICENAME3)) )), UNO_QUERY); + OUString( IMPLNAME3), + OUString( SERVICENAME3) )), UNO_QUERY); } static Reference<XInterface> SAL_CALL test4_createInstance(const Reference<XMultiServiceFactory> & rSMgr) throw (RuntimeException) { return Reference<XInterface>( static_cast<XWeak*>( new TestService( - OUString( RTL_CONSTASCII_USTRINGPARAM( IMPLNAME4)), - OUString( RTL_CONSTASCII_USTRINGPARAM( SERVICENAME4)) )), UNO_QUERY); + OUString( IMPLNAME4), + OUString( SERVICENAME4) )), UNO_QUERY); } @@ -142,26 +142,26 @@ extern "C" { { Reference< XRegistryKey > xNewKey( reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey( - OUString(RTL_CONSTASCII_USTRINGPARAM( "/" IMPLNAME1 "/UNO/SERVICES" )) ) ); + OUString( "/" IMPLNAME1 "/UNO/SERVICES" ) ) ); - xNewKey->createKey( OUString( RTL_CONSTASCII_USTRINGPARAM( SERVICENAME1))); + xNewKey->createKey( OUString( SERVICENAME1)); xNewKey= reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey( - OUString(RTL_CONSTASCII_USTRINGPARAM( "/" IMPLNAME2 "/UNO/SERVICES" )) ); + OUString( "/" IMPLNAME2 "/UNO/SERVICES" ) ); - xNewKey->createKey(OUString( RTL_CONSTASCII_USTRINGPARAM( SERVICENAME2))); + xNewKey->createKey(OUString( SERVICENAME2)); xNewKey= reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey( - OUString(RTL_CONSTASCII_USTRINGPARAM( "/" IMPLNAME3 "/UNO/SERVICES" )) ); + OUString( "/" IMPLNAME3 "/UNO/SERVICES" ) ); - xNewKey->createKey(OUString( RTL_CONSTASCII_USTRINGPARAM( SERVICENAME3))); + xNewKey->createKey(OUString( SERVICENAME3)); xNewKey= reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey( - OUString(RTL_CONSTASCII_USTRINGPARAM( "/" IMPLNAME4 "/UNO/SERVICES" )) ); + OUString( "/" IMPLNAME4 "/UNO/SERVICES" ) ); - xNewKey->createKey(OUString( RTL_CONSTASCII_USTRINGPARAM( SERVICENAME4))); + xNewKey->createKey(OUString( SERVICENAME4)); return sal_True; } catch (const InvalidRegistryException &) @@ -177,14 +177,14 @@ extern "C" { void * pRet = 0; - OUString implname1( RTL_CONSTASCII_USTRINGPARAM( IMPLNAME1) ); - OUString serviceName1( RTL_CONSTASCII_USTRINGPARAM( SERVICENAME1) ); - OUString implname2( RTL_CONSTASCII_USTRINGPARAM( IMPLNAME2) ); - OUString serviceName2( RTL_CONSTASCII_USTRINGPARAM( SERVICENAME2) ); - OUString implname3( RTL_CONSTASCII_USTRINGPARAM( IMPLNAME3) ); - OUString serviceName3( RTL_CONSTASCII_USTRINGPARAM( SERVICENAME3) ); - OUString implname4( RTL_CONSTASCII_USTRINGPARAM( IMPLNAME4) ); - OUString serviceName4( RTL_CONSTASCII_USTRINGPARAM( SERVICENAME4) ); + OUString implname1( IMPLNAME1 ); + OUString serviceName1( SERVICENAME1 ); + OUString implname2( IMPLNAME2 ); + OUString serviceName2( SERVICENAME2 ); + OUString implname3( IMPLNAME3 ); + OUString serviceName3( SERVICENAME3 ); + OUString implname4( IMPLNAME4 ); + OUString serviceName4( SERVICENAME4 ); if (implname1.equals( OUString::createFromAscii(pImplName))) { diff --git a/sal/test/unloading/samplelib2.cxx b/sal/test/unloading/samplelib2.cxx index 142472a04cb9..2e7be25aebe0 100644 --- a/sal/test/unloading/samplelib2.cxx +++ b/sal/test/unloading/samplelib2.cxx @@ -103,22 +103,22 @@ static Reference<XInterface> SAL_CALL test21_createInstance(const Reference<XMul throw (RuntimeException) { return Reference<XInterface>( static_cast<XWeak*>( new TestService( - OUString( RTL_CONSTASCII_USTRINGPARAM( IMPLNAME1)), - OUString( RTL_CONSTASCII_USTRINGPARAM( SERVICENAME1)) )), UNO_QUERY); + OUString( IMPLNAME1), + OUString( SERVICENAME1) )), UNO_QUERY); } static Reference<XInterface> SAL_CALL test22_createInstance(const Reference<XMultiServiceFactory> & rSMgr) throw (RuntimeException) { return Reference<XInterface>( static_cast<XWeak*>( new TestService( - OUString( RTL_CONSTASCII_USTRINGPARAM( IMPLNAME2)), - OUString( RTL_CONSTASCII_USTRINGPARAM( SERVICENAME2)) )), UNO_QUERY); + OUString( IMPLNAME2), + OUString( SERVICENAME2) )), UNO_QUERY); } static Reference<XInterface> SAL_CALL test23_createInstance(const Reference<XMultiServiceFactory> & rSMgr) throw (RuntimeException) { return Reference<XInterface>( static_cast<XWeak*>( new TestService( - OUString( RTL_CONSTASCII_USTRINGPARAM( IMPLNAME3)), - OUString( RTL_CONSTASCII_USTRINGPARAM( SERVICENAME3)) )), UNO_QUERY); + OUString( IMPLNAME3), + OUString( SERVICENAME3) )), UNO_QUERY); } @@ -132,20 +132,20 @@ extern "C" { { Reference< XRegistryKey > xNewKey( reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey( - OUString(RTL_CONSTASCII_USTRINGPARAM( "/" IMPLNAME1 "/UNO/SERVICES" )) ) ); + OUString( "/" IMPLNAME1 "/UNO/SERVICES" ) ) ); - xNewKey->createKey( OUString( RTL_CONSTASCII_USTRINGPARAM( SERVICENAME1))); + xNewKey->createKey( OUString( SERVICENAME1)); xNewKey= reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey( - OUString(RTL_CONSTASCII_USTRINGPARAM( "/" IMPLNAME2 "/UNO/SERVICES" )) ); + OUString( "/" IMPLNAME2 "/UNO/SERVICES" ) ); - xNewKey->createKey(OUString( RTL_CONSTASCII_USTRINGPARAM( SERVICENAME2))); + xNewKey->createKey(OUString( SERVICENAME2)); xNewKey= reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey( - OUString(RTL_CONSTASCII_USTRINGPARAM( "/" IMPLNAME3 "/UNO/SERVICES" )) ); + OUString( "/" IMPLNAME3 "/UNO/SERVICES" ) ); - xNewKey->createKey(OUString( RTL_CONSTASCII_USTRINGPARAM( SERVICENAME3))); + xNewKey->createKey(OUString( SERVICENAME3)); return sal_True; } @@ -162,12 +162,12 @@ extern "C" { void * pRet = 0; - OUString implname1( RTL_CONSTASCII_USTRINGPARAM( IMPLNAME1) ); - OUString serviceName1( RTL_CONSTASCII_USTRINGPARAM( SERVICENAME1) ); - OUString implname2( RTL_CONSTASCII_USTRINGPARAM( IMPLNAME2) ); - OUString serviceName2( RTL_CONSTASCII_USTRINGPARAM( SERVICENAME2) ); - OUString implname3( RTL_CONSTASCII_USTRINGPARAM( IMPLNAME3) ); - OUString serviceName3( RTL_CONSTASCII_USTRINGPARAM( SERVICENAME3) ); + OUString implname1( IMPLNAME1 ); + OUString serviceName1( SERVICENAME1 ); + OUString implname2( IMPLNAME2 ); + OUString serviceName2( SERVICENAME2 ); + OUString implname3( IMPLNAME3 ); + OUString serviceName3( SERVICENAME3 ); if (implname1.equals( OUString::createFromAscii(pImplName))) { diff --git a/sal/workben/t_osl_getVolInfo.cxx b/sal/workben/t_osl_getVolInfo.cxx index 5db4588f515d..1e9e425f0a02 100644 --- a/sal/workben/t_osl_getVolInfo.cxx +++ b/sal/workben/t_osl_getVolInfo.cxx @@ -88,28 +88,28 @@ public: void test_osl_getVolumeInformation() { - rtl::OUString path = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(TEST_PATH_1)); + rtl::OUString path = rtl::OUString(TEST_PATH_1); rtl::OUString path_url; osl_getFileURLFromSystemPath(path.pData, &path_url.pData); test_getVolumeInformation(path_url); - path = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(TEST_PATH_2)); + path = rtl::OUString(TEST_PATH_2); osl_getFileURLFromSystemPath(path.pData, &path_url.pData); test_getVolumeInformation(path_url); - path = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(TEST_PATH_3)); + path = rtl::OUString(TEST_PATH_3); osl_getFileURLFromSystemPath(path.pData, &path_url.pData); test_getVolumeInformation(path_url); - path = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(TEST_PATH_4)); + path = rtl::OUString(TEST_PATH_4); osl_getFileURLFromSystemPath(path.pData, &path_url.pData); test_getVolumeInformation(path_url); - path = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(TEST_PATH_5)); + path = rtl::OUString(TEST_PATH_5); osl_getFileURLFromSystemPath(path.pData, &path_url.pData); test_getVolumeInformation(path_url); - path = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(TEST_PATH_6)); + path = rtl::OUString(TEST_PATH_6); osl_getFileURLFromSystemPath(path.pData, &path_url.pData); test_getVolumeInformation(path_url); } diff --git a/sal/workben/t_osl_joinProcess.cxx b/sal/workben/t_osl_joinProcess.cxx index 93b2e6bc8d41..60914ee26ede 100644 --- a/sal/workben/t_osl_joinProcess.cxx +++ b/sal/workben/t_osl_joinProcess.cxx @@ -36,12 +36,12 @@ #include <signal.h> #ifdef WNT - const rtl::OUString IMAGE_NAME(RTL_CONSTASCII_USTRINGPARAM("ojpx.exe")); + const rtl::OUString IMAGE_NAME("ojpx.exe"); #else - const rtl::OUString IMAGE_NAME(RTL_CONSTASCII_USTRINGPARAM("ojpx")); + const rtl::OUString IMAGE_NAME("ojpx"); #endif -const rtl::OUString CWD(RTL_CONSTASCII_USTRINGPARAM(".")); +const rtl::OUString CWD("."); class Test_osl_Process : public CppUnit::TestFixture { |