diff options
author | Muhammet Kara <muhammet.kara@pardus.org.tr> | 2016-07-01 14:07:52 +0300 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2016-07-03 15:46:58 +0000 |
commit | d5784e91e9cd83336dc16392fd65cb11c5373c9c (patch) | |
tree | d4113a679a56f6352b3ec49ad0cbe636fe9c3038 /basic | |
parent | bad68fd0b4a40062990c96a1a3f8d7a31bd84180 (diff) |
Improve readability of OUString concatanation in LibPage
, ScriptDocument
, PropBrw
, VBATest
, SbUnoClass
, SbModule
, and SbiSymPool
It is more readable and more efficient as a bonus.
See: https://goo.gl/jsVAwy:
Change-Id: I73926989345193b133e538d5aeca36f12723162c
Reviewed-on: https://gerrit.libreoffice.org/26853
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'basic')
-rw-r--r-- | basic/qa/cppunit/test_vba.cxx | 12 | ||||
-rw-r--r-- | basic/source/classes/sbunoobj.cxx | 26 | ||||
-rw-r--r-- | basic/source/classes/sbxmod.cxx | 24 | ||||
-rw-r--r-- | basic/source/comp/symtbl.cxx | 6 |
4 files changed, 34 insertions, 34 deletions
diff --git a/basic/qa/cppunit/test_vba.cxx b/basic/qa/cppunit/test_vba.cxx index 83d243d21dc0..7d145e832f02 100644 --- a/basic/qa/cppunit/test_vba.cxx +++ b/basic/qa/cppunit/test_vba.cxx @@ -69,8 +69,8 @@ void VBATest::testMiscVBAFunctions() for ( sal_uInt32 i=0; i<SAL_N_ELEMENTS( macroSource ); ++i ) { - OUString sMacroURL( sMacroPathURL ); - sMacroURL += OUString::createFromAscii( macroSource[ i ] ); + OUString sMacroURL = sMacroPathURL + + OUString::createFromAscii( macroSource[ i ] ); MacroSnippet myMacro; myMacro.LoadSourceFromFile( sMacroURL ); @@ -133,16 +133,16 @@ void VBATest::testMiscOLEStuff() uno::Sequence< uno::Any > aArgs(1); // path to test document - OUString sPath = m_directories.getPathFromSrc("/basic/qa/vba_tests/data/"); - sPath += "ADODBdata.xls"; + OUString sPath = m_directories.getPathFromSrc("/basic/qa/vba_tests/data/") + + "ADODBdata.xls"; sPath = sPath.replaceAll( "/", "\\" ); aArgs[ 0 ] = uno::makeAny( sPath ); for ( sal_uInt32 i=0; i<SAL_N_ELEMENTS( macroSource ); ++i ) { - OUString sMacroURL( sMacroPathURL ); - sMacroURL += OUString::createFromAscii( macroSource[ i ] ); + OUString sMacroURL = sMacroPathURL + + OUString::createFromAscii( macroSource[ i ] ); MacroSnippet myMacro; myMacro.LoadSourceFromFile( sMacroURL ); SbxVariableRef pReturn = myMacro.Run( aArgs ); diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx index 6622cde095f4..cc1b6aa9706f 100644 --- a/basic/source/classes/sbunoobj.cxx +++ b/basic/source/classes/sbunoobj.cxx @@ -3396,9 +3396,9 @@ SbxVariable* SbUnoClass::Find( const OUString& rName, SbxClassType ) else { // expand fully qualified name - OUString aNewName = GetName(); - aNewName += "."; - aNewName += rName; + OUString aNewName = GetName() + + "." + + rName; // get CoreReflection Reference< XIdlReflection > xCoreReflection = getCoreReflection_Impl(); @@ -3808,8 +3808,8 @@ void SbUnoSingleton::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) Any aRetAny; if( xContextToUse.is() ) { - OUString aSingletonName( "/singletons/" ); - aSingletonName += GetName(); + OUString aSingletonName = "/singletons/" + + GetName(); Reference < XInterface > xRet; xContextToUse->getValueByName( aSingletonName ) >>= xRet; aRetAny <<= xRet; @@ -4306,9 +4306,9 @@ void SAL_CALL ModuleInvocationProxy::setValue(const OUString& rProperty, const A SolarMutexGuard guard; - OUString aPropertyFunctionName( "Property Set " ); - aPropertyFunctionName += m_aPrefix; - aPropertyFunctionName += rProperty; + OUString aPropertyFunctionName = "Property Set " + + m_aPrefix + + rProperty; SbxVariable* p = m_xScopeObj->Find( aPropertyFunctionName, SbxClassType::Method ); SbMethod* pMeth = p != nullptr ? dynamic_cast<SbMethod*>( p ) : nullptr; @@ -4345,9 +4345,9 @@ Any SAL_CALL ModuleInvocationProxy::getValue(const OUString& rProperty) } SolarMutexGuard guard; - OUString aPropertyFunctionName( "Property Get " ); - aPropertyFunctionName += m_aPrefix; - aPropertyFunctionName += rProperty; + OUString aPropertyFunctionName = "Property Get " + + m_aPrefix + + rProperty; SbxVariable* p = m_xScopeObj->Find( aPropertyFunctionName, SbxClassType::Method ); SbMethod* pMeth = p != nullptr ? dynamic_cast<SbMethod*>( p ) : nullptr; @@ -4390,8 +4390,8 @@ Any SAL_CALL ModuleInvocationProxy::invoke( const OUString& rFunction, { return aRet; } - OUString aFunctionName = m_aPrefix; - aFunctionName += rFunction; + OUString aFunctionName = m_aPrefix + + rFunction; bool bSetRescheduleBack = false; bool bOldReschedule = true; diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx index f36b9bfee42c..1e59c1373474 100644 --- a/basic/source/classes/sbxmod.cxx +++ b/basic/source/classes/sbxmod.cxx @@ -742,8 +742,8 @@ void SbModule::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) if( pHint->GetId() == SBX_HINT_DATAWANTED ) { - OUString aProcName("Property Get "); - aProcName += pProcProperty->GetName(); + OUString aProcName = "Property Get " + + pProcProperty->GetName(); SbxVariable* pMethVar = Find( aProcName, SbxClassType::Method ); if( pMethVar ) @@ -784,14 +784,14 @@ void SbModule::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) { pProcProperty->setSet( false ); - OUString aProcName("Property Set "); - aProcName += pProcProperty->GetName(); + OUString aProcName = "Property Set " + + pProcProperty->GetName(); pMethVar = Find( aProcName, SbxClassType::Method ); } if( !pMethVar ) // Let { - OUString aProcName("Property Let " ); - aProcName += pProcProperty->GetName(); + OUString aProcName = "Property Let " + + pProcProperty->GetName(); pMethVar = Find( aProcName, SbxClassType::Method ); } @@ -1871,8 +1871,8 @@ void SbModule::handleProcedureProperties( SfxBroadcaster& rBC, const SfxHint& rH if( pHint->GetId() == SBX_HINT_DATAWANTED ) { - OUString aProcName("Property Get "); - aProcName += pProcProperty->GetName(); + OUString aProcName = "Property Get " + + pProcProperty->GetName(); SbxVariable* pMeth = Find( aProcName, SbxClassType::Method ); if( pMeth ) @@ -1913,14 +1913,14 @@ void SbModule::handleProcedureProperties( SfxBroadcaster& rBC, const SfxHint& rH { pProcProperty->setSet( false ); - OUString aProcName("Property Set " ); - aProcName += pProcProperty->GetName(); + OUString aProcName = "Property Set " + + pProcProperty->GetName(); pMeth = Find( aProcName, SbxClassType::Method ); } if( !pMeth ) // Let { - OUString aProcName("Property Let " ); - aProcName += pProcProperty->GetName(); + OUString aProcName = "Property Let " + + pProcProperty->GetName(); pMeth = Find( aProcName, SbxClassType::Method ); } diff --git a/basic/source/comp/symtbl.cxx b/basic/source/comp/symtbl.cxx index f7e6016aa6b1..578d035042fd 100644 --- a/basic/source/comp/symtbl.cxx +++ b/basic/source/comp/symtbl.cxx @@ -160,9 +160,9 @@ void SbiSymPool::Add( SbiSymDef* pDef ) OUString aName( pDef->aName ); if( pDef->IsStatic() ) { - aName = pParser->aGblStrings.Find( nProcId ); - aName += ":"; - aName += pDef->aName; + aName = pParser->aGblStrings.Find( nProcId ) + + ":" + + pDef->aName; } pDef->nId = rStrings.Add( aName ); } |