From 3a18c3d97abfb60a09cc6a8bd5dd163fe2cfafa3 Mon Sep 17 00:00:00 2001 From: Gert Faller Date: Fri, 10 Dec 2010 18:31:39 +0100 Subject: RTL_CONSTASCII_USTRINGPARAM in ure 1 --- stoc/source/defaultregistry/defaultregistry.cxx | 2 +- stoc/test/excomp/excomp.cxx | 14 +-- stoc/test/excomp/excomp1.cxx | 2 +- stoc/test/excomp/excomp2.cxx | 2 +- .../registry_tdprovider/testregistrytdprovider.cxx | 6 +- stoc/test/tdmanager/testtdmanager.cxx | 6 +- stoc/test/testconv.cxx | 104 ++++++++++---------- stoc/test/testcorefl.cxx | 106 ++++++++++----------- stoc/test/testiadapter.cxx | 24 ++--- stoc/test/testintrosp.cxx | 78 +++++++-------- stoc/test/testproxyfac.cxx | 4 +- stoc/test/testregistry.cxx | 14 +-- stoc/test/testsmgr.cxx | 2 +- stoc/test/testsmgr_cpnt.cxx | 38 ++++---- stoc/test/uriproc/test_uriproc.cxx | 18 ++-- 15 files changed, 210 insertions(+), 210 deletions(-) (limited to 'stoc') diff --git a/stoc/source/defaultregistry/defaultregistry.cxx b/stoc/source/defaultregistry/defaultregistry.cxx index 5bf2e3abb34d..2063073cbcd9 100644 --- a/stoc/source/defaultregistry/defaultregistry.cxx +++ b/stoc/source/defaultregistry/defaultregistry.cxx @@ -1324,7 +1324,7 @@ void SAL_CALL NestedRegistryImpl::close( ) } /* throw InvalidRegistryException( - OUString::createFromAscii("the 'close' method is not specified for a nested registry"), + OUString(RTL_CONSTASCII_USTRINGPARAM("the 'close' method is not specified for a nested registry")), Reference< XInterface >() ); */ } diff --git a/stoc/test/excomp/excomp.cxx b/stoc/test/excomp/excomp.cxx index 91d04623c0ec..deb523d70e0b 100644 --- a/stoc/test/excomp/excomp.cxx +++ b/stoc/test/excomp/excomp.cxx @@ -86,25 +86,25 @@ SAL_IMPLEMENT_MAIN() OUString exePath( getExePath() ); OUString excompRdb(exePath); - excompRdb += OUString::createFromAscii("excomp.rdb"); + excompRdb += OUString(RTL_CONSTASCII_USTRINGPARAM("excomp.rdb")); Reference< XMultiServiceFactory > xSMgr = ::cppu::createRegistryServiceFactory( excompRdb ); TEST_ENSHURE( xSMgr.is(), "excomp error 0" ); typelib_TypeDescription* pTypeDesc = NULL; - OUString sType = OUString::createFromAscii("com.sun.star.text.XTextDocument"); + OUString sType(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.XTextDocument")); typelib_typedescription_getByName( &pTypeDesc, sType.pData); // typelib_InterfaceTypeDescription* pInterDesc = (typelib_InterfaceTypeDescription*)pTypeDesc; - Reference< XInterface > xIFace = xSMgr->createInstance(OUString::createFromAscii("com.sun.star.registry.ImplementationRegistration")); + Reference< XInterface > xIFace = xSMgr->createInstance(OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.registry.ImplementationRegistration"))); Reference< XImplementationRegistration > xImpReg( xIFace, UNO_QUERY); TEST_ENSHURE( xImpReg.is(), "excomp error 1" ); try { - xImpReg->registerImplementation(OUString::createFromAscii("com.sun.star.loader.SharedLibrary"), + xImpReg->registerImplementation(OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.loader.SharedLibrary")), compName1, Reference< XSimpleRegistry >() ); - xImpReg->registerImplementation(OUString::createFromAscii("com.sun.star.loader.SharedLibrary"), + xImpReg->registerImplementation(OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.loader.SharedLibrary")), compName2, Reference< XSimpleRegistry >() ); } @@ -113,10 +113,10 @@ SAL_IMPLEMENT_MAIN() TEST_ENSHURE( e.Message.getLength(), OUStringToOString(e.Message, RTL_TEXTENCODING_ASCII_US).getStr() ); } - Reference< XTest > xTest1( xSMgr->createInstance(OUString::createFromAscii("example.ExampleComponent1")), + Reference< XTest > xTest1( xSMgr->createInstance(OUString(RTL_CONSTASCII_USTRINGPARAM("example.ExampleComponent1"))), UNO_QUERY); TEST_ENSHURE( xTest1.is(), "excomp error 2" ); - Reference< XTest > xTest2( xSMgr->createInstance(OUString::createFromAscii("example.ExampleComponent2")), + Reference< XTest > xTest2( xSMgr->createInstance(OUString(RTL_CONSTASCII_USTRINGPARAM("example.ExampleComponent2"))), UNO_QUERY); TEST_ENSHURE( xTest2.is(), "excomp error 3" ); diff --git a/stoc/test/excomp/excomp1.cxx b/stoc/test/excomp/excomp1.cxx index cb71cdc83203..058a06bc3f97 100644 --- a/stoc/test/excomp/excomp1.cxx +++ b/stoc/test/excomp/excomp1.cxx @@ -129,7 +129,7 @@ Sequence SAL_CALL ExampleComponent1Impl::getSupportedServiceNames_Stat OUString SAL_CALL ExampleComponent1Impl::getMessage() throw(RuntimeException) { Guard< Mutex > aGuard( m_mutex ); - return OUString::createFromAscii("Lalelu nur der Mann im Mond schaut zu ..."); + return OUString(RTL_CONSTASCII_USTRINGPARAM("Lalelu nur der Mann im Mond schaut zu ...")); } diff --git a/stoc/test/excomp/excomp2.cxx b/stoc/test/excomp/excomp2.cxx index 6439296f703a..f62e957efec4 100644 --- a/stoc/test/excomp/excomp2.cxx +++ b/stoc/test/excomp/excomp2.cxx @@ -199,7 +199,7 @@ Sequence SAL_CALL ExampleComponent2Impl::getSupportedServiceNames_Stat OUString SAL_CALL ExampleComponent2Impl::getMessage() throw(RuntimeException) { Guard< Mutex > aGuard( m_mutex ); - return OUString::createFromAscii("Alle meine Entchen schwimmen auf dem See, schwimmen auf dem See ..."); + return OUString(RTL_CONSTASCII_USTRINGPARAM("Alle meine Entchen schwimmen auf dem See, schwimmen auf dem See ...")); } diff --git a/stoc/test/registry_tdprovider/testregistrytdprovider.cxx b/stoc/test/registry_tdprovider/testregistrytdprovider.cxx index 02471d1c5d87..cb47b3371e8c 100644 --- a/stoc/test/registry_tdprovider/testregistrytdprovider.cxx +++ b/stoc/test/registry_tdprovider/testregistrytdprovider.cxx @@ -868,7 +868,7 @@ sal_Int32 Service::run(css::uno::Sequence< rtl::OUString > const &) } rtl::OUString Service::getImplementationName() { - return rtl::OUString::createFromAscii("test.registrytdprovider.impl"); + return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("test.registrytdprovider.impl")); } css::uno::Sequence< rtl::OUString > Service::getSupportedServiceNames() { @@ -912,9 +912,9 @@ namespace { bool writeInfo(void * registryKey, rtl::OUString const & implementationName, css::uno::Sequence< rtl::OUString > const & serviceNames) { - rtl::OUString keyName(rtl::OUString::createFromAscii("/")); + rtl::OUString keyName(RTL_CONSTASCII_USTRINGPARAM("/")); keyName += implementationName; - keyName += rtl::OUString::createFromAscii("/UNO/SERVICES"); + keyName += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES")); css::uno::Reference< css::registry::XRegistryKey > key; try { key = static_cast< css::registry::XRegistryKey * >(registryKey)-> diff --git a/stoc/test/tdmanager/testtdmanager.cxx b/stoc/test/tdmanager/testtdmanager.cxx index 0901ae6522e7..6f3542697b94 100644 --- a/stoc/test/tdmanager/testtdmanager.cxx +++ b/stoc/test/tdmanager/testtdmanager.cxx @@ -299,7 +299,7 @@ sal_Int32 Service::run(css::uno::Sequence< rtl::OUString > const & arguments) } rtl::OUString Service::getImplementationName() { - return rtl::OUString::createFromAscii("test.tdmanager.impl"); + return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("test.tdmanager.impl")); } css::uno::Sequence< rtl::OUString > Service::getSupportedServiceNames() { @@ -343,9 +343,9 @@ namespace { bool writeInfo(void * registryKey, rtl::OUString const & implementationName, css::uno::Sequence< rtl::OUString > const & serviceNames) { - rtl::OUString keyName(rtl::OUString::createFromAscii("/")); + rtl::OUString keyName(RTL_CONSTASCII_USTRINGPARAM("/")); keyName += implementationName; - keyName += rtl::OUString::createFromAscii("/UNO/SERVICES"); + keyName += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES")); css::uno::Reference< css::registry::XRegistryKey > key; try { key = static_cast< css::registry::XRegistryKey * >(registryKey)-> diff --git a/stoc/test/testconv.cxx b/stoc/test/testconv.cxx index 05ebf9a82de5..978bab5b0c2e 100644 --- a/stoc/test/testconv.cxx +++ b/stoc/test/testconv.cxx @@ -306,66 +306,66 @@ static sal_Int32 initBlocks( ConvBlock * pTestBlocks ) sal_uInt32 nElems = 0; // ==BYTE== - aVal <<= OUString::createFromAscii( "0xff" ); + aVal <<= OUString(RTL_CONSTASCII_USTRINGPARAM("0xff")); pTestBlocks[nElems++] = ConvBlock( aVal, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0 ); - aVal <<= OUString::createFromAscii( "255" ); + aVal <<= OUString(RTL_CONSTASCII_USTRINGPARAM("255")); pTestBlocks[nElems++] = ConvBlock( aVal, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0 ); aVal <<= (sal_Int8)0xffu; pTestBlocks[nElems++] = ConvBlock( aVal, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0 ); // st,do,fl,u3,i3,u1,i1,by,bo,ch,tc,si,sa - aVal <<= OUString::createFromAscii( "0x80" ); + aVal <<= OUString(RTL_CONSTASCII_USTRINGPARAM("0x80")); pTestBlocks[nElems++] = ConvBlock( aVal, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0 ); - aVal <<= OUString::createFromAscii( "128" ); + aVal <<= OUString(RTL_CONSTASCII_USTRINGPARAM("128")); pTestBlocks[nElems++] = ConvBlock( aVal, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0 ); aVal <<= (sal_Int8)( 0x80u ); pTestBlocks[nElems++] = ConvBlock( aVal, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0 ); // st,do,fl,u3,i3,u1,i1,by,bo,ch,tc,si,sa - aVal <<= OUString::createFromAscii( "0x7f" ); + aVal <<= OUString(RTL_CONSTASCII_USTRINGPARAM("0x7f")); pTestBlocks[nElems++] = ConvBlock( aVal, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0 ); - aVal <<= OUString::createFromAscii( "127" ); + aVal <<= OUString(RTL_CONSTASCII_USTRINGPARAM("127")); pTestBlocks[nElems++] = ConvBlock( aVal, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0 ); aVal <<= (sal_Int8)( 0x7f ); pTestBlocks[nElems++] = ConvBlock( aVal, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0 ); // st,do,fl,u3,i3,u1,i1,by,bo,ch,tc,si,sa - aVal <<= OUString::createFromAscii( "5" ); + aVal <<= OUString(RTL_CONSTASCII_USTRINGPARAM("5")); pTestBlocks[nElems++] = ConvBlock( aVal, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0 ); - aVal <<= OUString::createFromAscii( "+5" ); + aVal <<= OUString(RTL_CONSTASCII_USTRINGPARAM("+5")); pTestBlocks[nElems++] = ConvBlock( aVal, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0 ); aVal <<= (sal_Int8)( 5 ); pTestBlocks[nElems++] = ConvBlock( aVal, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 ); // st,do,fl,u3,i3,u1,i1,by,bo,ch,tc,si,sa - aVal <<= OUString::createFromAscii( "-5" ); + aVal <<= OUString(RTL_CONSTASCII_USTRINGPARAM("-5")); pTestBlocks[nElems++] = ConvBlock( aVal, 1, 1, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0 ); // st,do,fl,u3,i3,u1,i1,by,bo,ch,tc,si,sa aVal <<= (sal_Int8)( -5 ); pTestBlocks[nElems++] = ConvBlock( aVal, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0 ); // st,do,fl,u3,i3,u1,i1,by,bo,ch,tc,si,sa - aVal <<= OUString::createFromAscii( "256" ); + aVal <<= OUString(RTL_CONSTASCII_USTRINGPARAM("256")); pTestBlocks[nElems++] = ConvBlock( aVal, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0 ); // st,do,fl,u3,i3,u1,i1,by,bo,ch,tc,si,sa // ==UINT16== - aVal <<= OUString::createFromAscii( "65535" ); + aVal <<= OUString(RTL_CONSTASCII_USTRINGPARAM("65535")); pTestBlocks[nElems++] = ConvBlock( aVal, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0 ); - aVal <<= OUString::createFromAscii( "0xffff" ); + aVal <<= OUString(RTL_CONSTASCII_USTRINGPARAM("0xffff")); pTestBlocks[nElems++] = ConvBlock( aVal, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0 ); aVal <<= (sal_uInt16)( 0xffff ); pTestBlocks[nElems++] = ConvBlock( aVal, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0 ); // st,do,fl,u3,i3,u1,i1,by,bo,ch,tc,si,sa - aVal <<= OUString::createFromAscii( "32768" ); + aVal <<= OUString(RTL_CONSTASCII_USTRINGPARAM("32768")); pTestBlocks[nElems++] = ConvBlock( aVal, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0 ); aVal <<= (sal_uInt16)( 0x8000 ); pTestBlocks[nElems++] = ConvBlock( aVal, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0 ); // st,do,fl,u3,i3,u1,i1,by,bo,ch,tc,si,sa - aVal <<= OUString::createFromAscii( "32767" ); + aVal <<= OUString(RTL_CONSTASCII_USTRINGPARAM("32767")); pTestBlocks[nElems++] = ConvBlock( aVal, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0 ); - aVal <<= OUString::createFromAscii( "0x7fff" ); + aVal <<= OUString(RTL_CONSTASCII_USTRINGPARAM("0x7fff")); pTestBlocks[nElems++] = ConvBlock( aVal, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0 ); aVal <<= (sal_uInt16)( 0x7fff ); pTestBlocks[nElems++] = ConvBlock( aVal, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0 ); // st,do,fl,u3,i3,u1,i1,by,bo,ch,tc,si,sa - aVal <<= OUString::createFromAscii( "256" ); + aVal <<= OUString(RTL_CONSTASCII_USTRINGPARAM("256")); pTestBlocks[nElems++] = ConvBlock( aVal, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0 ); - aVal <<= OUString::createFromAscii( "0x100" ); + aVal <<= OUString(RTL_CONSTASCII_USTRINGPARAM("0x100")); pTestBlocks[nElems++] = ConvBlock( aVal, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0 ); aVal <<= (sal_uInt16)( 0x100 ); pTestBlocks[nElems++] = ConvBlock( aVal, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0 ); @@ -396,33 +396,33 @@ static sal_Int32 initBlocks( ConvBlock * pTestBlocks ) pTestBlocks[nElems++] = ConvBlock( aVal, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0 ); // st,do,fl,u3,i3,u1,i1,by,bo,ch,tc,si,sa // ==UINT32== - aVal <<= OUString::createFromAscii( "+4294967295" ); + aVal <<= OUString(RTL_CONSTASCII_USTRINGPARAM("+4294967295")); pTestBlocks[nElems++] = ConvBlock( aVal, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0 ); - aVal <<= OUString::createFromAscii( "4294967295" ); + aVal <<= OUString(RTL_CONSTASCII_USTRINGPARAM("4294967295")); pTestBlocks[nElems++] = ConvBlock( aVal, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0 ); - aVal <<= OUString::createFromAscii( "0xffffffff" ); + aVal <<= OUString(RTL_CONSTASCII_USTRINGPARAM("0xffffffff")); pTestBlocks[nElems++] = ConvBlock( aVal, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0 ); aVal <<= (sal_uInt32)( 0xffffffff ); pTestBlocks[nElems++] = ConvBlock( aVal, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0 ); // st,do,fl,u3,i3,u1,i1,by,bo,ch,tc,si,sa - aVal <<= OUString::createFromAscii( "-2147483648" ); + aVal <<= OUString(RTL_CONSTASCII_USTRINGPARAM("-2147483648")); pTestBlocks[nElems++] = ConvBlock( aVal, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0 ); - aVal <<= OUString::createFromAscii( "-0x80000000" ); + aVal <<= OUString(RTL_CONSTASCII_USTRINGPARAM("-0x80000000")); pTestBlocks[nElems++] = ConvBlock( aVal, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0 ); // st,do,fl,u3,i3,u1,i1,by,bo,ch,tc,si,sa aVal <<= (sal_uInt32)( 0x80000000 ); pTestBlocks[nElems++] = ConvBlock( aVal, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0 ); // st,do,fl,u3,i3,u1,i1,by,bo,ch,tc,si,sa - aVal <<= OUString::createFromAscii( "2147483647" ); + aVal <<= OUString(RTL_CONSTASCII_USTRINGPARAM("2147483647")); pTestBlocks[nElems++] = ConvBlock( aVal, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0 ); - aVal <<= OUString::createFromAscii( "0x7fffffff" ); + aVal <<= OUString(RTL_CONSTASCII_USTRINGPARAM("0x7fffffff")); pTestBlocks[nElems++] = ConvBlock( aVal, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0 ); aVal <<= (sal_uInt32)( 0x7fffffff ); pTestBlocks[nElems++] = ConvBlock( aVal, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0 ); // st,do,fl,u3,i3,u1,i1,by,bo,ch,tc,si,sa - aVal <<= OUString::createFromAscii( "65536" ); + aVal <<= OUString(RTL_CONSTASCII_USTRINGPARAM("65536")); pTestBlocks[nElems++] = ConvBlock( aVal, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0 ); - aVal <<= OUString::createFromAscii( "0x10000" ); + aVal <<= OUString(RTL_CONSTASCII_USTRINGPARAM("0x10000")); pTestBlocks[nElems++] = ConvBlock( aVal, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0 ); aVal <<= (sal_uInt32)( 0x10000 ); pTestBlocks[nElems++] = ConvBlock( aVal, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0 ); @@ -433,7 +433,7 @@ static sal_Int32 initBlocks( ConvBlock * pTestBlocks ) aVal <<= (sal_uInt32)( 5 ); pTestBlocks[nElems++] = ConvBlock( aVal, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 ); // st,do,fl,u3,i3,u1,i1,by,bo,ch,tc,si,sa - aVal <<= OUString::createFromAscii( "0xfffffffb" ); + aVal <<= OUString(RTL_CONSTASCII_USTRINGPARAM("0xfffffffb")); pTestBlocks[nElems++] = ConvBlock( aVal, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0 ); aVal <<= (sal_uInt32)( -5 ); // is 0xfffffffb pTestBlocks[nElems++] = ConvBlock( aVal, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0 ); @@ -461,27 +461,27 @@ static sal_Int32 initBlocks( ConvBlock * pTestBlocks ) pTestBlocks[nElems++] = ConvBlock( aVal, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0 ); // st,do,fl,u3,i3,u1,i1,by,bo,ch,tc,si,sa // ==FLOAT== - aVal <<= OUString::createFromAscii( "-3.4e+38" ); + aVal <<= OUString(RTL_CONSTASCII_USTRINGPARAM("-3.4e+38")); pTestBlocks[nElems++] = ConvBlock( aVal, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ); aVal <<= (float)( MIN_FLOAT ); pTestBlocks[nElems++] = ConvBlock( aVal, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0 ); // st,do,fl,u3,i3,u1,i1,by,bo,ch,tc,si,sa - aVal <<= OUString::createFromAscii( "+3.4e+38" ); + aVal <<= OUString(RTL_CONSTASCII_USTRINGPARAM("+3.4e+38")); pTestBlocks[nElems++] = ConvBlock( aVal, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ); aVal <<= (float)( MAX_FLOAT ); pTestBlocks[nElems++] = ConvBlock( aVal, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0 ); // st,do,fl,u3,i3,u1,i1,by,bo,ch,tc,si,sa - aVal <<= OUString::createFromAscii( "9e-20" ); + aVal <<= OUString(RTL_CONSTASCII_USTRINGPARAM("9e-20")); pTestBlocks[nElems++] = ConvBlock( aVal, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0 ); aVal <<= (float)( 9e-20 ); pTestBlocks[nElems++] = ConvBlock( aVal, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 ); // st,do,fl,u3,i3,u1,i1,by,bo,ch,tc,si,sa - aVal <<= OUString::createFromAscii( "+.7071067811865" ); + aVal <<= OUString(RTL_CONSTASCII_USTRINGPARAM("+.7071067811865")); pTestBlocks[nElems++] = ConvBlock( aVal, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0 ); aVal <<= (float)( .7071067811865 ); pTestBlocks[nElems++] = ConvBlock( aVal, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 ); // st,do,fl,u3,i3,u1,i1,by,bo,ch,tc,si,sa - aVal <<= OUString::createFromAscii( "3.14159265359" ); + aVal <<= OUString(RTL_CONSTASCII_USTRINGPARAM("3.14159265359")); pTestBlocks[nElems++] = ConvBlock( aVal, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0 ); aVal <<= (float)( 3.14159265359 ); pTestBlocks[nElems++] = ConvBlock( aVal, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 ); @@ -490,12 +490,12 @@ static sal_Int32 initBlocks( ConvBlock * pTestBlocks ) pTestBlocks[nElems++] = ConvBlock( aVal, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 ); // st,do,fl,u3,i3,u1,i1,by,bo,ch,tc,si,sa // ==DOUBLE== - aVal <<= OUString::createFromAscii( "-1.7976931348623155e+308" ); + aVal <<= OUString(RTL_CONSTASCII_USTRINGPARAM("-1.7976931348623155e+308")); pTestBlocks[nElems++] = ConvBlock( aVal, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ); aVal <<= (double)( MIN_DOUBLE ); pTestBlocks[nElems++] = ConvBlock( aVal, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0 ); // st,do,fl,u3,i3,u1,i1,by,bo,ch,tc,si,sa - aVal <<= OUString::createFromAscii( "1.7976931348623155e+308" ); + aVal <<= OUString(RTL_CONSTASCII_USTRINGPARAM("1.7976931348623155e+308")); pTestBlocks[nElems++] = ConvBlock( aVal, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ); aVal <<= (double)( MAX_DOUBLE ); pTestBlocks[nElems++] = ConvBlock( aVal, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0 ); @@ -521,7 +521,7 @@ static sal_Int32 initBlocks( ConvBlock * pTestBlocks ) aVal <<= (double)( 0xffffffff ); pTestBlocks[nElems++] = ConvBlock( aVal, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0 ); // st,do,fl,u3,i3,u1,i1,by,bo,ch,tc,si,sa - aVal <<= OUString::createFromAscii( "0x100000000" ); + aVal <<= OUString(RTL_CONSTASCII_USTRINGPARAM("0x100000000")); pTestBlocks[nElems++] = ConvBlock( aVal, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ); #ifndef OS2 aVal <<= (double)( SAL_CONST_INT64(0x100000000) ); @@ -536,20 +536,20 @@ static sal_Int32 initBlocks( ConvBlock * pTestBlocks ) aVal.setValue( &c, ::getCharCppuType() ); pTestBlocks[nElems++] = ConvBlock( aVal, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0 ); // st,do,fl,u3,i3,u1,i1,by,bo,ch,tc,si,sa - aVal <<= OUString::createFromAscii( "A" ); + aVal <<= OUString(RTL_CONSTASCII_USTRINGPARAM("A")); pTestBlocks[nElems++] = ConvBlock( aVal, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0 ); // st,do,fl,u3,i3,u1,i1,by,bo,ch,tc,si,sa // ==BOOL== - aVal <<= OUString::createFromAscii( "0" ); + aVal <<= OUString(RTL_CONSTASCII_USTRINGPARAM("0")); pTestBlocks[nElems++] = ConvBlock( aVal, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0 ); // st,do,fl,u3,i3,u1,i1,by,bo,ch,tc,si,sa - aVal <<= OUString::createFromAscii( "1" ); + aVal <<= OUString(RTL_CONSTASCII_USTRINGPARAM("1")); pTestBlocks[nElems++] = ConvBlock( aVal, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0 ); // st,do,fl,u3,i3,u1,i1,by,bo,ch,tc,si,sa - aVal <<= OUString::createFromAscii( "False" ); + aVal <<= OUString(RTL_CONSTASCII_USTRINGPARAM("False")); pTestBlocks[nElems++] = ConvBlock( aVal, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0 ); // st,do,fl,u3,i3,u1,i1,by,bo,ch,tc,si,sa - aVal <<= OUString::createFromAscii( "true" ); + aVal <<= OUString(RTL_CONSTASCII_USTRINGPARAM("true")); pTestBlocks[nElems++] = ConvBlock( aVal, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0 ); // st,do,fl,u3,i3,u1,i1,by,bo,ch,tc,si,sa @@ -561,17 +561,17 @@ static sal_Int32 initBlocks( ConvBlock * pTestBlocks ) aVal <<= OUString(); pTestBlocks[nElems++] = ConvBlock( aVal, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0 ); // st,do,fl,u3,i3,u1,i1,by,bo,ch,tc,si,sa - aVal <<= OUString::createFromAscii( "-" ); + aVal <<= OUString(RTL_CONSTASCII_USTRINGPARAM("-")); pTestBlocks[nElems++] = ConvBlock( aVal, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0 ); // st,do,fl,u3,i3,u1,i1,by,bo,ch,tc,si,sa - aVal <<= OUString::createFromAscii( "-0" ); + aVal <<= OUString(RTL_CONSTASCII_USTRINGPARAM("-0")); pTestBlocks[nElems++] = ConvBlock( aVal, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0 ); // st,do,fl,u3,i3,u1,i1,by,bo,ch,tc,si,sa // ==TYPECLASS ENUM== - aVal <<= OUString::createFromAscii( "eNuM" ); + aVal <<= OUString(RTL_CONSTASCII_USTRINGPARAM("eNuM")); pTestBlocks[nElems++] = ConvBlock( aVal, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0 ); // st,do,fl,u3,i3,u1,i1,by,bo,ch,tc,si,sa - aVal <<= OUString::createFromAscii( "DOUBLE" ); + aVal <<= OUString(RTL_CONSTASCII_USTRINGPARAM("DOUBLE")); pTestBlocks[nElems++] = ConvBlock( aVal, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0 ); // st,do,fl,u3,i3,u1,i1,by,bo,ch,tc,si,sa int e = 1; @@ -601,19 +601,19 @@ static sal_Int32 initBlocks( ConvBlock * pTestBlocks ) Sequence< Any > aAnySeq( 2 ), aAnySeq2( 2 ), aAnySeq3( 2 ); Any * pAnySeq = aAnySeq.getArray(); pAnySeq[0] = makeAny( aINT32Seq ); - pAnySeq[1] = makeAny( OUString::createFromAscii("lala") ); + pAnySeq[1] = makeAny( OUString(RTL_CONSTASCII_USTRINGPARAM("lala")) ); aVal <<= aAnySeq; pTestBlocks[nElems++] = ConvBlock( aVal, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 ); // st,do,fl,u3,i3,u1,i1,by,bo,ch,tc,si,sa pAnySeq = aAnySeq2.getArray(); pAnySeq[0] <<= (sal_Int32)4711; - pAnySeq[1] <<= OUString::createFromAscii("0815"); + pAnySeq[1] <<= OUString(RTL_CONSTASCII_USTRINGPARAM("0815")); aVal <<= aAnySeq2; pTestBlocks[nElems++] = ConvBlock( aVal, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1 ); // st,do,fl,u3,i3,u1,i1,by,bo,ch,tc,si,sa pAnySeq = aAnySeq3.getArray(); - pAnySeq[0] <<= OUString::createFromAscii("TypeClass_UNION"); - pAnySeq[1] <<= OUString::createFromAscii("TypeClass_ENUM"); + pAnySeq[0] <<= OUString(RTL_CONSTASCII_USTRINGPARAM("TypeClass_UNION")); + pAnySeq[1] <<= OUString(RTL_CONSTASCII_USTRINGPARAM("TypeClass_ENUM")); aVal <<= aAnySeq3; pTestBlocks[nElems++] = ConvBlock( aVal, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 ); // st,do,fl,u3,i3,u1,i1,by,bo,ch,tc,si,sa @@ -626,7 +626,7 @@ static void test_Conversion( const Reference< XMultiServiceFactory > & xMgr ) printf( "test_Conversion(): start...\n" ); Reference< XTypeConverter > xConverter( xMgr->createInstance( - OUString::createFromAscii( "com.sun.star.script.Converter" ) ), UNO_QUERY ); + OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.script.Converter")) ), UNO_QUERY ); ConvBlock * pTestBlocks = new ConvBlock[256]; sal_Int32 nPos = initBlocks( pTestBlocks ); @@ -676,18 +676,18 @@ static void test_Conversion( const Reference< XMultiServiceFactory > & xMgr ) SAL_IMPLEMENT_MAIN() { - Reference< XMultiServiceFactory > xMgr( createRegistryServiceFactory( OUString::createFromAscii("stoctest.rdb") ) ); + Reference< XMultiServiceFactory > xMgr( createRegistryServiceFactory( OUString(RTL_CONSTASCII_USTRINGPARAM("stoctest.rdb")) ) ); try { Reference< XImplementationRegistration > xImplReg( - xMgr->createInstance( OUString::createFromAscii("com.sun.star.registry.ImplementationRegistration") ), UNO_QUERY ); + xMgr->createInstance( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.registry.ImplementationRegistration")) ), UNO_QUERY ); OSL_ENSURE( xImplReg.is(), "### no impl reg!" ); OUString aLibName( RTL_CONSTASCII_USTRINGPARAM("stocservices.uno" SAL_DLLEXTENSION) ); xImplReg->registerImplementation( - OUString::createFromAscii("com.sun.star.loader.SharedLibrary"), + OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.loader.SharedLibrary")), aLibName, Reference< XSimpleRegistry >() ); test_Conversion( xMgr ); diff --git a/stoc/test/testcorefl.cxx b/stoc/test/testcorefl.cxx index 75d0782b1cf5..e2e44c366e96 100644 --- a/stoc/test/testcorefl.cxx +++ b/stoc/test/testcorefl.cxx @@ -106,23 +106,23 @@ static sal_Bool test_corefl( const Reference< XIdlReflection > & xRefl ) Reference< XHierarchicalNameAccess > xHNameAccess( xRefl, UNO_QUERY ); TEST_ENSHURE(xHNameAccess.is(), "### cannot get XHierarchicalNameAccess!" ); - TEST_ENSHURE(xRefl->forName(OUString::createFromAscii("ModuleA.StructA"))->getName() == OUString::createFromAscii("ModuleA.StructA"), "test_RegCoreReflection(): error 2b"); - TEST_ENSHURE(xRefl->forName(OUString::createFromAscii("ModuleA.ExceptionB"))->getTypeClass() == TypeClass_EXCEPTION, "test_RegCoreReflection(): error 2c"); - TEST_ENSHURE(xRefl->forName(OUString::createFromAscii("ModuleA.ModuleB.EnumA")).is(), "test_RegCoreReflection(): error 2e"); + TEST_ENSHURE(xRefl->forName(OUString(RTL_CONSTASCII_USTRINGPARAM("ModuleA.StructA")))->getName() == OUString(RTL_CONSTASCII_USTRINGPARAM("ModuleA.StructA")), "test_RegCoreReflection(): error 2b"); + TEST_ENSHURE(xRefl->forName(OUString(RTL_CONSTASCII_USTRINGPARAM("ModuleA.ExceptionB")))->getTypeClass() == TypeClass_EXCEPTION, "test_RegCoreReflection(): error 2c"); + TEST_ENSHURE(xRefl->forName(OUString(RTL_CONSTASCII_USTRINGPARAM("ModuleA.ModuleB.EnumA"))).is(), "test_RegCoreReflection(): error 2e"); // const - TEST_ENSHURE(*(const sal_Bool *)xHNameAccess->getByHierarchicalName(OUString::createFromAscii("ModuleC.aConstBoolean")).getValue() == aConstBoolean, "test_RegCoreReflection(): error 4c"); - TEST_ENSHURE(*(const sal_Int8 *)xHNameAccess->getByHierarchicalName(OUString::createFromAscii("ModuleC.aConstByte")).getValue() == aConstByte, "test_RegCoreReflection(): error 4e"); - TEST_ENSHURE(xHNameAccess->getByHierarchicalName(OUString::createFromAscii("ModuleC.aConstShort")) == aConstShort, "test_RegCoreReflection(): error 4g"); - TEST_ENSHURE(xHNameAccess->getByHierarchicalName(OUString::createFromAscii("ModuleC.aConstUShort")) == aConstUShort, "test_RegCoreReflection(): error 4i"); - TEST_ENSHURE(xHNameAccess->getByHierarchicalName(OUString::createFromAscii("ModuleC.aConstLong")) == aConstLong, "test_RegCoreReflection(): error 4k"); - TEST_ENSHURE(xHNameAccess->getByHierarchicalName(OUString::createFromAscii("ModuleC.aConstULong")) == aConstULong, "test_RegCoreReflection(): error 4m"); -// TEST_ENSHURE(xHNameAccess->getByHierarchicalName(OUString::createFromAscii("ModuleC.aConstFloat")) == aConstFloat, "test_RegCoreReflection(): error 4o"); -// TEST_ENSHURE(xHNameAccess->getByHierarchicalName(OUString::createFromAscii("ModuleC.aConstDouble")) == aConstDouble, "test_RegCoreReflection(): error 4q"); + TEST_ENSHURE(*(const sal_Bool *)xHNameAccess->getByHierarchicalName(OUString(RTL_CONSTASCII_USTRINGPARAM("ModuleC.aConstBoolean"))).getValue() == aConstBoolean, "test_RegCoreReflection(): error 4c"); + TEST_ENSHURE(*(const sal_Int8 *)xHNameAccess->getByHierarchicalName(OUString(RTL_CONSTASCII_USTRINGPARAM("ModuleC.aConstByte"))).getValue() == aConstByte, "test_RegCoreReflection(): error 4e"); + TEST_ENSHURE(xHNameAccess->getByHierarchicalName(OUString(RTL_CONSTASCII_USTRINGPARAM("ModuleC.aConstShort"))) == aConstShort, "test_RegCoreReflection(): error 4g"); + TEST_ENSHURE(xHNameAccess->getByHierarchicalName(OUString(RTL_CONSTASCII_USTRINGPARAM("ModuleC.aConstUShort"))) == aConstUShort, "test_RegCoreReflection(): error 4i"); + TEST_ENSHURE(xHNameAccess->getByHierarchicalName(OUString(RTL_CONSTASCII_USTRINGPARAM("ModuleC.aConstLong"))) == aConstLong, "test_RegCoreReflection(): error 4k"); + TEST_ENSHURE(xHNameAccess->getByHierarchicalName(OUString(RTL_CONSTASCII_USTRINGPARAM("ModuleC.aConstULong"))) == aConstULong, "test_RegCoreReflection(): error 4m"); +// TEST_ENSHURE(xHNameAccess->getByHierarchicalName(OUString(RTL_CONSTASCII_USTRINGPARAM("ModuleC.aConstFloat"))) == aConstFloat, "test_RegCoreReflection(): error 4o"); +// TEST_ENSHURE(xHNameAccess->getByHierarchicalName(OUString(RTL_CONSTASCII_USTRINGPARAM("ModuleC.aConstDouble"))) == aConstDouble, "test_RegCoreReflection(): error 4q"); // Enums - xClass = xRefl->forName(OUString::createFromAscii("ModuleA.ModuleB.EnumA")); + xClass = xRefl->forName(OUString(RTL_CONSTASCII_USTRINGPARAM("ModuleA.ModuleB.EnumA"))); TEST_ENSHURE(xClass.is(), "test_RegCoreReflection(): error 5"); @@ -141,9 +141,9 @@ static sal_Bool test_corefl( const Reference< XIdlReflection > & xRefl ) // Interface - Reference< XIdlClass > xA = xRefl->forName( OUString::createFromAscii("ModuleC.XInterfaceB") ); + Reference< XIdlClass > xA = xRefl->forName( OUString(RTL_CONSTASCII_USTRINGPARAM("ModuleC.XInterfaceB")) ); - xClass = xRefl->forName(OUString::createFromAscii("ModuleC.XInterfaceB")); + xClass = xRefl->forName(OUString(RTL_CONSTASCII_USTRINGPARAM("ModuleC.XInterfaceB"))); TEST_ENSHURE(xClass == xA, "test_RegCoreReflection(): error 7"); TEST_ENSHURE(xClass.is(), "test_RegCoreReflection(): error 7a"); @@ -159,10 +159,10 @@ static sal_Bool test_corefl( const Reference< XIdlReflection > & xRefl ) typelib_typedescription_release( pTD ); TEST_ENSHURE(xClass->getSuperclasses().getLength() == 1, "test_RegCoreReflection(): error 9"); - TEST_ENSHURE(xClass->getSuperclasses().getArray()[0]->getName() == OUString::createFromAscii("ModuleC.XInterfaceA"), "test_RegCoreReflection(): error 10"); + TEST_ENSHURE(xClass->getSuperclasses().getArray()[0]->getName() == OUString(RTL_CONSTASCII_USTRINGPARAM("ModuleC.XInterfaceA")), "test_RegCoreReflection(): error 10"); TEST_ENSHURE(xClass->getMethods().getLength() == 7, "test_RegCoreReflection(): error 11"); TEST_ENSHURE(xA->getMethods().getLength() == 7, "test_RegCoreReflection(): error 11a"); - TEST_ENSHURE(xClass->getMethods().getArray()[3]->getName() == OUString::createFromAscii("methodA"), "test_RegCoreReflection(): 12"); + TEST_ENSHURE(xClass->getMethods().getArray()[3]->getName() == OUString(RTL_CONSTASCII_USTRINGPARAM("methodA")), "test_RegCoreReflection(): 12"); TEST_ENSHURE(xClass->getMethods().getArray()[3]->getReturnType()->getTypeClass() == TypeClass_VOID, "test_RegCoreReflection(): error 13"); TEST_ENSHURE(xClass->getMethods().getArray()[3]->getParameterTypes().getLength() == 0, "test_RegCoreReflection(): error 14"); TEST_ENSHURE(xClass->getMethods().getArray()[3]->getExceptionTypes().getLength() == 0, "test_RegCoreReflection(): error 15"); @@ -175,44 +175,44 @@ static sal_Bool test_corefl( const Reference< XIdlReflection > & xRefl ) TEST_ENSHURE(xClass->getMethods().getArray()[4]->getParameterInfos().getArray()[0].aType == xRefl->forName( OUString( RTL_CONSTASCII_USTRINGPARAM("short") ) ), "test_RegCoreReflection(): error 18b"); TEST_ENSHURE(xClass->getMethods().getArray()[4]->getParameterInfos().getArray()[0].aMode == ParamMode_IN, "test_RegCoreReflection(): error 18c"); TEST_ENSHURE(xClass->getMethods().getArray()[4]->getExceptionTypes().getLength() == 0, "test_RegCoreReflection(): error 19"); - TEST_ENSHURE(xClass->getMethods().getArray()[5]->getName() == OUString::createFromAscii("methodC"), "test_RegCoreReflection(): error 20"); + TEST_ENSHURE(xClass->getMethods().getArray()[5]->getName() == OUString(RTL_CONSTASCII_USTRINGPARAM("methodC")), "test_RegCoreReflection(): error 20"); TEST_ENSHURE(xClass->getMethods().getArray()[5]->getMode() == MethodMode_TWOWAY, "test_RegCoreReflection(): error 20a"); TEST_ENSHURE(xClass->getMethods().getArray()[5]->getReturnType()->getTypeClass() == TypeClass_SEQUENCE, "test_RegCoreReflection(): error 21"); TEST_ENSHURE(xClass->getMethods().getArray()[5]->getReturnType()->getComponentType()->getTypeClass() == TypeClass_STRUCT, "test_RegCoreReflection(): error 22"); - TEST_ENSHURE(xClass->getMethods().getArray()[5]->getReturnType()->getComponentType()->getName() == OUString::createFromAscii("ModuleA.StructB"), "test_RegCoreReflection(): error 23"); + TEST_ENSHURE(xClass->getMethods().getArray()[5]->getReturnType()->getComponentType()->getName() == OUString(RTL_CONSTASCII_USTRINGPARAM("ModuleA.StructB")), "test_RegCoreReflection(): error 23"); TEST_ENSHURE(xClass->getMethods().getArray()[5]->getParameterTypes().getLength() == 2, "test_RegCoreReflection(): error 24"); TEST_ENSHURE(xClass->getMethods().getArray()[5]->getParameterTypes().getArray()[0]->getTypeClass() == TypeClass_STRUCT, "test_RegCoreReflection(): error 25"); - TEST_ENSHURE(xClass->getMethods().getArray()[5]->getParameterTypes().getArray()[0]->getName() == OUString::createFromAscii("ModuleA.StructC"), "test_RegCoreReflection(): error 26"); + TEST_ENSHURE(xClass->getMethods().getArray()[5]->getParameterTypes().getArray()[0]->getName() == OUString(RTL_CONSTASCII_USTRINGPARAM("ModuleA.StructC")), "test_RegCoreReflection(): error 26"); TEST_ENSHURE(xClass->getMethods().getArray()[5]->getParameterTypes().getArray()[1]->getTypeClass() == TypeClass_STRUCT, "test_RegCoreReflection(): error 27"); - TEST_ENSHURE(xClass->getMethods().getArray()[5]->getParameterTypes().getArray()[1]->getName() == OUString::createFromAscii("ModuleA.StructA"), "test_RegCoreReflection(): error 28"); + TEST_ENSHURE(xClass->getMethods().getArray()[5]->getParameterTypes().getArray()[1]->getName() == OUString(RTL_CONSTASCII_USTRINGPARAM("ModuleA.StructA")), "test_RegCoreReflection(): error 28"); TEST_ENSHURE(xClass->getMethods().getArray()[5]->getExceptionTypes().getLength() == 0, "test_RegCoreReflection(): error 29"); - TEST_ENSHURE(xClass->getMethods().getArray()[6]->getName() == OUString::createFromAscii("methodD"), "test_RegCoreReflection(): error 30"); + TEST_ENSHURE(xClass->getMethods().getArray()[6]->getName() == OUString(RTL_CONSTASCII_USTRINGPARAM("methodD")), "test_RegCoreReflection(): error 30"); TEST_ENSHURE(xClass->getMethods().getArray()[6]->getReturnType()->getTypeClass() == TypeClass_INTERFACE, "test_RegCoreReflection(): error 31"); - TEST_ENSHURE(xClass->getMethods().getArray()[6]->getReturnType()->getName() == OUString::createFromAscii("ModuleC.XInterfaceA"), "test_RegCoreReflection(): error 32"); + TEST_ENSHURE(xClass->getMethods().getArray()[6]->getReturnType()->getName() == OUString(RTL_CONSTASCII_USTRINGPARAM("ModuleC.XInterfaceA")), "test_RegCoreReflection(): error 32"); TEST_ENSHURE(xClass->getMethods().getArray()[6]->getParameterTypes().getLength() == 1, "test_RegCoreReflection(): error 33"); TEST_ENSHURE(xClass->getMethods().getArray()[6]->getParameterTypes().getArray()[0]->getTypeClass() == TypeClass_ENUM, "test_RegCoreReflection(): error 34"); - TEST_ENSHURE(xClass->getMethods().getArray()[6]->getParameterTypes().getArray()[0]->getName() == OUString::createFromAscii("ModuleA.ModuleB.EnumA"), "test_RegCoreReflection(): error 35"); + TEST_ENSHURE(xClass->getMethods().getArray()[6]->getParameterTypes().getArray()[0]->getName() == OUString(RTL_CONSTASCII_USTRINGPARAM("ModuleA.ModuleB.EnumA")), "test_RegCoreReflection(): error 35"); TEST_ENSHURE(xClass->getMethods().getArray()[6]->getExceptionTypes().getLength() == 3, "test_RegCoreReflection(): error 36"); TEST_ENSHURE(xClass->getMethods().getArray()[6]->getExceptionTypes().getArray()[0]->getTypeClass() == TypeClass_EXCEPTION, "test_RegCoreReflection(): error 37"); - TEST_ENSHURE(xClass->getMethods().getArray()[6]->getExceptionTypes().getArray()[0]->getName() == OUString::createFromAscii("ModuleA.ExceptionA"), "test_RegCoreReflection(): error 38"); + TEST_ENSHURE(xClass->getMethods().getArray()[6]->getExceptionTypes().getArray()[0]->getName() == OUString(RTL_CONSTASCII_USTRINGPARAM("ModuleA.ExceptionA")), "test_RegCoreReflection(): error 38"); TEST_ENSHURE(xClass->getMethods().getArray()[6]->getExceptionTypes().getArray()[1]->getTypeClass() == TypeClass_EXCEPTION, "test_RegCoreReflection(): error 38"); - TEST_ENSHURE(xClass->getMethods().getArray()[6]->getExceptionTypes().getArray()[1]->getName() == OUString::createFromAscii("ModuleA.ExceptionB"), "test_RegCoreReflection(): error 39"); + TEST_ENSHURE(xClass->getMethods().getArray()[6]->getExceptionTypes().getArray()[1]->getName() == OUString(RTL_CONSTASCII_USTRINGPARAM("ModuleA.ExceptionB")), "test_RegCoreReflection(): error 39"); TEST_ENSHURE(xClass->getMethods().getArray()[6]->getExceptionTypes().getArray()[2]->getTypeClass() == TypeClass_EXCEPTION, "test_RegCoreReflection(): error 40"); - TEST_ENSHURE(xClass->getMethods().getArray()[6]->getExceptionTypes().getArray()[2]->getName() == OUString::createFromAscii("ModuleA.ExceptionC"), "test_RegCoreReflection(): error 41"); + TEST_ENSHURE(xClass->getMethods().getArray()[6]->getExceptionTypes().getArray()[2]->getName() == OUString(RTL_CONSTASCII_USTRINGPARAM("ModuleA.ExceptionC")), "test_RegCoreReflection(): error 41"); TEST_ENSHURE(xClass->getMethods().getArray()[6]->getExceptionTypes().getArray()[2]->getFields().getLength() == 3, "test_RegCoreReflection(): error 42"); TEST_ENSHURE(xClass->getMethods().getArray()[6]->getExceptionTypes().getArray()[2]->getFields().getArray()[0]->getType()->getTypeClass() == TypeClass_BOOLEAN, "test_RegCoreReflection(): error 43"); - TEST_ENSHURE(xClass->getMethods().getArray()[6]->getExceptionTypes().getArray()[2]->getFields().getArray()[0]->getType()->getName() == OUString::createFromAscii("boolean"), "test_RegCoreReflection(): error 43a"); + TEST_ENSHURE(xClass->getMethods().getArray()[6]->getExceptionTypes().getArray()[2]->getFields().getArray()[0]->getType()->getName() == OUString(RTL_CONSTASCII_USTRINGPARAM("boolean")), "test_RegCoreReflection(): error 43a"); TEST_ENSHURE(xClass->getMethods().getArray()[6]->getExceptionTypes().getArray()[2]->getFields().getArray()[1]->getType()->getTypeClass() == TypeClass_STRUCT, "test_RegCoreReflection(): error 44"); - TEST_ENSHURE(xClass->getMethods().getArray()[6]->getExceptionTypes().getArray()[2]->getFields().getArray()[1]->getType()->getName() == OUString::createFromAscii("ModuleA.StructC"), "test_RegCoreReflection(): error 45"); + TEST_ENSHURE(xClass->getMethods().getArray()[6]->getExceptionTypes().getArray()[2]->getFields().getArray()[1]->getType()->getName() == OUString(RTL_CONSTASCII_USTRINGPARAM("ModuleA.StructC")), "test_RegCoreReflection(): error 45"); TEST_ENSHURE(xClass->getMethods().getArray()[6]->getExceptionTypes().getArray()[2]->getFields().getArray()[2]->getType()->getTypeClass() == TypeClass_INTERFACE, "test_RegCoreReflection(): error 46"); - TEST_ENSHURE(xClass->getMethods().getArray()[6]->getExceptionTypes().getArray()[2]->getFields().getArray()[2]->getType()->getName() == OUString::createFromAscii("ModuleA.XInterface1"), "test_RegCoreReflection(): error 47"); + TEST_ENSHURE(xClass->getMethods().getArray()[6]->getExceptionTypes().getArray()[2]->getFields().getArray()[2]->getType()->getName() == OUString(RTL_CONSTASCII_USTRINGPARAM("ModuleA.XInterface1")), "test_RegCoreReflection(): error 47"); // SequenceReflections - TEST_ENSHURE(xRefl->forName( OUString::createFromAscii("[]ModuleA.StructA") )->getTypeClass() == TypeClass_SEQUENCE, "test_RegCoreReflection(): error 48"); - TEST_ENSHURE(xRefl->forName( OUString::createFromAscii("[]ModuleA.StructA") )->getComponentType().is(), "test_RegCoreReflection(): error 49"); - TEST_ENSHURE(xRefl->forName( OUString::createFromAscii("[][]ModuleA.StructA") )->getComponentType()->getComponentType()->getName() == OUString::createFromAscii("ModuleA.StructA"), "test_RegCoreReflection(): error 50"); - TEST_ENSHURE(xRefl->forName( OUString::createFromAscii("[]com.sun.star.uno.XInterface") ) == xRefl->forName(OUString( RTL_CONSTASCII_USTRINGPARAM("ModuleA.StructC") ))->getField(OUString::createFromAscii("aInterfaceSeq"))->getType(), "test_RegCoreReflection(): error 51"); + TEST_ENSHURE(xRefl->forName( OUString(RTL_CONSTASCII_USTRINGPARAM("[]ModuleA.StructA")) )->getTypeClass() == TypeClass_SEQUENCE, "test_RegCoreReflection(): error 48"); + TEST_ENSHURE(xRefl->forName( OUString(RTL_CONSTASCII_USTRINGPARAM("[]ModuleA.StructA")) )->getComponentType().is(), "test_RegCoreReflection(): error 49"); + TEST_ENSHURE(xRefl->forName( OUString(RTL_CONSTASCII_USTRINGPARAM("[][]ModuleA.StructA")) )->getComponentType()->getComponentType()->getName() == OUString(RTL_CONSTASCII_USTRINGPARAM("ModuleA.StructA")), "test_RegCoreReflection(): error 50"); + TEST_ENSHURE(xRefl->forName( OUString(RTL_CONSTASCII_USTRINGPARAM("[]com.sun.star.uno.XInterface")) ) == xRefl->forName(OUString( RTL_CONSTASCII_USTRINGPARAM("ModuleA.StructC") ))->getField(OUString(RTL_CONSTASCII_USTRINGPARAM("aInterfaceSeq")))->getType(), "test_RegCoreReflection(): error 51"); StructC aStructC; aStructC.aLong = aConstLong; @@ -223,7 +223,7 @@ static sal_Bool test_corefl( const Reference< XIdlReflection > & xRefl ) Any aAny; - xRefl->forName(OUString::createFromAscii("ModuleA.StructC"))->getField(OUString::createFromAscii("aInterfaceSeq"))->getType()->createObject(aAny); + xRefl->forName(OUString(RTL_CONSTASCII_USTRINGPARAM("ModuleA.StructC")))->getField(OUString(RTL_CONSTASCII_USTRINGPARAM("aInterfaceSeq")))->getType()->createObject(aAny); TEST_ENSHURE(aAny.getValueType() == ::getCppuType( (const Sequence > *)0 ), "test_RegCoreReflection(): error 51a"); @@ -234,33 +234,33 @@ static sal_Bool test_corefl( const Reference< XIdlReflection > & xRefl ) TEST_ENSHURE(*(sal_Int32*)xRefl->forName(OUString( RTL_CONSTASCII_USTRINGPARAM("ModuleA.StructA") ))->getField(OUString( RTL_CONSTASCII_USTRINGPARAM("aLong") ))->get( Any(&aStructC, ::getCppuType( (const StructC *)0 ))).getValue() == aConstLong, "test_RegCoreReflection(): error 52"); - TEST_ENSHURE(xRefl->forName(OUString::createFromAscii("ModuleA.StructA"))->getField(OUString( RTL_CONSTASCII_USTRINGPARAM("aLong") ))->getAccessMode() == FieldAccessMode_READWRITE, "test_RegCoreReflection(): error 52a"); + TEST_ENSHURE(xRefl->forName(OUString(RTL_CONSTASCII_USTRINGPARAM("ModuleA.StructA")))->getField(OUString( RTL_CONSTASCII_USTRINGPARAM("aLong") ))->getAccessMode() == FieldAccessMode_READWRITE, "test_RegCoreReflection(): error 52a"); Reference< XIdlField2 > rField ( xRefl->forName(OUString( RTL_CONSTASCII_USTRINGPARAM("ModuleA.StructC") ))->getField(OUString( RTL_CONSTASCII_USTRINGPARAM("aLong") )) , UNO_QUERY ); rField->set(aStructAny, aAny); - TEST_ENSHURE(*(sal_Int32*)xRefl->forName(OUString::createFromAscii("ModuleA.StructB"))->getField(OUString( RTL_CONSTASCII_USTRINGPARAM("aLong") ))->get(aStructAny).getValue() == *(sal_Int32*)aAny.getValue(), "test_RegCoreReflection(): error 53"); + TEST_ENSHURE(*(sal_Int32*)xRefl->forName(OUString(RTL_CONSTASCII_USTRINGPARAM("ModuleA.StructB")))->getField(OUString( RTL_CONSTASCII_USTRINGPARAM("aLong") ))->get(aStructAny).getValue() == *(sal_Int32*)aAny.getValue(), "test_RegCoreReflection(): error 53"); - xRefl->forName( OUString::createFromAscii("[]ModuleA.StructA") )->createObject(aAny); + xRefl->forName( OUString(RTL_CONSTASCII_USTRINGPARAM("[]ModuleA.StructA")) )->createObject(aAny); TEST_ENSHURE(aAny.getValueTypeName().equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("[]ModuleA.StructA")), "test_RegCoreReflection(): error 54"); - xRefl->forName(OUString::createFromAscii("[][]ModuleA.StructA"))->createObject(aAny); + xRefl->forName(OUString(RTL_CONSTASCII_USTRINGPARAM("[][]ModuleA.StructA")))->createObject(aAny); TEST_ENSHURE(aAny.getValueTypeName().equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("[][]ModuleA.StructA") ), "test_RegCoreReflection(): error 56"); // xClass = xRefl->forName(OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.beans.XIntroTest") )); // TEST_ENSHURE(xClass.is(), "test_RegCoreReflection(): error 58"); -// TEST_ENSHURE(xClass->getMethod(OUString::createFromAscii("getStrings"))->getReturnType()->getTypeClass() == TypeClass_SEQUENCE, "test_RegCoreReflection(): error 59"); -// TEST_ENSHURE(xClass->getMethod(OUString::createFromAscii("getStrings"))->getReturnType()->getComponentType()->getName() == OUString::createFromAscii("string"), "test_RegCoreReflection(): error 60"); +// TEST_ENSHURE(xClass->getMethod(OUString(RTL_CONSTASCII_USTRINGPARAM("getStrings")))->getReturnType()->getTypeClass() == TypeClass_SEQUENCE, "test_RegCoreReflection(): error 59"); +// TEST_ENSHURE(xClass->getMethod(OUString(RTL_CONSTASCII_USTRINGPARAM("getStrings")))->getReturnType()->getComponentType()->getName() == OUString(RTL_CONSTASCII_USTRINGPARAM("string")), "test_RegCoreReflection(): error 60"); -// xClass->getMethod(OUString::createFromAscii("getStrings"))->getReturnType()->createObject(aAny); +// xClass->getMethod(OUString(RTL_CONSTASCII_USTRINGPARAM("getStrings")))->getReturnType()->createObject(aAny); // TEST_ENSHURE(aAny.getValueTypeName().equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("[]string") ), "test_RegCoreReflection(): error 61"); - TEST_ENSHURE(xRefl->forName(OUString::createFromAscii("[][][]unsigned long"))->getComponentType()->getComponentType()->getComponentType()->getTypeClass() == TypeClass_UNSIGNED_LONG, "test_RegCoreReflection(): error 62"); + TEST_ENSHURE(xRefl->forName(OUString(RTL_CONSTASCII_USTRINGPARAM("[][][]unsigned long")))->getComponentType()->getComponentType()->getComponentType()->getTypeClass() == TypeClass_UNSIGNED_LONG, "test_RegCoreReflection(): error 62"); try { fprintf( stderr, "%1\n" ); - Any bla = xRefl->forName(OUString::createFromAscii("ModuleA.StructC"))->getField(OUString::createFromAscii("aString"))->get(Any()); + Any bla = xRefl->forName(OUString(RTL_CONSTASCII_USTRINGPARAM("ModuleA.StructC")))->getField(OUString(RTL_CONSTASCII_USTRINGPARAM("aString")))->get(Any()); TEST_ENSHURE(sal_False, "test_RegCoreReflection(): error 63"); return sal_False; } @@ -274,9 +274,9 @@ static sal_Bool test_corefl( const Reference< XIdlReflection > & xRefl ) Any blup; blup <<= aStructC; Any gulp; - rField = Reference< XIdlField2 > ( xRefl->forName(OUString::createFromAscii("ModuleA.StructC"))->getField(OUString::createFromAscii("aString")) , UNO_QUERY); + rField = Reference< XIdlField2 > ( xRefl->forName(OUString(RTL_CONSTASCII_USTRINGPARAM("ModuleA.StructC")))->getField(OUString(RTL_CONSTASCII_USTRINGPARAM("aString"))) , UNO_QUERY); rField->set( blup, gulp); -// xRefl->forName(OUString::createFromAscii("ModuleA.StructC"))->getField(OUString::createFromAscii("aString"))->set(blup, gulp); +// xRefl->forName(OUString(RTL_CONSTASCII_USTRINGPARAM("ModuleA.StructC")))->getField(OUString(RTL_CONSTASCII_USTRINGPARAM("aString")))->set(blup, gulp); TEST_ENSHURE(sal_False, "test_RegCoreReflection(): error 64"); return sal_False; } @@ -292,8 +292,8 @@ static sal_Bool test_corefl( const Reference< XIdlReflection > & xRefl ) Any blup; blup <<= aStructC; rField = Reference< XIdlField2 > ( - xRefl->forName(OUString::createFromAscii("ModuleA.StructC"))->getField(OUString::createFromAscii("aString")) , UNO_QUERY); - xRefl->forName(OUString::createFromAscii("ModuleA.StructC"))->getField(OUString::createFromAscii("aString"))->set(blup, gulp); + xRefl->forName(OUString(RTL_CONSTASCII_USTRINGPARAM("ModuleA.StructC")))->getField(OUString(RTL_CONSTASCII_USTRINGPARAM("aString"))) , UNO_QUERY); + xRefl->forName(OUString(RTL_CONSTASCII_USTRINGPARAM("ModuleA.StructC")))->getField(OUString(RTL_CONSTASCII_USTRINGPARAM("aString")))->set(blup, gulp); TEST_ENSHURE(sal_False, "test_RegCoreReflection(): error 65"); return sal_False; } @@ -302,10 +302,10 @@ static sal_Bool test_corefl( const Reference< XIdlReflection > & xRefl ) } Any gulp; - gulp <<= OUString(OUString::createFromAscii("Test")); + gulp <<= OUString(OUString(RTL_CONSTASCII_USTRINGPARAM("Test"))); Any blup; blup <<= aStructC; - xRefl->forName(OUString::createFromAscii("ModuleA.StructC"))->getField(OUString::createFromAscii("aString"))->set(blup, gulp); + xRefl->forName(OUString(RTL_CONSTASCII_USTRINGPARAM("ModuleA.StructC")))->getField(OUString(RTL_CONSTASCII_USTRINGPARAM("aString")))->set(blup, gulp); Reference< XInterfaceA > xAI = new OInterfaceA(); @@ -316,7 +316,7 @@ static sal_Bool test_corefl( const Reference< XIdlReflection > & xRefl ) Any a; a <<= xAI; - Any bla = xRefl->forName(OUString::createFromAscii("ModuleC.XInterfaceA"))->getMethod(OUString::createFromAscii("methodC"))->invoke(a, params); + Any bla = xRefl->forName(OUString(RTL_CONSTASCII_USTRINGPARAM("ModuleC.XInterfaceA")))->getMethod(OUString(RTL_CONSTASCII_USTRINGPARAM("methodC")))->invoke(a, params); TEST_ENSHURE(sal_False, "test_RegCoreReflection(): error 66"); return sal_False; } @@ -334,7 +334,7 @@ static sal_Bool test_corefl( const Reference< XIdlReflection > & xRefl ) Any a; a <<= xAI; - Any bla = xRefl->forName(OUString::createFromAscii("ModuleC.XInterfaceA"))->getMethod(OUString::createFromAscii("methodC"))->invoke(a, params); + Any bla = xRefl->forName(OUString(RTL_CONSTASCII_USTRINGPARAM("ModuleC.XInterfaceA")))->getMethod(OUString(RTL_CONSTASCII_USTRINGPARAM("methodC")))->invoke(a, params); } try { @@ -345,7 +345,7 @@ static sal_Bool test_corefl( const Reference< XIdlReflection > & xRefl ) Any a; a <<= xAI; - Any bla = xRefl->forName(OUString::createFromAscii("ModuleC.XInterfaceA"))->getMethod(OUString::createFromAscii("methodC"))->invoke(a, params); + Any bla = xRefl->forName(OUString(RTL_CONSTASCII_USTRINGPARAM("ModuleC.XInterfaceA")))->getMethod(OUString(RTL_CONSTASCII_USTRINGPARAM("methodC")))->invoke(a, params); TEST_ENSHURE(sal_False, "test_RegCoreReflection(): error 67"); return sal_False; } @@ -360,7 +360,7 @@ static sal_Bool test_corefl( const Reference< XIdlReflection > & xRefl ) Any a; a <<= xAI; - TEST_ENSHURE(xRefl->forName(OUString::createFromAscii("ModuleC.XInterfaceA"))->getMethod(OUString::createFromAscii("methodC"))->invoke(a, params).getValueType() + TEST_ENSHURE(xRefl->forName(OUString(RTL_CONSTASCII_USTRINGPARAM("ModuleC.XInterfaceA")))->getMethod(OUString(RTL_CONSTASCII_USTRINGPARAM("methodC")))->invoke(a, params).getValueType() == ::getCppuType( (const Sequence *)0 ), "test_RegCoreReflection(): error 68"); return sal_True; diff --git a/stoc/test/testiadapter.cxx b/stoc/test/testiadapter.cxx index 8479a6934803..e4e9f22c5c8f 100644 --- a/stoc/test/testiadapter.cxx +++ b/stoc/test/testiadapter.cxx @@ -764,7 +764,7 @@ sal_Bool performTest( const Reference & xLBT ) sal_True, '@', 17, 0x1234, 0xfedc, 0x12345678, 0xfedcba98, SAL_CONST_INT64(0x123456789abcdef0), SAL_CONST_UINT64(0xfedcba9876543210), - (float)17.0815, 3.1415926359, TestEnum_LOLA, OUString::createFromAscii("dumdidum"), xI, + (float)17.0815, 3.1415926359, TestEnum_LOLA, OUString(RTL_CONSTASCII_USTRINGPARAM("dumdidum")), xI, Any( &xI, ::getCppuType( (const Reference *)0 ) ) ); OSL_ENSURE( aData.Any == xI, "### unexpected any!" ); @@ -867,7 +867,7 @@ test::TestData Test_Impl::raiseException( sal_Bool& /*bBool*/, sal_Unicode& /*cC { IllegalArgumentException aExc; aExc.ArgumentPosition = 5; - aExc.Message = OUString::createFromAscii("dum dum dum ich tanz im kreis herum..."); + aExc.Message = OUString(RTL_CONSTASCII_USTRINGPARAM("dum dum dum ich tanz im kreis herum...")); aExc.Context = *this; throw aExc; } @@ -875,7 +875,7 @@ test::TestData Test_Impl::raiseException( sal_Bool& /*bBool*/, sal_Unicode& /*cC sal_Int32 Test_Impl::getRuntimeException() throw(::com::sun::star::uno::RuntimeException) { RuntimeException aExc; - aExc.Message = OUString::createFromAscii("dum dum dum ich tanz im kreis herum..."); + aExc.Message = OUString(RTL_CONSTASCII_USTRINGPARAM("dum dum dum ich tanz im kreis herum...")); aExc.Context = *this; throw aExc; } @@ -883,7 +883,7 @@ sal_Int32 Test_Impl::getRuntimeException() throw(::com::sun::star::uno::RuntimeE void Test_Impl::setRuntimeException( sal_Int32 /*_runtimeexception*/ ) throw(::com::sun::star::uno::RuntimeException) { RuntimeException aExc; - aExc.Message = OUString::createFromAscii("dum dum dum ich tanz im kreis herum..."); + aExc.Message = OUString(RTL_CONSTASCII_USTRINGPARAM("dum dum dum ich tanz im kreis herum...")); aExc.Context = *this; throw aExc; } @@ -952,7 +952,7 @@ sal_Bool raiseException( const Reference & xLBT ) static sal_Bool test_adapter( const Reference< XMultiServiceFactory > & xMgr ) { Reference< XInvocationAdapterFactory > xAdapFac( - xMgr->createInstance( OUString::createFromAscii("com.sun.star.script.InvocationAdapterFactory") ), UNO_QUERY ); + xMgr->createInstance( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.script.InvocationAdapterFactory")) ), UNO_QUERY ); Reference< XInvocationAdapterFactory2 > xAdapFac2( xAdapFac, UNO_QUERY_THROW ); Reference< XLanguageBindingTest > xOriginal( (XLanguageBindingTest *)new Test_Impl() ); @@ -997,9 +997,9 @@ static sal_Bool test_adapter( const Reference< XMultiServiceFactory > & xMgr ) static sal_Bool test_invocation( const Reference< XMultiServiceFactory > & xMgr ) { Reference< XInvocationAdapterFactory > xAdapFac( - xMgr->createInstance( OUString::createFromAscii("com.sun.star.script.InvocationAdapterFactory") ), UNO_QUERY ); + xMgr->createInstance( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.script.InvocationAdapterFactory")) ), UNO_QUERY ); Reference< XSingleServiceFactory > xInvocFac( - xMgr->createInstance( OUString::createFromAscii("com.sun.star.script.Invocation") ), UNO_QUERY ); + xMgr->createInstance( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.script.Invocation")) ), UNO_QUERY ); Reference< XLanguageBindingTest > xOriginal( (XLanguageBindingTest *)new Test_Impl() ); Any aOriginal( &xOriginal, ::getCppuType( &xOriginal ) ); @@ -1028,23 +1028,23 @@ SAL_IMPLEMENT_MAIN() OSL_ENSURE( xImplReg.is(), "### no impl reg!" ); xImplReg->registerImplementation( - OUString::createFromAscii("com.sun.star.loader.SharedLibrary"), + OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.loader.SharedLibrary")), OUString::createFromAscii("invocadapt.uno" SAL_DLLEXTENSION), Reference< XSimpleRegistry >() ); xImplReg->registerImplementation( - OUString::createFromAscii("com.sun.star.loader.SharedLibrary"), + OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.loader.SharedLibrary")), OUString::createFromAscii("stocservices.uno" SAL_DLLEXTENSION), Reference< XSimpleRegistry >() ); xImplReg->registerImplementation( - OUString::createFromAscii("com.sun.star.loader.SharedLibrary"), + OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.loader.SharedLibrary")), OUString::createFromAscii("invocation.uno" SAL_DLLEXTENSION), Reference< XSimpleRegistry >() ); xImplReg->registerImplementation( - OUString::createFromAscii("com.sun.star.loader.SharedLibrary"), + OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.loader.SharedLibrary")), OUString::createFromAscii("reflection.uno" SAL_DLLEXTENSION), Reference< XSimpleRegistry >() ); xImplReg->registerImplementation( - OUString::createFromAscii("com.sun.star.loader.SharedLibrary"), + OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.loader.SharedLibrary")), OUString::createFromAscii("introspection.uno" SAL_DLLEXTENSION), Reference< XSimpleRegistry >() ); diff --git a/stoc/test/testintrosp.cxx b/stoc/test/testintrosp.cxx index fdee2ab6619a..3a905c376f73 100644 --- a/stoc/test/testintrosp.cxx +++ b/stoc/test/testintrosp.cxx @@ -103,7 +103,7 @@ Reference TypeToIdlClass( const Type& rType, const Reference< XMultiS if( !xRefl.is() ) { xRefl = Reference< XIdlReflection >( xMgr->createInstance( - OUString::createFromAscii("com.sun.star.reflection.CoreReflection") ), UNO_QUERY ); + OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.reflection.CoreReflection")) ), UNO_QUERY ); OSL_ENSURE( xRefl.is(), "### no corereflection!" ); } xRetClass = xRefl->forName( sOWName ); @@ -127,19 +127,19 @@ OUString AnyToString( const Any& aValue, sal_Bool bIncludeType, const Reference< OUString aRetStr; switch( eType ) { - case TypeClass_TYPE: aRetStr = OUString::createFromAscii("TYPE TYPE"); break; - case TypeClass_INTERFACE: aRetStr = OUString::createFromAscii("TYPE INTERFACE"); break; - case TypeClass_SERVICE: aRetStr = OUString::createFromAscii("TYPE SERVICE"); break; - case TypeClass_STRUCT: aRetStr = OUString::createFromAscii("TYPE STRUCT"); break; - case TypeClass_TYPEDEF: aRetStr = OUString::createFromAscii("TYPE TYPEDEF"); break; - case TypeClass_UNION: aRetStr = OUString::createFromAscii("TYPE UNION"); break; - case TypeClass_ENUM: aRetStr = OUString::createFromAscii("TYPE ENUM"); break; - case TypeClass_EXCEPTION: aRetStr = OUString::createFromAscii("TYPE EXCEPTION"); break; - case TypeClass_ARRAY: aRetStr = OUString::createFromAscii("TYPE ARRAY"); break; - case TypeClass_SEQUENCE: aRetStr = OUString::createFromAscii("TYPE SEQUENCE"); break; - case TypeClass_VOID: aRetStr = OUString::createFromAscii("TYPE void"); break; - case TypeClass_ANY: aRetStr = OUString::createFromAscii("TYPE any"); break; - case TypeClass_UNKNOWN: aRetStr = OUString::createFromAscii("TYPE unknown"); break; + case TypeClass_TYPE: aRetStr = OUString(RTL_CONSTASCII_USTRINGPARAM("TYPE TYPE")); break; + case TypeClass_INTERFACE: aRetStr = OUString(RTL_CONSTASCII_USTRINGPARAM("TYPE INTERFACE")); break; + case TypeClass_SERVICE: aRetStr = OUString(RTL_CONSTASCII_USTRINGPARAM("TYPE SERVICE")); break; + case TypeClass_STRUCT: aRetStr = OUString(RTL_CONSTASCII_USTRINGPARAM("TYPE STRUCT")); break; + case TypeClass_TYPEDEF: aRetStr = OUString(RTL_CONSTASCII_USTRINGPARAM("TYPE TYPEDEF")); break; + case TypeClass_UNION: aRetStr = OUString(RTL_CONSTASCII_USTRINGPARAM("TYPE UNION")); break; + case TypeClass_ENUM: aRetStr = OUString(RTL_CONSTASCII_USTRINGPARAM("TYPE ENUM")); break; + case TypeClass_EXCEPTION: aRetStr = OUString(RTL_CONSTASCII_USTRINGPARAM("TYPE EXCEPTION")); break; + case TypeClass_ARRAY: aRetStr = OUString(RTL_CONSTASCII_USTRINGPARAM("TYPE ARRAY")); break; + case TypeClass_SEQUENCE: aRetStr = OUString(RTL_CONSTASCII_USTRINGPARAM("TYPE SEQUENCE")); break; + case TypeClass_VOID: aRetStr = OUString(RTL_CONSTASCII_USTRINGPARAM("TYPE void")); break; + case TypeClass_ANY: aRetStr = OUString(RTL_CONSTASCII_USTRINGPARAM("TYPE any")); break; + case TypeClass_UNKNOWN: aRetStr = OUString(RTL_CONSTASCII_USTRINGPARAM("TYPE unknown")); break; case TypeClass_BOOLEAN: { sal_Bool b = *(sal_Bool*)aValue.getValue(); @@ -226,7 +226,7 @@ OUString AnyToString( const Any& aValue, sal_Bool bIncludeType, const Reference< if( bIncludeType ) { Reference< XIdlClass > xIdlClass = TypeToIdlClass( aValType, xMgr ); - aRetStr = aRetStr + OUString( OUString::createFromAscii(" (Typ: ") ) + xIdlClass->getName() + OUString::createFromAscii(")"); + aRetStr = aRetStr + OUString( OUString(RTL_CONSTASCII_USTRINGPARAM(" (Typ: ")) ) + xIdlClass->getName() + OUString(RTL_CONSTASCII_USTRINGPARAM(")")); } return aRetStr; } @@ -338,21 +338,21 @@ Sequence< Property > ImplPropertySetInfo::getProperties(void) pSeq = new Sequence( 3 ); Property * pAry = pSeq->getArray(); - pAry[0].Name = OUString::createFromAscii("Factor"); + pAry[0].Name = OUString(RTL_CONSTASCII_USTRINGPARAM("Factor")); pAry[0].Handle = -1; pAry[0].Type = getCppuType( (double*) NULL ); //pAry[0].Type = TypeToIdlClass( getCppuType( (double*) NULL ), mxMgr ); //pAry[0].Type = Double_getReflection()->getIdlClass(); pAry[0].Attributes = BOUND | TRANSIENT; - pAry[1].Name = OUString::createFromAscii("MyCount"); + pAry[1].Name = OUString(RTL_CONSTASCII_USTRINGPARAM("MyCount")); pAry[1].Handle = -1; pAry[1].Type = getCppuType( (sal_Int32*) NULL ); //pAry[1].Type = TypeToIdlClass( getCppuType( (sal_Int32*) NULL ), mxMgr ); //pAry[1].Type = INT32_getReflection()->getIdlClass(); pAry[1].Attributes = BOUND | TRANSIENT; - pAry[2].Name = OUString::createFromAscii("Info"); + pAry[2].Name = OUString(RTL_CONSTASCII_USTRINGPARAM("Info")); pAry[2].Handle = -1; pAry[2].Type = getCppuType( (OUString*) NULL ); //pAry[2].Type = TypeToIdlClass( getCppuType( (OUString*) NULL ), mxMgr ); @@ -512,7 +512,7 @@ public: virtual OUString SAL_CALL getFirstName() throw(RuntimeException); virtual OUString SAL_CALL getLastName() throw(RuntimeException) - { return OUString( OUString::createFromAscii("Meyer") ); } + { return OUString( OUString(RTL_CONSTASCII_USTRINGPARAM("Meyer")) ); } virtual sal_Int16 SAL_CALL getAge() throw(RuntimeException) { return m_nMarkusAge; } virtual sal_Int16 SAL_CALL getChildrenCount() throw(RuntimeException) @@ -608,14 +608,14 @@ void ImplIntroTest::Init( void ) { // Eindeutigen Namen verpassen static sal_Int32 nObjCount = 0; - OUString aName( OUString::createFromAscii("IntroTest-Obj Nr. ") ); + OUString aName( RTL_CONSTASCII_USTRINGPARAM("IntroTest-Obj Nr. ") ); aName += OUString::valueOf( nObjCount ); setObjectName( aName ); // Properties initialisieren aAnyArray[0] <<= 3.14; aAnyArray[1] <<= (sal_Int32)42; - aAnyArray[2] <<= OUString( OUString::createFromAscii("Hallo") ); + aAnyArray[2] <<= OUString( OUString(RTL_CONSTASCII_USTRINGPARAM("Hallo")) ); // Output-Interface //m_pOutput = NULL; @@ -637,12 +637,12 @@ void ImplIntroTest::Init( void ) // String-Sequence intitialisieren aStringSeq.realloc( 3 ); OUString* pStr = aStringSeq.getArray(); - pStr[ 0 ] = OUString( OUString::createFromAscii("String 0") ); - pStr[ 1 ] = OUString( OUString::createFromAscii("String 1") ); - pStr[ 2 ] = OUString( OUString::createFromAscii("String 2") ); + pStr[ 0 ] = OUString( OUString(RTL_CONSTASCII_USTRINGPARAM("String 0")) ); + pStr[ 1 ] = OUString( OUString(RTL_CONSTASCII_USTRINGPARAM("String 1")) ); + pStr[ 2 ] = OUString( OUString(RTL_CONSTASCII_USTRINGPARAM("String 2")) ); // structs initialisieren - m_aFirstStruct.Name = OUString::createFromAscii("FirstStruct-Name"); + m_aFirstStruct.Name = OUString(RTL_CONSTASCII_USTRINGPARAM("FirstStruct-Name")); m_aFirstStruct.Handle = 77777; //XIdlClassRef Type; m_aFirstStruct.Attributes = -222; @@ -760,7 +760,7 @@ Any ImplIntroTest::getPropertyValue( const OUString& PropertyName ) OUString ImplIntroTest::getFirstName(void) throw(RuntimeException) { - return OUString( OUString::createFromAscii("Markus") ); + return OUString( OUString(RTL_CONSTASCII_USTRINGPARAM("Markus")) ); } void ImplIntroTest::writeln( const OUString& Text ) @@ -812,7 +812,7 @@ sal_Bool ImplIntroTest::hasElements( ) sal_Int32 getIndexForName( const OUString& ItemName ) { OUString aLeftStr = ItemName.copy( 0, 4 ); - if( aLeftStr == OUString::createFromAscii("Item") ) + if( aLeftStr == OUString(RTL_CONSTASCII_USTRINGPARAM("Item")) ) { // TODO OUString aNumStr = ItemName.copy( 4 ); @@ -840,7 +840,7 @@ Any ImplIntroTest::getByName( const OUString& aName ) if( !pNameAccessTab[iIndex].is() ) { ImplIntroTest* p = new ImplIntroTest( mxMgr ); - OUString aName2( OUString::createFromAscii("IntroTest by Name-Access, Index = ") ); + OUString aName2( RTL_CONSTASCII_USTRINGPARAM("IntroTest by Name-Access, Index = ") ); aName2 += OUString::valueOf( iIndex ); //aName2 = aName2 + StringToUString( String( iIndex ), CHARSET_SYSTEM ); p->setObjectName( aName2 ); @@ -864,7 +864,7 @@ Sequence< OUString > ImplIntroTest::getElementNames( ) OUString* pStr = aStrSeq.getArray(); for( sal_Int32 i = 0 ; i < DEFAULT_NAME_ACCESS_COUNT ; i++ ) { - OUString aName( OUString::createFromAscii("Item") ); + OUString aName( RTL_CONSTASCII_USTRINGPARAM("Item") ); aName += OUString::valueOf( i ); //aName = aName + StringToUString( i, CHARSET_SYSTEM ); pStr[i] = aName; @@ -902,7 +902,7 @@ Any ImplIntroTest::getByIndex( sal_Int32 Index ) if( !pNameAccessTab[Index].is() ) { ImplIntroTest* p = new ImplIntroTest( mxMgr ); - OUString aName( OUString::createFromAscii("IntroTest by Index-Access, Index = ") ); + OUString aName( RTL_CONSTASCII_USTRINGPARAM("IntroTest by Index-Access, Index = ") ); aName += OUString::valueOf( Index ); //aName = aName + StringToUString( String( iIndex ), CHARSET_SYSTEM ); p->setObjectName( aName ); @@ -1296,7 +1296,7 @@ static sal_Bool test_introsp( Reference< XMultiServiceFactory > xMgr, OUString aStr; aPropVal >>= aStr; //OString aStr = aPropVal.getString(); - aStr = aStr + OUString::createFromAscii(" (Modified!)"); + aStr = aStr + OUString(RTL_CONSTASCII_USTRINGPARAM(" (Modified!)")); aNewVal <<= aStr; break; } @@ -1544,35 +1544,35 @@ static sal_Bool test_introsp( Reference< XMultiServiceFactory > xMgr, SAL_IMPLEMENT_MAIN() { - Reference< XMultiServiceFactory > xMgr( createRegistryServiceFactory( OUString::createFromAscii("stoctest.rdb") ) ); + Reference< XMultiServiceFactory > xMgr( createRegistryServiceFactory( OUString(RTL_CONSTASCII_USTRINGPARAM("stoctest.rdb")) ) ); sal_Bool bSucc = sal_False; try { Reference< XImplementationRegistration > xImplReg( - xMgr->createInstance( OUString::createFromAscii("com.sun.star.registry.ImplementationRegistration") ), UNO_QUERY ); + xMgr->createInstance( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.registry.ImplementationRegistration")) ), UNO_QUERY ); OSL_ENSURE( xImplReg.is(), "### no impl reg!" ); // Register services OUString libName( RTL_CONSTASCII_USTRINGPARAM( "reflection.uno" SAL_DLLEXTENSION) ); -// ORealDynamicLoader::computeLibraryName( OUString::createFromAscii("corefl"), libName); +// ORealDynamicLoader::computeLibraryName( OUString(RTL_CONSTASCII_USTRINGPARAM("corefl")), libName); fprintf(stderr, "1\n" ); - xImplReg->registerImplementation(OUString::createFromAscii("com.sun.star.loader.SharedLibrary"), + xImplReg->registerImplementation(OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.loader.SharedLibrary")), libName, Reference< XSimpleRegistry >() ); fprintf(stderr, "2\n" ); - Reference< XIdlReflection > xRefl( xMgr->createInstance( OUString::createFromAscii("com.sun.star.reflection.CoreReflection") ), UNO_QUERY ); + Reference< XIdlReflection > xRefl( xMgr->createInstance( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.reflection.CoreReflection")) ), UNO_QUERY ); OSL_ENSURE( xRefl.is(), "### no corereflection!" ); // Introspection libName = OUString::createFromAscii( "introspection.uno" SAL_DLLEXTENSION); -// ORealDynamicLoader::computeLibraryName( OUString::createFromAscii("insp"), libName); +// ORealDynamicLoader::computeLibraryName( OUString(RTL_CONSTASCII_USTRINGPARAM("insp")), libName); fprintf(stderr, "3\n" ); - xImplReg->registerImplementation(OUString::createFromAscii("com.sun.star.loader.SharedLibrary"), + xImplReg->registerImplementation(OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.loader.SharedLibrary")), libName, Reference< XSimpleRegistry >() ); fprintf(stderr, "4\n" ); - Reference< XIntrospection > xIntrosp( xMgr->createInstance( OUString::createFromAscii("com.sun.star.beans.Introspection") ), UNO_QUERY ); + Reference< XIntrospection > xIntrosp( xMgr->createInstance( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.beans.Introspection")) ), UNO_QUERY ); OSL_ENSURE( xRefl.is(), "### no corereflection!" ); fprintf(stderr, "before test_introsp\n" ); diff --git a/stoc/test/testproxyfac.cxx b/stoc/test/testproxyfac.cxx index 0a2377c53736..b5cf33c8739e 100644 --- a/stoc/test/testproxyfac.cxx +++ b/stoc/test/testproxyfac.cxx @@ -77,7 +77,7 @@ public: // XServiceInfo virtual OUString SAL_CALL getImplementationName() throw (RuntimeException) - { return OUString::createFromAscii( "target" ); } + { return OUString(RTL_CONSTASCII_USTRINGPARAM("target")); } virtual sal_Bool SAL_CALL supportsService( const OUString & /*rServiceName*/ ) throw (RuntimeException) { return sal_False; } @@ -141,7 +141,7 @@ public: // XServiceInfo virtual OUString SAL_CALL getImplementationName() throw (RuntimeException) - { return OUString::createFromAscii( "master" ); } + { return OUString(RTL_CONSTASCII_USTRINGPARAM("master")); } virtual sal_Bool SAL_CALL supportsService( const OUString & /*rServiceName*/ ) throw (RuntimeException) { return sal_False; } diff --git a/stoc/test/testregistry.cxx b/stoc/test/testregistry.cxx index b3d9bb2d5316..bf1b55027482 100644 --- a/stoc/test/testregistry.cxx +++ b/stoc/test/testregistry.cxx @@ -125,7 +125,7 @@ void setStarUserRegistry() RegistryKey rootKey, rKey, rKey2; OUString userReg = getExePath(); - userReg += OUString::createFromAscii("user.rdb"); + userReg += OUString(RTL_CONSTASCII_USTRINGPARAM("user.rdb")); if(myRegistry->open(userReg, REG_READWRITE)) { TEST_ENSHURE(!myRegistry->create(userReg), "setStarUserRegistry error 1"); @@ -145,7 +145,7 @@ void setLinkInDefaultRegistry(const OUString& linkName, const OUString& linkTarg RegistryKey rootKey; OUString appReg = getExePath(); - appReg += OUString::createFromAscii("stoctest.rdb"); + appReg += OUString(RTL_CONSTASCII_USTRINGPARAM("stoctest.rdb")); TEST_ENSHURE(!myRegistry->open(appReg, REG_READWRITE), "setLinkInDefaultRegistry error 1"); TEST_ENSHURE(!myRegistry->openRootKey(rootKey), "setLinkInDefaultRegistry error 2"); @@ -458,11 +458,11 @@ void test_DefaultRegistry( OUString userRdb(exePath); OUString applicatRdb(exePath); - userRdb += OUString::createFromAscii("user.rdb"); - applicatRdb += OUString::createFromAscii("stoctest.rdb"); + userRdb += OUString(RTL_CONSTASCII_USTRINGPARAM("user.rdb")); + applicatRdb += OUString(RTL_CONSTASCII_USTRINGPARAM("stoctest.rdb")); Reference < XMultiServiceFactory > rSMgr = ::cppu::createRegistryServiceFactory( userRdb, applicatRdb, sal_False, OUString()); - //OUString::createFromAscii("//./e:/src596/stoc/wntmsci3/bin") ); + //OUString(RTL_CONSTASCII_USTRINGPARAM("//./e:/src596/stoc/wntmsci3/bin")) ); Reference< XPropertySet > xPropSet( rSMgr, UNO_QUERY); TEST_ENSHURE( xPropSet.is(), "test_DefaultRegistry error0"); @@ -669,8 +669,8 @@ void test_DefaultRegistry( SAL_IMPLEMENT_MAIN() { // setStarUserRegistry(); - setLinkInDefaultRegistry(OUString::createFromAscii("/Test/DefaultLink"), - OUString::createFromAscii("/Test/FifthKey/MyFirstLink")); + setLinkInDefaultRegistry(OUString(RTL_CONSTASCII_USTRINGPARAM("/Test/DefaultLink")), + OUString(RTL_CONSTASCII_USTRINGPARAM("/Test/FifthKey/MyFirstLink"))); OUString reg1( RTL_CONSTASCII_USTRINGPARAM("testreg1.rdb") ); OUString reg2( RTL_CONSTASCII_USTRINGPARAM("testreg2.rdb") ); diff --git a/stoc/test/testsmgr.cxx b/stoc/test/testsmgr.cxx index a609632bcb55..60b8467f753a 100644 --- a/stoc/test/testsmgr.cxx +++ b/stoc/test/testsmgr.cxx @@ -80,7 +80,7 @@ void setStarUserRegistry() RegistryKey rootKey, rKey, rKey2; OUString userReg = getExePath(); - userReg += OUString::createFromAscii("user.rdb"); + userReg += OUString(RTL_CONSTASCII_USTRINGPARAM("user.rdb")); if(myRegistry->open(userReg, REG_READWRITE)) { TEST_ENSHURE(!myRegistry->create(userReg), "setStarUserRegistry error 1"); diff --git a/stoc/test/testsmgr_cpnt.cxx b/stoc/test/testsmgr_cpnt.cxx index 751459e004b9..e57a065a90f0 100644 --- a/stoc/test/testsmgr_cpnt.cxx +++ b/stoc/test/testsmgr_cpnt.cxx @@ -86,7 +86,7 @@ Reference getProcessServiceManager() { MutexGuard aGuard( Mutex::getGlobalMutex() ); if (! s_x.is()) - s_x = createRegistryServiceFactory( OUString::createFromAscii( "stoctest.rdb" ), sal_False ); + s_x = createRegistryServiceFactory( OUString(RTL_CONSTASCII_USTRINGPARAM("stoctest.rdb")), sal_False ); } return s_x; } @@ -181,7 +181,7 @@ Sequence< OUString > Test_Manager_Impl::getSupportedServiceNames_Static(void) th { Sequence< OUString > aSNS( 2 ); aSNS.getArray()[0] = OUString::createFromAscii(SERVICE_NAME); - aSNS.getArray()[1] = OUString::createFromAscii("com.sun.star.bridge.Bridge"); + aSNS.getArray()[1] = OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.bridge.Bridge")); return aSNS; } @@ -218,7 +218,7 @@ extern "C" void SAL_CALL test_ServiceManager() Reference xContEnum(xSMgr, UNO_QUERY); TEST_ENSHURE( xContEnum.is() , "query on XContentEnumerationAccess failed" ); - Reference xEnum(xContEnum->createContentEnumeration(OUString::createFromAscii("com.sun.star.registry.SimpleRegistry"))); + Reference xEnum(xContEnum->createContentEnumeration(OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.registry.SimpleRegistry")))); TEST_ENSHURE( xEnum.is() , "createContentEnumeration failed" ); sal_Int32 nLen = 0; while( xEnum->hasMoreElements() ) @@ -243,33 +243,33 @@ extern "C" void SAL_CALL test_ServiceManager() TEST_ENSHURE( nLen == 8, "more than 6 factories" ); // try to get an instance for a unknown service - TEST_ENSHURE( !xSMgr->createInstance(OUString::createFromAscii("bla.blup.Q")).is(), "unknown service provider found" ); + TEST_ENSHURE( !xSMgr->createInstance(OUString(RTL_CONSTASCII_USTRINGPARAM("bla.blup.Q"))).is(), "unknown service provider found" ); // // First test : register service via the internal function of the component itself // { Reference< XImplementationRegistration > - xInst( xSMgr->createInstance(OUString::createFromAscii("com.sun.star.registry.ImplementationRegistration")), UNO_QUERY ); + xInst( xSMgr->createInstance(OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.registry.ImplementationRegistration"))), UNO_QUERY ); TEST_ENSHURE( xInst.is(), "no ImplementationRegistration" ); try { // register the services via writeComponentRegInfo (see at end of this file) - xInst->registerImplementation(OUString::createFromAscii("com.sun.star.loader.SharedLibrary"), atUModule2, Reference< XSimpleRegistry >() ); + xInst->registerImplementation(OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.loader.SharedLibrary")), atUModule2, Reference< XSimpleRegistry >() ); } catch( CannotRegisterImplementationException e ) { TEST_ENSHURE( 0, "register implementation failed" ); } // getImplementations() check - Sequence seqImpl = xInst->getImplementations(OUString::createFromAscii("com.sun.star.loader.SharedLibrary"), atUModule2); + Sequence seqImpl = xInst->getImplementations(OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.loader.SharedLibrary")), atUModule2); TEST_ENSHURE( seqImpl.getLength() == 1, "count of implementantions is wrong" ); - TEST_ENSHURE( seqImpl.getConstArray()[0] == OUString::createFromAscii("com.sun.star.DummyService.V10"), "implementation name is not equal" ); + TEST_ENSHURE( seqImpl.getConstArray()[0] == OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.DummyService.V10")), "implementation name is not equal" ); // tests, if a service provider can be instantiated. - Reference< XInterface > xIFace(xSMgr->createInstance(OUString::createFromAscii("com.sun.star.ts.TestManagerImpl"))); + Reference< XInterface > xIFace(xSMgr->createInstance(OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ts.TestManagerImpl")))); TEST_ENSHURE( xIFace.is(), "loadable service not found" ); // remove the service @@ -278,10 +278,10 @@ extern "C" void SAL_CALL test_ServiceManager() } -// Reference < XSimpleRegistry > xSReg( xSMgr->createInstance(OUString::createFromAscii("com::sun::star.uno.repos.SimpleRegistry")), UNO_QUERY ); +// Reference < XSimpleRegistry > xSReg( xSMgr->createInstance(OUString(RTL_CONSTASCII_USTRINGPARAM("com::sun::star.uno.repos.SimpleRegistry"))), UNO_QUERY ); // TEST_ENSHURE( xSReg.is() , "Simple registry couldn't be instantiated" ); -// xSReg->open(OUString::createFromAscii("dummy.reg"), sal_False, sal_True); +// xSReg->open(OUString(RTL_CONSTASCII_USTRINGPARAM("dummy.reg")), sal_False, sal_True); // xSReg->close(); // laut dbo : C-API muss nicht mehr unterstuezt werden @@ -305,23 +305,23 @@ extern "C" void SAL_CALL test_ServiceManager() // if (!UNO_isNull((UNO_Ifc*)&xUnoSMgr)) // xUnoSMgr.m_pVmt->release(xUnoSMgr.m_pCtx); -// xSReg->open(OUString::createFromAscii("dummy.reg"), sal_True, sal_False); -// TEST_ENSHURE(!xSReg->getRootKey()->openKey(OUString::createFromAscii("/SERVICES/com::sun::star/ts/TestManagerImpl/URL")).is(), +// xSReg->open(OUString(RTL_CONSTASCII_USTRINGPARAM("dummy.reg")), sal_True, sal_False); +// TEST_ENSHURE(!xSReg->getRootKey()->openKey(OUString(RTL_CONSTASCII_USTRINGPARAM("/SERVICES/com::sun::star/ts/TestManagerImpl/URL"))).is(), // "deinstall failed" ); // xSReg->close(); -// xSReg->open(OUString::createFromAscii("dummy.reg"), sal_False, sal_False); +// xSReg->open(OUString(RTL_CONSTASCII_USTRINGPARAM("dummy.reg")), sal_False, sal_False); // xSReg->destroy(); -// xSReg->open(OUString::createFromAscii("dummy2.reg"), sal_False, sal_False); +// xSReg->open(OUString(RTL_CONSTASCII_USTRINGPARAM("dummy2.reg")), sal_False, sal_False); // xSReg->destroy(); // Test initialisieren /* - XServiceProviderRef xSiSP1 = createSimpleServiceProvider( OUString::createFromAscii("com::sun::star.usr.Test_Manager_Impl1"), Test_Manager_Impl_getReflection ); - XServiceProviderRef xSiSP11 = createSimpleServiceProvider( OUString::createFromAscii("com::sun::star.usr.Test_Manager_Impl1"), Test_Manager_Impl_getReflection ); - XServiceProviderRef xSiSP2 = createSimpleServiceProvider( OUString::createFromAscii("com::sun::star.usr.Test_Manager_Impl2"), Test_Manager_Impl_getReflection ); + XServiceProviderRef xSiSP1 = createSimpleServiceProvider( OUString(RTL_CONSTASCII_USTRINGPARAM("com::sun::star.usr.Test_Manager_Impl1")), Test_Manager_Impl_getReflection ); + XServiceProviderRef xSiSP11 = createSimpleServiceProvider( OUString(RTL_CONSTASCII_USTRINGPARAM("com::sun::star.usr.Test_Manager_Impl1")), Test_Manager_Impl_getReflection ); + XServiceProviderRef xSiSP2 = createSimpleServiceProvider( OUString(RTL_CONSTASCII_USTRINGPARAM("com::sun::star.usr.Test_Manager_Impl2")), Test_Manager_Impl_getReflection ); */ /* // second test @@ -335,7 +335,7 @@ extern "C" void SAL_CALL test_ServiceManager() Test_Manager_Impl::getSupportedServiceNames_Static() ), UNO_QUERY); Reference< XServiceProvider > xSiSP11(createSingleFactory( xSMgr, - OUString::createFromAscii("com::sun::star.usr.Test_Manager_Impl1"), + OUString(RTL_CONSTASCII_USTRINGPARAM("com::sun::star.usr.Test_Manager_Impl1")), Test_Manager_Impl_CreateInstance, Test_Manager_Impl::getSupportedServiceNames_Static() ),UNO_QUERY); Reference< XServiceProvider > xSiSP2(createSingleFactory( diff --git a/stoc/test/uriproc/test_uriproc.cxx b/stoc/test/uriproc/test_uriproc.cxx index a835a37f6b69..41b29bba1105 100644 --- a/stoc/test/uriproc/test_uriproc.cxx +++ b/stoc/test/uriproc/test_uriproc.cxx @@ -253,7 +253,7 @@ void Test::testParse() { data[i].pathSegmentCount, uriRef->getPathSegmentCount()); TEST_ASSERT_EQUAL( "testParse", i, data[i].uriReference, - rtl::OUString::createFromAscii(""), uriRef->getPathSegment(-1)); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("")), uriRef->getPathSegment(-1)); TEST_ASSERT_EQUAL( "testParse", i, data[i].uriReference, rtl::OUString::createFromAscii(data[i].pathSegment0), @@ -276,7 +276,7 @@ void Test::testParse() { uriRef->getPathSegment(4)); TEST_ASSERT_EQUAL( "testParse", i, data[i].uriReference, - rtl::OUString::createFromAscii(""), uriRef->getPathSegment(5)); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("")), uriRef->getPathSegment(5)); TEST_ASSERT_EQUAL( "testParse", i, data[i].uriReference, data[i].query != 0, uriRef->hasQuery()); @@ -850,7 +850,7 @@ void Test::testVndSunStarScript() { "testVndSunStarScript", static_cast< double >(i) + static_cast< double >(j) / 10.0, - ::rtl::OUString::createFromAscii("setParameter"), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("setParameter")), originalReference, uriRef->getUriReference()); } @@ -862,7 +862,7 @@ void Test::testVndSunStarScript() { TEST_ASSERT_EQUAL( "testVndSunStarScript", i, - ::rtl::OUString::createFromAscii("setName"), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("setName")), originalReference, uriRef->getUriReference()); } @@ -904,8 +904,8 @@ void Test::testVndSunStarScript() { } TEST_ASSERT_EQUAL( "testVndSunStarScript", - ::rtl::OUString::createFromAscii("illegal arguments"), - ::rtl::OUString::createFromAscii("name"), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("illegal arguments")), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("name")), caughtExpected, true); @@ -913,15 +913,15 @@ void Test::testVndSunStarScript() { try { scriptUrl->setParameter( ::rtl::OUString(), - ::rtl::OUString::createFromAscii("non-empty")); + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("non-empty"))); } catch( const css::lang::IllegalArgumentException& ) { caughtExpected = true; } TEST_ASSERT_EQUAL( "testVndSunStarScript", - ::rtl::OUString::createFromAscii("illegal arguments"), - ::rtl::OUString::createFromAscii("parameter"), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("illegal arguments")), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("parameter")), caughtExpected, true); } -- cgit