diff options
author | Gert Faller <gertfaller@aliceadsl.fr> | 2010-12-10 18:31:39 +0100 |
---|---|---|
committer | Gert Faller <gertfaller@aliceadsl.fr> | 2010-12-10 18:31:39 +0100 |
commit | 3a18c3d97abfb60a09cc6a8bd5dd163fe2cfafa3 (patch) | |
tree | 02ef980b5d6440ebbacf6f8801bea9d27f62b7a5 /sal/workben | |
parent | 377a56fb1b9825ec5dc71ba9ae81b6e27cfabffb (diff) |
RTL_CONSTASCII_USTRINGPARAM in ure 1
Diffstat (limited to 'sal/workben')
-rw-r--r-- | sal/workben/getlocaleinfotest.cxx | 4 | ||||
-rw-r--r-- | sal/workben/measure_oustrings.cxx | 8 | ||||
-rw-r--r-- | sal/workben/testfile.cxx | 30 |
3 files changed, 21 insertions, 21 deletions
diff --git a/sal/workben/getlocaleinfotest.cxx b/sal/workben/getlocaleinfotest.cxx index da2642ca147b..f8467e945a91 100644 --- a/sal/workben/getlocaleinfotest.cxx +++ b/sal/workben/getlocaleinfotest.cxx @@ -35,8 +35,8 @@ int _cdecl main( int argc, char * argv[] ) { - rtl::OUString lang = rtl::OUString::createFromAscii( "de" ); - rtl::OUString country = rtl::OUString::createFromAscii( "DE" ); + rtl::OUString lang(RTL_CONSTASCII_USTRINGPARAM("de")); + rtl::OUString country(RTL_CONSTASCII_USTRINGPARAM("DE")); rtl_TextEncoding rtlTextEnc; rtl_Locale* rtlLocale = diff --git a/sal/workben/measure_oustrings.cxx b/sal/workben/measure_oustrings.cxx index bff7d6dea096..f99b06c0727f 100644 --- a/sal/workben/measure_oustrings.cxx +++ b/sal/workben/measure_oustrings.cxx @@ -53,7 +53,7 @@ SAL_IMPLEMENT_MAIN() //get my cpu fan up to speed :-) for (int i = 0; i < 10000000; ++i) { - rtl::OUString sFoo(rtl::OUString::createFromAscii("X")); + rtl::OUString sFoo(RTL_CONSTASCII_USTRINGPARAM("X")); rtl::OUString sBar(RTL_CONSTASCII_USTRINGPARAM("X")); #ifdef SAL_DECLARE_UTF16 rtl::OUString sBoo(RTL_CONSTASCII_USTRINGPARAM_WIDE("X")); @@ -75,7 +75,7 @@ SAL_IMPLEMENT_MAIN() { sal_uInt32 nStartTime = osl_getGlobalTimer(); for (int i = 0; i < 100000000; ++i) - rtl::OUString sFoo(rtl::OUString::createFromAscii("")); + rtl::OUString sFoo(OUString()); sal_uInt32 nEndTime = osl_getGlobalTimer(); std::cout << "rtl::OUString::createFromAscii() " << nEndTime - nStartTime << "ms" << std::endl; } @@ -85,7 +85,7 @@ SAL_IMPLEMENT_MAIN() { sal_uInt32 nStartTime = osl_getGlobalTimer(); for (int i = 0; i < 100000000; ++i) - rtl::OUString sFoo(rtl::OUString::createFromAscii("X")); + rtl::OUString sFoo(RTL_CONSTASCII_USTRINGPARAM("X")); sal_uInt32 nEndTime = osl_getGlobalTimer(); std::cout << "rtl::OUString::createFromAscii(\"X\") " << nEndTime - nStartTime << "ms" << std::endl; } @@ -120,7 +120,7 @@ SAL_IMPLEMENT_MAIN() { sal_uInt32 nStartTime = osl_getGlobalTimer(); for (int i = 0; i < 100000000; ++i) - rtl::OUString sFoo(rtl::OUString::createFromAscii("XXXXXXXXXXXXXXX")); + rtl::OUString sFoo(RTL_CONSTASCII_USTRINGPARAM("XXXXXXXXXXXXXXX")); sal_uInt32 nEndTime = osl_getGlobalTimer(); std::cout << "rtl::OUString::createFromAscii(\"XXXXXXXX\") " << nEndTime - nStartTime << "ms" << std::endl; } diff --git a/sal/workben/testfile.cxx b/sal/workben/testfile.cxx index d92522fa07ca..4881248eb212 100644 --- a/sal/workben/testfile.cxx +++ b/sal/workben/testfile.cxx @@ -163,7 +163,7 @@ sal_Bool Initialize( void ) iniFileURL=rtl::OUString( rtl_uString_getStr(strExeFileURL) ,(int) (pExeFileCount-rtl_uString_getStr(strExeFileURL)) ); // add "/testfile.ini" to iniFileURL - iniFileURL+=rtl::OUString::createFromAscii("/testfile.ini"); + iniFileURL+=rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/testfile.ini")); // Open the ini-File pFile=new File( iniFileURL ); @@ -906,7 +906,7 @@ void FileCopyAndMoveTest( void ) // FileCopyTest //-------------------------------------------------- - destPath+=rtl::OUString::createFromAscii("/"); + destPath+=rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); destPath+=file3; printf( "Copy the file "); @@ -940,7 +940,7 @@ void FileCopyAndMoveTest( void ) //-------------------------------------------------- destPath=rtl::OUString( dir_not_exist ); - destPath+=rtl::OUString::createFromAscii("/"); + destPath+=rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); destPath+=file3; printf( "Copy a file to a not existing directory \n"); @@ -973,7 +973,7 @@ void FileCopyAndMoveTest( void ) //-------------------------------------------------- destPath=rtl::OUString( dir2 ); - destPath+=rtl::OUString::createFromAscii("/"); + destPath+=rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); destPath+=file3; printf( "Move the file "); @@ -1022,7 +1022,7 @@ void FileCopyAndMoveTest( void ) //-------------------------------------------------- destPath=rtl::OUString( dir_not_exist ); - destPath+=rtl::OUString::createFromAscii("/"); + destPath+=rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); destPath+=file3; printf( "Move a file to a not existing directory: \n"); @@ -2302,15 +2302,15 @@ void AbsolutePathTest(void) printf( "AbsolutePath-Test\n" ); printf( "--------------------------------------------\n\n" ); - DoAbsolutePathTest(dir1, rtl::OUString::createFromAscii(".")); - DoAbsolutePathTest(dir1, rtl::OUString::createFromAscii("..")); - DoAbsolutePathTest(dir1, rtl::OUString::createFromAscii("../..")); - DoAbsolutePathTest(dir1, rtl::OUString::createFromAscii("../HUHU")); + DoAbsolutePathTest(dir1, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("."))); + DoAbsolutePathTest(dir1, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".."))); + DoAbsolutePathTest(dir1, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("../.."))); + DoAbsolutePathTest(dir1, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("../HUHU"))); - DoAbsolutePathTest(dir_on_server, rtl::OUString::createFromAscii(".")); - DoAbsolutePathTest(dir_on_server, rtl::OUString::createFromAscii("..")); - DoAbsolutePathTest(dir_on_server, rtl::OUString::createFromAscii("../..")); - DoAbsolutePathTest(dir_on_server, rtl::OUString::createFromAscii("../HUHU")); + DoAbsolutePathTest(dir_on_server, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("."))); + DoAbsolutePathTest(dir_on_server, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".."))); + DoAbsolutePathTest(dir_on_server, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("../.."))); + DoAbsolutePathTest(dir_on_server, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("../HUHU"))); PressKey(); return; @@ -2420,7 +2420,7 @@ void SearchPathTest(void) printFileName( file3 ); printf( "\n" ); - rc=FileBase::searchFileURL( file3 , rtl::OUString::createFromAscii("") , strResultPath ); + rc=FileBase::searchFileURL( file3 , rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("")) , strResultPath ); if ( rc == FileBase::E_None ) { @@ -2457,7 +2457,7 @@ void SearchPathTest(void) //------------------------------------------------------------ rtl::OUString strSearchPath( dir_not_exist ); - strSearchPath+=rtl::OUString::createFromAscii(";"); + strSearchPath+=rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(";")); strSearchPath+=dir_on_server; printf( "\nsearchFileURL: File : "); |