summaryrefslogtreecommitdiff
path: root/registry
diff options
context:
space:
mode:
authorNorbert Thiebaud <nthiebaud@gmail.com>2012-06-02 16:12:08 -0500
committerNorbert Thiebaud <nthiebaud@gmail.com>2012-06-02 16:48:34 -0500
commitacb7bd175abe6c7f793cc673feaab46c90b9a260 (patch)
tree206be73ecd4a2af07310e8efe348f9647382d331 /registry
parentd29d9399d48f85989cc8040f5ba334c38b40a544 (diff)
targeted string re-work
Change-Id: I145731d9f28faf0065f5960f2c5a32f27d8c8620
Diffstat (limited to 'registry')
-rw-r--r--registry/test/testmerge.cxx226
-rw-r--r--registry/test/testregcpp.cxx438
-rw-r--r--registry/tools/checksingleton.cxx2
-rw-r--r--registry/workben/regspeed.cxx20
-rw-r--r--registry/workben/regtest.cxx64
5 files changed, 375 insertions, 375 deletions
diff --git a/registry/test/testmerge.cxx b/registry/test/testmerge.cxx
index f1940c07cd70..61df62878a0b 100644
--- a/registry/test/testmerge.cxx
+++ b/registry/test/testmerge.cxx
@@ -48,7 +48,7 @@ sal_Int32 lValue2 = 54321;
sal_Int32 lValue3 = 111333111;
sal_Int32 lValue4 = 333111333;
sal_Char* sValue = (sal_Char*)"string Value";
-OUString wValue(RTL_CONSTASCII_USTRINGPARAM("unicode Value"));
+OUString wValue("unicode Value");
void test_generateMerge1()
@@ -57,21 +57,21 @@ void test_generateMerge1()
RegistryKey rootKey, key1, key2, key3, key4, key5, key6, key7, key8, key9;
- REG_ENSURE(!myRegistry->create(OUString(RTL_CONSTASCII_USTRINGPARAM("merge1.rdb"))), "testGenerateMerge1 error 1");
+ REG_ENSURE(!myRegistry->create(OUString("merge1.rdb")), "testGenerateMerge1 error 1");
REG_ENSURE(!myRegistry->openRootKey(rootKey), "testGenerateMerge1 error 2");
- REG_ENSURE(!rootKey.createKey(OUString(RTL_CONSTASCII_USTRINGPARAM("MergeKey1")), key1), "testGenerateMerge1 error 3");
- REG_ENSURE(!rootKey.createKey(OUString(RTL_CONSTASCII_USTRINGPARAM("/MergeKey1/MK1SubKey1")), key2), "testGenerateMerge1 error 4");
- REG_ENSURE(!rootKey.createKey(OUString(RTL_CONSTASCII_USTRINGPARAM("/MergeKey1/MK1SubKey1/KeyWithLongValue")), key3), "testGenerateMerge1 error 5");
+ REG_ENSURE(!rootKey.createKey(OUString("MergeKey1"), key1), "testGenerateMerge1 error 3");
+ REG_ENSURE(!rootKey.createKey(OUString("/MergeKey1/MK1SubKey1"), key2), "testGenerateMerge1 error 4");
+ REG_ENSURE(!rootKey.createKey(OUString("/MergeKey1/MK1SubKey1/KeyWithLongValue"), key3), "testGenerateMerge1 error 5");
REG_ENSURE(!key3.setValue(OUString(), RG_VALUETYPE_LONG, &lValue1, sizeof(sal_Int32)), "testGenerateMerge1 error 5a");
- REG_ENSURE(!rootKey.createKey(OUString(RTL_CONSTASCII_USTRINGPARAM("/MergeKey1/MK1SubKey2")), key4), "testGenerateMerge1 error 6");
- REG_ENSURE(!rootKey.createKey(OUString(RTL_CONSTASCII_USTRINGPARAM("/MergeKey1/MK1SubKey2/KeyWithStringValue")), key5), "testGenerateMerge1 error 7");
+ REG_ENSURE(!rootKey.createKey(OUString("/MergeKey1/MK1SubKey2"), key4), "testGenerateMerge1 error 6");
+ REG_ENSURE(!rootKey.createKey(OUString("/MergeKey1/MK1SubKey2/KeyWithStringValue"), key5), "testGenerateMerge1 error 7");
REG_ENSURE(!key5.setValue(OUString(), RG_VALUETYPE_STRING, sValue, strlen(sValue)+1), "testGenerateMerge1 error 7a");
- REG_ENSURE(!rootKey.createKey(OUString(RTL_CONSTASCII_USTRINGPARAM("/MergeKey1/MK1SubKey3")), key6), "testGenerateMerge1 error 8");
- REG_ENSURE(!rootKey.createKey(OUString(RTL_CONSTASCII_USTRINGPARAM("/MergeKey1/MK1SubKey3/KeyWithUnicodeValue")), key7), "testGenerateMerge1 error 9");
+ REG_ENSURE(!rootKey.createKey(OUString("/MergeKey1/MK1SubKey3"), key6), "testGenerateMerge1 error 8");
+ REG_ENSURE(!rootKey.createKey(OUString("/MergeKey1/MK1SubKey3/KeyWithUnicodeValue"), key7), "testGenerateMerge1 error 9");
REG_ENSURE(!key7.setValue(OUString(), RG_VALUETYPE_UNICODE, (void*)wValue.getStr(), ((wValue.getLength()+1)*sizeof(sal_Unicode))), "testGenerateMerge1 error 9a");
- REG_ENSURE(!rootKey.createKey(OUString(RTL_CONSTASCII_USTRINGPARAM("/MergeKey1/MK1SubKey4")), key8), "testGenerateMerge1 error 10");
- REG_ENSURE(!rootKey.createKey(OUString(RTL_CONSTASCII_USTRINGPARAM("/MergeKey1/MK1SubKey4/KeyWithBinaryValue")), key9), "testGenerateMerge1 error 11");
+ REG_ENSURE(!rootKey.createKey(OUString("/MergeKey1/MK1SubKey4"), key8), "testGenerateMerge1 error 10");
+ REG_ENSURE(!rootKey.createKey(OUString("/MergeKey1/MK1SubKey4/KeyWithBinaryValue"), key9), "testGenerateMerge1 error 11");
REG_ENSURE(!key9.setValue(OUString(), RG_VALUETYPE_BINARY, (void*)"abcdefghijklmnopqrstuvwxyz", 27), "testGenerateMerge1 error 11a");
@@ -85,18 +85,18 @@ void test_generateMerge1()
!key8.closeKey() &&
!key9.closeKey(), "testGenerateMerge1 error 12");
- REG_ENSURE(!rootKey.createKey(OUString(RTL_CONSTASCII_USTRINGPARAM("MergeKey1u2")), key1), "testGenerateMerge1 error 13");
- REG_ENSURE(!rootKey.createKey(OUString(RTL_CONSTASCII_USTRINGPARAM("/MergeKey1u2/MK1SubKey11")), key2), "testGenerateMerge1 error 14");
- REG_ENSURE(!rootKey.createKey(OUString(RTL_CONSTASCII_USTRINGPARAM("/MergeKey1u2/MK1SubKey11/KeyWithLongValue")), key3), "testGenerateMerge1 error 15");
+ REG_ENSURE(!rootKey.createKey(OUString("MergeKey1u2"), key1), "testGenerateMerge1 error 13");
+ REG_ENSURE(!rootKey.createKey(OUString("/MergeKey1u2/MK1SubKey11"), key2), "testGenerateMerge1 error 14");
+ REG_ENSURE(!rootKey.createKey(OUString("/MergeKey1u2/MK1SubKey11/KeyWithLongValue"), key3), "testGenerateMerge1 error 15");
REG_ENSURE(!key3.setValue(OUString(), RG_VALUETYPE_LONG, &lValue2, sizeof(sal_Int32)), "testGenerateMerge1 error 15a");
- REG_ENSURE(!rootKey.createKey(OUString(RTL_CONSTASCII_USTRINGPARAM("/MergeKey1u2/MK1SubKey12")), key4), "testGenerateMerge1 error 16");
- REG_ENSURE(!rootKey.createKey(OUString(RTL_CONSTASCII_USTRINGPARAM("/MergeKey1u2/MK1SubKey12/KeyWithStringValue")), key5), "testGenerateMerge1 error 17");
+ REG_ENSURE(!rootKey.createKey(OUString("/MergeKey1u2/MK1SubKey12"), key4), "testGenerateMerge1 error 16");
+ REG_ENSURE(!rootKey.createKey(OUString("/MergeKey1u2/MK1SubKey12/KeyWithStringValue"), key5), "testGenerateMerge1 error 17");
REG_ENSURE(!key5.setValue(OUString(), RG_VALUETYPE_STRING, sValue, strlen(sValue)+1), "testGenerateMerge1 error 17a");
- REG_ENSURE(!rootKey.createKey(OUString(RTL_CONSTASCII_USTRINGPARAM("/MergeKey1u2/MK1SubKey13")), key6), "testGenerateMerge1 error 18");
- REG_ENSURE(!rootKey.createKey(OUString(RTL_CONSTASCII_USTRINGPARAM("/MergeKey1u2/MK1SubKey13/KeyWithUnicodeValue")), key7), "testGenerateMerge1 error 19");
+ REG_ENSURE(!rootKey.createKey(OUString("/MergeKey1u2/MK1SubKey13"), key6), "testGenerateMerge1 error 18");
+ REG_ENSURE(!rootKey.createKey(OUString("/MergeKey1u2/MK1SubKey13/KeyWithUnicodeValue"), key7), "testGenerateMerge1 error 19");
REG_ENSURE(!key7.setValue(OUString(), RG_VALUETYPE_UNICODE, (void*)wValue.getStr(), ((wValue.getLength()+1)*sizeof(sal_Unicode))), "testGenerateMerge1 error 19a");
- REG_ENSURE(!rootKey.createKey(OUString(RTL_CONSTASCII_USTRINGPARAM("/MergeKey1u2/MK12SubKey1u2")), key8), "testGenerateMerge1 error 20");
- REG_ENSURE(!rootKey.createKey(OUString(RTL_CONSTASCII_USTRINGPARAM("/MergeKey1u2/MK12SubKey1u2/KeyWithLongValue")), key9), "testGenerateMerge1 error 21");
+ REG_ENSURE(!rootKey.createKey(OUString("/MergeKey1u2/MK12SubKey1u2"), key8), "testGenerateMerge1 error 20");
+ REG_ENSURE(!rootKey.createKey(OUString("/MergeKey1u2/MK12SubKey1u2/KeyWithLongValue"), key9), "testGenerateMerge1 error 21");
REG_ENSURE(!key9.setValue(OUString(), RG_VALUETYPE_LONG, &lValue3, sizeof(sal_Int32)), "testGenerateMerge1 error 21a");
REG_ENSURE(!rootKey.closeKey() &&
@@ -123,21 +123,21 @@ void test_generateMerge2()
RegistryKey rootKey, key1, key2, key3, key4, key5, key6, key7, key8, key9;
- REG_ENSURE(!myRegistry->create(OUString(RTL_CONSTASCII_USTRINGPARAM("merge2.rdb"))), "testGenerateMerge2 error 1");
+ REG_ENSURE(!myRegistry->create(OUString("merge2.rdb")), "testGenerateMerge2 error 1");
REG_ENSURE(!myRegistry->openRootKey(rootKey), "testGenerateMerge2 error 2");
- REG_ENSURE(!rootKey.createKey(OUString(RTL_CONSTASCII_USTRINGPARAM("MergeKey2")), key1), "testGenerateMerge2 error 3");
- REG_ENSURE(!rootKey.createKey(OUString(RTL_CONSTASCII_USTRINGPARAM("/MergeKey2/MK2SubKey1")), key2), "testGenerateMerge2 error 4");
- REG_ENSURE(!rootKey.createKey(OUString(RTL_CONSTASCII_USTRINGPARAM("/MergeKey2/MK2SubKey1/KeyWithBinaryValue")), key3), "testGenerateMerge2 error 5");
+ REG_ENSURE(!rootKey.createKey(OUString("MergeKey2"), key1), "testGenerateMerge2 error 3");
+ REG_ENSURE(!rootKey.createKey(OUString("/MergeKey2/MK2SubKey1"), key2), "testGenerateMerge2 error 4");
+ REG_ENSURE(!rootKey.createKey(OUString("/MergeKey2/MK2SubKey1/KeyWithBinaryValue"), key3), "testGenerateMerge2 error 5");
REG_ENSURE(!key3.setValue(OUString(), RG_VALUETYPE_BINARY, (void*)"1234567890", 11), "testGenerateMerge1 error 5a");
- REG_ENSURE(!rootKey.createKey(OUString(RTL_CONSTASCII_USTRINGPARAM("/MergeKey2/MK2SubKey2")), key4), "testGenerateMerge2 error 6");
- REG_ENSURE(!rootKey.createKey(OUString(RTL_CONSTASCII_USTRINGPARAM("/MergeKey2/MK2SubKey2/KeyWithUnicodeValue")), key5), "testGenerateMerge2 error 7");
+ REG_ENSURE(!rootKey.createKey(OUString("/MergeKey2/MK2SubKey2"), key4), "testGenerateMerge2 error 6");
+ REG_ENSURE(!rootKey.createKey(OUString("/MergeKey2/MK2SubKey2/KeyWithUnicodeValue"), key5), "testGenerateMerge2 error 7");
REG_ENSURE(!key5.setValue(OUString(), RG_VALUETYPE_UNICODE, (void*)wValue.getStr(), ((wValue.getLength()+1)*sizeof(sal_Unicode))), "testGenerateMerge1 error 7a");
- REG_ENSURE(!rootKey.createKey(OUString(RTL_CONSTASCII_USTRINGPARAM("/MergeKey2/MK2SubKey3")), key6), "testGenerateMerge2 error 8");
- REG_ENSURE(!rootKey.createKey(OUString(RTL_CONSTASCII_USTRINGPARAM("/MergeKey2/MK2SubKey3/KeyWithStringValue")), key7), "testGenerateMerge2 error 9");
+ REG_ENSURE(!rootKey.createKey(OUString("/MergeKey2/MK2SubKey3"), key6), "testGenerateMerge2 error 8");
+ REG_ENSURE(!rootKey.createKey(OUString("/MergeKey2/MK2SubKey3/KeyWithStringValue"), key7), "testGenerateMerge2 error 9");
REG_ENSURE(!key7.setValue(OUString(), RG_VALUETYPE_STRING, sValue, strlen(sValue)+1), "testGenerateMerge1 error 9a");
- REG_ENSURE(!rootKey.createKey(OUString(RTL_CONSTASCII_USTRINGPARAM("/MergeKey2/MK2SubKey4")), key8), "testGenerateMerge2 error 10");
- REG_ENSURE(!rootKey.createKey(OUString(RTL_CONSTASCII_USTRINGPARAM("/MergeKey2/MK2SubKey4/KeyWithLongValue")), key9), "testGenerateMerge2 error 11");
+ REG_ENSURE(!rootKey.createKey(OUString("/MergeKey2/MK2SubKey4"), key8), "testGenerateMerge2 error 10");
+ REG_ENSURE(!rootKey.createKey(OUString("/MergeKey2/MK2SubKey4/KeyWithLongValue"), key9), "testGenerateMerge2 error 11");
REG_ENSURE(!key9.setValue(OUString(), RG_VALUETYPE_LONG, &lValue1, sizeof(sal_Int32)), "testGenerateMerge1 error 11a");
REG_ENSURE(!key1.closeKey() &&
@@ -150,18 +150,18 @@ void test_generateMerge2()
!key8.closeKey() &&
!key9.closeKey(), "testGenerateMerge2 error 12");
- REG_ENSURE(!rootKey.createKey(OUString(RTL_CONSTASCII_USTRINGPARAM("MergeKey1u2")), key1), "testGenerateMerge2 error 13");
- REG_ENSURE(!rootKey.createKey(OUString(RTL_CONSTASCII_USTRINGPARAM("/MergeKey1u2/MK2SubKey21")), key2), "testGenerateMerge2 error 14");
- REG_ENSURE(!rootKey.createKey(OUString(RTL_CONSTASCII_USTRINGPARAM("/MergeKey1u2/MK2SubKey21/KeyWithBinaryValue")), key3), "testGenerateMerge2 error 15");
+ REG_ENSURE(!rootKey.createKey(OUString("MergeKey1u2"), key1), "testGenerateMerge2 error 13");
+ REG_ENSURE(!rootKey.createKey(OUString("/MergeKey1u2/MK2SubKey21"), key2), "testGenerateMerge2 error 14");
+ REG_ENSURE(!rootKey.createKey(OUString("/MergeKey1u2/MK2SubKey21/KeyWithBinaryValue"), key3), "testGenerateMerge2 error 15");
REG_ENSURE(!key3.setValue(OUString(), RG_VALUETYPE_BINARY, (void*)"a1b2c3d4e5f6g7h8i9", 19), "testGenerateMerge1 error 15a");
- REG_ENSURE(!rootKey.createKey(OUString(RTL_CONSTASCII_USTRINGPARAM("/MergeKey1u2/MK2SubKey22")), key4), "testGenerateMerge2 error 16");
- REG_ENSURE(!rootKey.createKey(OUString(RTL_CONSTASCII_USTRINGPARAM("/MergeKey1u2/MK2SubKey22/KeyWithLongValue")), key5), "testGenerateMerge2 error 17");
+ REG_ENSURE(!rootKey.createKey(OUString("/MergeKey1u2/MK2SubKey22"), key4), "testGenerateMerge2 error 16");
+ REG_ENSURE(!rootKey.createKey(OUString("/MergeKey1u2/MK2SubKey22/KeyWithLongValue"), key5), "testGenerateMerge2 error 17");
REG_ENSURE(!key5.setValue(OUString(), RG_VALUETYPE_LONG, &lValue2, sizeof(sal_Int32)), "testGenerateMerge1 error 17a");
- REG_ENSURE(!rootKey.createKey(OUString(RTL_CONSTASCII_USTRINGPARAM("/MergeKey1u2/MK2SubKey23")), key6), "testGenerateMerge2 error 18");
- REG_ENSURE(!rootKey.createKey(OUString(RTL_CONSTASCII_USTRINGPARAM("/MergeKey1u2/MK2SubKey23/KeyWithStringValue")), key7), "testGenerateMerge2 error 19");
+ REG_ENSURE(!rootKey.createKey(OUString("/MergeKey1u2/MK2SubKey23"), key6), "testGenerateMerge2 error 18");
+ REG_ENSURE(!rootKey.createKey(OUString("/MergeKey1u2/MK2SubKey23/KeyWithStringValue"), key7), "testGenerateMerge2 error 19");
REG_ENSURE(!key7.setValue(OUString(), RG_VALUETYPE_STRING, sValue, strlen(sValue)+1), "testGenerateMerge1 error 19a");
- REG_ENSURE(!rootKey.createKey(OUString(RTL_CONSTASCII_USTRINGPARAM("/MergeKey1u2/MK12SubKey1u2")), key8), "testGenerateMerge2 error 20");
- REG_ENSURE(!rootKey.createKey(OUString(RTL_CONSTASCII_USTRINGPARAM("/MergeKey1u2/MK12SubKey1u2/KeyWithLongValue")), key9), "testGenerateMerge2 error 21");
+ REG_ENSURE(!rootKey.createKey(OUString("/MergeKey1u2/MK12SubKey1u2"), key8), "testGenerateMerge2 error 20");
+ REG_ENSURE(!rootKey.createKey(OUString("/MergeKey1u2/MK12SubKey1u2/KeyWithLongValue"), key9), "testGenerateMerge2 error 21");
REG_ENSURE(!key9.setValue(OUString(), RG_VALUETYPE_LONG, &lValue4, sizeof(sal_Int32)), "testGenerateMerge1 error 21a");
REG_ENSURE(!rootKey.closeKey() &&
@@ -188,112 +188,112 @@ void test_merge()
RegistryKey rootKey, key1, mkey1, key2, mkey2, key1u2, mkey1u2;
- REG_ENSURE(!myRegistry->create(OUString(RTL_CONSTASCII_USTRINGPARAM("mergetest.rdb"))), "testMerge error 1");
+ REG_ENSURE(!myRegistry->create(OUString("mergetest.rdb")), "testMerge error 1");
REG_ENSURE(myRegistry->getName() == "mergetest.rdb", "testMerge error 1.a)");
REG_ENSURE(!myRegistry->openRootKey(rootKey), "testMerge error 2");
- REG_ENSURE(!myRegistry->loadKey(rootKey, OUString(RTL_CONSTASCII_USTRINGPARAM("/stardiv/IchbineinMergeKey")),
- OUString(RTL_CONSTASCII_USTRINGPARAM("merge1.rdb"))), "testMerge error 3");
- REG_ENSURE(!myRegistry->mergeKey(rootKey, OUString(RTL_CONSTASCII_USTRINGPARAM("/stardiv/IchbineinMergeKey")),
- OUString(RTL_CONSTASCII_USTRINGPARAM("merge2.rdb"))), "testMerge error 4");
+ REG_ENSURE(!myRegistry->loadKey(rootKey, OUString("/stardiv/IchbineinMergeKey"),
+ OUString("merge1.rdb")), "testMerge error 3");
+ REG_ENSURE(!myRegistry->mergeKey(rootKey, OUString("/stardiv/IchbineinMergeKey"),
+ OUString("merge2.rdb")), "testMerge error 4");
///////////////////////////////////////////////////////////////////////////
- REG_ENSURE(!rootKey.openKey(OUString(RTL_CONSTASCII_USTRINGPARAM("/stardiv/IchbineinMergeKey")), key1), "testMerge error 5");
+ REG_ENSURE(!rootKey.openKey(OUString("/stardiv/IchbineinMergeKey"), key1), "testMerge error 5");
- REG_ENSURE(!key1.openKey(OUString(RTL_CONSTASCII_USTRINGPARAM("MergeKey1")), mkey1), "testMerge error 6");
+ REG_ENSURE(!key1.openKey(OUString("MergeKey1"), mkey1), "testMerge error 6");
REG_ENSURE(!mkey1.closeKey(), "testMerge error 7");
- REG_ENSURE(!key1.openKey(OUString(RTL_CONSTASCII_USTRINGPARAM("/MergeKey1/MK1SubKey1")), mkey1), "testMerge error 8");
+ REG_ENSURE(!key1.openKey(OUString("/MergeKey1/MK1SubKey1"), mkey1), "testMerge error 8");
REG_ENSURE(!mkey1.closeKey(), "testMerge error 9");
- REG_ENSURE(!key1.openKey(OUString(RTL_CONSTASCII_USTRINGPARAM("/MergeKey1/MK1SubKey1/KeyWithLongValue")), mkey1), "testMerge error 10");
+ REG_ENSURE(!key1.openKey(OUString("/MergeKey1/MK1SubKey1/KeyWithLongValue"), mkey1), "testMerge error 10");
REG_ENSURE(!mkey1.closeKey(), "testMerge error 11");
- REG_ENSURE(!key1.openKey(OUString(RTL_CONSTASCII_USTRINGPARAM("/MergeKey1/MK1SubKey2")), mkey1), "testMerge error 12");
+ REG_ENSURE(!key1.openKey(OUString("/MergeKey1/MK1SubKey2"), mkey1), "testMerge error 12");
REG_ENSURE(!mkey1.closeKey(), "testMerge error 13");
- REG_ENSURE(!key1.openKey(OUString(RTL_CONSTASCII_USTRINGPARAM("/MergeKey1/MK1SubKey2/KeyWithStringValue")), mkey1), "testMerge error 14");
+ REG_ENSURE(!key1.openKey(OUString("/MergeKey1/MK1SubKey2/KeyWithStringValue"), mkey1), "testMerge error 14");
REG_ENSURE(!mkey1.closeKey(), "testMerge error 15");
- REG_ENSURE(!key1.openKey(OUString(RTL_CONSTASCII_USTRINGPARAM("/MergeKey1/MK1SubKey3")), mkey1), "testMerge error 16");
+ REG_ENSURE(!key1.openKey(OUString("/MergeKey1/MK1SubKey3"), mkey1), "testMerge error 16");
REG_ENSURE(!mkey1.closeKey(), "testMerge error 17");
- REG_ENSURE(!key1.openKey(OUString(RTL_CONSTASCII_USTRINGPARAM("/MergeKey1/MK1SubKey3/KeyWithUnicodeValue")), mkey1), "testMerge error 18");
+ REG_ENSURE(!key1.openKey(OUString("/MergeKey1/MK1SubKey3/KeyWithUnicodeValue"), mkey1), "testMerge error 18");
REG_ENSURE(!mkey1.closeKey(), "testMerge error 19");
- REG_ENSURE(!key1.openKey(OUString(RTL_CONSTASCII_USTRINGPARAM("/MergeKey1/MK1SubKey4")), mkey1), "testMerge error 20");
+ REG_ENSURE(!key1.openKey(OUString("/MergeKey1/MK1SubKey4"), mkey1), "testMerge error 20");
REG_ENSURE(!mkey1.closeKey(), "testMerge error 21");
- REG_ENSURE(!key1.openKey(OUString(RTL_CONSTASCII_USTRINGPARAM("/MergeKey1/MK1SubKey4/KeyWithBinaryValue")), mkey1), "testMerge error 22");
+ REG_ENSURE(!key1.openKey(OUString("/MergeKey1/MK1SubKey4/KeyWithBinaryValue"), mkey1), "testMerge error 22");
REG_ENSURE(!mkey1.closeKey(), "testMerge error 23");
REG_ENSURE(!key1.closeKey(), "testMerge error 24");
///////////////////////////////////////////////////////////////////////////
- REG_ENSURE(!rootKey.openKey(OUString(RTL_CONSTASCII_USTRINGPARAM("/stardiv/IchbineinMergeKey")), key2), "testMerge error 25");
+ REG_ENSURE(!rootKey.openKey(OUString("/stardiv/IchbineinMergeKey"), key2), "testMerge error 25");
- REG_ENSURE(!key2.openKey(OUString(RTL_CONSTASCII_USTRINGPARAM("MergeKey2")), mkey2), "testMerge error 26");
+ REG_ENSURE(!key2.openKey(OUString("MergeKey2"), mkey2), "testMerge error 26");
REG_ENSURE(!mkey2.closeKey(), "testMerge error 27");
- REG_ENSURE(!key2.openKey(OUString(RTL_CONSTASCII_USTRINGPARAM("/MergeKey2/MK2SubKey1")), mkey2), "testMerge error 28");
+ REG_ENSURE(!key2.openKey(OUString("/MergeKey2/MK2SubKey1"), mkey2), "testMerge error 28");
REG_ENSURE(!mkey2.closeKey(), "testMerge error 29");
- REG_ENSURE(!key2.openKey(OUString(RTL_CONSTASCII_USTRINGPARAM("/MergeKey2/MK2SubKey1/KeyWithBinaryValue")), mkey2), "testMerge error 30");
+ REG_ENSURE(!key2.openKey(OUString("/MergeKey2/MK2SubKey1/KeyWithBinaryValue"), mkey2), "testMerge error 30");
REG_ENSURE(!mkey2.closeKey(), "testMerge error 31");
- REG_ENSURE(!key2.openKey(OUString(RTL_CONSTASCII_USTRINGPARAM("/MergeKey2/MK2SubKey2")), mkey2), "testMerge error 31");
+ REG_ENSURE(!key2.openKey(OUString("/MergeKey2/MK2SubKey2"), mkey2), "testMerge error 31");
REG_ENSURE(!mkey2.closeKey(), "testMerge error 33");
- REG_ENSURE(!key2.openKey(OUString(RTL_CONSTASCII_USTRINGPARAM("/MergeKey2/MK2SubKey2/KeyWithUnicodeValue")), mkey2), "testMerge error 34");
+ REG_ENSURE(!key2.openKey(OUString("/MergeKey2/MK2SubKey2/KeyWithUnicodeValue"), mkey2), "testMerge error 34");
REG_ENSURE(!mkey2.closeKey(), "testMerge error 35");
- REG_ENSURE(!key2.openKey(OUString(RTL_CONSTASCII_USTRINGPARAM("/MergeKey2/MK2SubKey3")), mkey2), "testMerge error 36");
+ REG_ENSURE(!key2.openKey(OUString("/MergeKey2/MK2SubKey3"), mkey2), "testMerge error 36");
REG_ENSURE(!mkey2.closeKey(), "testMerge error 37");
- REG_ENSURE(!key2.openKey(OUString(RTL_CONSTASCII_USTRINGPARAM("/MergeKey2/MK2SubKey3/KeyWithStringValue")), mkey2), "testMerge error 38");
+ REG_ENSURE(!key2.openKey(OUString("/MergeKey2/MK2SubKey3/KeyWithStringValue"), mkey2), "testMerge error 38");
REG_ENSURE(!mkey2.closeKey(), "testMerge error 39");
- REG_ENSURE(!key2.openKey(OUString(RTL_CONSTASCII_USTRINGPARAM("/MergeKey2/MK2SubKey4")), mkey2), "testMerge error 40");
+ REG_ENSURE(!key2.openKey(OUString("/MergeKey2/MK2SubKey4"), mkey2), "testMerge error 40");
REG_ENSURE(!mkey2.closeKey(), "testMerge error 41");
- REG_ENSURE(!key2.openKey(OUString(RTL_CONSTASCII_USTRINGPARAM("/MergeKey2/MK2SubKey4/KeyWithLongValue")), mkey2), "testMerge error 42");
+ REG_ENSURE(!key2.openKey(OUString("/MergeKey2/MK2SubKey4/KeyWithLongValue"), mkey2), "testMerge error 42");
REG_ENSURE(!mkey2.closeKey(), "testMerge error 43");
REG_ENSURE(!key2.closeKey(), "testMerge error 44");
///////////////////////////////////////////////////////////////////////////
- REG_ENSURE(!rootKey.openKey(OUString(RTL_CONSTASCII_USTRINGPARAM("/stardiv/IchbineinMergeKey")), key1u2), "testMerge error 40");
+ REG_ENSURE(!rootKey.openKey(OUString("/stardiv/IchbineinMergeKey"), key1u2), "testMerge error 40");
- REG_ENSURE(!key1u2.openKey(OUString(RTL_CONSTASCII_USTRINGPARAM("MergeKey1u2")), mkey1u2), "testMerge error 41");
+ REG_ENSURE(!key1u2.openKey(OUString("MergeKey1u2"), mkey1u2), "testMerge error 41");
REG_ENSURE(!mkey1u2.closeKey(), "testMerge error 42");
- REG_ENSURE(!key1u2.openKey(OUString(RTL_CONSTASCII_USTRINGPARAM("/MergeKey1u2/MK1SubKey11")), mkey1u2), "testMerge error 43");
+ REG_ENSURE(!key1u2.openKey(OUString("/MergeKey1u2/MK1SubKey11"), mkey1u2), "testMerge error 43");
REG_ENSURE(!mkey1u2.closeKey(), "testMerge error 44");
- REG_ENSURE(!key1u2.openKey(OUString(RTL_CONSTASCII_USTRINGPARAM("/MergeKey1u2/MK1SubKey11/KeyWithLongValue")), mkey1u2), "testMerge error 45");
+ REG_ENSURE(!key1u2.openKey(OUString("/MergeKey1u2/MK1SubKey11/KeyWithLongValue"), mkey1u2), "testMerge error 45");
REG_ENSURE(!mkey1u2.closeKey(), "testMerge error 46");
- REG_ENSURE(!key1u2.openKey(OUString(RTL_CONSTASCII_USTRINGPARAM("/MergeKey1u2/MK1SubKey12")), mkey1u2), "testMerge error 47");
+ REG_ENSURE(!key1u2.openKey(OUString("/MergeKey1u2/MK1SubKey12"), mkey1u2), "testMerge error 47");
REG_ENSURE(!mkey1u2.closeKey(), "testMerge error 48");
- REG_ENSURE(!key1u2.openKey(OUString(RTL_CONSTASCII_USTRINGPARAM("/MergeKey1u2/MK1SubKey12/KeyWithStringValue")), mkey1u2), "testMerge error 49");
+ REG_ENSURE(!key1u2.openKey(OUString("/MergeKey1u2/MK1SubKey12/KeyWithStringValue"), mkey1u2), "testMerge error 49");
REG_ENSURE(!mkey1u2.closeKey(), "testMerge error 50");
- REG_ENSURE(!key1u2.openKey(OUString(RTL_CONSTASCII_USTRINGPARAM("/MergeKey1u2/MK1SubKey13")), mkey1u2), "testMerge error 51");
+ REG_ENSURE(!key1u2.openKey(OUString("/MergeKey1u2/MK1SubKey13"), mkey1u2), "testMerge error 51");
REG_ENSURE(!mkey1u2.closeKey(), "testMerge error 52");
- REG_ENSURE(!key1u2.openKey(OUString(RTL_CONSTASCII_USTRINGPARAM("/MergeKey1u2/MK1SubKey13/KeyWithUnicodeValue")), mkey1u2), "testMerge error 53");
+ REG_ENSURE(!key1u2.openKey(OUString("/MergeKey1u2/MK1SubKey13/KeyWithUnicodeValue"), mkey1u2), "testMerge error 53");
REG_ENSURE(!mkey1u2.closeKey(), "testMerge error 54");
- REG_ENSURE(!key1u2.openKey(OUString(RTL_CONSTASCII_USTRINGPARAM("/MergeKey1u2/MK2SubKey21")), mkey1u2), "testMerge error 55");
+ REG_ENSURE(!key1u2.openKey(OUString("/MergeKey1u2/MK2SubKey21"), mkey1u2), "testMerge error 55");
REG_ENSURE(!mkey1u2.closeKey(), "testMerge error 56");
- REG_ENSURE(!key1u2.openKey(OUString(RTL_CONSTASCII_USTRINGPARAM("/MergeKey1u2/MK2SubKey21/KeyWithBinaryValue")), mkey1u2), "testMerge error 57");
+ REG_ENSURE(!key1u2.openKey(OUString("/MergeKey1u2/MK2SubKey21/KeyWithBinaryValue"), mkey1u2), "testMerge error 57");
REG_ENSURE(!mkey1u2.closeKey(), "testMerge error 58");
- REG_ENSURE(!key1u2.openKey(OUString(RTL_CONSTASCII_USTRINGPARAM("/MergeKey1u2/MK2SubKey22")), mkey1u2), "testMerge error 59");
+ REG_ENSURE(!key1u2.openKey(OUString("/MergeKey1u2/MK2SubKey22"), mkey1u2), "testMerge error 59");
REG_ENSURE(!mkey1u2.closeKey(), "testMerge error 60");
- REG_ENSURE(!key1u2.openKey(OUString(RTL_CONSTASCII_USTRINGPARAM("/MergeKey1u2/MK2SubKey22/KeyWithLongValue")), mkey1u2), "testMerge error 61");
+ REG_ENSURE(!key1u2.openKey(OUString("/MergeKey1u2/MK2SubKey22/KeyWithLongValue"), mkey1u2), "testMerge error 61");
REG_ENSURE(!mkey1u2.closeKey(), "testMerge error 62");
- REG_ENSURE(!key1u2.openKey(OUString(RTL_CONSTASCII_USTRINGPARAM("/MergeKey1u2/MK2SubKey23")), mkey1u2), "testMerge error 63");
+ REG_ENSURE(!key1u2.openKey(OUString("/MergeKey1u2/MK2SubKey23"), mkey1u2), "testMerge error 63");
REG_ENSURE(!mkey1u2.closeKey(), "testMerge error 64");
- REG_ENSURE(!key1u2.openKey(OUString(RTL_CONSTASCII_USTRINGPARAM("/MergeKey1u2/MK2SubKey23/KeyWithStringValue")), mkey1u2), "testMerge error 65");
+ REG_ENSURE(!key1u2.openKey(OUString("/MergeKey1u2/MK2SubKey23/KeyWithStringValue"), mkey1u2), "testMerge error 65");
REG_ENSURE(!mkey1u2.closeKey(), "testMerge error 66");
- REG_ENSURE(!key1u2.openKey(OUString(RTL_CONSTASCII_USTRINGPARAM("/MergeKey1u2/MK12SubKey1u2")), mkey1u2), "testMerge error 67");
+ REG_ENSURE(!key1u2.openKey(OUString("/MergeKey1u2/MK12SubKey1u2"), mkey1u2), "testMerge error 67");
REG_ENSURE(!mkey1u2.closeKey(), "testMerge error 68");
- REG_ENSURE(!key1u2.openKey(OUString(RTL_CONSTASCII_USTRINGPARAM("/MergeKey1u2/MK12SubKey1u2/KeyWithLongValue")), mkey1u2), "testMerge error 69");
+ REG_ENSURE(!key1u2.openKey(OUString("/MergeKey1u2/MK12SubKey1u2/KeyWithLongValue"), mkey1u2), "testMerge error 69");
REG_ENSURE(!mkey1u2.closeKey(), "testMerge error 70");
REG_ENSURE(!key1u2.closeKey(), "testMerge error 71");
@@ -305,101 +305,101 @@ void test_merge()
sal_Int32 int32Value;
sal_uInt8 *Value;
- REG_ENSURE(!rootKey.openKey(OUString(RTL_CONSTASCII_USTRINGPARAM("/stardiv/IchbineinMergeKey")), key1), "testMerge error 72");
+ REG_ENSURE(!rootKey.openKey(OUString("/stardiv/IchbineinMergeKey"), key1), "testMerge error 72");
- REG_ENSURE(!key1.getValueInfo(OUString(RTL_CONSTASCII_USTRINGPARAM("/MergeKey1/MK1SubKey1/KeyWithLongValue")), &valueType, &valueSize), "testMerge error 73");
+ REG_ENSURE(!key1.getValueInfo(OUString("/MergeKey1/MK1SubKey1/KeyWithLongValue"), &valueType, &valueSize), "testMerge error 73");
REG_ENSURE(valueType == RG_VALUETYPE_LONG && valueSize == sizeof(sal_Int32), "testMerge error 74");
- REG_ENSURE(!key1.getValue(OUString(RTL_CONSTASCII_USTRINGPARAM("/MergeKey1/MK1SubKey1/KeyWithLongValue")), (RegValue)&int32Value), "testMerge error 74.a)");
+ REG_ENSURE(!key1.getValue(OUString("/MergeKey1/MK1SubKey1/KeyWithLongValue"), (RegValue)&int32Value), "testMerge error 74.a)");
REG_ENSURE(int32Value == lValue1, "testMerge error 74.b)");
- REG_ENSURE(!key1.getValueInfo(OUString(RTL_CONSTASCII_USTRINGPARAM("/MergeKey1/MK1SubKey2/KeyWithStringValue")), &valueType, &valueSize), "testMerge error 75");
+ REG_ENSURE(!key1.getValueInfo(OUString("/MergeKey1/MK1SubKey2/KeyWithStringValue"), &valueType, &valueSize), "testMerge error 75");
REG_ENSURE(valueType == RG_VALUETYPE_STRING && valueSize == strlen(sValue)+1, "testMerge error 76");
Value = new sal_uInt8[valueSize];
- REG_ENSURE(!key1.getValue(OUString(RTL_CONSTASCII_USTRINGPARAM("/MergeKey1/MK1SubKey2/KeyWithStringValue")), (RegValue)Value), "testMerge error 76.a)");
+ REG_ENSURE(!key1.getValue(OUString("/MergeKey1/MK1SubKey2/KeyWithStringValue"), (RegValue)Value), "testMerge error 76.a)");
REG_ENSURE(strcmp((const sal_Char*)Value, sValue) == 0, "testMerge error 76.b)");
delete [] Value;
- REG_ENSURE(!key1.getValueInfo(OUString(RTL_CONSTASCII_USTRINGPARAM("/MergeKey1/MK1SubKey3/KeyWithUnicodeValue")), &valueType, &valueSize), "testMerge error 77");
+ REG_ENSURE(!key1.getValueInfo(OUString("/MergeKey1/MK1SubKey3/KeyWithUnicodeValue"), &valueType, &valueSize), "testMerge error 77");
REG_ENSURE(valueType == RG_VALUETYPE_UNICODE && valueSize == (wValue.getLength()+1)*sizeof(sal_Unicode), "testMerge error 78");
Value = new sal_uInt8[valueSize];
- REG_ENSURE(!key1.getValue(OUString(RTL_CONSTASCII_USTRINGPARAM("/MergeKey1/MK1SubKey3/KeyWithUnicodeValue")), (RegValue)Value), "testMerge error 78.a)");
+ REG_ENSURE(!key1.getValue(OUString("/MergeKey1/MK1SubKey3/KeyWithUnicodeValue"), (RegValue)Value), "testMerge error 78.a)");
REG_ENSURE(wValue.equals( (const sal_Unicode*)Value ), "testMerge error 78.b)");
delete [] Value;
- REG_ENSURE(!key1.getValueInfo(OUString(RTL_CONSTASCII_USTRINGPARAM("/MergeKey1/MK1SubKey4/KeyWithBinaryValue")), &valueType, &valueSize), "testMerge error 79");
+ REG_ENSURE(!key1.getValueInfo(OUString("/MergeKey1/MK1SubKey4/KeyWithBinaryValue"), &valueType, &valueSize), "testMerge error 79");
REG_ENSURE(valueType == RG_VALUETYPE_BINARY && valueSize == 27, "testMerge error 80");
Value = new sal_uInt8[valueSize];
- REG_ENSURE(!key1.getValue(OUString(RTL_CONSTASCII_USTRINGPARAM("/MergeKey1/MK1SubKey4/KeyWithBinaryValue")), (RegValue)Value), "testMerge error 80.a)");
+ REG_ENSURE(!key1.getValue(OUString("/MergeKey1/MK1SubKey4/KeyWithBinaryValue"), (RegValue)Value), "testMerge error 80.a)");
REG_ENSURE(strcmp((const sal_Char*)Value, "abcdefghijklmnopqrstuvwxyz") == 0, "testMerge error 80.b)");
delete [] Value;
- REG_ENSURE(!key1.getValueInfo(OUString(RTL_CONSTASCII_USTRINGPARAM("/MergeKey2/MK2SubKey1/KeyWithBinaryValue")), &valueType, &valueSize), "testMerge error 81");
+ REG_ENSURE(!key1.getValueInfo(OUString("/MergeKey2/MK2SubKey1/KeyWithBinaryValue"), &valueType, &valueSize), "testMerge error 81");
REG_ENSURE(valueType == RG_VALUETYPE_BINARY && valueSize == 11, "testMerge error 82");
Value = new sal_uInt8[valueSize];
- REG_ENSURE(!key1.getValue(OUString(RTL_CONSTASCII_USTRINGPARAM("/MergeKey2/MK2SubKey1/KeyWithBinaryValue")), (RegValue)Value), "testMerge error 82.a)");
+ REG_ENSURE(!key1.getValue(OUString("/MergeKey2/MK2SubKey1/KeyWithBinaryValue"), (RegValue)Value), "testMerge error 82.a)");
REG_ENSURE(strcmp((const sal_Char*)Value, "1234567890") == 0, "testMerge error 82.b)");
delete [] Value;
- REG_ENSURE(!key1.getValueInfo(OUString(RTL_CONSTASCII_USTRINGPARAM("/MergeKey2/MK2SubKey2/KeyWithUnicodeValue")), &valueType, &valueSize), "testMerge error 83");
+ REG_ENSURE(!key1.getValueInfo(OUString("/MergeKey2/MK2SubKey2/KeyWithUnicodeValue"), &valueType, &valueSize), "testMerge error 83");
REG_ENSURE(valueType == RG_VALUETYPE_UNICODE&& valueSize == (wValue.getLength()+1)*sizeof(sal_Unicode), "testMerge error 84");
Value = new sal_uInt8[valueSize];
- REG_ENSURE(!key1.getValue(OUString(RTL_CONSTASCII_USTRINGPARAM("/MergeKey2/MK2SubKey2/KeyWithUnicodeValue")), (RegValue)Value), "testMerge error 84.a)");
+ REG_ENSURE(!key1.getValue(OUString("/MergeKey2/MK2SubKey2/KeyWithUnicodeValue"), (RegValue)Value), "testMerge error 84.a)");
REG_ENSURE(wValue.equals( (const sal_Unicode*)Value ), "testMerge error 84.b)");
delete [] Value;
- REG_ENSURE(!key1.getValueInfo(OUString(RTL_CONSTASCII_USTRINGPARAM("/MergeKey2/MK2SubKey3/KeyWithStringValue")), &valueType, &valueSize), "testMerge error 85");
+ REG_ENSURE(!key1.getValueInfo(OUString("/MergeKey2/MK2SubKey3/KeyWithStringValue"), &valueType, &valueSize), "testMerge error 85");
REG_ENSURE(valueType == RG_VALUETYPE_STRING && valueSize == strlen(sValue)+1, "testMerge error 86");
Value = new sal_uInt8[valueSize];
- REG_ENSURE(!key1.getValue(OUString(RTL_CONSTASCII_USTRINGPARAM("/MergeKey2/MK2SubKey3/KeyWithStringValue")), (RegValue)Value), "testMerge error 86.a)");
+ REG_ENSURE(!key1.getValue(OUString("/MergeKey2/MK2SubKey3/KeyWithStringValue"), (RegValue)Value), "testMerge error 86.a)");
REG_ENSURE(strcmp((const sal_Char*)Value, sValue) == 0, "testMerge error 86.b)");
delete [] Value;
- REG_ENSURE(!key1.getValueInfo(OUString(RTL_CONSTASCII_USTRINGPARAM("/MergeKey2/MK2SubKey4/KeyWithLongValue")), &valueType, &valueSize), "testMerge error 87");
+ REG_ENSURE(!key1.getValueInfo(OUString("/MergeKey2/MK2SubKey4/KeyWithLongValue"), &valueType, &valueSize), "testMerge error 87");
REG_ENSURE(valueType == RG_VALUETYPE_LONG && valueSize == sizeof(sal_Int32), "testMerge error 88");
- REG_ENSURE(!key1.getValue(OUString(RTL_CONSTASCII_USTRINGPARAM("/MergeKey2/MK2SubKey4/KeyWithLongValue")), (RegValue)&int32Value), "testMerge error 88.a)");
+ REG_ENSURE(!key1.getValue(OUString("/MergeKey2/MK2SubKey4/KeyWithLongValue"), (RegValue)&int32Value), "testMerge error 88.a)");
REG_ENSURE(int32Value == lValue1, "testMerge error 88.b)");
- REG_ENSURE(!key1.getValueInfo(OUString(RTL_CONSTASCII_USTRINGPARAM("/MergeKey1u2/MK1SubKey11/KeyWithLongValue")), &valueType, &valueSize), "testMerge error 89");
+ REG_ENSURE(!key1.getValueInfo(OUString("/MergeKey1u2/MK1SubKey11/KeyWithLongValue"), &valueType, &valueSize), "testMerge error 89");
REG_ENSURE(valueType == RG_VALUETYPE_LONG && valueSize == sizeof(sal_Int32), "testMerge error 90");
- REG_ENSURE(!key1.getValue(OUString(RTL_CONSTASCII_USTRINGPARAM("/MergeKey1u2/MK1SubKey11/KeyWithLongValue")), (RegValue)&int32Value), "testMerge error 90.a)");
+ REG_ENSURE(!key1.getValue(OUString("/MergeKey1u2/MK1SubKey11/KeyWithLongValue"), (RegValue)&int32Value), "testMerge error 90.a)");
REG_ENSURE(int32Value == lValue2, "testMerge error 90.b)");
- REG_ENSURE(!key1.getValueInfo(OUString(RTL_CONSTASCII_USTRINGPARAM("/MergeKey1u2/MK1SubKey12/KeyWithStringValue")), &valueType, &valueSize), "testMerge error 91");
+ REG_ENSURE(!key1.getValueInfo(OUString("/MergeKey1u2/MK1SubKey12/KeyWithStringValue"), &valueType, &valueSize), "testMerge error 91");
REG_ENSURE(valueType == RG_VALUETYPE_STRING && valueSize == strlen(sValue)+1, "testMerge error 92");
Value = new sal_uInt8[valueSize];
- REG_ENSURE(!key1.getValue(OUString(RTL_CONSTASCII_USTRINGPARAM("/MergeKey1u2/MK1SubKey12/KeyWithStringValue")), (RegValue)Value), "testMerge error 92.a)");
+ REG_ENSURE(!key1.getValue(OUString("/MergeKey1u2/MK1SubKey12/KeyWithStringValue"), (RegValue)Value), "testMerge error 92.a)");
REG_ENSURE(strcmp((const sal_Char*)Value, sValue) == 0, "testMerge error 92.b)");
delete [] Value;
- REG_ENSURE(!key1.getValueInfo(OUString(RTL_CONSTASCII_USTRINGPARAM("/MergeKey1u2/MK1SubKey13/KeyWithUnicodeValue")), &valueType, &valueSize), "testMerge error 93");
+ REG_ENSURE(!key1.getValueInfo(OUString("/MergeKey1u2/MK1SubKey13/KeyWithUnicodeValue"), &valueType, &valueSize), "testMerge error 93");
REG_ENSURE(valueType == RG_VALUETYPE_UNICODE && valueSize == (wValue.getLength()+1)*sizeof(sal_Unicode), "testMerge error 94");
Value = new sal_uInt8[valueSize];
- REG_ENSURE(!key1.getValue(OUString(RTL_CONSTASCII_USTRINGPARAM("/MergeKey1u2/MK1SubKey13/KeyWithUnicodeValue")), (RegValue)Value), "testMerge error 94.a)");
+ REG_ENSURE(!key1.getValue(OUString("/MergeKey1u2/MK1SubKey13/KeyWithUnicodeValue"), (RegValue)Value), "testMerge error 94.a)");
REG_ENSURE(wValue.equals( (const sal_Unicode*)Value ), "testMerge error 94.b)");
delete [] Value;
- REG_ENSURE(!key1.getValueInfo(OUString(RTL_CONSTASCII_USTRINGPARAM("/MergeKey1u2/MK2SubKey21/KeyWithBinaryValue")), &valueType, &valueSize), "testMerge error 95");
+ REG_ENSURE(!key1.getValueInfo(OUString("/MergeKey1u2/MK2SubKey21/KeyWithBinaryValue"), &valueType, &valueSize), "testMerge error 95");
REG_ENSURE(valueType == RG_VALUETYPE_BINARY && valueSize == 19, "testMerge error 96");
Value = new sal_uInt8[valueSize];
- REG_ENSURE(!key1.getValue(OUString(RTL_CONSTASCII_USTRINGPARAM("/MergeKey1u2/MK2SubKey21/KeyWithBinaryValue")), (RegValue)Value), "testMerge error 96.a)");
+ REG_ENSURE(!key1.getValue(OUString("/MergeKey1u2/MK2SubKey21/KeyWithBinaryValue"), (RegValue)Value), "testMerge error 96.a)");
REG_ENSURE(strcmp((const sal_Char*)Value, "a1b2c3d4e5f6g7h8i9") == 0, "testMerge error 96.b)");
delete [] Value;
- REG_ENSURE(!key1.getValueInfo(OUString(RTL_CONSTASCII_USTRINGPARAM("/MergeKey1u2/MK2SubKey22/KeyWithLongValue")), &valueType, &valueSize), "testMerge error 97");
+ REG_ENSURE(!key1.getValueInfo(OUString("/MergeKey1u2/MK2SubKey22/KeyWithLongValue"), &valueType, &valueSize), "testMerge error 97");
REG_ENSURE(valueType == RG_VALUETYPE_LONG && valueSize == sizeof(sal_Int32), "testMerge error 98");
- REG_ENSURE(!key1.getValue(OUString(RTL_CONSTASCII_USTRINGPARAM("/MergeKey1u2/MK2SubKey22/KeyWithLongValue")), (RegValue)&int32Value), "testMerge error 98.a)");
+ REG_ENSURE(!key1.getValue(OUString("/MergeKey1u2/MK2SubKey22/KeyWithLongValue"), (RegValue)&int32Value), "testMerge error 98.a)");
REG_ENSURE(int32Value == lValue2, "testMerge error 98.b)");
- REG_ENSURE(!key1.getValueInfo(OUString(RTL_CONSTASCII_USTRINGPARAM("/MergeKey1u2/MK2SubKey23/KeyWithStringValue")), &valueType, &valueSize), "testMerge error 99");
+ REG_ENSURE(!key1.getValueInfo(OUString("/MergeKey1u2/MK2SubKey23/KeyWithStringValue"), &valueType, &valueSize), "testMerge error 99");
REG_ENSURE(valueType == RG_VALUETYPE_STRING && valueSize == strlen(sValue)+1, "testMerge error 100");
Value = new sal_uInt8[valueSize];
- REG_ENSURE(!key1.getValue(OUString(RTL_CONSTASCII_USTRINGPARAM("/MergeKey1u2/MK2SubKey23/KeyWithStringValue")), (RegValue)Value), "testMerge error 100.a)");
+ REG_ENSURE(!key1.getValue(OUString("/MergeKey1u2/MK2SubKey23/KeyWithStringValue"), (RegValue)Value), "testMerge error 100.a)");
REG_ENSURE(strcmp((const sal_Char*)Value, sValue) == 0, "testMerge error 100.b)");
delete [] Value;
- REG_ENSURE(!key1.getValueInfo(OUString(RTL_CONSTASCII_USTRINGPARAM("/MergeKey1u2/MK12SubKey1u2/KeyWithLongValue")), &valueType, &valueSize), "testMerge error 101");
+ REG_ENSURE(!key1.getValueInfo(OUString("/MergeKey1u2/MK12SubKey1u2/KeyWithLongValue"), &valueType, &valueSize), "testMerge error 101");
REG_ENSURE(valueType == RG_VALUETYPE_LONG && valueSize == sizeof(sal_Int32), "testMerge error 102");
- REG_ENSURE(!key1.getValue(OUString(RTL_CONSTASCII_USTRINGPARAM("/MergeKey1u2/MK12SubKey1u2/KeyWithLongValue")), (RegValue)&int32Value), "testMerge error 102.a)");
+ REG_ENSURE(!key1.getValue(OUString("/MergeKey1u2/MK12SubKey1u2/KeyWithLongValue"), (RegValue)&int32Value), "testMerge error 102.a)");
REG_ENSURE(int32Value == lValue4, "testMerge error 102.b)");
@@ -409,8 +409,8 @@ void test_merge()
REG_ENSURE(!rootKey.closeKey(), "testMerge error 10");
- REG_ENSURE(!myRegistry->destroy( OUString(RTL_CONSTASCII_USTRINGPARAM("merge1.rdb")) ), "test_registry_CppApi error 11");
- REG_ENSURE(!myRegistry->destroy( OUString(RTL_CONSTASCII_USTRINGPARAM("merge2.rdb")) ), "test_registry_CppApi error 12");
+ REG_ENSURE(!myRegistry->destroy( OUString("merge1.rdb") ), "test_registry_CppApi error 11");
+ REG_ENSURE(!myRegistry->destroy( OUString("merge2.rdb") ), "test_registry_CppApi error 12");
REG_ENSURE(!myRegistry->destroy( OUString() ), "test_registry_CppApi error 13");
delete myRegistry;
diff --git a/registry/test/testregcpp.cxx b/registry/test/testregcpp.cxx
index 0517e3bb42b2..623b248dff92 100644
--- a/registry/test/testregcpp.cxx
+++ b/registry/test/testregcpp.cxx
@@ -50,95 +50,95 @@ void test_coreReflection()
RegistryKey rootKey, key1, key2, key3, key4 ,key5, key6, key7, key8;
- REG_ENSURE(!myRegistry->create(OUString(RTL_CONSTASCII_USTRINGPARAM("ucrtest.rdb"))), "testCoreReflection error 1");
+ REG_ENSURE(!myRegistry->create(OUString("ucrtest.rdb")), "testCoreReflection error 1");
REG_ENSURE(!myRegistry->openRootKey(rootKey), "testCoreReflection error 2");
- REG_ENSURE(!rootKey.createKey(OUString(RTL_CONSTASCII_USTRINGPARAM("UCR")), key1), "testCoreReflection error 3");
- REG_ENSURE(!key1.createKey(OUString(RTL_CONSTASCII_USTRINGPARAM("ModuleA")), key2), "testCoreReflection error 4");
- REG_ENSURE(!key2.createKey(OUString(RTL_CONSTASCII_USTRINGPARAM("StructA")), key3), "testCoreReflection error 5");
- REG_ENSURE(!key2.createKey(OUString(RTL_CONSTASCII_USTRINGPARAM("EnumA")), key4), "testCoreReflection error 6");
- REG_ENSURE(!key2.createKey(OUString(RTL_CONSTASCII_USTRINGPARAM("XInterfaceA")), key5), "testCoreReflection error 7");
- REG_ENSURE(!key2.createKey(OUString(RTL_CONSTASCII_USTRINGPARAM("ExceptionA")), key6), "testCoreReflection error 8");
- REG_ENSURE(!key2.createKey(OUString(RTL_CONSTASCII_USTRINGPARAM("ServiceA")), key7), "testCoreReflection error 8a");
- REG_ENSURE(!key2.createKey(OUString(RTL_CONSTASCII_USTRINGPARAM("ConstantsA")), key8), "testCoreReflection error 8b");
+ REG_ENSURE(!rootKey.createKey(OUString("UCR"), key1), "testCoreReflection error 3");
+ REG_ENSURE(!key1.createKey(OUString("ModuleA"), key2), "testCoreReflection error 4");
+ REG_ENSURE(!key2.createKey(OUString("StructA"), key3), "testCoreReflection error 5");
+ REG_ENSURE(!key2.createKey(OUString("EnumA"), key4), "testCoreReflection error 6");
+ REG_ENSURE(!key2.createKey(OUString("XInterfaceA"), key5), "testCoreReflection error 7");
+ REG_ENSURE(!key2.createKey(OUString("ExceptionA"), key6), "testCoreReflection error 8");
+ REG_ENSURE(!key2.createKey(OUString("ServiceA"), key7), "testCoreReflection error 8a");
+ REG_ENSURE(!key2.createKey(OUString("ConstantsA"), key8), "testCoreReflection error 8b");
{
RegistryTypeWriter writer(RT_TYPE_MODULE,
- OUString(RTL_CONSTASCII_USTRINGPARAM("ModuleA")),
+ OUString("ModuleA"),
OUString(), 11, 0, 0);
RTConstValue aConst;
- writer.setDoku(OUString(RTL_CONSTASCII_USTRINGPARAM("Hallo ich bin ein Modul")));
- writer.setFileName(OUString(RTL_CONSTASCII_USTRINGPARAM("DummyFile")));
+ writer.setDoku(OUString("Hallo ich bin ein Modul"));
+ writer.setFileName(OUString("DummyFile"));
aConst.m_type = RT_TYPE_BOOL;
aConst.m_value.aBool = sal_True;
- writer.setFieldData(0, OUString(RTL_CONSTASCII_USTRINGPARAM("aConstBool")),
- OUString(RTL_CONSTASCII_USTRINGPARAM("boolean")),
- OUString(RTL_CONSTASCII_USTRINGPARAM("ich bin ein boolean")),
- OUString(RTL_CONSTASCII_USTRINGPARAM("DummyFile")), RT_ACCESS_CONST, aConst);
+ writer.setFieldData(0, OUString("aConstBool"),
+ OUString("boolean"),
+ OUString("ich bin ein boolean"),
+ OUString("DummyFile"), RT_ACCESS_CONST, aConst);
aConst.m_type = RT_TYPE_BYTE;
aConst.m_value.aByte = 127;
- writer.setFieldData(1, OUString(RTL_CONSTASCII_USTRINGPARAM("aConstByte")),
- OUString(RTL_CONSTASCII_USTRINGPARAM("byte")),
- OUString(RTL_CONSTASCII_USTRINGPARAM("ich bin ein byte")),
- OUString(RTL_CONSTASCII_USTRINGPARAM("DummyFile")), RT_ACCESS_CONST, aConst);
+ writer.setFieldData(1, OUString("aConstByte"),
+ OUString("byte"),
+ OUString("ich bin ein byte"),
+ OUString("DummyFile"), RT_ACCESS_CONST, aConst);
aConst.m_type = RT_TYPE_INT16;
aConst.m_value.aShort = -10;
- writer.setFieldData(2, OUString(RTL_CONSTASCII_USTRINGPARAM("aConstShort")),
- OUString(RTL_CONSTASCII_USTRINGPARAM("short")),
- OUString(RTL_CONSTASCII_USTRINGPARAM("ich bin ein short")),
- OUString(RTL_CONSTASCII_USTRINGPARAM("DummyFile")), RT_ACCESS_CONST, aConst);
+ writer.setFieldData(2, OUString("aConstShort"),
+ OUString("short"),
+ OUString("ich bin ein short"),
+ OUString("DummyFile"), RT_ACCESS_CONST, aConst);
aConst.m_type = RT_TYPE_UINT16;
aConst.m_value.aUShort = 10;
- writer.setFieldData(3, OUString(RTL_CONSTASCII_USTRINGPARAM("aConstUShort")),
- OUString(RTL_CONSTASCII_USTRINGPARAM("unsigned short")),
- OUString(RTL_CONSTASCII_USTRINGPARAM("ich bin ein unsigned short")),
- OUString(RTL_CONSTASCII_USTRINGPARAM("DummyFile")), RT_ACCESS_CONST, aConst);
+ writer.setFieldData(3, OUString("aConstUShort"),
+ OUString("unsigned short"),
+ OUString("ich bin ein unsigned short"),
+ OUString("DummyFile"), RT_ACCESS_CONST, aConst);
aConst.m_type = RT_TYPE_INT32;
aConst.m_value.aLong = -100000;
- writer.setFieldData(4, OUString(RTL_CONSTASCII_USTRINGPARAM("aConstLong")),
- OUString(RTL_CONSTASCII_USTRINGPARAM("long")),
- OUString(RTL_CONSTASCII_USTRINGPARAM("ich bin ein long")),
- OUString(RTL_CONSTASCII_USTRINGPARAM("DummyFile")), RT_ACCESS_CONST, aConst);
+ writer.setFieldData(4, OUString("aConstLong"),
+ OUString("long"),
+ OUString("ich bin ein long"),
+ OUString("DummyFile"), RT_ACCESS_CONST, aConst);
aConst.m_type = RT_TYPE_UINT32;
aConst.m_value.aULong = 100000;
- writer.setFieldData(5, OUString(RTL_CONSTASCII_USTRINGPARAM("aConstULong")),
- OUString(RTL_CONSTASCII_USTRINGPARAM("unsigned long")),
- OUString(RTL_CONSTASCII_USTRINGPARAM("ich bin ein unsigned long")),
- OUString(RTL_CONSTASCII_USTRINGPARAM("DummyFile")), RT_ACCESS_CONST, aConst);
+ writer.setFieldData(5, OUString("aConstULong"),
+ OUString("unsigned long"),
+ OUString("ich bin ein unsigned long"),
+ OUString("DummyFile"), RT_ACCESS_CONST, aConst);
aConst.m_type = RT_TYPE_INT64;
aConst.m_value.aHyper = -100000000;
- writer.setFieldData(6, OUString(RTL_CONSTASCII_USTRINGPARAM("aConstHyper")),
- OUString(RTL_CONSTASCII_USTRINGPARAM("hyper")),
- OUString(RTL_CONSTASCII_USTRINGPARAM("ich bin ein hyper")),
- OUString(RTL_CONSTASCII_USTRINGPARAM("DummyFile")), RT_ACCESS_CONST, aConst);
+ writer.setFieldData(6, OUString("aConstHyper"),
+ OUString("hyper"),
+ OUString("ich bin ein hyper"),
+ OUString("DummyFile"), RT_ACCESS_CONST, aConst);
aConst.m_type = RT_TYPE_UINT64;
aConst.m_value.aUHyper = 100000000;
- writer.setFieldData(7, OUString(RTL_CONSTASCII_USTRINGPARAM("aConstULong")),
- OUString(RTL_CONSTASCII_USTRINGPARAM("unsigned long")),
- OUString(RTL_CONSTASCII_USTRINGPARAM("ich bin ein unsigned long")),
- OUString(RTL_CONSTASCII_USTRINGPARAM("DummyFile")), RT_ACCESS_CONST, aConst);
+ writer.setFieldData(7, OUString("aConstULong"),
+ OUString("unsigned long"),
+ OUString("ich bin ein unsigned long"),
+ OUString("DummyFile"), RT_ACCESS_CONST, aConst);
aConst.m_type = RT_TYPE_FLOAT;
aConst.m_value.aFloat = -2e-10f;
- writer.setFieldData(8, OUString(RTL_CONSTASCII_USTRINGPARAM("aConstFloat")),
- OUString(RTL_CONSTASCII_USTRINGPARAM("float")),
- OUString(RTL_CONSTASCII_USTRINGPARAM("ich bin ein float")),
- OUString(RTL_CONSTASCII_USTRINGPARAM("DummyFile")), RT_ACCESS_CONST, aConst);
+ writer.setFieldData(8, OUString("aConstFloat"),
+ OUString("float"),
+ OUString("ich bin ein float"),
+ OUString("DummyFile"), RT_ACCESS_CONST, aConst);
aConst.m_type = RT_TYPE_DOUBLE;
- aConst.m_value.aDouble = -2e-100; writer.setFieldData(9, OUString(RTL_CONSTASCII_USTRINGPARAM("aConstDouble")),
- OUString(RTL_CONSTASCII_USTRINGPARAM("double")),
- OUString(RTL_CONSTASCII_USTRINGPARAM("ich bin ein double")),
- OUString(RTL_CONSTASCII_USTRINGPARAM("DummyFile")), RT_ACCESS_CONST, aConst);
+ aConst.m_value.aDouble = -2e-100; writer.setFieldData(9, OUString("aConstDouble"),
+ OUString("double"),
+ OUString("ich bin ein double"),
+ OUString("DummyFile"), RT_ACCESS_CONST, aConst);
aConst.m_type = RT_TYPE_STRING;
- OUString tmpStr(RTL_CONSTASCII_USTRINGPARAM("dies ist ein unicode string"));
+ OUString tmpStr("dies ist ein unicode string");
aConst.m_value.aString = tmpStr.getStr();
- writer.setFieldData(10, OUString(RTL_CONSTASCII_USTRINGPARAM("aConstString")),
- OUString(RTL_CONSTASCII_USTRINGPARAM("string")),
- OUString(RTL_CONSTASCII_USTRINGPARAM("ich bin ein string")),
- OUString(RTL_CONSTASCII_USTRINGPARAM("DummyFile")), RT_ACCESS_CONST, aConst);
+ writer.setFieldData(10, OUString("aConstString"),
+ OUString("string"),
+ OUString("ich bin ein string"),
+ OUString("DummyFile"), RT_ACCESS_CONST, aConst);
const sal_uInt8* pBlop = writer.getBlop();
sal_uInt32 aBlopSize = writer.getBlopSize();
@@ -171,20 +171,20 @@ void test_coreReflection()
{
RegistryTypeWriter writer(RT_TYPE_STRUCT,
- OUString(RTL_CONSTASCII_USTRINGPARAM("ModuleA/StructA")),
+ OUString("ModuleA/StructA"),
OUString(), 3, 0, 0);
- writer.setDoku(OUString(RTL_CONSTASCII_USTRINGPARAM("Hallo ich bin eine Struktur")));
- writer.setFileName(OUString(RTL_CONSTASCII_USTRINGPARAM("DummyFile")));
+ writer.setDoku(OUString("Hallo ich bin eine Struktur"));
+ writer.setFileName(OUString("DummyFile"));
- writer.setFieldData(0, OUString(RTL_CONSTASCII_USTRINGPARAM("asal_uInt32")),
- OUString(RTL_CONSTASCII_USTRINGPARAM("unsigned long")),
+ writer.setFieldData(0, OUString("asal_uInt32"),
+ OUString("unsigned long"),
OUString(), OUString(), RT_ACCESS_READWRITE);
- writer.setFieldData(1, OUString(RTL_CONSTASCII_USTRINGPARAM("aXInterface")),
- OUString(RTL_CONSTASCII_USTRINGPARAM("stardiv/uno/XInterface")),
+ writer.setFieldData(1, OUString("aXInterface"),
+ OUString("stardiv/uno/XInterface"),
OUString(), OUString(), RT_ACCESS_READWRITE);
- writer.setFieldData(2, OUString(RTL_CONSTASCII_USTRINGPARAM("aSequence")),
- OUString(RTL_CONSTASCII_USTRINGPARAM("[]ModuleA/EnumA")),
+ writer.setFieldData(2, OUString("aSequence"),
+ OUString("[]ModuleA/EnumA"),
OUString(), OUString(), RT_ACCESS_READWRITE);
const sal_uInt8* pBlop = writer.getBlop();
@@ -195,7 +195,7 @@ void test_coreReflection()
{
RegistryTypeWriter writer(RT_TYPE_ENUM,
- OUString(RTL_CONSTASCII_USTRINGPARAM("ModuleA/EnumA")),
+ OUString("ModuleA/EnumA"),
OUString(), 2, 0, 0);
RTConstValue aConst;
@@ -203,15 +203,15 @@ void test_coreReflection()
aConst.m_type = RT_TYPE_UINT32;
aConst.m_value.aULong = 10;
- writer.setDoku(OUString(RTL_CONSTASCII_USTRINGPARAM("Hallo ich bin ein Enum")));
- writer.setFileName(OUString(RTL_CONSTASCII_USTRINGPARAM("DummyFile")));
+ writer.setDoku(OUString("Hallo ich bin ein Enum"));
+ writer.setFileName(OUString("DummyFile"));
- writer.setFieldData(0, OUString(RTL_CONSTASCII_USTRINGPARAM("ENUM_VAL_1")),
- OUString(), OUString(RTL_CONSTASCII_USTRINGPARAM("ich bin ein enum value")),
+ writer.setFieldData(0, OUString("ENUM_VAL_1"),
+ OUString(), OUString("ich bin ein enum value"),
OUString(), RT_ACCESS_CONST, aConst);
aConst.m_value.aULong = 10;
- writer.setFieldData(1, OUString(RTL_CONSTASCII_USTRINGPARAM("ENUM_VAL_2")),
+ writer.setFieldData(1, OUString("ENUM_VAL_2"),
OUString(), OUString(), OUString(), RT_ACCESS_CONST, aConst);
const sal_uInt8* pBlop = writer.getBlop();
@@ -222,38 +222,38 @@ void test_coreReflection()
{
RegistryTypeWriter writer(RT_TYPE_INTERFACE,
- OUString(RTL_CONSTASCII_USTRINGPARAM("ModuleA/XInterfaceA")),
- OUString(RTL_CONSTASCII_USTRINGPARAM("stardiv/uno/XInterface")),
+ OUString("ModuleA/XInterfaceA"),
+ OUString("stardiv/uno/XInterface"),
4, 1, 0);
RTConstValue aConst;
RTUik aUik = {1,2,3,4,5};
writer.setUik(aUik);
- writer.setDoku(OUString(RTL_CONSTASCII_USTRINGPARAM("Hallo ich bin ein Interface")));
- writer.setFileName(OUString(RTL_CONSTASCII_USTRINGPARAM("DummyFile")));
+ writer.setDoku(OUString("Hallo ich bin ein Interface"));
+ writer.setFileName(OUString("DummyFile"));
- writer.setFieldData(0, OUString(RTL_CONSTASCII_USTRINGPARAM("aString")),
- OUString(RTL_CONSTASCII_USTRINGPARAM("string")), OUString(), OUString(), RT_ACCESS_READWRITE);
- writer.setFieldData(1, OUString(RTL_CONSTASCII_USTRINGPARAM("aStruct")),
- OUString(RTL_CONSTASCII_USTRINGPARAM("ModuleA/StructA")),
+ writer.setFieldData(0, OUString("aString"),
+ OUString("string"), OUString(), OUString(), RT_ACCESS_READWRITE);
+ writer.setFieldData(1, OUString("aStruct"),
+ OUString("ModuleA/StructA"),
OUString(), OUString(), RT_ACCESS_READONLY);
- writer.setFieldData(2, OUString(RTL_CONSTASCII_USTRINGPARAM("aEnum")),
- OUString(RTL_CONSTASCII_USTRINGPARAM("ModuleA/EnumA")), OUString(), OUString(), RT_ACCESS_BOUND);
+ writer.setFieldData(2, OUString("aEnum"),
+ OUString("ModuleA/EnumA"), OUString(), OUString(), RT_ACCESS_BOUND);
aConst.m_type = RT_TYPE_UINT16;
aConst.m_value.aUShort = 12;
- writer.setFieldData(3, OUString(RTL_CONSTASCII_USTRINGPARAM("aConstUShort")),
- OUString(RTL_CONSTASCII_USTRINGPARAM("unsigned short")), OUString(),
- OUString(RTL_CONSTASCII_USTRINGPARAM("DummyFile")), RT_ACCESS_CONST, aConst);
-
- writer.setMethodData(0, OUString(RTL_CONSTASCII_USTRINGPARAM("methodA")),
- OUString(RTL_CONSTASCII_USTRINGPARAM("double")), RT_MODE_TWOWAY, 2, 1,
- OUString(RTL_CONSTASCII_USTRINGPARAM("Hallo ich bin die methodA")));
- writer.setParamData(0, 0, OUString(RTL_CONSTASCII_USTRINGPARAM("ModuleA/StructA")),
- OUString(RTL_CONSTASCII_USTRINGPARAM("aStruct")), RT_PARAM_IN);
- writer.setParamData(0, 1, OUString(RTL_CONSTASCII_USTRINGPARAM("unsigned short")),
- OUString(RTL_CONSTASCII_USTRINGPARAM("aShort")), RT_PARAM_INOUT);
- writer.setExcData(0, 0, OUString(RTL_CONSTASCII_USTRINGPARAM("ModuleA/ExceptionA")));
+ writer.setFieldData(3, OUString("aConstUShort"),
+ OUString("unsigned short"), OUString(),
+ OUString("DummyFile"), RT_ACCESS_CONST, aConst);
+
+ writer.setMethodData(0, OUString("methodA"),
+ OUString("double"), RT_MODE_TWOWAY, 2, 1,
+ OUString("Hallo ich bin die methodA"));
+ writer.setParamData(0, 0, OUString("ModuleA/StructA"),
+ OUString("aStruct"), RT_PARAM_IN);
+ writer.setParamData(0, 1, OUString("unsigned short"),
+ OUString("aShort"), RT_PARAM_INOUT);
+ writer.setExcData(0, 0, OUString("ModuleA/ExceptionA"));
const sal_uInt8* pBlop = writer.getBlop();
sal_uInt32 aBlopSize = writer.getBlopSize();
@@ -282,14 +282,14 @@ void test_coreReflection()
{
RegistryTypeWriter writer(RT_TYPE_EXCEPTION,
- OUString(RTL_CONSTASCII_USTRINGPARAM("ModuleA/ExceptionA")),
+ OUString("ModuleA/ExceptionA"),
OUString(), 1, 0, 0);
- writer.setDoku(OUString(RTL_CONSTASCII_USTRINGPARAM("Hallo ich bin eine Exception")));
+ writer.setDoku(OUString("Hallo ich bin eine Exception"));
- writer.setFieldData(0, OUString(RTL_CONSTASCII_USTRINGPARAM("aSource")),
- OUString(RTL_CONSTASCII_USTRINGPARAM("stardiv/uno/XInterface")),
- OUString(RTL_CONSTASCII_USTRINGPARAM("ich bin ein interface member")),
+ writer.setFieldData(0, OUString("aSource"),
+ OUString("stardiv/uno/XInterface"),
+ OUString("ich bin ein interface member"),
OUString(), RT_ACCESS_READWRITE);
const sal_uInt8* pBlop = writer.getBlop();
@@ -300,26 +300,26 @@ void test_coreReflection()
{
RegistryTypeWriter writer(RT_TYPE_SERVICE,
- OUString(RTL_CONSTASCII_USTRINGPARAM("ModuleA/ServiceA")),
+ OUString("ModuleA/ServiceA"),
OUString(), 1, 0, 4);
- writer.setDoku(OUString(RTL_CONSTASCII_USTRINGPARAM("Hallo ich bin ein Service")));
- writer.setFileName(OUString(RTL_CONSTASCII_USTRINGPARAM("DummyFile")));
+ writer.setDoku(OUString("Hallo ich bin ein Service"));
+ writer.setFileName(OUString("DummyFile"));
- writer.setFieldData(0, OUString(RTL_CONSTASCII_USTRINGPARAM("aProperty")),
- OUString(RTL_CONSTASCII_USTRINGPARAM("stardiv/uno/XInterface")),
- OUString(RTL_CONSTASCII_USTRINGPARAM("ich bin eine property")),
+ writer.setFieldData(0, OUString("aProperty"),
+ OUString("stardiv/uno/XInterface"),
+ OUString("ich bin eine property"),
OUString(), RT_ACCESS_READWRITE);
- writer.setReferenceData(0, OUString(RTL_CONSTASCII_USTRINGPARAM("ModuleA/XInterfaceA")), RT_REF_SUPPORTS,
- OUString(RTL_CONSTASCII_USTRINGPARAM("Hallo ich eine Reference auf ein supported interface")),
+ writer.setReferenceData(0, OUString("ModuleA/XInterfaceA"), RT_REF_SUPPORTS,
+ OUString("Hallo ich eine Reference auf ein supported interface"),
RT_ACCESS_OPTIONAL);
- writer.setReferenceData(1, OUString(RTL_CONSTASCII_USTRINGPARAM("ModuleA/XInterfaceA")), RT_REF_OBSERVES,
- OUString(RTL_CONSTASCII_USTRINGPARAM("Hallo ich eine Reference auf ein observed interface")));
- writer.setReferenceData(2, OUString(RTL_CONSTASCII_USTRINGPARAM("ModuleA/ServiceB")), RT_REF_EXPORTS,
- OUString(RTL_CONSTASCII_USTRINGPARAM("Hallo ich eine Reference auf einen exported service")));
- writer.setReferenceData(3, OUString(RTL_CONSTASCII_USTRINGPARAM("ModuleA/ServiceB")), RT_REF_NEEDS,
- OUString(RTL_CONSTASCII_USTRINGPARAM("Hallo ich eine Reference auf einen needed service")));
+ writer.setReferenceData(1, OUString("ModuleA/XInterfaceA"), RT_REF_OBSERVES,
+ OUString("Hallo ich eine Reference auf ein observed interface"));
+ writer.setReferenceData(2, OUString("ModuleA/ServiceB"), RT_REF_EXPORTS,
+ OUString("Hallo ich eine Reference auf einen exported service"));
+ writer.setReferenceData(3, OUString("ModuleA/ServiceB"), RT_REF_NEEDS,
+ OUString("Hallo ich eine Reference auf einen needed service"));
const sal_uInt8* pBlop = writer.getBlop();
sal_uInt32 aBlopSize = writer.getBlopSize();
@@ -344,32 +344,32 @@ void test_coreReflection()
{
RegistryTypeWriter writer(RT_TYPE_CONSTANTS,
- OUString(RTL_CONSTASCII_USTRINGPARAM("ModuleA/ConstansA")),
+ OUString("ModuleA/ConstansA"),
OUString(), 3, 0, 0);
RTConstValue aConst;
- writer.setDoku(OUString(RTL_CONSTASCII_USTRINGPARAM("Hallo ich bin eine Constants Group")));
- writer.setFileName(OUString(RTL_CONSTASCII_USTRINGPARAM("DummyFile")));
+ writer.setDoku(OUString("Hallo ich bin eine Constants Group"));
+ writer.setFileName(OUString("DummyFile"));
aConst.m_type = RT_TYPE_BOOL;
aConst.m_value.aBool = sal_True;
- writer.setFieldData(0, OUString(RTL_CONSTASCII_USTRINGPARAM("ConstantsA_aConstBool")),
- OUString(RTL_CONSTASCII_USTRINGPARAM("boolean")),
- OUString(RTL_CONSTASCII_USTRINGPARAM("ich bin ein boolean")),
- OUString(RTL_CONSTASCII_USTRINGPARAM("DummyFile")), RT_ACCESS_CONST, aConst);
+ writer.setFieldData(0, OUString("ConstantsA_aConstBool"),
+ OUString("boolean"),
+ OUString("ich bin ein boolean"),
+ OUString("DummyFile"), RT_ACCESS_CONST, aConst);
aConst.m_type = RT_TYPE_BYTE;
aConst.m_value.aByte = 127;
- writer.setFieldData(1, OUString(RTL_CONSTASCII_USTRINGPARAM("ConstantsA_aConstByte")),
- OUString(RTL_CONSTASCII_USTRINGPARAM("byte")),
- OUString(RTL_CONSTASCII_USTRINGPARAM("ich bin ein byte")),
- OUString(RTL_CONSTASCII_USTRINGPARAM("DummyFile")), RT_ACCESS_CONST, aConst);
+ writer.setFieldData(1, OUString("ConstantsA_aConstByte"),
+ OUString("byte"),
+ OUString("ich bin ein byte"),
+ OUString("DummyFile"), RT_ACCESS_CONST, aConst);
aConst.m_type = RT_TYPE_INT16;
aConst.m_value.aShort = -10;
- writer.setFieldData(2, OUString(RTL_CONSTASCII_USTRINGPARAM("ConstantsA_aConstShort")),
- OUString(RTL_CONSTASCII_USTRINGPARAM("short")),
- OUString(RTL_CONSTASCII_USTRINGPARAM("ich bin ein short")),
- OUString(RTL_CONSTASCII_USTRINGPARAM("DummyFile")), RT_ACCESS_CONST, aConst);
+ writer.setFieldData(2, OUString("ConstantsA_aConstShort"),
+ OUString("short"),
+ OUString("ich bin ein short"),
+ OUString("DummyFile"), RT_ACCESS_CONST, aConst);
const sal_uInt8* pBlop = writer.getBlop();
sal_uInt32 aBlopSize = writer.getBlopSize();
@@ -389,40 +389,40 @@ void test_registry_CppApi()
RegistryKey rootKey, key1, key2, key3, key4 ,key5, key6, key7, key8, key9;
- REG_ENSURE(!myRegistry->create(OUString(RTL_CONSTASCII_USTRINGPARAM("test.rdb"))), "test_registry_CppApi error 1");
+ REG_ENSURE(!myRegistry->create(OUString("test.rdb")), "test_registry_CppApi error 1");
REG_ENSURE(!myRegistry->openRootKey(rootKey), "test_registry_CppApi error 2");
- REG_ENSURE(!rootKey.createKey(OUString(RTL_CONSTASCII_USTRINGPARAM("myFirstKey")), key1), "test_registry_CppApi error 3");
- REG_ENSURE(!rootKey.createKey(OUString(RTL_CONSTASCII_USTRINGPARAM("mySecondKey")), key2), "test_registry_CppApi error 4");
- REG_ENSURE(!key1.createKey(OUString(RTL_CONSTASCII_USTRINGPARAM("X")), key3), "test_registry_CppApi error 5");
- REG_ENSURE(!key1.createKey(OUString(RTL_CONSTASCII_USTRINGPARAM("mySecondSubKey")), key4), "test_registry_CppApi error 6");
- REG_ENSURE(!rootKey.createKey(OUString(RTL_CONSTASCII_USTRINGPARAM("myThirdKey")), key5), "test_registry_CppApi error 6a");
+ REG_ENSURE(!rootKey.createKey(OUString("myFirstKey"), key1), "test_registry_CppApi error 3");
+ REG_ENSURE(!rootKey.createKey(OUString("mySecondKey"), key2), "test_registry_CppApi error 4");
+ REG_ENSURE(!key1.createKey(OUString("X"), key3), "test_registry_CppApi error 5");
+ REG_ENSURE(!key1.createKey(OUString("mySecondSubKey"), key4), "test_registry_CppApi error 6");
+ REG_ENSURE(!rootKey.createKey(OUString("myThirdKey"), key5), "test_registry_CppApi error 6a");
- REG_ENSURE(!key5.createKey(OUString(RTL_CONSTASCII_USTRINGPARAM("1")), key4), "test_registry_CppApi error 6b");
- REG_ENSURE(!key4.createKey(OUString(RTL_CONSTASCII_USTRINGPARAM("2")), key3), "test_registry_CppApi error 6c");
- REG_ENSURE(!key5.openKey(OUString(RTL_CONSTASCII_USTRINGPARAM("1")), key4), "test_registry_CppApi error 6d");
- REG_ENSURE(!rootKey.openKey(OUString(RTL_CONSTASCII_USTRINGPARAM("/myThirdKey/1")), key4), "test_registry_CppApi error 6e");
+ REG_ENSURE(!key5.createKey(OUString("1"), key4), "test_registry_CppApi error 6b");
+ REG_ENSURE(!key4.createKey(OUString("2"), key3), "test_registry_CppApi error 6c");
+ REG_ENSURE(!key5.openKey(OUString("1"), key4), "test_registry_CppApi error 6d");
+ REG_ENSURE(!rootKey.openKey(OUString("/myThirdKey/1"), key4), "test_registry_CppApi error 6e");
REG_ENSURE(key4.getName() == "/myThirdKey/1", "test_registry_CppApi error 6f");
- REG_ENSURE(!rootKey.createKey(OUString(RTL_CONSTASCII_USTRINGPARAM("myFourthKey")), key6), "test_registry_CppApi error 7");
- REG_ENSURE(!rootKey.createKey(OUString(RTL_CONSTASCII_USTRINGPARAM("myFifthKey")), key6), "test_registry_CppApi error 7a");
- REG_ENSURE(!rootKey.createKey(OUString(RTL_CONSTASCII_USTRINGPARAM("mySixthKey")), key6), "test_registry_CppApi error 7b");
+ REG_ENSURE(!rootKey.createKey(OUString("myFourthKey"), key6), "test_registry_CppApi error 7");
+ REG_ENSURE(!rootKey.createKey(OUString("myFifthKey"), key6), "test_registry_CppApi error 7a");
+ REG_ENSURE(!rootKey.createKey(OUString("mySixthKey"), key6), "test_registry_CppApi error 7b");
// Link Test
//
- REG_ENSURE(!rootKey.createKey(OUString(RTL_CONSTASCII_USTRINGPARAM("/myFourthKey/X")), key7), "test_registry_CppApi error 7c)");;
- REG_ENSURE(!key6.createLink(OUString(RTL_CONSTASCII_USTRINGPARAM("myFirstLink")), OUString(RTL_CONSTASCII_USTRINGPARAM("/myFourthKey/X"))), "test_registry_CppApi error 7d");
- REG_ENSURE(!key6.createKey(OUString(RTL_CONSTASCII_USTRINGPARAM("mySixthSubKey")), key7), "test_registry_CppApi error 7e");
+ REG_ENSURE(!rootKey.createKey(OUString("/myFourthKey/X"), key7), "test_registry_CppApi error 7c)");;
+ REG_ENSURE(!key6.createLink(OUString("myFirstLink"), OUString("/myFourthKey/X")), "test_registry_CppApi error 7d");
+ REG_ENSURE(!key6.createKey(OUString("mySixthSubKey"), key7), "test_registry_CppApi error 7e");
OUString linkTarget;
- REG_ENSURE(!key6.getLinkTarget(OUString(RTL_CONSTASCII_USTRINGPARAM("myFirstLink")), linkTarget), "test_registry_CppApi error 7f");
+ REG_ENSURE(!key6.getLinkTarget(OUString("myFirstLink"), linkTarget), "test_registry_CppApi error 7f");
REG_ENSURE(linkTarget == "/myFourthKey/X", "test_registry_CppApi error 7g");
RegistryKeyNames* pSubKeyNames = new RegistryKeyNames();
sal_uInt32 nSubKeys=0;
- REG_ENSURE(!rootKey.getKeyNames(OUString(RTL_CONSTASCII_USTRINGPARAM("mySixthKey")), *pSubKeyNames), "test_registry_CppApi error 7h)");
+ REG_ENSURE(!rootKey.getKeyNames(OUString("mySixthKey"), *pSubKeyNames), "test_registry_CppApi error 7h)");
REG_ENSURE(pSubKeyNames->getLength() == 2, "test_registry_CppApi error 7i)");
for (sal_uInt32 i=0; i < pSubKeyNames->getLength(); i++)
@@ -438,32 +438,32 @@ void test_registry_CppApi()
REG_ENSURE(!key7.closeKey(), "test_registry_CppApi error 7k1");
delete pSubKeyNames;
- REG_ENSURE(!rootKey.openKey(OUString(RTL_CONSTASCII_USTRINGPARAM("/mySixthKey/myFirstLink")), key6), "test_registry_CppApi error 7l");
+ REG_ENSURE(!rootKey.openKey(OUString("/mySixthKey/myFirstLink"), key6), "test_registry_CppApi error 7l");
// REG_ENSURE(key6.getName() == "/myFourthKey/X", "test_registry_CppApi error 7m");
- REG_ENSURE(!rootKey.openKey(OUString(RTL_CONSTASCII_USTRINGPARAM("myFifthKey")), key6), "test_registry_CppApi error 7m1");
- REG_ENSURE(!key6.createLink(OUString(RTL_CONSTASCII_USTRINGPARAM("mySecondLink")),
- OUString(RTL_CONSTASCII_USTRINGPARAM("/mySixthKey/myFirstLink"))), "test_registry_CppApi error 7m2");
+ REG_ENSURE(!rootKey.openKey(OUString("myFifthKey"), key6), "test_registry_CppApi error 7m1");
+ REG_ENSURE(!key6.createLink(OUString("mySecondLink"),
+ OUString("/mySixthKey/myFirstLink")), "test_registry_CppApi error 7m2");
- REG_ENSURE(!rootKey.openKey(OUString(RTL_CONSTASCII_USTRINGPARAM("/myFifthKey/mySecondLink")), key6), "test_registry_CppApi error 7m3");
+ REG_ENSURE(!rootKey.openKey(OUString("/myFifthKey/mySecondLink"), key6), "test_registry_CppApi error 7m3");
// REG_ENSURE(key6.getName() == "/myFourthKey/X", "test_registry_CppApi error 7m4");
- REG_ENSURE(!rootKey.createKey(OUString(RTL_CONSTASCII_USTRINGPARAM("/myFifthKey/mySecondLink/myFirstLinkSubKey")), key7), "test_registry_CppApi error 7m5");
+ REG_ENSURE(!rootKey.createKey(OUString("/myFifthKey/mySecondLink/myFirstLinkSubKey"), key7), "test_registry_CppApi error 7m5");
REG_ENSURE(key7.getName() == "/myFourthKey/X/myFirstLinkSubKey", "test_registry_CppApi error 7m6");
- REG_ENSURE(!key7.createLink(OUString(RTL_CONSTASCII_USTRINGPARAM("myThirdLink")), OUString(RTL_CONSTASCII_USTRINGPARAM("/myFifthKey/mySecondLink"))), "test_registry_CppApi error 7m7");
- REG_ENSURE(!rootKey.openKey(OUString(RTL_CONSTASCII_USTRINGPARAM("/myFourthKey/X/myFirstLinkSubKey/myThirdLink")), key7), "test_registry_CppApi error 7m8");
-// REG_ENSURE(!key7.openKey(OUString(RTL_CONSTASCII_USTRINGPARAM("/myFirstLinkSubKey/myThirdLink/myFirstLinkSubKey/myThirdLink")), key6), "test_registry_CppApi error 7m9");
+ REG_ENSURE(!key7.createLink(OUString("myThirdLink"), OUString("/myFifthKey/mySecondLink")), "test_registry_CppApi error 7m7");
+ REG_ENSURE(!rootKey.openKey(OUString("/myFourthKey/X/myFirstLinkSubKey/myThirdLink"), key7), "test_registry_CppApi error 7m8");
+// REG_ENSURE(!key7.openKey(OUString("/myFirstLinkSubKey/myThirdLink/myFirstLinkSubKey/myThirdLink"), key6), "test_registry_CppApi error 7m9");
// REG_ENSURE(key7.getName() == "/myFourthKey/X", "test_registry_CppApi error 7m10");
REG_ENSURE(!key7.closeKey(), "test_registry_CppApi error 7m11");
- REG_ENSURE(!rootKey.deleteLink(OUString(RTL_CONSTASCII_USTRINGPARAM("/myFifthKey/mySecondLink"))), "test_registry_CppApi error 7m12");
+ REG_ENSURE(!rootKey.deleteLink(OUString("/myFifthKey/mySecondLink")), "test_registry_CppApi error 7m12");
- REG_ENSURE(!rootKey.createLink(OUString(RTL_CONSTASCII_USTRINGPARAM("/myFifthKey/mySecondLink")),
- OUString(RTL_CONSTASCII_USTRINGPARAM("/myFourthKey/X/myFirstLinkSubKey/myThirdLink"))),
+ REG_ENSURE(!rootKey.createLink(OUString("/myFifthKey/mySecondLink"),
+ OUString("/myFourthKey/X/myFirstLinkSubKey/myThirdLink")),
"test_registry_CppApi error 7m13");
-// REG_ENSURE(rootKey.openKey(OUString(RTL_CONSTASCII_USTRINGPARAM("/myFourthKey/X/myFirstLinkSubKey/myThirdLink")), key7) == REG_DETECT_RECURSION,
+// REG_ENSURE(rootKey.openKey(OUString("/myFourthKey/X/myFirstLinkSubKey/myThirdLink"), key7) == REG_DETECT_RECURSION,
// "test_registry_CppApi error 7m14");
// REG_ENSURE(key7.closeKey() == REG_INVALID_KEY, "test_registry_CppApi error 7m11");
@@ -471,7 +471,7 @@ void test_registry_CppApi()
RegistryKeyNames subKeyNames;
nSubKeys=0;
- REG_ENSURE(!rootKey.getKeyNames(OUString(RTL_CONSTASCII_USTRINGPARAM("mySixthKey")), subKeyNames), "test_registry_CppApi error 7n");
+ REG_ENSURE(!rootKey.getKeyNames(OUString("mySixthKey"), subKeyNames), "test_registry_CppApi error 7n");
nSubKeys = subKeyNames.getLength();
REG_ENSURE(nSubKeys == 2, "test_registry_CppApi error 7n1");
@@ -482,7 +482,7 @@ void test_registry_CppApi()
RegistryKeyArray subKeys;
nSubKeys=0;
- REG_ENSURE(!rootKey.openSubKeys(OUString(RTL_CONSTASCII_USTRINGPARAM("myFirstKey")), subKeys), "test_registry_CppApi error 7o");
+ REG_ENSURE(!rootKey.openSubKeys(OUString("myFirstKey"), subKeys), "test_registry_CppApi error 7o");
nSubKeys = subKeys.getLength();
REG_ENSURE(nSubKeys == 2, "test_registry_CppApi error 7o1");
@@ -492,24 +492,24 @@ void test_registry_CppApi()
REG_ENSURE(!rootKey.closeSubKeys(subKeys), "test_registry_CppApi error 7q)");
- REG_ENSURE(!rootKey.createKey(OUString(RTL_CONSTASCII_USTRINGPARAM("/TEST")), key8), "test_registry_CppApi error 8");
- REG_ENSURE(!rootKey.createKey(OUString(RTL_CONSTASCII_USTRINGPARAM("/TEST/Child1")), key8), "test_registry_CppApi error 8a");
- REG_ENSURE(!rootKey.createKey(OUString(RTL_CONSTASCII_USTRINGPARAM("/TEST/Child2")), key8), "test_registry_CppApi error 8a1");
- REG_ENSURE(!rootKey.openKey(OUString(RTL_CONSTASCII_USTRINGPARAM("/TEST")), key9), "test_registry_CppApi error 8b");
+ REG_ENSURE(!rootKey.createKey(OUString("/TEST"), key8), "test_registry_CppApi error 8");
+ REG_ENSURE(!rootKey.createKey(OUString("/TEST/Child1"), key8), "test_registry_CppApi error 8a");
+ REG_ENSURE(!rootKey.createKey(OUString("/TEST/Child2"), key8), "test_registry_CppApi error 8a1");
+ REG_ENSURE(!rootKey.openKey(OUString("/TEST"), key9), "test_registry_CppApi error 8b");
REG_ENSURE(!key8.closeKey() && !key9.closeKey(), "test_registry_CppApi error 8b1");
- REG_ENSURE(!rootKey.openKey(OUString(RTL_CONSTASCII_USTRINGPARAM("/TEST")), key8), "test_registry_CppApi error 8b");
+ REG_ENSURE(!rootKey.openKey(OUString("/TEST"), key8), "test_registry_CppApi error 8b");
REG_ENSURE(!key8.closeKey(), "test_registry_CppApi error 8c");
- REG_ENSURE(!rootKey.openKey(OUString(RTL_CONSTASCII_USTRINGPARAM("TEST")), key8), "test_registry_CppApi error 8c");
+ REG_ENSURE(!rootKey.openKey(OUString("TEST"), key8), "test_registry_CppApi error 8c");
REG_ENSURE(!key8.closeKey(), "test_registry_CppApi error 8d");
sal_Char* Value=(sal_Char*)"Mein erster Value";
- REG_ENSURE(!rootKey.setValue(OUString(RTL_CONSTASCII_USTRINGPARAM("mySecondKey")), RG_VALUETYPE_STRING, Value, 18), "test_registry_CppApi error 9");
+ REG_ENSURE(!rootKey.setValue(OUString("mySecondKey"), RG_VALUETYPE_STRING, Value, 18), "test_registry_CppApi error 9");
RegValueType valueType;
sal_uInt32 valueSize;
sal_Char* readValue;
- REG_ENSURE(!rootKey.getValueInfo(OUString(RTL_CONSTASCII_USTRINGPARAM("mySecondKey")), &valueType, &valueSize), "test_registry_CppApi error 9a");
+ REG_ENSURE(!rootKey.getValueInfo(OUString("mySecondKey"), &valueType, &valueSize), "test_registry_CppApi error 9a");
readValue = (sal_Char*)rtl_allocateMemory(valueSize);
REG_ENSURE(!key2.getValue(OUString(), readValue), "test_registry_CppApi error 10");
@@ -528,16 +528,16 @@ void test_registry_CppApi()
pList[1]=n2;
pList[2]=n3;
- REG_ENSURE(!rootKey.setStringListValue(OUString(RTL_CONSTASCII_USTRINGPARAM("myFourthKey")), (sal_Char**)pList, 3), "test_registry_CppApi error 13a");
+ REG_ENSURE(!rootKey.setStringListValue(OUString("myFourthKey"), (sal_Char**)pList, 3), "test_registry_CppApi error 13a");
RegistryValueList<sal_Char*> valueList;
- REG_ENSURE(!rootKey.getStringListValue(OUString(RTL_CONSTASCII_USTRINGPARAM("myFourthKey")), valueList), "test_registry_CppApi error 13b");
+ REG_ENSURE(!rootKey.getStringListValue(OUString("myFourthKey"), valueList), "test_registry_CppApi error 13b");
REG_ENSURE(strcmp(n1, valueList.getElement(0)) == 0, "test_registry_CppApi error 13c");
REG_ENSURE(strcmp(n2, valueList.getElement(1)) == 0, "test_registry_CppApi error 13d");
REG_ENSURE(strcmp(n3, valueList.getElement(2)) == 0, "test_registry_CppApi error 13e");
- REG_ENSURE(!rootKey.getValueInfo(OUString(RTL_CONSTASCII_USTRINGPARAM("myFourthKey")), &valueType, &valueSize), "test_registry_CppApi error 13e1");
+ REG_ENSURE(!rootKey.getValueInfo(OUString("myFourthKey"), &valueType, &valueSize), "test_registry_CppApi error 13e1");
REG_ENSURE(valueType == RG_VALUETYPE_STRINGLIST, "test_registry_CppApi error 13e2");
REG_ENSURE(valueSize == 3, "test_registry_CppApi error 13e3");
@@ -546,40 +546,40 @@ void test_registry_CppApi()
pLong[1] = 456;
pLong[2] = 789;
- REG_ENSURE(!rootKey.setLongListValue(OUString(RTL_CONSTASCII_USTRINGPARAM("myFifthKey")), pLong, 3), "test_registry_CppApi error 13f");
+ REG_ENSURE(!rootKey.setLongListValue(OUString("myFifthKey"), pLong, 3), "test_registry_CppApi error 13f");
RegistryValueList<sal_Int32> longList;
- REG_ENSURE(!rootKey.getLongListValue(OUString(RTL_CONSTASCII_USTRINGPARAM("myFifthKey")), longList), "test_registry_CppApi error 13g");
+ REG_ENSURE(!rootKey.getLongListValue(OUString("myFifthKey"), longList), "test_registry_CppApi error 13g");
REG_ENSURE(pLong[0] == longList.getElement(0), "test_registry_CppApi error 13h");
REG_ENSURE(pLong[1] == longList.getElement(1), "test_registry_CppApi error 13i");
REG_ENSURE(pLong[2] == longList.getElement(2), "test_registry_CppApi error 13j");
- OUString sWTestValue(RTL_CONSTASCII_USTRINGPARAM("Mein erster Unicode Value"));
+ OUString sWTestValue("Mein erster Unicode Value");
const sal_Unicode* wTestValue= sWTestValue.getStr();
- REG_ENSURE(!rootKey.setValue(OUString(RTL_CONSTASCII_USTRINGPARAM("mySixthKey")), RG_VALUETYPE_UNICODE, (void*)wTestValue,
+ REG_ENSURE(!rootKey.setValue(OUString("mySixthKey"), RG_VALUETYPE_UNICODE, (void*)wTestValue,
(rtl_ustr_getLength(wTestValue)+1)*sizeof(sal_Unicode)), "test_registry_CppApi error 13j1");
- REG_ENSURE(!rootKey.getValueInfo(OUString(RTL_CONSTASCII_USTRINGPARAM("mySixthKey")), &valueType, &valueSize), "test_registry_CppApi error 13j2");
+ REG_ENSURE(!rootKey.getValueInfo(OUString("mySixthKey"), &valueType, &valueSize), "test_registry_CppApi error 13j2");
sal_Unicode* pTmpValue = (sal_Unicode*)rtl_allocateMemory(valueSize);
- REG_ENSURE(!rootKey.getValue(OUString(RTL_CONSTASCII_USTRINGPARAM("mySixthKey")), pTmpValue), "test_registry_CppApi error 13j3");
+ REG_ENSURE(!rootKey.getValue(OUString("mySixthKey"), pTmpValue), "test_registry_CppApi error 13j3");
REG_ENSURE(rtl_ustr_getLength(wTestValue) == rtl_ustr_getLength(pTmpValue), "test_registry_CppApi error 13j4");
REG_ENSURE(rtl_ustr_compare(wTestValue, pTmpValue) == 0, "test_registry_CppApi error 13j4");
const sal_Unicode* pUnicode[3];
- OUString w1(RTL_CONSTASCII_USTRINGPARAM("Hallo"));
- OUString w2(RTL_CONSTASCII_USTRINGPARAM("jetzt komm"));
- OUString w3(RTL_CONSTASCII_USTRINGPARAM("ich als unicode"));
+ OUString w1("Hallo");
+ OUString w2("jetzt komm");
+ OUString w3("ich als unicode");
pUnicode[0]=w1.getStr();
pUnicode[1]=w2.getStr();
pUnicode[2]=w3.getStr();
- REG_ENSURE(!rootKey.setUnicodeListValue(OUString(RTL_CONSTASCII_USTRINGPARAM("mySixthKey")), (sal_Unicode**)pUnicode, 3), "test_registry_CppApi error 13k");
+ REG_ENSURE(!rootKey.setUnicodeListValue(OUString("mySixthKey"), (sal_Unicode**)pUnicode, 3), "test_registry_CppApi error 13k");
RegistryValueList<sal_Unicode*> unicodeList;
- REG_ENSURE(!rootKey.getUnicodeListValue(OUString(RTL_CONSTASCII_USTRINGPARAM("mySixthKey")), unicodeList), "test_registry_CppApi error 13l");
+ REG_ENSURE(!rootKey.getUnicodeListValue(OUString("mySixthKey"), unicodeList), "test_registry_CppApi error 13l");
REG_ENSURE(rtl_ustr_compare(w1, unicodeList.getElement(0)) == 0, "test_registry_CppApi error 13m");
REG_ENSURE(rtl_ustr_compare(w2, unicodeList.getElement(1)) == 0, "test_registry_CppApi error 13n");
@@ -591,16 +591,16 @@ void test_registry_CppApi()
!key3.closeKey() &&
!key4.closeKey(), "test_registry_CppApi error 14");
- REG_ENSURE(!rootKey.deleteKey(OUString(RTL_CONSTASCII_USTRINGPARAM("myFirstKey"))), "test_registry_CppApi error 15");
+ REG_ENSURE(!rootKey.deleteKey(OUString("myFirstKey")), "test_registry_CppApi error 15");
REG_ENSURE(!key2.closeKey(), "test_registry_CppApi error 16");
- REG_ENSURE(!rootKey.openKey(OUString(RTL_CONSTASCII_USTRINGPARAM("mySecondKey")), key2), "test_registry_CppApi error 17");
+ REG_ENSURE(!rootKey.openKey(OUString("mySecondKey"), key2), "test_registry_CppApi error 17");
REG_ENSURE(!key5.closeKey(), "test_registry_CppApi error 18");
- REG_ENSURE(!rootKey.deleteKey(OUString(RTL_CONSTASCII_USTRINGPARAM("myThirdKey"))), "test_registry_CppApi error 19");
+ REG_ENSURE(!rootKey.deleteKey(OUString("myThirdKey")), "test_registry_CppApi error 19");
- REG_ENSURE(rootKey.openKey(OUString(RTL_CONSTASCII_USTRINGPARAM("myThirdKey")), key5), "test_registry_CppApi error 20");
+ REG_ENSURE(rootKey.openKey(OUString("myThirdKey"), key5), "test_registry_CppApi error 20");
REG_ENSURE(!key2.closeKey() &&
!rootKey.closeKey(), "test_registry_CppApi error 21");
@@ -610,14 +610,14 @@ void test_registry_CppApi()
// Test loadkey
RegistryKey rootKey2, key21, key22, key23, key24 , key25;
- REG_ENSURE(!myRegistry->create(OUString(RTL_CONSTASCII_USTRINGPARAM("test2.rdb"))), "test_registry_CppApi error 23");
+ REG_ENSURE(!myRegistry->create(OUString("test2.rdb")), "test_registry_CppApi error 23");
REG_ENSURE(!myRegistry->openRootKey(rootKey2), "test_registry_CppApi error 24");
- REG_ENSURE(!rootKey2.createKey(OUString(RTL_CONSTASCII_USTRINGPARAM("reg2FirstKey")), key21), "test_registry_CppApi error 25");
- REG_ENSURE(!rootKey2.createKey(OUString(RTL_CONSTASCII_USTRINGPARAM("reg2SecondKey")), key22), "test_registry_CppApi error 26");
- REG_ENSURE(!key21.createKey(OUString(RTL_CONSTASCII_USTRINGPARAM("reg2FirstSubKey")), key23), "test_registry_CppApi error 27");
- REG_ENSURE(!key21.createKey(OUString(RTL_CONSTASCII_USTRINGPARAM("reg2SecondSubKey")), key24), "test_registry_CppApi error 28");
- REG_ENSURE(!rootKey2.createKey(OUString(RTL_CONSTASCII_USTRINGPARAM("reg2ThirdKey")), key25), "test_registry_CppApi error 29");
+ REG_ENSURE(!rootKey2.createKey(OUString("reg2FirstKey"), key21), "test_registry_CppApi error 25");
+ REG_ENSURE(!rootKey2.createKey(OUString("reg2SecondKey"), key22), "test_registry_CppApi error 26");
+ REG_ENSURE(!key21.createKey(OUString("reg2FirstSubKey"), key23), "test_registry_CppApi error 27");
+ REG_ENSURE(!key21.createKey(OUString("reg2SecondSubKey"), key24), "test_registry_CppApi error 28");
+ REG_ENSURE(!rootKey2.createKey(OUString("reg2ThirdKey"), key25), "test_registry_CppApi error 29");
sal_uInt32 nValue= 123456789;
REG_ENSURE(!key23.setValue(OUString(), RG_VALUETYPE_LONG, &nValue, sizeof(sal_uInt32)), "test_registry_CppApi error 30");
@@ -631,38 +631,38 @@ void test_registry_CppApi()
REG_ENSURE(!myRegistry->close(), "test_registry_CppApi error 32");
- REG_ENSURE(!myRegistry->open(OUString(RTL_CONSTASCII_USTRINGPARAM("test.rdb")), REG_READWRITE), "test_registry_CppApi error 33");
+ REG_ENSURE(!myRegistry->open(OUString("test.rdb"), REG_READWRITE), "test_registry_CppApi error 33");
REG_ENSURE(!myRegistry->openRootKey(rootKey), "test_registry_CppApi error 34");
- REG_ENSURE(!myRegistry->loadKey(rootKey, OUString(RTL_CONSTASCII_USTRINGPARAM("allFromTest2")),
- OUString(RTL_CONSTASCII_USTRINGPARAM("test2.rdb"))), "test_registry_CppApi error 35");
- REG_ENSURE(!myRegistry->saveKey(rootKey, OUString(RTL_CONSTASCII_USTRINGPARAM("allFromTest2")),
- OUString(RTL_CONSTASCII_USTRINGPARAM("test3.rdb"))), "test_registry_CppApi error 36");
+ REG_ENSURE(!myRegistry->loadKey(rootKey, OUString("allFromTest2"),
+ OUString("test2.rdb")), "test_registry_CppApi error 35");
+ REG_ENSURE(!myRegistry->saveKey(rootKey, OUString("allFromTest2"),
+ OUString("test3.rdb")), "test_registry_CppApi error 36");
- REG_ENSURE(!rootKey.createKey(OUString(RTL_CONSTASCII_USTRINGPARAM("allFromTest3")), key1), "test_registry_CppApi error 37");
- REG_ENSURE(!key1.createKey(OUString(RTL_CONSTASCII_USTRINGPARAM("myFirstKey2")), key2), "test_registry_CppApi error 38");
- REG_ENSURE(!key1.createKey(OUString(RTL_CONSTASCII_USTRINGPARAM("mySecondKey2")), key3), "test_registry_CppApi error 39");
+ REG_ENSURE(!rootKey.createKey(OUString("allFromTest3"), key1), "test_registry_CppApi error 37");
+ REG_ENSURE(!key1.createKey(OUString("myFirstKey2"), key2), "test_registry_CppApi error 38");
+ REG_ENSURE(!key1.createKey(OUString("mySecondKey2"), key3), "test_registry_CppApi error 39");
- REG_ENSURE(!myRegistry->mergeKey(rootKey, OUString(RTL_CONSTASCII_USTRINGPARAM("allFromTest3")),
- OUString(RTL_CONSTASCII_USTRINGPARAM("test3.rdb"))), "test_registry_CppApi error 40");
- REG_ENSURE(!myRegistry->mergeKey(rootKey, OUString(RTL_CONSTASCII_USTRINGPARAM("allFromTest3")),
- OUString(RTL_CONSTASCII_USTRINGPARAM("ucrtest.rdb")), sal_True), "test_registry_CppApi error 40.a)");
+ REG_ENSURE(!myRegistry->mergeKey(rootKey, OUString("allFromTest3"),
+ OUString("test3.rdb")), "test_registry_CppApi error 40");
+ REG_ENSURE(!myRegistry->mergeKey(rootKey, OUString("allFromTest3"),
+ OUString("ucrtest.rdb"), sal_True), "test_registry_CppApi error 40.a)");
-// REG_ENSURE(myRegistry->mergeKey(rootKey, OUString(RTL_CONSTASCII_USTRINGPARAM("allFromTest3")), OUString(RTL_CONSTASCII_USTRINGPARAM("ucrtest.rdb")), sal_True)
+// REG_ENSURE(myRegistry->mergeKey(rootKey, OUString("allFromTest3"), OUString("ucrtest.rdb"), sal_True)
// == REG_NO_ERROR/*REG_MERGE_CONFLICT*/, "test_registry_CppApi error 40.b)");
REG_ENSURE(!key1.closeKey() &&
!key2.closeKey(), "test_registry_CppApi error 41");
- const sal_Unicode* wValue= OUString(RTL_CONSTASCII_USTRINGPARAM("Mein erster Unicode Value")).getStr();
+ const sal_Unicode* wValue= OUString("Mein erster Unicode Value").getStr();
REG_ENSURE(!key3.setValue(OUString(), RG_VALUETYPE_UNICODE, (void*)wValue,
(rtl_ustr_getLength(wValue)+1)*sizeof(sal_Unicode)), "test_registry_CppApi error 42");
REG_ENSURE(!key3.closeKey(), "test_registry_CppApi error 43");
- REG_ENSURE(!rootKey.openKey(OUString(RTL_CONSTASCII_USTRINGPARAM("/allFromTest3/reg2FirstKey/reg2FirstSubKey")), key1),
+ REG_ENSURE(!rootKey.openKey(OUString("/allFromTest3/reg2FirstKey/reg2FirstSubKey"), key1),
"test_registry_CppApi error 43.a)");
- REG_ENSURE(!rootKey.deleteKey(OUString(RTL_CONSTASCII_USTRINGPARAM("/allFromTest3/reg2FirstKey/reg2FirstSubKey"))), "test_registry_CppApi error 44");
+ REG_ENSURE(!rootKey.deleteKey(OUString("/allFromTest3/reg2FirstKey/reg2FirstSubKey")), "test_registry_CppApi error 44");
REG_ENSURE(key1.getValueInfo(OUString(), &valueType, &valueSize) == REG_INVALID_KEY,
"test_registry_CppApi error 44.a)");
REG_ENSURE(!key1.closeKey(), "test_registry_CppApi error 44.b)");
@@ -671,9 +671,9 @@ void test_registry_CppApi()
REG_ENSURE(!myRegistry->close(), "test_registry_CppApi error 46");
- REG_ENSURE(!myRegistry->open(OUString(RTL_CONSTASCII_USTRINGPARAM("test.rdb")), REG_READWRITE), "test_registry_CppApi error 47");
+ REG_ENSURE(!myRegistry->open(OUString("test.rdb"), REG_READWRITE), "test_registry_CppApi error 47");
- REG_ENSURE(!myRegistry->destroy(OUString(RTL_CONSTASCII_USTRINGPARAM("test2.rdb"))), "test_registry_CppApi error 48");
+ REG_ENSURE(!myRegistry->destroy(OUString("test2.rdb")), "test_registry_CppApi error 48");
// REG_ENSURE(!myRegistry->destroy("test3.rdb"), "test_registry_CppApi error 49");
Registry *myRegistry2 = new Registry(*myRegistry);
@@ -682,22 +682,22 @@ void test_registry_CppApi()
delete(myRegistry2);
- REG_ENSURE(!myRegistry->create(OUString(RTL_CONSTASCII_USTRINGPARAM("destroytest.rdb"))), "test_registry_CppApi error 51");
+ REG_ENSURE(!myRegistry->create(OUString("destroytest.rdb")), "test_registry_CppApi error 51");
REG_ENSURE(!myRegistry->close(), "test_registry_CppApi error 52");
- REG_ENSURE(!myRegistry->open(OUString(RTL_CONSTASCII_USTRINGPARAM("destroytest.rdb")), REG_READONLY), "test_registry_CppApi error 53");
+ REG_ENSURE(!myRegistry->open(OUString("destroytest.rdb"), REG_READONLY), "test_registry_CppApi error 53");
REG_ENSURE(!myRegistry->openRootKey(rootKey), "test_registry_CppApi error 54");
- REG_ENSURE(myRegistry->mergeKey(rootKey, OUString(RTL_CONSTASCII_USTRINGPARAM("allFromTest3")),
- OUString(RTL_CONSTASCII_USTRINGPARAM("test3.rdb"))), "test_registry_CppApi error 55");
- REG_ENSURE(!myRegistry->destroy(OUString(RTL_CONSTASCII_USTRINGPARAM("test3.rdb"))), "test_registry_CppApi error 56");
+ REG_ENSURE(myRegistry->mergeKey(rootKey, OUString("allFromTest3"),
+ OUString("test3.rdb")), "test_registry_CppApi error 55");
+ REG_ENSURE(!myRegistry->destroy(OUString("test3.rdb")), "test_registry_CppApi error 56");
REG_ENSURE(!rootKey.closeKey(), "test_registry_CppApi error 57");
REG_ENSURE(!myRegistry->close(), "test_registry_CppApi error 58");
- REG_ENSURE(!myRegistry->open(OUString(RTL_CONSTASCII_USTRINGPARAM("destroytest.rdb")), REG_READWRITE), "test_registry_CppApi error 59");
+ REG_ENSURE(!myRegistry->open(OUString("destroytest.rdb"), REG_READWRITE), "test_registry_CppApi error 59");
REG_ENSURE(!myRegistry->destroy(OUString()), "test_registry_CppApi error 60");
- REG_ENSURE(!myRegistry->open(OUString(RTL_CONSTASCII_USTRINGPARAM("test.rdb")), REG_READWRITE), "test_registry_CppApi error 61");
- REG_ENSURE(!myRegistry->destroy(OUString(RTL_CONSTASCII_USTRINGPARAM("ucrtest.rdb"))), "test_registry_CppApi error 62");
+ REG_ENSURE(!myRegistry->open(OUString("test.rdb"), REG_READWRITE), "test_registry_CppApi error 61");
+ REG_ENSURE(!myRegistry->destroy(OUString("ucrtest.rdb")), "test_registry_CppApi error 62");
REG_ENSURE(!myRegistry->destroy(OUString()), "test_registry_CppApi error 63");
delete(myRegistry);
diff --git a/registry/tools/checksingleton.cxx b/registry/tools/checksingleton.cxx
index 998bc625de0a..5fead7367884 100644
--- a/registry/tools/checksingleton.cxx
+++ b/registry/tools/checksingleton.cxx
@@ -306,7 +306,7 @@ int _cdecl main( int argc, char * argv[] )
}
RegistryKey singletonKey;
- if ( indexRoot.createKey(OUString(RTL_CONSTASCII_USTRINGPARAM("SINGLETONS")), singletonKey) )
+ if ( indexRoot.createKey(OUString("SINGLETONS"), singletonKey) )
{
fprintf(stderr, "%s: open/create SINGLETONS key of registry \"%s\" failed\n",
options.getProgramName().c_str(), options.getIndexReg().c_str());
diff --git a/registry/workben/regspeed.cxx b/registry/workben/regspeed.cxx
index b6c3f42f29d4..51d39bbba72a 100644
--- a/registry/workben/regspeed.cxx
+++ b/registry/workben/regspeed.cxx
@@ -108,9 +108,9 @@ int _cdecl main( int argc, char * argv[] )
{
RegHandle hReg;
RegKeyHandle hRootKey, hKey, hSubKey, hSubSubKey;
- OUString sName1(RTL_CONSTASCII_USTRINGPARAM("regkey"));
- OUString sName2(RTL_CONSTASCII_USTRINGPARAM("regSubkey"));
- OUString sName3(RTL_CONSTASCII_USTRINGPARAM("regSubSubkey"));
+ OUString sName1("regkey");
+ OUString sName2("regSubkey");
+ OUString sName3("regSubSubkey");
OUString keyName1;
OUString keyName2;
OUString keyName3;
@@ -129,7 +129,7 @@ int _cdecl main( int argc, char * argv[] )
S2 = atoi(argv[2]);
S3 = atoi(argv[3]);
- OUString speedReg( RTL_CONSTASCII_USTRINGPARAM("speed.reg"));
+ OUString speedReg( "speed.reg");
if (reg_createRegistry(speedReg.pData, &hReg))
{
cout << "creating registry \"test.reg\" failed\n";
@@ -189,7 +189,7 @@ int _cdecl main( int argc, char * argv[] )
for (sal_Int32 i=0; i < S1; i++)
{
- keyName1 = OUString(RTL_CONSTASCII_USTRINGPARAM("/"));
+ keyName1 = OUString("/");
keyName1 += sName1;
keyName1 += OUString().valueOf(i);
if (reg_openKey(hRootKey, keyName1.pData, &hKey))
@@ -198,10 +198,10 @@ int _cdecl main( int argc, char * argv[] )
for (sal_Int32 j=0; j < S2; j++)
{
- keyName2 = OUString(RTL_CONSTASCII_USTRINGPARAM("/"));
+ keyName2 = OUString("/");
keyName2 += sName1;
keyName2 += OUString().valueOf(i);
- keyName2 += OUString(RTL_CONSTASCII_USTRINGPARAM("/"));
+ keyName2 += OUString("/");
keyName2 += sName2;
keyName2 += OUString().valueOf(j);
if (reg_openKey(hRootKey, keyName2.pData, &hSubKey))
@@ -210,13 +210,13 @@ int _cdecl main( int argc, char * argv[] )
for (sal_Int32 n=0; n < S3; n++)
{
- keyName3 = OUString(RTL_CONSTASCII_USTRINGPARAM("/"));
+ keyName3 = OUString("/");
keyName3 += sName1;
keyName3 += OUString().valueOf(i);
- keyName3 += OUString(RTL_CONSTASCII_USTRINGPARAM("/"));
+ keyName3 += OUString("/");
keyName3 += sName2;
keyName3 += OUString().valueOf(j);
- keyName3 += OUString(RTL_CONSTASCII_USTRINGPARAM("/"));
+ keyName3 += OUString("/");
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 4307992c2e4d..7c8a393b3733 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(RTL_CONSTASCII_USTRINGPARAM("test4.rdb")).pData, &hReg))
+ if (reg_createRegistry(OUString("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(RTL_CONSTASCII_USTRINGPARAM("myFirstKey")).pData, &hKey1))
+ if (reg_createKey(hRootKey, OUString("myFirstKey").pData, &hKey1))
cout << "\t2. creating key \"myFirstKey\" failed\n";
else
cout << "2. key \"myFirstKey\" is created\n";
- if (reg_createKey(hRootKey, OUString(RTL_CONSTASCII_USTRINGPARAM("mySecondKey")).pData, &hKey2))
+ if (reg_createKey(hRootKey, OUString("mySecondKey").pData, &hKey2))
cout << "\t3. creating key \"mySecondKey\" failed\n";
else
cout << "3. key \"mySecondKey\" is created\n";
- if (reg_createKey(hKey1, OUString(RTL_CONSTASCII_USTRINGPARAM("myFirstSubKey")).pData, &hKey3))
+ if (reg_createKey(hKey1, OUString("myFirstSubKey").pData, &hKey3))
cout << "\t4. creating subkey \"myFirstSubKey\" failed\n";
else
cout << "4. subkey \"myFirstSubKey\" is created\n";
- if (reg_createKey(hKey1, OUString(RTL_CONSTASCII_USTRINGPARAM("mySecondSubKey")).pData, &hKey4))
+ if (reg_createKey(hKey1, OUString("mySecondSubKey").pData, &hKey4))
cout << "\t5. creating subkey \"mySecondSubKey\" failed\n";
else
cout << "5. subkey \"mySecondSubKey\" is created\n";
- if (reg_createKey(hRootKey, OUString(RTL_CONSTASCII_USTRINGPARAM("myThirdKey")).pData, &hKey5))
+ if (reg_createKey(hRootKey, OUString("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(RTL_CONSTASCII_USTRINGPARAM("myFirstKey")).pData, &phSubKeys, &nSubKeys))
+ if (reg_openSubKeys(hRootKey, OUString("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(RTL_CONSTASCII_USTRINGPARAM("mySecondKey")).pData, RG_VALUETYPE_STRING, Value, 18))
+ if (reg_setValue(hRootKey, OUString("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(RTL_CONSTASCII_USTRINGPARAM("mySecondKey")).pData, &valueType, &valueSize))
+ if (reg_getValueInfo(hRootKey, OUString("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(RTL_CONSTASCII_USTRINGPARAM("myFirstKey")).pData))
+ if (reg_deleteKey(hRootKey, OUString("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(RTL_CONSTASCII_USTRINGPARAM("mySecondKey")).pData, &hKey2))
+ if (reg_openKey(hRootKey, OUString("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(RTL_CONSTASCII_USTRINGPARAM("myThirdKey")).pData))
+ if (reg_deleteKey(hRootKey, OUString("myThirdKey").pData))
cout << "\t16. delete key \"myThirdKey\" failed\n";
else
cout << "16. key \"myThirdKey\" is deleted\n";
- if (reg_openKey(hRootKey, OUString(RTL_CONSTASCII_USTRINGPARAM("myThirdKey")).pData, &hKey5))
+ if (reg_openKey(hRootKey, OUString("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(RTL_CONSTASCII_USTRINGPARAM("test5.rdb")).pData, &hReg2))
+ if (reg_createRegistry(OUString("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(RTL_CONSTASCII_USTRINGPARAM("reg2FirstKey")).pData, &h2Key1))
+ if (reg_createKey(hRootKey2, OUString("reg2FirstKey").pData, &h2Key1))
cout << "\t23. creating key \"reg2FirstKey\" failed\n";
else
cout << "23. key \"reg2FirstKey\" is created\n";
- if (reg_createKey(hRootKey2, OUString(RTL_CONSTASCII_USTRINGPARAM("reg2SecondKey")).pData, &h2Key2))
+ if (reg_createKey(hRootKey2, OUString("reg2SecondKey").pData, &h2Key2))
cout << "\t24. creating key \"reg2SecondKey\" failed\n";
else
cout << "24. key \"reg2SecondKey\" is created\n";
- if (reg_createKey(h2Key1, OUString(RTL_CONSTASCII_USTRINGPARAM("reg2FirstSubKey")).pData, &h2Key3))
+ if (reg_createKey(h2Key1, OUString("reg2FirstSubKey").pData, &h2Key3))
cout << "\t25. creating key \"reg2FirstSubKey\" failed\n";
else
cout << "25. key \"reg2FirstSubKey\" is created\n";
- if (reg_createKey(h2Key1, OUString(RTL_CONSTASCII_USTRINGPARAM("reg2SecondSubKey")).pData, &h2Key4))
+ if (reg_createKey(h2Key1, OUString("reg2SecondSubKey").pData, &h2Key4))
cout << "\26. creating key \"reg2SecondSubKey\" failed\n";
else
cout << "26. key \"reg2SecondSubKey\" is created\n";
- if (reg_createKey(hRootKey2, OUString(RTL_CONSTASCII_USTRINGPARAM("reg2ThirdKey")).pData, &h2Key5))
+ if (reg_createKey(hRootKey2, OUString("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(RTL_CONSTASCII_USTRINGPARAM("test4.rdb")).pData, &hReg, REG_READWRITE))
+ if (reg_openRegistry(OUString("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(RTL_CONSTASCII_USTRINGPARAM("allFromTest2")).pData,
- OUString(RTL_CONSTASCII_USTRINGPARAM("test5.rdb")).pData))
+ if (reg_loadKey(hRootKey, OUString("allFromTest2").pData,
+ OUString("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(RTL_CONSTASCII_USTRINGPARAM("allFromTest2")).pData,
- OUString(RTL_CONSTASCII_USTRINGPARAM("test6.rdb")).pData))
+ if (reg_saveKey(hRootKey, OUString("allFromTest2").pData,
+ OUString("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(RTL_CONSTASCII_USTRINGPARAM("allFromTest3")).pData, &hKey1))
+ if (reg_createKey(hRootKey, OUString("allFromTest3").pData, &hKey1))
cout << "\t35. creating key \"allFromTest3\" failed\n";
else
cout << "36. key \"allFromTest3\" is created\n";
- if (reg_createKey(hKey1, OUString(RTL_CONSTASCII_USTRINGPARAM("myFirstKey2")).pData, &hKey2))
+ if (reg_createKey(hKey1, OUString("myFirstKey2").pData, &hKey2))
cout << "\t37. creating key \"myFirstKey2\" failed\n";
else
cout << "37. key \"myFirstKey2\" is created\n";
- if (reg_createKey(hKey1, OUString(RTL_CONSTASCII_USTRINGPARAM("mySecondKey2")).pData, &hKey3))
+ if (reg_createKey(hKey1, OUString("mySecondKey2").pData, &hKey3))
cout << "\t38. creating key \"mySecondKey2\" failed\n";
else
cout << "38. key \"mySecondKey2\" is created\n";
- if (reg_mergeKey(hRootKey, OUString(RTL_CONSTASCII_USTRINGPARAM("allFromTest3")).pData,
- OUString(RTL_CONSTASCII_USTRINGPARAM("test6.rdb")).pData, sal_False, sal_False))
+ if (reg_mergeKey(hRootKey, OUString("allFromTest3").pData,
+ OUString("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(RTL_CONSTASCII_USTRINGPARAM("/allFromTest3/reg2FirstKey/reg2FirstSubKey")).pData))
+ if (reg_deleteKey(hRootKey, OUString("/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(RTL_CONSTASCII_USTRINGPARAM("test4.rdb")).pData, &hReg2, REG_READONLY))
+ if (reg_openRegistry(OUString("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(RTL_CONSTASCII_USTRINGPARAM("test4.rdb")).pData, &hReg3, REG_READONLY))
+ if (reg_openRegistry(OUString("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";