summaryrefslogtreecommitdiff
path: root/stoc
diff options
context:
space:
mode:
authorNorbert Thiebaud <nthiebaud@gmail.com>2012-06-02 12:05:32 -0500
committerNorbert Thiebaud <nthiebaud@gmail.com>2012-06-02 12:58:05 -0500
commit6bcd6d89a1a4beccf7ec294947673803761a0d52 (patch)
treed4aa074093a64dc35552e61ea6b1c498c2157dd3 /stoc
parent4d20c0d5893718e14f661cd316a6def6a008518e (diff)
targeted string re-work
Change-Id: Ia4cf1dcae7d40eca29f84fa7277681d1c1fb61bd
Diffstat (limited to 'stoc')
-rw-r--r--stoc/test/testiadapter.cxx42
-rw-r--r--stoc/test/testintrosp.cxx81
-rw-r--r--stoc/test/testloader.cxx6
-rw-r--r--stoc/test/testproxyfac.cxx35
-rw-r--r--stoc/test/testregistry.cxx246
-rw-r--r--stoc/test/testsmgr_cpnt.cxx30
-rw-r--r--stoc/test/uriproc/test_uriproc.cxx36
7 files changed, 231 insertions, 245 deletions
diff --git a/stoc/test/testiadapter.cxx b/stoc/test/testiadapter.cxx
index 3b63f77a0a1e..ce71dceaff95 100644
--- a/stoc/test/testiadapter.cxx
+++ b/stoc/test/testiadapter.cxx
@@ -546,7 +546,7 @@ Any XLB_Invocation::invoke( const OUString & rFunctionName,
if (! bImplementedMethod)
{
throw IllegalArgumentException(
- OUString( RTL_CONSTASCII_USTRINGPARAM("not an implemented method!") ),
+ OUString( "not an implemented method!" ),
(OWeakObject *)this, 0 );
}
@@ -765,7 +765,7 @@ sal_Bool performTest( const Reference<XLanguageBindingTest > & xLBT )
sal_True, '@', 17, 0x1234, 0xfedc, 0x12345678, 0xfedcba98,
SAL_CONST_INT64(0x123456789abcdef0),
SAL_CONST_UINT64(0xfedcba9876543210),
- (float)17.0815, 3.1415926359, TestEnum_LOLA, OUString(RTL_CONSTASCII_USTRINGPARAM("dumdidum")), xI,
+ (float)17.0815, 3.1415926359, TestEnum_LOLA, OUString("dumdidum"), xI,
Any( &xI, ::getCppuType( (const Reference<XInterface > *)0 ) ) );
OSL_ENSURE( aData.Any == xI, "### unexpected any!" );
@@ -868,7 +868,7 @@ test::TestData Test_Impl::raiseException( sal_Bool& /*bBool*/, sal_Unicode& /*cC
{
IllegalArgumentException aExc;
aExc.ArgumentPosition = 5;
- aExc.Message = OUString(RTL_CONSTASCII_USTRINGPARAM("dum dum dum ich tanz im kreis herum..."));
+ aExc.Message = OUString("dum dum dum ich tanz im kreis herum...");
aExc.Context = *this;
throw aExc;
}
@@ -876,7 +876,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(RTL_CONSTASCII_USTRINGPARAM("dum dum dum ich tanz im kreis herum..."));
+ aExc.Message = OUString("dum dum dum ich tanz im kreis herum...");
aExc.Context = *this;
throw aExc;
}
@@ -884,7 +884,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(RTL_CONSTASCII_USTRINGPARAM("dum dum dum ich tanz im kreis herum..."));
+ aExc.Message = OUString("dum dum dum ich tanz im kreis herum...");
aExc.Context = *this;
throw aExc;
}
@@ -953,7 +953,7 @@ sal_Bool raiseException( const Reference<XLanguageBindingTest > & xLBT )
static sal_Bool test_adapter( const Reference< XMultiServiceFactory > & xMgr )
{
Reference< XInvocationAdapterFactory > xAdapFac(
- xMgr->createInstance( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.script.InvocationAdapterFactory")) ), UNO_QUERY );
+ xMgr->createInstance( OUString("com.sun.star.script.InvocationAdapterFactory") ), UNO_QUERY );
Reference< XInvocationAdapterFactory2 > xAdapFac2( xAdapFac, UNO_QUERY_THROW );
Reference< XLanguageBindingTest > xOriginal( (XLanguageBindingTest *)new Test_Impl() );
@@ -998,9 +998,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(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.script.InvocationAdapterFactory")) ), UNO_QUERY );
+ xMgr->createInstance( OUString("com.sun.star.script.InvocationAdapterFactory") ), UNO_QUERY );
Reference< XSingleServiceFactory > xInvocFac(
- xMgr->createInstance( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.script.Invocation")) ), UNO_QUERY );
+ xMgr->createInstance( OUString("com.sun.star.script.Invocation") ), UNO_QUERY );
Reference< XLanguageBindingTest > xOriginal( (XLanguageBindingTest *)new Test_Impl() );
Any aOriginal( &xOriginal, ::getCppuType( &xOriginal ) );
@@ -1016,37 +1016,35 @@ static sal_Bool test_invocation( const Reference< XMultiServiceFactory > & xMgr
SAL_IMPLEMENT_MAIN()
{
Reference< XMultiServiceFactory > xMgr( createRegistryServiceFactory(
- OUString( RTL_CONSTASCII_USTRINGPARAM("stoctest.rdb") ) ) );
+ OUString( "stoctest.rdb" ) ) );
try
{
Reference< XImplementationRegistration > xImplReg(
xMgr->createInstance(
- OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.registry.ImplementationRegistration") ) ),
+ OUString( "com.sun.star.registry.ImplementationRegistration" ) ),
UNO_QUERY );
OSL_ENSURE( xImplReg.is(), "### no impl reg!" );
xImplReg->registerImplementation(
- OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.loader.SharedLibrary")),
- OUString(RTL_CONSTASCII_USTRINGPARAM("invocadapt.uno" SAL_DLLEXTENSION)),
+ OUString("com.sun.star.loader.SharedLibrary"),
+ OUString("invocadapt.uno" SAL_DLLEXTENSION),
Reference< XSimpleRegistry >() );
xImplReg->registerImplementation(
- OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.loader.SharedLibrary")),
- OUString(RTL_CONSTASCII_USTRINGPARAM("stocservices.uno" SAL_DLLEXTENSION)),
+ OUString("com.sun.star.loader.SharedLibrary"),
+ OUString("stocservices.uno" SAL_DLLEXTENSION),
Reference< XSimpleRegistry >() );
xImplReg->registerImplementation(
- OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.loader.SharedLibrary")),
- OUString(RTL_CONSTASCII_USTRINGPARAM("invocation.uno" SAL_DLLEXTENSION)),
+ OUString("com.sun.star.loader.SharedLibrary"),
+ OUString("invocation.uno" SAL_DLLEXTENSION),
Reference< XSimpleRegistry >() );
xImplReg->registerImplementation(
- OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.loader.SharedLibrary")),
- OUString(RTL_CONSTASCII_USTRINGPARAM("reflection.uno" SAL_DLLEXTENSION)),
+ OUString("com.sun.star.loader.SharedLibrary"),
+ OUString("reflection.uno" SAL_DLLEXTENSION),
Reference< XSimpleRegistry >() );
xImplReg->registerImplementation(
- OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.loader.SharedLibrary")),
- OUString(RTL_CONSTASCII_USTRINGPARAM("introspection.uno" SAL_DLLEXTENSION)),
+ OUString("com.sun.star.loader.SharedLibrary"),
+ OUString("introspection.uno" SAL_DLLEXTENSION),
Reference< XSimpleRegistry >() );
if (test_adapter( xMgr ))
diff --git a/stoc/test/testintrosp.cxx b/stoc/test/testintrosp.cxx
index 9f3b11dd91ad..2ea7cf44a46f 100644
--- a/stoc/test/testintrosp.cxx
+++ b/stoc/test/testintrosp.cxx
@@ -91,7 +91,7 @@ Reference<XIdlClass> TypeToIdlClass( const Type& rType, const Reference< XMultiS
if( !xRefl.is() )
{
xRefl = Reference< XIdlReflection >( xMgr->createInstance(
- OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.reflection.CoreReflection")) ), UNO_QUERY );
+ OUString("com.sun.star.reflection.CoreReflection") ), UNO_QUERY );
OSL_ENSURE( xRefl.is(), "### no corereflection!" );
}
xRetClass = xRefl->forName( sOWName );
@@ -115,19 +115,19 @@ OUString AnyToString( const Any& aValue, sal_Bool bIncludeType, const Reference<
OUString aRetStr;
switch( eType )
{
- 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_TYPE: aRetStr = OUString("TYPE TYPE"); break;
+ case TypeClass_INTERFACE: aRetStr = OUString("TYPE INTERFACE"); break;
+ case TypeClass_SERVICE: aRetStr = OUString("TYPE SERVICE"); break;
+ case TypeClass_STRUCT: aRetStr = OUString("TYPE STRUCT"); break;
+ case TypeClass_TYPEDEF: aRetStr = OUString("TYPE TYPEDEF"); break;
+ case TypeClass_UNION: aRetStr = OUString("TYPE UNION"); break;
+ case TypeClass_ENUM: aRetStr = OUString("TYPE ENUM"); break;
+ case TypeClass_EXCEPTION: aRetStr = OUString("TYPE EXCEPTION"); break;
+ case TypeClass_ARRAY: aRetStr = OUString("TYPE ARRAY"); break;
+ case TypeClass_SEQUENCE: aRetStr = OUString("TYPE SEQUENCE"); break;
+ case TypeClass_VOID: aRetStr = OUString("TYPE void"); break;
+ case TypeClass_ANY: aRetStr = OUString("TYPE any"); break;
+ case TypeClass_UNKNOWN: aRetStr = OUString("TYPE unknown"); break;
case TypeClass_BOOLEAN:
{
sal_Bool b = *(sal_Bool*)aValue.getValue();
@@ -188,7 +188,7 @@ OUString AnyToString( const Any& aValue, sal_Bool bIncludeType, const Reference<
if( bIncludeType )
{
Reference< XIdlClass > xIdlClass = TypeToIdlClass( aValType, xMgr );
- aRetStr = aRetStr + OUString( OUString(RTL_CONSTASCII_USTRINGPARAM(" (Typ: ")) ) + xIdlClass->getName() + OUString(RTL_CONSTASCII_USTRINGPARAM(")"));
+ aRetStr = aRetStr + OUString( OUString(" (Typ: ") ) + xIdlClass->getName() + OUString(""));
}
return aRetStr;
}
@@ -228,17 +228,17 @@ Sequence< Property > ImplPropertySetInfo::getProperties(void)
pSeq = new Sequence<Property>( 3 );
Property * pAry = pSeq->getArray();
- pAry[0].Name = OUString(RTL_CONSTASCII_USTRINGPARAM("Factor"));
+ pAry[0].Name = OUString("Factor");
pAry[0].Handle = -1;
pAry[0].Type = getCppuType( (double*) NULL );
pAry[0].Attributes = BOUND | TRANSIENT;
- pAry[1].Name = OUString(RTL_CONSTASCII_USTRINGPARAM("MyCount"));
+ pAry[1].Name = OUString("MyCount");
pAry[1].Handle = -1;
pAry[1].Type = getCppuType( (sal_Int32*) NULL );
pAry[1].Attributes = BOUND | TRANSIENT;
- pAry[2].Name = OUString(RTL_CONSTASCII_USTRINGPARAM("Info"));
+ pAry[2].Name = OUString("Info");
pAry[2].Handle = -1;
pAry[2].Type = getCppuType( (OUString*) NULL );
pAry[2].Attributes = TRANSIENT;
@@ -360,7 +360,7 @@ public:
virtual OUString SAL_CALL getFirstName()
throw(RuntimeException);
virtual OUString SAL_CALL getLastName() throw(RuntimeException)
- { return OUString( OUString(RTL_CONSTASCII_USTRINGPARAM("Meyer")) ); }
+ { return OUString( OUString("Meyer") ); }
virtual sal_Int16 SAL_CALL getAge() throw(RuntimeException)
{ return m_nMarkusAge; }
virtual sal_Int16 SAL_CALL getChildrenCount() throw(RuntimeException)
@@ -445,14 +445,14 @@ void ImplIntroTest::Init( void )
{
// Eindeutigen Namen verpassen
static sal_Int32 nObjCount = 0;
- OUString aName( RTL_CONSTASCII_USTRINGPARAM("IntroTest-Obj Nr. ") );
+ OUString aName( "IntroTest-Obj Nr. " );
aName += OUString::valueOf( nObjCount );
setObjectName( aName );
// Properties initialisieren
aAnyArray[0] <<= 3.14;
aAnyArray[1] <<= (sal_Int32)42;
- aAnyArray[2] <<= OUString( OUString(RTL_CONSTASCII_USTRINGPARAM("Hallo")) );
+ aAnyArray[2] <<= OUString( OUString("Hallo") );
// Einmal fuer den internen Gebrauch die PropertySetInfo abholen
m_xMyInfo = getPropertySetInfo();
@@ -471,12 +471,12 @@ void ImplIntroTest::Init( void )
// String-Sequence intitialisieren
aStringSeq.realloc( 3 );
OUString* pStr = aStringSeq.getArray();
- 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")) );
+ pStr[ 0 ] = OUString( OUString("String 0") );
+ pStr[ 1 ] = OUString( OUString("String 1") );
+ pStr[ 2 ] = OUString( OUString("String 2") );
// structs initialisieren
- m_aFirstStruct.Name = OUString(RTL_CONSTASCII_USTRINGPARAM("FirstStruct-Name"));
+ m_aFirstStruct.Name = OUString("FirstStruct-Name");
m_aFirstStruct.Handle = 77777;
//XIdlClassRef Type;
m_aFirstStruct.Attributes = -222;
@@ -550,7 +550,7 @@ Any ImplIntroTest::getPropertyValue( const OUString& PropertyName )
OUString ImplIntroTest::getFirstName(void)
throw(RuntimeException)
{
- return OUString( OUString(RTL_CONSTASCII_USTRINGPARAM("Markus")) );
+ return OUString( OUString("Markus") );
}
void ImplIntroTest::writeln( const OUString& Text )
@@ -590,7 +590,7 @@ sal_Bool ImplIntroTest::hasElements( )
sal_Int32 getIndexForName( const OUString& ItemName )
{
OUString aLeftStr = ItemName.copy( 0, 4 );
- if( aLeftStr == OUString(RTL_CONSTASCII_USTRINGPARAM("Item")) )
+ if( aLeftStr == OUString("Item") )
{
// TODO
OUString aNumStr = ItemName.copy( 4 );
@@ -616,7 +616,7 @@ Any ImplIntroTest::getByName( const OUString& aName )
if( !pNameAccessTab[iIndex].is() )
{
ImplIntroTest* p = new ImplIntroTest( mxMgr );
- OUString aName2( RTL_CONSTASCII_USTRINGPARAM("IntroTest by Name-Access, Index = ") );
+ OUString aName2( "IntroTest by Name-Access, Index = " );
aName2 += OUString::valueOf( iIndex );
p->setObjectName( aName2 );
pNameAccessTab[iIndex] = p;
@@ -635,7 +635,7 @@ Sequence< OUString > ImplIntroTest::getElementNames( )
OUString* pStr = aStrSeq.getArray();
for( sal_Int32 i = 0 ; i < DEFAULT_NAME_ACCESS_COUNT ; i++ )
{
- OUString aName( RTL_CONSTASCII_USTRINGPARAM("Item") );
+ OUString aName( "Item" );
aName += OUString::valueOf( i );
pStr[i] = aName;
}
@@ -668,7 +668,7 @@ Any ImplIntroTest::getByIndex( sal_Int32 Index )
if( !pNameAccessTab[Index].is() )
{
ImplIntroTest* p = new ImplIntroTest( mxMgr );
- OUString aName( RTL_CONSTASCII_USTRINGPARAM("IntroTest by Index-Access, Index = ") );
+ OUString aName( "IntroTest by Index-Access, Index = " );
aName += OUString::valueOf( Index );
p->setObjectName( aName );
pIndexAccessTab[Index] = p;
@@ -988,7 +988,7 @@ static sal_Bool test_introsp( Reference< XMultiServiceFactory > xMgr,
{
OUString aStr;
aPropVal >>= aStr;
- aStr = aStr + OUString(RTL_CONSTASCII_USTRINGPARAM(" (Modified!)"));
+ aStr = aStr + OUString(" (Modified!)");
aNewVal <<= aStr;
break;
}
@@ -1198,33 +1198,32 @@ static sal_Bool test_introsp( Reference< XMultiServiceFactory > xMgr,
SAL_IMPLEMENT_MAIN()
{
- Reference< XMultiServiceFactory > xMgr( createRegistryServiceFactory( OUString(RTL_CONSTASCII_USTRINGPARAM("stoctest.rdb")) ) );
+ Reference< XMultiServiceFactory > xMgr( createRegistryServiceFactory( OUString("stoctest.rdb") ) );
sal_Bool bSucc = sal_False;
try
{
Reference< XImplementationRegistration > xImplReg(
- xMgr->createInstance( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.registry.ImplementationRegistration")) ), UNO_QUERY );
+ xMgr->createInstance( OUString("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) );
+ OUString libName( "reflection.uno" SAL_DLLEXTENSION );
fprintf(stderr, "1\n" );
- xImplReg->registerImplementation(OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.loader.SharedLibrary")),
+ xImplReg->registerImplementation(OUString("com.sun.star.loader.SharedLibrary"),
libName, Reference< XSimpleRegistry >() );
fprintf(stderr, "2\n" );
- Reference< XIdlReflection > xRefl( xMgr->createInstance( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.reflection.CoreReflection")) ), UNO_QUERY );
+ Reference< XIdlReflection > xRefl( xMgr->createInstance( OUString("com.sun.star.reflection.CoreReflection") ), UNO_QUERY );
OSL_ENSURE( xRefl.is(), "### no corereflection!" );
// Introspection
- libName = OUString(RTL_CONSTASCII_USTRINGPARAM(
- "introspection.uno" SAL_DLLEXTENSION));
+ libName = OUString(
+ "introspection.uno" SAL_DLLEXTENSION);
fprintf(stderr, "3\n" );
- xImplReg->registerImplementation(OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.loader.SharedLibrary")),
+ xImplReg->registerImplementation(OUString("com.sun.star.loader.SharedLibrary"),
libName, Reference< XSimpleRegistry >() );
fprintf(stderr, "4\n" );
- Reference< XIntrospection > xIntrosp( xMgr->createInstance( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.beans.Introspection")) ), UNO_QUERY );
+ Reference< XIntrospection > xIntrosp( xMgr->createInstance( OUString("com.sun.star.beans.Introspection") ), UNO_QUERY );
OSL_ENSURE( xRefl.is(), "### no corereflection!" );
fprintf(stderr, "before test_introsp\n" );
diff --git a/stoc/test/testloader.cxx b/stoc/test/testloader.cxx
index dad125fe669e..d4d39d3ceff9 100644
--- a/stoc/test/testloader.cxx
+++ b/stoc/test/testloader.cxx
@@ -78,13 +78,13 @@ SAL_IMPLEMENT_MAIN()
Module module;
OUString dllName(
- RTL_CONSTASCII_USTRINGPARAM("bootstrap.uno" SAL_DLLEXTENSION) );
+ "bootstrap.uno" SAL_DLLEXTENSION );
if (module.load(dllName))
{
// try to get provider from module
component_getFactoryFunc pCompFactoryFunc = (component_getFactoryFunc)
- module.getFunctionSymbol( OUString(RTL_CONSTASCII_USTRINGPARAM(COMPONENT_GETFACTORY)) );
+ module.getFunctionSymbol( OUString(COMPONENT_GETFACTORY) );
if (pCompFactoryFunc)
{
@@ -113,7 +113,7 @@ SAL_IMPLEMENT_MAIN()
OSL_ENSURE( xServInfo.is(), "testloader error4");
OSL_ENSURE( xServInfo->getImplementationName() == "com.sun.star.comp.stoc.DLLComponentLoader", "testloader error5");
- OSL_ENSURE( xServInfo->supportsService(OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.loader.SharedLibrary")) ), "testloader error6");
+ OSL_ENSURE( xServInfo->supportsService(OUString( "com.sun.star.loader.SharedLibrary") ), "testloader error6");
OSL_ENSURE( xServInfo->getSupportedServiceNames().getLength() == 1, "testloader error7");
xIFace.clear();
diff --git a/stoc/test/testproxyfac.cxx b/stoc/test/testproxyfac.cxx
index e92fabecb130..fecdb705e6d4 100644
--- a/stoc/test/testproxyfac.cxx
+++ b/stoc/test/testproxyfac.cxx
@@ -75,7 +75,7 @@ public:
// XServiceInfo
virtual OUString SAL_CALL getImplementationName() throw (RuntimeException)
- { return OUString(RTL_CONSTASCII_USTRINGPARAM("target")); }
+ { return OUString("target"); }
virtual sal_Bool SAL_CALL supportsService( const OUString & /*rServiceName*/ )
throw (RuntimeException)
{ return sal_False; }
@@ -100,7 +100,7 @@ Any TargetObject::queryInterface( Type const & type )
if (ret.hasValue())
return ret;
throw lang::DisposedException(
- OUString( RTL_CONSTASCII_USTRINGPARAM("my test exception") ),
+ OUString( "my test exception" ),
static_cast< OWeakObject * >(this) );
}
@@ -139,7 +139,7 @@ public:
// XServiceInfo
virtual OUString SAL_CALL getImplementationName() throw (RuntimeException)
- { return OUString(RTL_CONSTASCII_USTRINGPARAM("master")); }
+ { return OUString("master"); }
virtual sal_Bool SAL_CALL supportsService( const OUString & /*rServiceName*/ )
throw (RuntimeException)
{ return sal_False; }
@@ -240,7 +240,7 @@ static void test_proxyfac(
// proxy the proxy...
Reference< XInterface > xNew( TestMaster::create( xMaster, xProxyFac ) );
test_proxyfac_(
- xNew, OUString( RTL_CONSTASCII_USTRINGPARAM("master") ), xProxyFac );
+ xNew, OUString( "master" ), xProxyFac );
}
SAL_IMPLEMENT_MAIN()
@@ -248,8 +248,7 @@ SAL_IMPLEMENT_MAIN()
bool success = true;
Environment cpp_env;
- OUString cpp( RTL_CONSTASCII_USTRINGPARAM(
- CPPU_CURRENT_LANGUAGE_BINDING_NAME) );
+ OUString cpp( CPPU_CURRENT_LANGUAGE_BINDING_NAME );
uno_getEnvironment(
reinterpret_cast< uno_Environment ** >( &cpp_env ),
cpp.pData, 0 );
@@ -258,31 +257,27 @@ SAL_IMPLEMENT_MAIN()
{
Reference< lang::XMultiServiceFactory > xMgr(
createRegistryServiceFactory(
- OUString( RTL_CONSTASCII_USTRINGPARAM("stoctest.rdb") ) ) );
+ OUString( "stoctest.rdb" ) ) );
try
{
Reference< registry::XImplementationRegistration > xImplReg(
xMgr->createInstance(
- OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.registry.ImplementationRegistration")
+ OUString( "com.sun.star.registry.ImplementationRegistration"
) ),
UNO_QUERY );
OSL_ENSURE( xImplReg.is(), "### no impl reg!" );
OUString aLibName(
- RTL_CONSTASCII_USTRINGPARAM("proxyfac.uno" SAL_DLLEXTENSION) );
+ "proxyfac.uno" SAL_DLLEXTENSION );
xImplReg->registerImplementation(
- OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.loader.SharedLibrary") ),
+ OUString( "com.sun.star.loader.SharedLibrary" ),
aLibName, Reference< registry::XSimpleRegistry >() );
Reference< reflection::XProxyFactory > xProxyFac(
xMgr->createInstance(
- OUString(RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.reflection.ProxyFactory")) ),
+ OUString(
+ "com.sun.star.reflection.ProxyFactory") ),
UNO_QUERY_THROW );
Reference< XAggregation > x(
@@ -294,7 +289,7 @@ SAL_IMPLEMENT_MAIN()
Reference< XInterface > xMaster( TestMaster::create( xProxyFac ) );
test_proxyfac(
xMaster,
- OUString( RTL_CONSTASCII_USTRINGPARAM("master") ),
+ OUString( "master" ),
xProxyFac );
}
{
@@ -309,7 +304,7 @@ SAL_IMPLEMENT_MAIN()
xMaster.clear();
test_proxyfac(
xSlave_lives_alone,
- OUString( RTL_CONSTASCII_USTRINGPARAM("master") ),
+ OUString( "master" ),
xProxyFac );
uno_dumpEnvironment( stdout, cpp_env.get(), 0 );
}
@@ -323,7 +318,7 @@ SAL_IMPLEMENT_MAIN()
test_proxyfac(
xProxyFac->createProxy(
static_cast< OWeakObject * >( new TargetObject ) ),
- OUString( RTL_CONSTASCII_USTRINGPARAM("target") ),
+ OUString( "target" ),
xProxyFac );
uno_dumpEnvironment( stdout, cpp_env.get(), 0 );
}
@@ -341,7 +336,7 @@ SAL_IMPLEMENT_MAIN()
Reference< lang::XComponent > xComp;
Reference< beans::XPropertySet >(
xMgr, UNO_QUERY_THROW )->getPropertyValue(
- OUString( RTL_CONSTASCII_USTRINGPARAM("DefaultContext") ) )
+ OUString( "DefaultContext" ) )
>>= xComp;
xComp->dispose();
}
diff --git a/stoc/test/testregistry.cxx b/stoc/test/testregistry.cxx
index 1c314e6c53f5..c20f17bb0dfd 100644
--- a/stoc/test/testregistry.cxx
+++ b/stoc/test/testregistry.cxx
@@ -120,7 +120,7 @@ Registry *myRegistry = new Registry();
RegistryKey rootKey, rKey, rKey2;
OUString userReg = getExePath();
-userReg += OUString(RTL_CONSTASCII_USTRINGPARAM("user.rdb"));
+userReg += OUString("user.rdb");
if(myRegistry->open(userReg, REG_READWRITE))
{
OSL_VERIFY(!myRegistry->create(userReg));
@@ -140,7 +140,7 @@ void setLinkInDefaultRegistry(const OUString& linkName, const OUString& linkTarg
RegistryKey rootKey;
OUString appReg = getExePath();
- appReg += OUString(RTL_CONSTASCII_USTRINGPARAM("stoctest.rdb"));
+ appReg += OUString("stoctest.rdb");
OSL_VERIFY(!myRegistry->open(appReg, REG_READWRITE));
OSL_VERIFY(!myRegistry->openRootKey(rootKey));
@@ -163,13 +163,13 @@ void test_SimpleRegistry(
Module module;
OUString dllName(
- RTL_CONSTASCII_USTRINGPARAM("simplereg.uno" SAL_DLLEXTENSION) );
+ "simplereg.uno" SAL_DLLEXTENSION );
if (module.load(dllName))
{
// try to get provider from module
component_getFactoryFunc pCompFactoryFunc = (component_getFactoryFunc)
- module.getFunctionSymbol( OUString(RTL_CONSTASCII_USTRINGPARAM(COMPONENT_GETFACTORY)) );
+ module.getFunctionSymbol( OUString(COMPONENT_GETFACTORY) );
if (pCompFactoryFunc)
{
@@ -201,7 +201,7 @@ void test_SimpleRegistry(
OSL_ENSURE( xServInfo.is(), "test_SimpleRegistry error2");
OSL_ENSURE( xServInfo->getImplementationName() == "com.sun.star.comp.stoc.SimpleRegistry", "test_SimpleRegistry error3");
- OSL_ENSURE( xServInfo->supportsService(OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.registry.SimpleRegistry"))), "test_SimpleRegistry error4");
+ OSL_ENSURE( xServInfo->supportsService(OUString( "com.sun.star.registry.SimpleRegistry")), "test_SimpleRegistry error4");
OSL_ENSURE( xServInfo->getSupportedServiceNames().getLength() == 1, "test_SimpleRegistry error5");
xServInfo.clear();
@@ -220,18 +220,18 @@ void test_SimpleRegistry(
Reference<XRegistryKey> xRootKey(xReg->getRootKey());
OSL_ENSURE( xRootKey->isValid(), "test_SimpleRegistry error 9" );
- Reference<XRegistryKey> xKey = xRootKey->createKey(OUString( RTL_CONSTASCII_USTRINGPARAM("FirstKey") ));
+ Reference<XRegistryKey> xKey = xRootKey->createKey(OUString( "FirstKey" ));
- Reference<XRegistryKey> xSubKey = xKey->createKey(OUString( RTL_CONSTASCII_USTRINGPARAM("FirstSubKey") ));
+ Reference<XRegistryKey> xSubKey = xKey->createKey(OUString( "FirstSubKey" ));
xSubKey->setLongValue(123456789);
- xSubKey = xKey->createKey(OUString( RTL_CONSTASCII_USTRINGPARAM("SecondSubKey") ));
- xSubKey->setAsciiValue(OUString( RTL_CONSTASCII_USTRINGPARAM("ich bin ein acsii value") ));
+ xSubKey = xKey->createKey(OUString( "SecondSubKey" ));
+ xSubKey->setAsciiValue(OUString( "ich bin ein acsii value" ));
- xSubKey = xKey->createKey(OUString( RTL_CONSTASCII_USTRINGPARAM("ThirdSubKey") ));
- xSubKey->setStringValue(OUString( RTL_CONSTASCII_USTRINGPARAM("ich bin ein unicode value") ));
+ xSubKey = xKey->createKey(OUString( "ThirdSubKey" ));
+ xSubKey->setStringValue(OUString( "ich bin ein unicode value" ));
- xSubKey = xKey->createKey(OUString( RTL_CONSTASCII_USTRINGPARAM("FourthSubKey") ));
+ xSubKey = xKey->createKey(OUString( "FourthSubKey" ));
Sequence<sal_Int8> aSeq((sal_Int8*)"ich bin ein binary value", 25);
xSubKey->setBinaryValue(aSeq);
@@ -244,22 +244,22 @@ void test_SimpleRegistry(
name = seqNames.getArray()[i];
xSubKey = seqKeys.getArray()[i];
- if (name == OUString( RTL_CONSTASCII_USTRINGPARAM("/FirstKey/FirstSubKey") ))
+ if (name == OUString( "/FirstKey/FirstSubKey" ))
{
OSL_ENSURE( xSubKey->getLongValue() == 123456789,
"test_SimpleRegistry error 10" );
} else
- if (name == OUString( RTL_CONSTASCII_USTRINGPARAM("/FirstKey/SecondSubKey") ))
+ if (name == OUString( "/FirstKey/SecondSubKey" ))
{
- OSL_ENSURE( xSubKey->getAsciiValue() == OUString( RTL_CONSTASCII_USTRINGPARAM("ich bin ein acsii value") ),
+ OSL_ENSURE( xSubKey->getAsciiValue() == OUString( "ich bin ein acsii value" ),
"test_SimpleRegistry error 11" );
} else
- if (name == OUString( RTL_CONSTASCII_USTRINGPARAM("/FirstKey/ThirdSubKey") ))
+ if (name == OUString( "/FirstKey/ThirdSubKey" ))
{
- OSL_ENSURE( xSubKey->getStringValue() == OUString( RTL_CONSTASCII_USTRINGPARAM("ich bin ein unicode value") ),
+ OSL_ENSURE( xSubKey->getStringValue() == OUString( "ich bin ein unicode value" ),
"test_SimpleRegistry error 12" );
} else
- if (name == OUString( RTL_CONSTASCII_USTRINGPARAM("/FirstKey/FourthSubKey") ))
+ if (name == OUString( "/FirstKey/FourthSubKey" ))
{
Sequence<sal_Int8> seqByte = xSubKey->getBinaryValue();
OSL_ENSURE(!strcmp(((const char*)seqByte.getArray()), "ich bin ein binary value"),
@@ -271,10 +271,10 @@ void test_SimpleRegistry(
xKey->closeKey();
- xRootKey->deleteKey(OUString( RTL_CONSTASCII_USTRINGPARAM("FirstKey") ));
- xRootKey->createKey(OUString( RTL_CONSTASCII_USTRINGPARAM("SecondFirstKey" )));
+ xRootKey->deleteKey(OUString( "FirstKey" ));
+ xRootKey->createKey(OUString( "SecondFirstKey" ));
- xKey = xRootKey->createKey(OUString( RTL_CONSTASCII_USTRINGPARAM("SecondKey") ));
+ xKey = xRootKey->createKey(OUString( "SecondKey" ));
sal_Int32 pLongs[3] = {123, 456, 789};
Sequence<sal_Int32> seqLongs(pLongs, 3);
xKey->setLongListValue(seqLongs);
@@ -287,11 +287,11 @@ void test_SimpleRegistry(
OSL_ENSURE( seqLongs.getArray()[2] == 789, "test_SimpleRegistry error 17" );
- xKey = xRootKey->createKey(OUString( RTL_CONSTASCII_USTRINGPARAM("ThirdKey") ));
+ xKey = xRootKey->createKey(OUString( "ThirdKey" ));
OUString pAscii[3];
- pAscii[0] = OUString( RTL_CONSTASCII_USTRINGPARAM("Hallo") );
- pAscii[1] = OUString( RTL_CONSTASCII_USTRINGPARAM("jetzt komm") );
- pAscii[2] = OUString( RTL_CONSTASCII_USTRINGPARAM("ich") );
+ pAscii[0] = OUString( "Hallo" );
+ pAscii[1] = OUString( "jetzt komm" );
+ pAscii[2] = OUString( "ich" );
Sequence<OUString> seqAscii(pAscii, 3);
xKey->setAsciiListValue(seqAscii);
@@ -299,15 +299,15 @@ void test_SimpleRegistry(
Sequence<OUString> seqAscii2;
seqAscii2 = xKey->getAsciiListValue();
OSL_ENSURE( seqAscii2.getLength() == 3, "test_SimpleRegistry error 18" );
- OSL_ENSURE( seqAscii2.getArray()[0] == OUString( RTL_CONSTASCII_USTRINGPARAM("Hallo") ), "test_SimpleRegistry error 19");
- OSL_ENSURE( seqAscii2.getArray()[1] == OUString( RTL_CONSTASCII_USTRINGPARAM("jetzt komm") ), "test_SimpleRegistry error 20");
- OSL_ENSURE( seqAscii2.getArray()[2] == OUString( RTL_CONSTASCII_USTRINGPARAM("ich") ), "test_SimpleRegistry error 21");
+ OSL_ENSURE( seqAscii2.getArray()[0] == OUString( "Hallo" ), "test_SimpleRegistry error 19");
+ OSL_ENSURE( seqAscii2.getArray()[1] == OUString( "jetzt komm" ), "test_SimpleRegistry error 20");
+ OSL_ENSURE( seqAscii2.getArray()[2] == OUString( "ich" ), "test_SimpleRegistry error 21");
- xKey = xRootKey->createKey(OUString( RTL_CONSTASCII_USTRINGPARAM("FourthKey") ));
+ xKey = xRootKey->createKey(OUString( "FourthKey" ));
OUString pUnicode[3];
- pUnicode[0] = OUString( RTL_CONSTASCII_USTRINGPARAM("Hallo") );
- pUnicode[1] = OUString( RTL_CONSTASCII_USTRINGPARAM("jetzt komm") );
- pUnicode[2] = OUString( RTL_CONSTASCII_USTRINGPARAM("ich als unicode") );
+ pUnicode[0] = OUString( "Hallo" );
+ pUnicode[1] = OUString( "jetzt komm" );
+ pUnicode[2] = OUString( "ich als unicode" );
Sequence<OUString> seqUnicode(pUnicode, 3);
xKey->setStringListValue(seqUnicode);
@@ -315,20 +315,20 @@ void test_SimpleRegistry(
Sequence<OUString> seqUnicode2;
seqUnicode2 = xKey->getStringListValue();
OSL_ENSURE( seqUnicode2.getLength() == 3, "test_SimpleRegistry error 22" );
- OSL_ENSURE( seqUnicode2.getArray()[0] == OUString( RTL_CONSTASCII_USTRINGPARAM("Hallo") ), "test_SimpleRegistry error 23");
- OSL_ENSURE( seqUnicode2.getArray()[1] == OUString( RTL_CONSTASCII_USTRINGPARAM("jetzt komm") ), "test_SimpleRegistry error 24");
- OSL_ENSURE( seqUnicode2.getArray()[2] == OUString( RTL_CONSTASCII_USTRINGPARAM("ich als unicode") ), "test_SimpleRegistry error 25");
+ OSL_ENSURE( seqUnicode2.getArray()[0] == OUString( "Hallo" ), "test_SimpleRegistry error 23");
+ OSL_ENSURE( seqUnicode2.getArray()[1] == OUString( "jetzt komm" ), "test_SimpleRegistry error 24");
+ OSL_ENSURE( seqUnicode2.getArray()[2] == OUString( "ich als unicode" ), "test_SimpleRegistry error 25");
xReg->open(testreg2, sal_False, sal_True);
OSL_ENSURE( xReg->isValid() != sal_False, "test_SimpleRegistry error 25" );
xRootKey = xReg->getRootKey();
- xKey = xRootKey->createKey(OUString( RTL_CONSTASCII_USTRINGPARAM("ThirdKey/FirstSubKey/WithSubSubKey") ));
+ xKey = xRootKey->createKey(OUString( "ThirdKey/FirstSubKey/WithSubSubKey" ));
xKey->closeKey();
OSL_VERIFY(
xRootKey->createLink(
- OUString( RTL_CONSTASCII_USTRINGPARAM("LinkTest") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM("/ThirdKey/FirstSubKey/WithSubSubKey") )) );
+ OUString( "LinkTest" ),
+ OUString( "/ThirdKey/FirstSubKey/WithSubSubKey" )) );
xRootKey->closeKey();
xReg->close();
@@ -348,80 +348,80 @@ void test_SimpleRegistry(
}
xRootKey = xReg->getRootKey();
- xKey = xRootKey->openKey( OUString( RTL_CONSTASCII_USTRINGPARAM("LinkTest") ) );
+ xKey = xRootKey->openKey( OUString( "LinkTest" ) );
OSL_ENSURE( xKey.is() && xKey->isValid() && xKey->getKeyName() == "/ThirdKey/FirstSubKey/WithSubSubKey", "test_SimpleRegistry error 1213" );
xKey->closeKey();
OSL_ENSURE(
- xRootKey->getKeyType( OUString( RTL_CONSTASCII_USTRINGPARAM("LinkTest") ) ) ==
+ xRootKey->getKeyType( OUString( "LinkTest" ) ) ==
registry::RegistryKeyType_LINK,
"test_SimpleRegistry error 1214" );
- xKey = xRootKey->openKey(OUString( RTL_CONSTASCII_USTRINGPARAM("FirstKey/SecondSubKey") ));
+ xKey = xRootKey->openKey(OUString( "FirstKey/SecondSubKey" ));
OSL_ENSURE( !xKey.is(), "test_SimpleRegistry error 27" );
// Test Links
- xKey = xRootKey->createKey(OUString( RTL_CONSTASCII_USTRINGPARAM("FifthKey") ));
- xKey->createLink(OUString( RTL_CONSTASCII_USTRINGPARAM("MyFirstLink") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM("/ThirdKey/FirstSubKey") ));
+ xKey = xRootKey->createKey(OUString( "FifthKey" ));
+ xKey->createLink(OUString( "MyFirstLink" ),
+ OUString( "/ThirdKey/FirstSubKey" ));
- xKey = xRootKey->openKey(OUString( RTL_CONSTASCII_USTRINGPARAM("/FifthKey/MyFirstLink") ));
+ xKey = xRootKey->openKey(OUString( "/FifthKey/MyFirstLink" ));
OSL_ENSURE( xKey->isValid(), "test_SimpleRegistry error 27" );
- OSL_ENSURE( xKey->getKeyName() == OUString( RTL_CONSTASCII_USTRINGPARAM("/ThirdKey/FirstSubKey") ), "test_SimpleRegistry error 28" );
+ OSL_ENSURE( xKey->getKeyName() == OUString( "/ThirdKey/FirstSubKey" ), "test_SimpleRegistry error 28" );
- xKey->createLink(OUString( RTL_CONSTASCII_USTRINGPARAM("/WithSubSubKey/MyFourthLink") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM("/FourthKey/MySecondLink") ));
+ xKey->createLink(OUString( "/WithSubSubKey/MyFourthLink" ),
+ OUString( "/FourthKey/MySecondLink" ));
- OSL_ENSURE( xKey->getLinkTarget(OUString( RTL_CONSTASCII_USTRINGPARAM("/WithSubSubKey/MyFourthLink") ))
- == OUString( RTL_CONSTASCII_USTRINGPARAM("/FourthKey/MySecondLink") ), "test_SimpleRegistry error 29" );
+ OSL_ENSURE( xKey->getLinkTarget(OUString( "/WithSubSubKey/MyFourthLink" ))
+ == OUString( "/FourthKey/MySecondLink" ), "test_SimpleRegistry error 29" );
try
{
- OSL_ENSURE( xKey->getResolvedName(OUString( RTL_CONSTASCII_USTRINGPARAM("/WithSubSubKey/MyFourthLink/BlaBlaBla") ))
- == OUString( RTL_CONSTASCII_USTRINGPARAM("/FourthKey/MySecondLink/BlaBlaBla") ), "test_SimpleRegistry error 30" );
+ OSL_ENSURE( xKey->getResolvedName(OUString( "/WithSubSubKey/MyFourthLink/BlaBlaBla" ))
+ == OUString( "/FourthKey/MySecondLink/BlaBlaBla" ), "test_SimpleRegistry error 30" );
}
catch(InvalidRegistryException&)
{
}
- xRootKey->createLink(OUString( RTL_CONSTASCII_USTRINGPARAM("/FourthKey/MySecondLink") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM("/SixthKey/MyThirdLink") ));
- xKey = xRootKey->createKey(OUString( RTL_CONSTASCII_USTRINGPARAM("SixthKey") ));
- xKey->createLink(OUString( RTL_CONSTASCII_USTRINGPARAM("MyThirdLink") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM("/FourthKey/MySecondLink") ));
+ xRootKey->createLink(OUString( "/FourthKey/MySecondLink" ),
+ OUString( "/SixthKey/MyThirdLink" ));
+ xKey = xRootKey->createKey(OUString( "SixthKey" ));
+ xKey->createLink(OUString( "MyThirdLink" ),
+ OUString( "/FourthKey/MySecondLink" ));
- xKey = xRootKey->createKey(OUString( RTL_CONSTASCII_USTRINGPARAM("/SixthKey/SixthSubKey") ));
+ xKey = xRootKey->createKey(OUString( "/SixthKey/SixthSubKey" ));
try
{
- xRootKey->openKey(OUString( RTL_CONSTASCII_USTRINGPARAM("/FifthKey/MyFirstLink/WithSubSubKey/MyFourthLink") ));
+ xRootKey->openKey(OUString( "/FifthKey/MyFirstLink/WithSubSubKey/MyFourthLink" ));
}
catch(InvalidRegistryException&)
{
}
- OSL_ENSURE( xRootKey->getLinkTarget(OUString( RTL_CONSTASCII_USTRINGPARAM("/FifthKey/MyFirstLink/WithSubSubKey/MyFourthLink") ))
- == OUString( RTL_CONSTASCII_USTRINGPARAM("/FourthKey/MySecondLink") ), "test_SimpleRegistry error 31" );
+ OSL_ENSURE( xRootKey->getLinkTarget(OUString( "/FifthKey/MyFirstLink/WithSubSubKey/MyFourthLink" ))
+ == OUString( "/FourthKey/MySecondLink" ), "test_SimpleRegistry error 31" );
- xRootKey->deleteLink(OUString( RTL_CONSTASCII_USTRINGPARAM("/FifthKey/MyFirstLink/WithSubSubKey/MyFourthLink") ));
+ xRootKey->deleteLink(OUString( "/FifthKey/MyFirstLink/WithSubSubKey/MyFourthLink" ));
- xRootKey->createLink(OUString( RTL_CONSTASCII_USTRINGPARAM("/FourthKey/MySecondLink") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM("/ThirdKey/FirstSubKey/WithSubSubKey") ));
+ xRootKey->createLink(OUString( "/FourthKey/MySecondLink" ),
+ OUString( "/ThirdKey/FirstSubKey/WithSubSubKey" ));
- xKey = xRootKey->openKey(OUString( RTL_CONSTASCII_USTRINGPARAM("SixthKey") ));
+ xKey = xRootKey->openKey(OUString( "SixthKey" ));
seqNames = xKey->getKeyNames();
seqKeys = xKey->openKeys();
- OSL_ENSURE( seqNames.getArray()[0] == OUString( RTL_CONSTASCII_USTRINGPARAM("/SixthKey/SixthSubKey") ),
+ OSL_ENSURE( seqNames.getArray()[0] == OUString( "/SixthKey/SixthSubKey" ),
"test_SimpleRegistry error 32" );
- OSL_ENSURE( seqNames.getArray()[1] == OUString( RTL_CONSTASCII_USTRINGPARAM("/SixthKey/MyThirdLink") ),
+ OSL_ENSURE( seqNames.getArray()[1] == OUString( "/SixthKey/MyThirdLink" ),
"test_SimpleRegistry error 33" );
- OSL_ENSURE( seqKeys.getArray()[0]->getKeyName() == OUString( RTL_CONSTASCII_USTRINGPARAM("/SixthKey/SixthSubKey") ),
+ OSL_ENSURE( seqKeys.getArray()[0]->getKeyName() == OUString( "/SixthKey/SixthSubKey" ),
"test_SimpleRegistry error 34" );
- OSL_ENSURE( seqKeys.getArray()[1]->getKeyName() == OUString( RTL_CONSTASCII_USTRINGPARAM("/ThirdKey/FirstSubKey/WithSubSubKey") ),
+ OSL_ENSURE( seqKeys.getArray()[1]->getKeyName() == OUString( "/ThirdKey/FirstSubKey/WithSubSubKey" ),
"test_SimpleRegistry error 35" );
- xRootKey->deleteLink(OUString( RTL_CONSTASCII_USTRINGPARAM("/FourthKey/MySecondLink") ));
+ xRootKey->deleteLink(OUString( "/FourthKey/MySecondLink" ));
xRootKey->closeKey();
}
catch(InvalidRegistryException&)
@@ -449,16 +449,16 @@ void test_DefaultRegistry(
OUString userRdb(exePath);
OUString applicatRdb(exePath);
- userRdb += OUString(RTL_CONSTASCII_USTRINGPARAM("user.rdb"));
- applicatRdb += OUString(RTL_CONSTASCII_USTRINGPARAM("stoctest.rdb"));
+ userRdb += OUString("user.rdb");
+ applicatRdb += OUString("stoctest.rdb");
Reference < XMultiServiceFactory > rSMgr = ::cppu::createRegistryServiceFactory( userRdb, applicatRdb, sal_False, OUString());
- //OUString(RTL_CONSTASCII_USTRINGPARAM("//./e:/src596/stoc/wntmsci3/bin")) );
+ //OUString("//./e:/src596/stoc/wntmsci3/bin") );
Reference< XPropertySet > xPropSet( rSMgr, UNO_QUERY);
OSL_ENSURE( xPropSet.is(), "test_DefaultRegistry error0");
- Any aPropertyAny( xPropSet->getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("Registry")) ) );
+ Any aPropertyAny( xPropSet->getPropertyValue( OUString("Registry") ) );
OSL_ENSURE( aPropertyAny.hasValue(), "test_DefaultRegistry error1");
Reference<XSimpleRegistry> xReg;
@@ -469,8 +469,8 @@ void test_DefaultRegistry(
OSL_ENSURE( xServInfo.is(), "test_DefaultRegistry error2");
- OSL_ENSURE( xServInfo->getImplementationName() == OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.stoc.NestedRegistry") ), "test_DefualtRegistry error3");
- OSL_ENSURE( xServInfo->supportsService(OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.registry.NestedRegistry") )), "test_DefaultRegistry error4");
+ OSL_ENSURE( xServInfo->getImplementationName() == OUString( "com.sun.star.comp.stoc.NestedRegistry" ), "test_DefualtRegistry error3");
+ OSL_ENSURE( xServInfo->supportsService(OUString( "com.sun.star.registry.NestedRegistry" )), "test_DefaultRegistry error4");
OSL_ENSURE( xServInfo->getSupportedServiceNames().getLength() == 1, "test_DefaultRegistry error5");
xServInfo.clear();
@@ -480,38 +480,38 @@ void test_DefaultRegistry(
{
Reference<XRegistryKey> xRootKey(xReg->getRootKey());
- Reference<XRegistryKey> xKey = xRootKey->openKey(OUString( RTL_CONSTASCII_USTRINGPARAM("/UCR/com/sun/star/registry/XSimpleRegistry") ));
+ Reference<XRegistryKey> xKey = xRootKey->openKey(OUString( "/UCR/com/sun/star/registry/XSimpleRegistry" ));
- OSL_ENSURE( xKey->getKeyName() == OUString( RTL_CONSTASCII_USTRINGPARAM("/UCR/com/sun/star/registry/XSimpleRegistry") ),
+ OSL_ENSURE( xKey->getKeyName() == OUString( "/UCR/com/sun/star/registry/XSimpleRegistry" ),
"test_DefaultRegistry error 7" );
if (bMergeDifferently)
{
mergeKeys(
xReg,
- OUString( RTL_CONSTASCII_USTRINGPARAM("Test") ),
+ OUString( "Test" ),
testreg );
}
else
{
- xReg->mergeKey(OUString( RTL_CONSTASCII_USTRINGPARAM("Test") ), testreg );
+ xReg->mergeKey(OUString( "Test" ), testreg );
}
- xKey = xRootKey->openKey(OUString( RTL_CONSTASCII_USTRINGPARAM("Test/ThirdKey/FirstSubKey/WithSubSubKey") ));
+ xKey = xRootKey->openKey(OUString( "Test/ThirdKey/FirstSubKey/WithSubSubKey" ));
if (xKey.is())
xKey->setLongValue(123456789);
- xKey = xRootKey->openKey(OUString( RTL_CONSTASCII_USTRINGPARAM("Test/ThirdKey/FirstSubKey") ));
+ xKey = xRootKey->openKey(OUString( "Test/ThirdKey/FirstSubKey" ));
if (xKey.is())
{
- xKey->createKey(OUString( RTL_CONSTASCII_USTRINGPARAM("SecondSubSubKey") ));
+ xKey->createKey(OUString( "SecondSubSubKey" ));
Sequence<OUString> seqNames = xKey->getKeyNames();
OSL_ENSURE( seqNames.getLength() == 2, "test_DefaultRegistry error 8" );
}
- xKey = xRootKey->openKey(OUString( RTL_CONSTASCII_USTRINGPARAM("/Test/ThirdKey") ));
+ xKey = xRootKey->openKey(OUString( "/Test/ThirdKey" ));
if (xKey.is())
{
RegistryValueType valueType = xKey->getValueType();
@@ -520,11 +520,11 @@ void test_DefaultRegistry(
Sequence<OUString> seqValue = xKey->getAsciiListValue();
OSL_ENSURE( seqValue.getLength() == 3, "test_DefaultRegistry error 10" );
- OSL_ENSURE( seqValue.getArray()[0] == OUString( RTL_CONSTASCII_USTRINGPARAM("Hallo") ),
+ OSL_ENSURE( seqValue.getArray()[0] == OUString( "Hallo" ),
"test_DefaultRegistry error 11" );
- OSL_ENSURE( seqValue.getArray()[1] == OUString( RTL_CONSTASCII_USTRINGPARAM("jetzt komm") ),
+ OSL_ENSURE( seqValue.getArray()[1] == OUString( "jetzt komm" ),
"test_DefaultRegistry error 12" );
- OSL_ENSURE( seqValue.getArray()[2] == OUString( RTL_CONSTASCII_USTRINGPARAM("ich") ),
+ OSL_ENSURE( seqValue.getArray()[2] == OUString( "ich" ),
"test_DefaultRegistry error 13" );
Sequence<sal_Int32> seqLong(3);
@@ -543,87 +543,87 @@ void test_DefaultRegistry(
}
// Test Links
- xKey = xRootKey->createKey(OUString( RTL_CONSTASCII_USTRINGPARAM("/Test/FifthKey") ));
- xKey->createLink(OUString( RTL_CONSTASCII_USTRINGPARAM("MyFirstLink") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM("/Test/ThirdKey/FirstSubKey") ));
+ xKey = xRootKey->createKey(OUString( "/Test/FifthKey" ));
+ xKey->createLink(OUString( "MyFirstLink" ),
+ OUString( "/Test/ThirdKey/FirstSubKey" ));
- xKey = xRootKey->openKey(OUString( RTL_CONSTASCII_USTRINGPARAM("/Test/FifthKey/MyFirstLink") ));
+ xKey = xRootKey->openKey(OUString( "/Test/FifthKey/MyFirstLink" ));
OSL_ENSURE( xKey->isValid(), "test_DefaultRegistry error 18" );
- OSL_ENSURE( xKey->getKeyName() == OUString( RTL_CONSTASCII_USTRINGPARAM("/Test/ThirdKey/FirstSubKey") ),
+ OSL_ENSURE( xKey->getKeyName() == OUString( "/Test/ThirdKey/FirstSubKey" ),
"test_DefaultRegistry error 19" );
- xKey->createLink(OUString( RTL_CONSTASCII_USTRINGPARAM("/WithSubSubKey/MyFourthLink") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM("/Test/FourthKey/MySecondLink") ));
+ xKey->createLink(OUString( "/WithSubSubKey/MyFourthLink" ),
+ OUString( "/Test/FourthKey/MySecondLink" ));
- OSL_ENSURE( xKey->getLinkTarget(OUString( RTL_CONSTASCII_USTRINGPARAM("/WithSubSubKey/MyFourthLink") ))
- == OUString( RTL_CONSTASCII_USTRINGPARAM("/Test/FourthKey/MySecondLink") ),
+ OSL_ENSURE( xKey->getLinkTarget(OUString( "/WithSubSubKey/MyFourthLink" ))
+ == OUString( "/Test/FourthKey/MySecondLink" ),
"test_DefaultRegistry error 20" );
try
{
- OSL_ENSURE( xKey->getResolvedName(OUString( RTL_CONSTASCII_USTRINGPARAM("/WithSubSubKey/MyFourthLink/BlaBlaBla") ))
- == OUString( RTL_CONSTASCII_USTRINGPARAM("/Test/FourthKey/MySecondLink/BlaBlaBla") ),
+ OSL_ENSURE( xKey->getResolvedName(OUString( "/WithSubSubKey/MyFourthLink/BlaBlaBla" ))
+ == OUString( "/Test/FourthKey/MySecondLink/BlaBlaBla" ),
"test_DefaultRegistry error 21" );
}
catch(InvalidRegistryException&)
{
}
- xRootKey->createLink(OUString( RTL_CONSTASCII_USTRINGPARAM("/Test/FourthKey/MySecondLink") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM("/Test/SixthKey/MyThirdLink") ));
- xKey = xRootKey->createKey(OUString( RTL_CONSTASCII_USTRINGPARAM("/Test/SixthKey") ));
- xKey->createLink(OUString( RTL_CONSTASCII_USTRINGPARAM("MyThirdLink") ),
- OUString( RTL_CONSTASCII_USTRINGPARAM("/Test/FourthKey/MySecondLink") ));
+ xRootKey->createLink(OUString( "/Test/FourthKey/MySecondLink" ),
+ OUString( "/Test/SixthKey/MyThirdLink" ));
+ xKey = xRootKey->createKey(OUString( "/Test/SixthKey" ));
+ xKey->createLink(OUString( "MyThirdLink" ),
+ OUString( "/Test/FourthKey/MySecondLink" ));
try
{
- xRootKey->openKey(OUString( RTL_CONSTASCII_USTRINGPARAM("/Test/FifthKey/MyFirstLink/WithSubSubKey/MyFourthLink") ));
+ xRootKey->openKey(OUString( "/Test/FifthKey/MyFirstLink/WithSubSubKey/MyFourthLink" ));
}
catch(InvalidRegistryException&)
{
printf("test InvalidRegistryExcption OK!\n");
}
- OSL_ENSURE( xRootKey->getLinkTarget(OUString( RTL_CONSTASCII_USTRINGPARAM("/Test/FifthKey/MyFirstLink/WithSubSubKey/MyFourthLink") ))
- == OUString( RTL_CONSTASCII_USTRINGPARAM("/Test/FourthKey/MySecondLink") ),
+ OSL_ENSURE( xRootKey->getLinkTarget(OUString( "/Test/FifthKey/MyFirstLink/WithSubSubKey/MyFourthLink" ))
+ == OUString( "/Test/FourthKey/MySecondLink" ),
"test_DefaultRegistry error 22" );
- xRootKey->deleteLink(OUString( RTL_CONSTASCII_USTRINGPARAM("/Test/FifthKey/MyFirstLink/WithSubSubKey/MyFourthLink") ));
+ xRootKey->deleteLink(OUString( "/Test/FifthKey/MyFirstLink/WithSubSubKey/MyFourthLink" ));
- xKey = xRootKey->openKey(OUString( RTL_CONSTASCII_USTRINGPARAM("/Test/DefaultLink/SecondSubSubKey") ));
+ xKey = xRootKey->openKey(OUString( "/Test/DefaultLink/SecondSubSubKey" ));
if (xKey.is())
{
- OSL_ENSURE( xKey->getKeyName() == OUString( RTL_CONSTASCII_USTRINGPARAM("/Test/ThirdKey/FirstSubKey/SecondSubSubKey") ), "test_DefaultRegistry error 23" );
+ OSL_ENSURE( xKey->getKeyName() == OUString( "/Test/ThirdKey/FirstSubKey/SecondSubSubKey" ), "test_DefaultRegistry error 23" );
}
- xKey = xRootKey->createKey(OUString( RTL_CONSTASCII_USTRINGPARAM("/Test/DefaultLink/ThirdSubSubKey") ));
+ xKey = xRootKey->createKey(OUString( "/Test/DefaultLink/ThirdSubSubKey" ));
if (xKey.is())
{
- OSL_ENSURE( xKey->getKeyName() == OUString( RTL_CONSTASCII_USTRINGPARAM("/Test/ThirdKey/FirstSubKey/ThirdSubSubKey") ),
+ OSL_ENSURE( xKey->getKeyName() == OUString( "/Test/ThirdKey/FirstSubKey/ThirdSubSubKey" ),
"test_DefaultRegistry error 24" );
}
- xKey = xRootKey->openKey(OUString( RTL_CONSTASCII_USTRINGPARAM("Test") ));
+ xKey = xRootKey->openKey(OUString( "Test" ));
OSL_ENSURE( xKey->isValid(), "test_DefaultRegistry error 25" );
- xRootKey->deleteKey(OUString( RTL_CONSTASCII_USTRINGPARAM("Test") ));
+ xRootKey->deleteKey(OUString( "Test" ));
if (bMergeDifferently)
{
mergeKeys(
xReg,
- OUString( RTL_CONSTASCII_USTRINGPARAM("AllFromTestreg2") ),
+ OUString( "AllFromTestreg2" ),
testreg2);
}
else
{
- xReg->mergeKey(OUString( RTL_CONSTASCII_USTRINGPARAM("AllFromTestreg2") ),
+ xReg->mergeKey(OUString( "AllFromTestreg2" ),
testreg2);
}
- xKey = xRootKey->openKey(OUString( RTL_CONSTASCII_USTRINGPARAM("/AllFromTestreg2/ThirdKey/FirstSubKey") ));
+ xKey = xRootKey->openKey(OUString( "/AllFromTestreg2/ThirdKey/FirstSubKey" ));
if (xKey.is())
{
- xRootKey->deleteKey(OUString( RTL_CONSTASCII_USTRINGPARAM("/AllFromTestreg2") ));
+ xRootKey->deleteKey(OUString( "/AllFromTestreg2" ));
}
}
@@ -660,13 +660,13 @@ void test_DefaultRegistry(
SAL_IMPLEMENT_MAIN()
{
// setStarUserRegistry();
- setLinkInDefaultRegistry(OUString(RTL_CONSTASCII_USTRINGPARAM("/Test/DefaultLink")),
- OUString(RTL_CONSTASCII_USTRINGPARAM("/Test/FifthKey/MyFirstLink")));
+ setLinkInDefaultRegistry(OUString("/Test/DefaultLink"),
+ OUString("/Test/FifthKey/MyFirstLink"));
- OUString reg1( RTL_CONSTASCII_USTRINGPARAM("testreg1.rdb") );
- OUString reg2( RTL_CONSTASCII_USTRINGPARAM("testreg2.rdb") );
- OUString areg1( RTL_CONSTASCII_USTRINGPARAM("atestreg1.rdb") );
- OUString areg2( RTL_CONSTASCII_USTRINGPARAM("atestreg2.rdb") );
+ OUString reg1( "testreg1.rdb" );
+ OUString reg2( "testreg2.rdb" );
+ OUString areg1( "atestreg1.rdb" );
+ OUString areg2( "atestreg2.rdb" );
test_SimpleRegistry( reg1, reg2 );
test_DefaultRegistry( reg1, reg2 );
diff --git a/stoc/test/testsmgr_cpnt.cxx b/stoc/test/testsmgr_cpnt.cxx
index 6672ef374f36..34f4b4c3703a 100644
--- a/stoc/test/testsmgr_cpnt.cxx
+++ b/stoc/test/testsmgr_cpnt.cxx
@@ -79,7 +79,7 @@ Reference<XMultiServiceFactory> getProcessServiceManager()
{
MutexGuard aGuard( Mutex::getGlobalMutex() );
if (! s_x.is())
- s_x = createRegistryServiceFactory( OUString(RTL_CONSTASCII_USTRINGPARAM("stoctest.rdb")), sal_False );
+ s_x = createRegistryServiceFactory( OUString("stoctest.rdb"), sal_False );
}
return s_x;
}
@@ -143,7 +143,7 @@ Reference < XInterface > SAL_CALL Test_Manager_Impl_CreateInstance(
//
OUString Test_Manager_Impl::getImplementationName() throw()
{
- return OUString(RTL_CONSTASCII_USTRINGPARAM(IMPLEMENTATION_NAME));
+ return OUString(IMPLEMENTATION_NAME);
}
//*************************************************************************
@@ -173,8 +173,8 @@ Sequence< OUString > Test_Manager_Impl::getSupportedServiceNames(void) throw ()
Sequence< OUString > Test_Manager_Impl::getSupportedServiceNames_Static(void) throw ()
{
Sequence< OUString > aSNS( 2 );
- aSNS.getArray()[0] = OUString(RTL_CONSTASCII_USTRINGPARAM(SERVICE_NAME));
- aSNS.getArray()[1] = OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.bridge.Bridge"));
+ aSNS.getArray()[0] = OUString(SERVICE_NAME);
+ aSNS.getArray()[1] = OUString("com.sun.star.bridge.Bridge");
return aSNS;
}
@@ -197,9 +197,7 @@ extern "C" void SAL_CALL test_ServiceManager()
#if ! defined SAL_DLLPREFIX
#define SAL_DLLPREFIX ""
#endif
- OUString atUModule2 = OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- SAL_DLLPREFIX "testsmgr_component" SAL_DLLEXTENSION ) );
+ OUString atUModule2 = OUString( SAL_DLLPREFIX "testsmgr_component" SAL_DLLEXTENSION );
// expand shared library name
OString atModule2( OUStringToOString(atUModule2, RTL_TEXTENCODING_ASCII_US) );
@@ -211,7 +209,7 @@ extern "C" void SAL_CALL test_ServiceManager()
Reference<XContentEnumerationAccess> xContEnum(xSMgr, UNO_QUERY);
OSL_ENSURE( xContEnum.is() , "query on XContentEnumerationAccess failed" );
- Reference<XEnumeration > xEnum(xContEnum->createContentEnumeration(OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.registry.SimpleRegistry"))));
+ Reference<XEnumeration > xEnum(xContEnum->createContentEnumeration(OUString("com.sun.star.registry.SimpleRegistry")));
OSL_ENSURE( xEnum.is() , "createContentEnumeration failed" );
sal_Int32 nLen = 0;
while( xEnum->hasMoreElements() )
@@ -236,33 +234,33 @@ extern "C" void SAL_CALL test_ServiceManager()
OSL_ENSURE( nLen == 8, "more than 6 factories" );
// try to get an instance for a unknown service
- OSL_VERIFY( !xSMgr->createInstance(OUString(RTL_CONSTASCII_USTRINGPARAM("bla.blup.Q"))).is() );
+ OSL_VERIFY( !xSMgr->createInstance(OUString("bla.blup.Q")).is() );
//
// First test : register service via the internal function of the component itself
//
{
Reference< XImplementationRegistration >
- xInst( xSMgr->createInstance(OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.registry.ImplementationRegistration"))), UNO_QUERY );
+ xInst( xSMgr->createInstance(OUString("com.sun.star.registry.ImplementationRegistration")), UNO_QUERY );
OSL_ENSURE( xInst.is(), "no ImplementationRegistration" );
try {
// register the services via writeComponentRegInfo (see at end of this file)
- xInst->registerImplementation(OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.loader.SharedLibrary")), atUModule2, Reference< XSimpleRegistry >() );
+ xInst->registerImplementation(OUString("com.sun.star.loader.SharedLibrary"), atUModule2, Reference< XSimpleRegistry >() );
}
catch(const CannotRegisterImplementationException &) {
OSL_ENSURE( 0, "register implementation failed" );
}
// getImplementations() check
- Sequence<OUString> seqImpl = xInst->getImplementations(OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.loader.SharedLibrary")), atUModule2);
+ Sequence<OUString> seqImpl = xInst->getImplementations(OUString("com.sun.star.loader.SharedLibrary"), atUModule2);
OSL_ENSURE( seqImpl.getLength() == 1, "count of implementantions is wrong" );
- OSL_ENSURE( seqImpl.getConstArray()[0] == OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.DummyService.V10")), "implementation name is not equal" );
+ OSL_ENSURE( seqImpl.getConstArray()[0] == OUString("com.sun.star.DummyService.V10"), "implementation name is not equal" );
// tests, if a service provider can be instantiated.
- Reference< XInterface > xIFace(xSMgr->createInstance(OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ts.TestManagerImpl"))));
+ Reference< XInterface > xIFace(xSMgr->createInstance(OUString("com.sun.star.ts.TestManagerImpl")));
OSL_ENSURE( xIFace.is(), "loadable service not found" );
// remove the service
@@ -290,7 +288,7 @@ sal_Bool SAL_CALL component_writeInfo(
{
Reference< XRegistryKey > xNewKey(
reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey(
- OUString( RTL_CONSTASCII_USTRINGPARAM("/" IMPLEMENTATION_NAME "/UNO/SERVICES") ) ) );
+ OUString( "/" IMPLEMENTATION_NAME "/UNO/SERVICES" ) ) );
const Sequence< OUString > & rSNL =
Test_Manager_Impl::getSupportedServiceNames_Static();
@@ -317,7 +315,7 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(
{
Reference< XSingleServiceFactory > xFactory( createSingleFactory(
reinterpret_cast< XMultiServiceFactory * >( pServiceManager ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(IMPLEMENTATION_NAME) ),
+ OUString( IMPLEMENTATION_NAME ),
Test_Manager_Impl_CreateInstance,
Test_Manager_Impl::getSupportedServiceNames_Static() ) );
diff --git a/stoc/test/uriproc/test_uriproc.cxx b/stoc/test/uriproc/test_uriproc.cxx
index 8952c79d12eb..cfa1a28895cb 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(RTL_CONSTASCII_USTRINGPARAM("")), uriRef->getPathSegment(-1));
+ rtl::OUString(""), uriRef->getPathSegment(-1));
TEST_ASSERT_EQUAL(
"testParse", i, data[i].uriReference,
rtl::OUString::createFromAscii(data[i].pathSegment0),
@@ -750,9 +750,7 @@ void Test::testVndSunStarExpand() {
{ "vnd.sun.star.expand:%5C$%5C%24%5C%5C", "$$\\" } };
css::uno::Reference< css::util::XMacroExpander > expander(
m_context->getValueByName(
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "/singletons/com.sun.star.util.theMacroExpander"))),
+ rtl::OUString( "/singletons/com.sun.star.util.theMacroExpander")),
css::uno::UNO_QUERY_THROW);
for (std::size_t i = 0; i < SAL_N_ELEMENTS(data); ++i) {
css::uno::Reference< css::uri::XUriReference > uriRef(
@@ -850,7 +848,7 @@ void Test::testVndSunStarScript() {
"testVndSunStarScript",
static_cast< double >(i)
+ static_cast< double >(j) / 10.0,
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("setParameter")),
+ ::rtl::OUString("setParameter"),
originalReference,
uriRef->getUriReference());
}
@@ -862,7 +860,7 @@ void Test::testVndSunStarScript() {
TEST_ASSERT_EQUAL(
"testVndSunStarScript",
i,
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("setName")),
+ ::rtl::OUString("setName"),
originalReference,
uriRef->getUriReference());
}
@@ -871,28 +869,26 @@ void Test::testVndSunStarScript() {
css::uno::Reference< css::uri::XUriReference > uriRef(
m_uriFactory->parse(
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "vnd.sun.star.script:Hello?location=Library.Module"))),
+ rtl::OUString( "vnd.sun.star.script:Hello?location=Library.Module")),
css::uno::UNO_SET_THROW);
css::uno::Reference< css::uri::XVndSunStarScriptUrlReference >
scriptUrl(uriRef, css::uno::UNO_QUERY_THROW);
scriptUrl->setParameter(
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "location")),
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "foo")));
+ ::rtl::OUString("location"),
+ ::rtl::OUString("foo"));
TEST_ASSERT_EQUAL(
"testVndSunStarScript", (sal_Int32)10, (sal_Int32)1,
uriRef->getUriReference(),
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "vnd.sun.star.script:Hello?location=foo")));
+ ::rtl::OUString("vnd.sun.star.script:Hello?location=foo"));
scriptUrl->setParameter(
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "language")),
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "StarBasic")));
+ ::rtl::OUString("language"),
+ ::rtl::OUString("StarBasic"));
TEST_ASSERT_EQUAL(
"testVndSunStarScript", (sal_Int32)10, (sal_Int32)2,
uriRef->getUriReference(),
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "vnd.sun.star.script:Hello?location=foo&language=StarBasic")));
+ ::rtl::OUString("vnd.sun.star.script:Hello?location=foo&language=StarBasic"));
bool caughtExpected = false;
@@ -904,8 +900,8 @@ void Test::testVndSunStarScript() {
}
TEST_ASSERT_EQUAL(
"testVndSunStarScript",
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("illegal arguments")),
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("name")),
+ ::rtl::OUString("illegal arguments"),
+ ::rtl::OUString("name"),
caughtExpected,
true);
@@ -913,15 +909,15 @@ void Test::testVndSunStarScript() {
try {
scriptUrl->setParameter(
::rtl::OUString(),
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("non-empty")));
+ ::rtl::OUString("non-empty"));
}
catch( const css::lang::IllegalArgumentException& ) {
caughtExpected = true;
}
TEST_ASSERT_EQUAL(
"testVndSunStarScript",
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("illegal arguments")),
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("parameter")),
+ ::rtl::OUString("illegal arguments"),
+ ::rtl::OUString("parameter"),
caughtExpected,
true);
}