summaryrefslogtreecommitdiff
path: root/registry/workben
diff options
context:
space:
mode:
authorGert Faller <gertfaller@aliceadsl.fr>2010-12-10 18:31:39 +0100
committerGert Faller <gertfaller@aliceadsl.fr>2010-12-10 18:31:39 +0100
commit3a18c3d97abfb60a09cc6a8bd5dd163fe2cfafa3 (patch)
tree02ef980b5d6440ebbacf6f8801bea9d27f62b7a5 /registry/workben
parent377a56fb1b9825ec5dc71ba9ae81b6e27cfabffb (diff)
RTL_CONSTASCII_USTRINGPARAM in ure 1
Diffstat (limited to 'registry/workben')
-rw-r--r--registry/workben/regspeed.cxx12
-rw-r--r--registry/workben/regtest.cxx64
2 files changed, 38 insertions, 38 deletions
diff --git a/registry/workben/regspeed.cxx b/registry/workben/regspeed.cxx
index 4cf828986abd..db400a73729b 100644
--- a/registry/workben/regspeed.cxx
+++ b/registry/workben/regspeed.cxx
@@ -194,7 +194,7 @@ int _cdecl main( int argc, char * argv[] )
for (sal_Int32 i=0; i < S1; i++)
{
- keyName1 = OUString::createFromAscii("/");
+ keyName1 = OUString(RTL_CONSTASCII_USTRINGPARAM("/"));
keyName1 += sName1;
keyName1 += OUString().valueOf(i);
if (reg_openKey(hRootKey, keyName1.pData, &hKey))
@@ -203,10 +203,10 @@ int _cdecl main( int argc, char * argv[] )
for (sal_Int32 j=0; j < S2; j++)
{
- keyName2 = OUString::createFromAscii("/");
+ keyName2 = OUString(RTL_CONSTASCII_USTRINGPARAM("/"));
keyName2 += sName1;
keyName2 += OUString().valueOf(i);
- keyName2 += OUString::createFromAscii("/");
+ keyName2 += OUString(RTL_CONSTASCII_USTRINGPARAM("/"));
keyName2 += sName2;
keyName2 += OUString().valueOf(j);
if (reg_openKey(hRootKey, keyName2.pData, &hSubKey))
@@ -215,13 +215,13 @@ int _cdecl main( int argc, char * argv[] )
for (sal_Int32 n=0; n < S3; n++)
{
- keyName3 = OUString::createFromAscii("/");
+ keyName3 = OUString(RTL_CONSTASCII_USTRINGPARAM("/"));
keyName3 += sName1;
keyName3 += OUString().valueOf(i);
- keyName3 += OUString::createFromAscii("/");
+ keyName3 += OUString(RTL_CONSTASCII_USTRINGPARAM("/"));
keyName3 += sName2;
keyName3 += OUString().valueOf(j);
- keyName3 += OUString::createFromAscii("/");
+ keyName3 += OUString(RTL_CONSTASCII_USTRINGPARAM("/"));
keyName3 += sName3;
keyName3 += OUString().valueOf(n);
if (reg_openKey(hRootKey, keyName3.pData, &hSubSubKey))
diff --git a/registry/workben/regtest.cxx b/registry/workben/regtest.cxx
index b3b2f5004755..b2ed50070d72 100644
--- a/registry/workben/regtest.cxx
+++ b/registry/workben/regtest.cxx
@@ -50,7 +50,7 @@ int _cdecl main()
cout << "\n Simple Registry Test !!! \n\n";
- if (reg_createRegistry(OUString::createFromAscii("test4.rdb").pData, &hReg))
+ if (reg_createRegistry(OUString(RTL_CONSTASCII_USTRINGPARAM("test4.rdb")).pData, &hReg))
cout << "\t0. creating registry \"test4.rdb\" failed\n";
else
cout << "0. registry test4.rdb is created\n";
@@ -60,23 +60,23 @@ int _cdecl main()
else
cout << "1. root key of \"test4.rdb\" is opened\n";
- if (reg_createKey(hRootKey, OUString::createFromAscii("myFirstKey").pData, &hKey1))
+ if (reg_createKey(hRootKey, OUString(RTL_CONSTASCII_USTRINGPARAM("myFirstKey")).pData, &hKey1))
cout << "\t2. creating key \"myFirstKey\" failed\n";
else
cout << "2. key \"myFirstKey\" is created\n";
- if (reg_createKey(hRootKey, OUString::createFromAscii("mySecondKey").pData, &hKey2))
+ if (reg_createKey(hRootKey, OUString(RTL_CONSTASCII_USTRINGPARAM("mySecondKey")).pData, &hKey2))
cout << "\t3. creating key \"mySecondKey\" failed\n";
else
cout << "3. key \"mySecondKey\" is created\n";
- if (reg_createKey(hKey1, OUString::createFromAscii("myFirstSubKey").pData, &hKey3))
+ if (reg_createKey(hKey1, OUString(RTL_CONSTASCII_USTRINGPARAM("myFirstSubKey")).pData, &hKey3))
cout << "\t4. creating subkey \"myFirstSubKey\" failed\n";
else
cout << "4. subkey \"myFirstSubKey\" is created\n";
- if (reg_createKey(hKey1, OUString::createFromAscii("mySecondSubKey").pData, &hKey4))
+ if (reg_createKey(hKey1, OUString(RTL_CONSTASCII_USTRINGPARAM("mySecondSubKey")).pData, &hKey4))
cout << "\t5. creating subkey \"mySecondSubKey\" failed\n";
else
cout << "5. subkey \"mySecondSubKey\" is created\n";
- if (reg_createKey(hRootKey, OUString::createFromAscii("myThirdKey").pData, &hKey5))
+ if (reg_createKey(hRootKey, OUString(RTL_CONSTASCII_USTRINGPARAM("myThirdKey")).pData, &hKey5))
cout << "\t6. creating key \"myThirdKey\" is created\n\n";
else
cout << "6. key \"myThirdKey\" is created\n\n";
@@ -84,7 +84,7 @@ int _cdecl main()
RegKeyHandle* phSubKeys;
sal_uInt32 nSubKeys;
- if (reg_openSubKeys(hRootKey, OUString::createFromAscii("myFirstKey").pData, &phSubKeys, &nSubKeys))
+ if (reg_openSubKeys(hRootKey, OUString(RTL_CONSTASCII_USTRINGPARAM("myFirstKey")).pData, &phSubKeys, &nSubKeys))
cout << "\t7. open subkeys of \"myfirstKey\" failed\n";
else
cout << "7. open " << nSubKeys << "subkeys of \"myfirstKey\"\n";
@@ -102,7 +102,7 @@ int _cdecl main()
char* Value=(char*)"Mein erster Value";
- if (reg_setValue(hRootKey, OUString::createFromAscii("mySecondKey").pData, RG_VALUETYPE_STRING, Value, 18))
+ if (reg_setValue(hRootKey, OUString(RTL_CONSTASCII_USTRINGPARAM("mySecondKey")).pData, RG_VALUETYPE_STRING, Value, 18))
cout << "\t9. setValue of key \"mySecondKey\" failed\n";
else
cout << "9. setValue (string Value) of key \"mySecondKey\"\n";
@@ -110,7 +110,7 @@ int _cdecl main()
RegValueType valueType;
sal_uInt32 valueSize;
sal_Char* readValue;
- if (reg_getValueInfo(hRootKey, OUString::createFromAscii("mySecondKey").pData, &valueType, &valueSize))
+ if (reg_getValueInfo(hRootKey, OUString(RTL_CONSTASCII_USTRINGPARAM("mySecondKey")).pData, &valueType, &valueSize))
cout << "\t10. getValueInfo of key \"mySecondKey\" failed\n";
else
cout << "10. getValueInfo of key \"mySecondKey\"\n";
@@ -135,7 +135,7 @@ int _cdecl main()
else
cout << "12. keys \"myFirstKey\" \"myfistSubKey\" \"mySecondSubKey\" are closed\n";
- if (reg_deleteKey(hRootKey, OUString::createFromAscii("myFirstKey").pData))
+ if (reg_deleteKey(hRootKey, OUString(RTL_CONSTASCII_USTRINGPARAM("myFirstKey")).pData))
cout << "13.\t delete key \"myFirstKey\" failed\n";
else
cout << "13. key \"myFirstKey\" is deleted\n";
@@ -145,7 +145,7 @@ int _cdecl main()
else
cout << "14. key \"mySecondKey\" is closed\n";
- if (reg_openKey(hRootKey, OUString::createFromAscii("mySecondKey").pData, &hKey2))
+ if (reg_openKey(hRootKey, OUString(RTL_CONSTASCII_USTRINGPARAM("mySecondKey")).pData, &hKey2))
cout << "\n15. open key \"mySecondKey\" failed\n";
else
cout << "15. key \"mySecondKey\" is opended\n";
@@ -154,12 +154,12 @@ int _cdecl main()
cout << "\t15. closing key \"myThirdSubKey\" failed\n";
else
cout << "15. key \"myThirdSubKey\" is closed\n";
- if (reg_deleteKey(hRootKey, OUString::createFromAscii("myThirdKey").pData))
+ if (reg_deleteKey(hRootKey, OUString(RTL_CONSTASCII_USTRINGPARAM("myThirdKey")).pData))
cout << "\t16. delete key \"myThirdKey\" failed\n";
else
cout << "16. key \"myThirdKey\" is deleted\n";
- if (reg_openKey(hRootKey, OUString::createFromAscii("myThirdKey").pData, &hKey5))
+ if (reg_openKey(hRootKey, OUString(RTL_CONSTASCII_USTRINGPARAM("myThirdKey")).pData, &hKey5))
cout << "\t17. open key \"myThirdKey\" failed\n";
else
cout << "17. key \"myThirdKey\" is opened\n";
@@ -187,7 +187,7 @@ int _cdecl main()
RegHandle hReg2;
RegKeyHandle hRootKey2, h2Key1, h2Key2, h2Key3, h2Key4, h2Key5;
- if (reg_createRegistry(OUString::createFromAscii("test5.rdb").pData, &hReg2))
+ if (reg_createRegistry(OUString(RTL_CONSTASCII_USTRINGPARAM("test5.rdb")).pData, &hReg2))
cout << "\t21. creating registry \"test5.rdb\" failed\n";
else
cout << "21. registry \"test5.rdb\" is created\n";
@@ -197,23 +197,23 @@ int _cdecl main()
else
cout << "22. root key of \"test5.rdb\" is opened\n";
- if (reg_createKey(hRootKey2, OUString::createFromAscii("reg2FirstKey").pData, &h2Key1))
+ if (reg_createKey(hRootKey2, OUString(RTL_CONSTASCII_USTRINGPARAM("reg2FirstKey")).pData, &h2Key1))
cout << "\t23. creating key \"reg2FirstKey\" failed\n";
else
cout << "23. key \"reg2FirstKey\" is created\n";
- if (reg_createKey(hRootKey2, OUString::createFromAscii("reg2SecondKey").pData, &h2Key2))
+ if (reg_createKey(hRootKey2, OUString(RTL_CONSTASCII_USTRINGPARAM("reg2SecondKey")).pData, &h2Key2))
cout << "\t24. creating key \"reg2SecondKey\" failed\n";
else
cout << "24. key \"reg2SecondKey\" is created\n";
- if (reg_createKey(h2Key1, OUString::createFromAscii("reg2FirstSubKey").pData, &h2Key3))
+ if (reg_createKey(h2Key1, OUString(RTL_CONSTASCII_USTRINGPARAM("reg2FirstSubKey")).pData, &h2Key3))
cout << "\t25. creating key \"reg2FirstSubKey\" failed\n";
else
cout << "25. key \"reg2FirstSubKey\" is created\n";
- if (reg_createKey(h2Key1, OUString::createFromAscii("reg2SecondSubKey").pData, &h2Key4))
+ if (reg_createKey(h2Key1, OUString(RTL_CONSTASCII_USTRINGPARAM("reg2SecondSubKey")).pData, &h2Key4))
cout << "\26. creating key \"reg2SecondSubKey\" failed\n";
else
cout << "26. key \"reg2SecondSubKey\" is created\n";
- if (reg_createKey(hRootKey2, OUString::createFromAscii("reg2ThirdKey").pData, &h2Key5))
+ if (reg_createKey(hRootKey2, OUString(RTL_CONSTASCII_USTRINGPARAM("reg2ThirdKey")).pData, &h2Key5))
cout << "\n27. creating key \"reg2ThirdKey\" failed\n";
else
cout << "27. key \"reg2ThirdKey\" is created\n";
@@ -243,7 +243,7 @@ int _cdecl main()
else
cout << "30. registry test5.rdb is closed\n";
- if (reg_openRegistry(OUString::createFromAscii("test4.rdb").pData, &hReg, REG_READWRITE))
+ if (reg_openRegistry(OUString(RTL_CONSTASCII_USTRINGPARAM("test4.rdb")).pData, &hReg, REG_READWRITE))
cout << "\t31. registry test4.rdb is opened\n";
else
cout << "31. registry test4.rdb is opened\n";
@@ -253,34 +253,34 @@ int _cdecl main()
else
cout << "32. root key of \"test4.rdb\" is opened\n";
- if (reg_loadKey(hRootKey, OUString::createFromAscii("allFromTest2").pData,
- OUString::createFromAscii("test5.rdb").pData))
+ if (reg_loadKey(hRootKey, OUString(RTL_CONSTASCII_USTRINGPARAM("allFromTest2")).pData,
+ OUString(RTL_CONSTASCII_USTRINGPARAM("test5.rdb")).pData))
cout << "\n\t33. load all keys from \"test5.rdb\" under key \"allFromTest2\" failed\n";
else
cout << "\n33. load all keys from test5.rdb under key \"allFromTest2\"\n";
- if (reg_saveKey(hRootKey, OUString::createFromAscii("allFromTest2").pData,
- OUString::createFromAscii("test6.rdb").pData))
+ if (reg_saveKey(hRootKey, OUString(RTL_CONSTASCII_USTRINGPARAM("allFromTest2")).pData,
+ OUString(RTL_CONSTASCII_USTRINGPARAM("test6.rdb")).pData))
cout << "\n\t34. save all keys under \"allFromTest2\" in test6.rdb\n";
else
cout << "\n34. save all keys under \"allFromTest2\" in test6.rdb\n";
- if (reg_createKey(hRootKey, OUString::createFromAscii("allFromTest3").pData, &hKey1))
+ if (reg_createKey(hRootKey, OUString(RTL_CONSTASCII_USTRINGPARAM("allFromTest3")).pData, &hKey1))
cout << "\t35. creating key \"allFromTest3\" failed\n";
else
cout << "36. key \"allFromTest3\" is created\n";
- if (reg_createKey(hKey1, OUString::createFromAscii("myFirstKey2").pData, &hKey2))
+ if (reg_createKey(hKey1, OUString(RTL_CONSTASCII_USTRINGPARAM("myFirstKey2")).pData, &hKey2))
cout << "\t37. creating key \"myFirstKey2\" failed\n";
else
cout << "37. key \"myFirstKey2\" is created\n";
- if (reg_createKey(hKey1, OUString::createFromAscii("mySecondKey2").pData, &hKey3))
+ if (reg_createKey(hKey1, OUString(RTL_CONSTASCII_USTRINGPARAM("mySecondKey2")).pData, &hKey3))
cout << "\t38. creating key \"mySecondKey2\" failed\n";
else
cout << "38. key \"mySecondKey2\" is created\n";
- if (reg_mergeKey(hRootKey, OUString::createFromAscii("allFromTest3").pData,
- OUString::createFromAscii("test6.rdb").pData, sal_False, sal_False))
+ if (reg_mergeKey(hRootKey, OUString(RTL_CONSTASCII_USTRINGPARAM("allFromTest3")).pData,
+ OUString(RTL_CONSTASCII_USTRINGPARAM("test6.rdb")).pData, sal_False, sal_False))
cout << "\n\t39. merge all keys under \"allFromTest2\" with all in test6.rdb\n";
else
cout << "\n39. merge all keys under \"allFromTest2\" with all in test6.rdb\n";
@@ -299,18 +299,18 @@ int _cdecl main()
cout << "\n42. closing key \"mySecondKey2\" of \"test5.rdb\"\n";
- if (reg_deleteKey(hRootKey, OUString::createFromAscii("/allFromTest3/reg2FirstKey/reg2FirstSubKey").pData))
+ if (reg_deleteKey(hRootKey, OUString(RTL_CONSTASCII_USTRINGPARAM("/allFromTest3/reg2FirstKey/reg2FirstSubKey")).pData))
cout << "\n\t43. delete key \"/allFromTest3/reg2FirstKey/reg2FirstSubKey\" failed\n";
else
cout << "\n43. key \"/allFromTest3/reg2FirstKey/reg2FirstSubKey\" is deleted\n";
- if (reg_openRegistry(OUString::createFromAscii("test4.rdb").pData, &hReg2, REG_READONLY))
+ if (reg_openRegistry(OUString(RTL_CONSTASCII_USTRINGPARAM("test4.rdb")).pData, &hReg2, REG_READONLY))
cout << "\n\t44. registry test4.rdb is opened for read only\n";
else
cout << "\n44. registry test4.rdb is opened for read only\n";
RegHandle hReg3;
- if (reg_openRegistry(OUString::createFromAscii("test4.rdb").pData, &hReg3, REG_READONLY))
+ if (reg_openRegistry(OUString(RTL_CONSTASCII_USTRINGPARAM("test4.rdb")).pData, &hReg3, REG_READONLY))
cout << "\n\t44.a). registry test4.rdb is opened for read only\n";
else
cout << "\n44.a). registry test4.rdb is opened for read only\n";