diff options
author | Noel Grandin <noel@peralex.com> | 2013-11-04 14:00:40 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-11-11 11:21:26 +0200 |
commit | e52779d2f8722c713f72aedbf475267440d729f0 (patch) | |
tree | 0f2f15b2a7645e0b75f8057c96c90e05e1a6e7df /cppuhelper | |
parent | remove unnecessary use of OUString constructor in BASIC module (diff) | |
download | core-e52779d2f8722c713f72aedbf475267440d729f0.tar.gz core-e52779d2f8722c713f72aedbf475267440d729f0.zip |
remove unnecessary use of OUString constructor
Change-Id: Ifb220af71857ddacd64e8204fb6d3e4aad8eef71
Diffstat (limited to 'cppuhelper')
-rw-r--r-- | cppuhelper/source/factory.cxx | 4 | ||||
-rw-r--r-- | cppuhelper/test/testhelper.cxx | 2 | ||||
-rw-r--r-- | cppuhelper/test/testpropshlp.cxx | 40 |
3 files changed, 23 insertions, 23 deletions
diff --git a/cppuhelper/source/factory.cxx b/cppuhelper/source/factory.cxx index f005337db8ce..aff6a5480507 100644 --- a/cppuhelper/source/factory.cxx +++ b/cppuhelper/source/factory.cxx @@ -810,9 +810,9 @@ Reference< XInterface > ORegistryFactoryHelper::createModuleFactory() { aActivatorName = aLocation.copy( 0, nPos ); if( aActivatorName.compareToAscii( "java" ) == 0 ) - aActivatorName = OUString("com.sun.star.loader.Java"); + aActivatorName = "com.sun.star.loader.Java"; else if( aActivatorName.compareToAscii( "module" ) == 0 ) - aActivatorName = OUString("com.sun.star.loader.SharedLibrary"); + aActivatorName = "com.sun.star.loader.SharedLibrary"; aLocation = aLocation.copy( nPos + 3 ); } } diff --git a/cppuhelper/test/testhelper.cxx b/cppuhelper/test/testhelper.cxx index 30df8637ff43..0fbd0caf96aa 100644 --- a/cppuhelper/test/testhelper.cxx +++ b/cppuhelper/test/testhelper.cxx @@ -61,7 +61,7 @@ SAL_IMPLEMENT_MAIN() ContextEntry_Init aEntry; aEntry.bLateInitService = false; - aEntry.name = OUString("bla, bla"); + aEntry.name = "bla, bla"; aEntry.value = makeAny( (sal_Int32)5 ); Reference< XComponentContext > xContext( createComponentContext( &aEntry, 1, xInitialContext ) ); OSL_ASSERT( xContext->getServiceManager() != xMgr ); // must be wrapped one diff --git a/cppuhelper/test/testpropshlp.cxx b/cppuhelper/test/testpropshlp.cxx index 7783e801a3bf..a20413461a5d 100644 --- a/cppuhelper/test/testpropshlp.cxx +++ b/cppuhelper/test/testpropshlp.cxx @@ -277,10 +277,10 @@ void test_PropertyArrayHelper() Sequence< OUString > aS( 4 ); sal_Int32 Handles[4]; // muss sortiert sein - aS.getArray()[0] = OUString("a"); - aS.getArray()[1] = OUString("d"); - aS.getArray()[2] = OUString("f"); - aS.getArray()[3] = OUString("t"); + aS[0] = "a"; + aS[1] = "d"; + aS[2] = "f"; + aS[3] = "t"; sal_Int32 nHitCount = a1.fillHandles( Handles, aS ); OSL_ENSURE( nHitCount == 3, "wrong number of hits " ); OSL_ENSURE( Handles[0] == getPropertyTable1()[0].Handle, "Handle not correct" ); @@ -806,9 +806,9 @@ void test_PropertySetHelper() xPS->addPropertyChangeListener( OUString("INT16"), xPS_L ); Sequence<OUString> szPN( 3 ); - szPN.getArray()[0] = OUString("BOOL"); - szPN.getArray()[1] = OUString("INT32"); - szPN.getArray()[2] = OUString("Does not exist"); // must ne ignored by the addPropertiesChangeListener method + szPN[0] = "BOOL"; + szPN[1] = "INT32"; + szPN[2] = "Does not exist"; // must ne ignored by the addPropertiesChangeListener method pPS->addPropertiesChangeListener( szPN, x1 ); szPN = Sequence<OUString>(); @@ -851,8 +851,8 @@ void test_PropertySetHelper() xPS->addPropertyChangeListener( OUString("INT16"), xPS_L ); Sequence<OUString> szPN( 2 ); - szPN.getArray()[0] = OUString("BOOL"); - szPN.getArray()[1] = OUString("INT32"); + szPN[0] = "BOOL"; + szPN[1] = "INT32"; pPS->addPropertiesChangeListener( szPN, x1 ); szPN = Sequence<OUString>(); pPS->addPropertiesChangeListener( szPN, x1 ); @@ -1022,9 +1022,9 @@ void test_PropertySetHelper() OSL_ENSURE( 66 == n32, "PropertySetHelper: wrong INT32 value" ); Sequence< OUString >valueNames = Sequence<OUString>( 3 ); - valueNames.getArray()[0] = OUString("BOOL"); - valueNames.getArray()[1] = OUString("INT16"); - valueNames.getArray()[2] = OUString("INT32"); + valueNames[0] = "BOOL"; + valueNames[1] = "INT16"; + valueNames[2] = "INT32"; Sequence< Any > aValues = pPS->getPropertyValues( valueNames ); b = *((sal_Bool*)aValues.getConstArray()[0].getValue()); @@ -1095,10 +1095,10 @@ void test_PropertySetHelper() pPS->addVetoableChangeListener( OUString("INT16") , x2 ); Sequence<OUString> szPN( 4 ); - szPN.getArray()[0] = OUString("BOOL"); - szPN.getArray()[1] = OUString("INT32"); - szPN.getArray()[2] = OUString("Does not exist"); // must ne ignored by the addPropertiesChangeListener method - szPN.getArray()[3] = OUString("INT16"); + szPN[0] = "BOOL"; + szPN[1] = "INT32"; + szPN[2] = "Does not exist"; // must ne ignored by the addPropertiesChangeListener method + szPN[3] = "INT16"; pPS->addPropertiesChangeListener( szPN, x1 ); pPS_L->nCount = 6; @@ -1114,8 +1114,8 @@ void test_PropertySetHelper() pPS_L->pExceptedListenerValues[5] <<= (sal_Int32) 44; // new value bound szPN = Sequence<OUString>( 2 ); - szPN.getArray()[0] = OUString("INT16"); - szPN.getArray()[1] = OUString("INT32"); + szPN[0] = "INT16"; + szPN[1] = "INT32"; Sequence< Any > aValues( 2 ); aValues.getArray()[0] <<= (sal_Int16) 22; aValues.getArray()[1] <<= (sal_Int16) 44; @@ -1136,8 +1136,8 @@ void test_PropertySetHelper() //vetoable exception with multible - szPN.getArray()[0] = OUString("INT16"); - szPN.getArray()[1] = OUString("INT16"); + szPN[0] = "INT16"; + szPN[1] = "INT16"; pPS->nINT32 = 0; pPS->nINT16 = 0; pPS_L->nCount = 4; |