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>
This commit is contained in:
committed by
Markus Mohrhard
parent
bad68fd0b4
commit
d5784e91e9
@@ -747,18 +747,18 @@ void LibPage::InsertLib()
|
|||||||
// filter
|
// filter
|
||||||
OUString aTitle(IDEResId(RID_STR_BASIC).toString());
|
OUString aTitle(IDEResId(RID_STR_BASIC).toString());
|
||||||
OUString aFilter;
|
OUString aFilter;
|
||||||
aFilter = "*.sbl;*.xlc;*.xlb" ; // library files
|
aFilter = OUString("*.sbl;*.xlc;*.xlb") // library files
|
||||||
aFilter += ";*.sdw;*.sxw;*.odt" ; // text
|
+ ";*.sdw;*.sxw;*.odt" // text
|
||||||
aFilter += ";*.vor;*.stw;*.ott" ; // text template
|
+ ";*.vor;*.stw;*.ott" // text template
|
||||||
aFilter += ";*.sgl;*.sxg;*.odm" ; // master document
|
+ ";*.sgl;*.sxg;*.odm" // master document
|
||||||
aFilter += ";*.oth" ; // html document template
|
+ ";*.oth" // html document template
|
||||||
aFilter += ";*.sdc;*.sxc;*.ods" ; // spreadsheet
|
+ ";*.sdc;*.sxc;*.ods" // spreadsheet
|
||||||
aFilter += ";*.stc;*.ots" ; // spreadsheet template
|
+ ";*.stc;*.ots" // spreadsheet template
|
||||||
aFilter += ";*.sda;*.sxd;*.odg" ; // drawing
|
+ ";*.sda;*.sxd;*.odg" // drawing
|
||||||
aFilter += ";*.std;*.otg" ; // drawing template
|
+ ";*.std;*.otg" // drawing template
|
||||||
aFilter += ";*.sdd;*.sxi;*.odp" ; // presentation
|
+ ";*.sdd;*.sxi;*.odp" // presentation
|
||||||
aFilter += ";*.sti;*.otp" ; // presentation template
|
+ ";*.sti;*.otp" // presentation template
|
||||||
aFilter += ";*.sxm;*.odf" ; // formula
|
+ ";*.sxm;*.odf" ; // formula
|
||||||
xFP->appendFilter( aTitle, aFilter );
|
xFP->appendFilter( aTitle, aFilter );
|
||||||
|
|
||||||
// set display directory and filter
|
// set display directory and filter
|
||||||
@@ -1271,8 +1271,8 @@ void LibPage::ExportAsPackage( const OUString& aLibName )
|
|||||||
const OUString strFullPath = "FullPath" ;
|
const OUString strFullPath = "FullPath" ;
|
||||||
const OUString strBasicMediaType = "application/vnd.sun.star.basic-library" ;
|
const OUString strBasicMediaType = "application/vnd.sun.star.basic-library" ;
|
||||||
|
|
||||||
OUString fullPath = aLibName;
|
OUString fullPath = aLibName
|
||||||
fullPath += "/" ;
|
+ "/" ;
|
||||||
auto attribs(::comphelper::InitPropertySequence({
|
auto attribs(::comphelper::InitPropertySequence({
|
||||||
{ strFullPath, makeAny(fullPath) },
|
{ strFullPath, makeAny(fullPath) },
|
||||||
{ strMediaType, makeAny(strBasicMediaType) }
|
{ strMediaType, makeAny(strBasicMediaType) }
|
||||||
|
@@ -1269,8 +1269,8 @@ namespace basctl
|
|||||||
sal_Int32 i = 1;
|
sal_Int32 i = 1;
|
||||||
while ( !bValid )
|
while ( !bValid )
|
||||||
{
|
{
|
||||||
aObjectName = aBaseName;
|
aObjectName = aBaseName
|
||||||
aObjectName += OUString::number( i );
|
+ OUString::number( i );
|
||||||
|
|
||||||
if ( aUsedNamesCheck.find( aObjectName ) == aUsedNamesCheck.end() )
|
if ( aUsedNamesCheck.find( aObjectName ) == aUsedNamesCheck.end() )
|
||||||
bValid = true;
|
bValid = true;
|
||||||
|
@@ -284,8 +284,8 @@ void PropBrw::implSetNewObjectSequence
|
|||||||
{
|
{
|
||||||
xObjectInspector->inspect( _rObjectSeq );
|
xObjectInspector->inspect( _rObjectSeq );
|
||||||
|
|
||||||
OUString aText = IDE_RESSTR(RID_STR_BRWTITLE_PROPERTIES);
|
OUString aText = IDE_RESSTR(RID_STR_BRWTITLE_PROPERTIES)
|
||||||
aText += IDE_RESSTR(RID_STR_BRWTITLE_MULTISELECT);
|
+ IDE_RESSTR(RID_STR_BRWTITLE_MULTISELECT);
|
||||||
SetText( aText );
|
SetText( aText );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -69,8 +69,8 @@ void VBATest::testMiscVBAFunctions()
|
|||||||
|
|
||||||
for ( sal_uInt32 i=0; i<SAL_N_ELEMENTS( macroSource ); ++i )
|
for ( sal_uInt32 i=0; i<SAL_N_ELEMENTS( macroSource ); ++i )
|
||||||
{
|
{
|
||||||
OUString sMacroURL( sMacroPathURL );
|
OUString sMacroURL = sMacroPathURL
|
||||||
sMacroURL += OUString::createFromAscii( macroSource[ i ] );
|
+ OUString::createFromAscii( macroSource[ i ] );
|
||||||
|
|
||||||
MacroSnippet myMacro;
|
MacroSnippet myMacro;
|
||||||
myMacro.LoadSourceFromFile( sMacroURL );
|
myMacro.LoadSourceFromFile( sMacroURL );
|
||||||
@@ -133,16 +133,16 @@ void VBATest::testMiscOLEStuff()
|
|||||||
|
|
||||||
uno::Sequence< uno::Any > aArgs(1);
|
uno::Sequence< uno::Any > aArgs(1);
|
||||||
// path to test document
|
// path to test document
|
||||||
OUString sPath = m_directories.getPathFromSrc("/basic/qa/vba_tests/data/");
|
OUString sPath = m_directories.getPathFromSrc("/basic/qa/vba_tests/data/")
|
||||||
sPath += "ADODBdata.xls";
|
+ "ADODBdata.xls";
|
||||||
sPath = sPath.replaceAll( "/", "\\" );
|
sPath = sPath.replaceAll( "/", "\\" );
|
||||||
|
|
||||||
aArgs[ 0 ] = uno::makeAny( sPath );
|
aArgs[ 0 ] = uno::makeAny( sPath );
|
||||||
|
|
||||||
for ( sal_uInt32 i=0; i<SAL_N_ELEMENTS( macroSource ); ++i )
|
for ( sal_uInt32 i=0; i<SAL_N_ELEMENTS( macroSource ); ++i )
|
||||||
{
|
{
|
||||||
OUString sMacroURL( sMacroPathURL );
|
OUString sMacroURL = sMacroPathURL
|
||||||
sMacroURL += OUString::createFromAscii( macroSource[ i ] );
|
+ OUString::createFromAscii( macroSource[ i ] );
|
||||||
MacroSnippet myMacro;
|
MacroSnippet myMacro;
|
||||||
myMacro.LoadSourceFromFile( sMacroURL );
|
myMacro.LoadSourceFromFile( sMacroURL );
|
||||||
SbxVariableRef pReturn = myMacro.Run( aArgs );
|
SbxVariableRef pReturn = myMacro.Run( aArgs );
|
||||||
|
@@ -3396,9 +3396,9 @@ SbxVariable* SbUnoClass::Find( const OUString& rName, SbxClassType )
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// expand fully qualified name
|
// expand fully qualified name
|
||||||
OUString aNewName = GetName();
|
OUString aNewName = GetName()
|
||||||
aNewName += ".";
|
+ "."
|
||||||
aNewName += rName;
|
+ rName;
|
||||||
|
|
||||||
// get CoreReflection
|
// get CoreReflection
|
||||||
Reference< XIdlReflection > xCoreReflection = getCoreReflection_Impl();
|
Reference< XIdlReflection > xCoreReflection = getCoreReflection_Impl();
|
||||||
@@ -3808,8 +3808,8 @@ void SbUnoSingleton::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
|
|||||||
Any aRetAny;
|
Any aRetAny;
|
||||||
if( xContextToUse.is() )
|
if( xContextToUse.is() )
|
||||||
{
|
{
|
||||||
OUString aSingletonName( "/singletons/" );
|
OUString aSingletonName = "/singletons/"
|
||||||
aSingletonName += GetName();
|
+ GetName();
|
||||||
Reference < XInterface > xRet;
|
Reference < XInterface > xRet;
|
||||||
xContextToUse->getValueByName( aSingletonName ) >>= xRet;
|
xContextToUse->getValueByName( aSingletonName ) >>= xRet;
|
||||||
aRetAny <<= xRet;
|
aRetAny <<= xRet;
|
||||||
@@ -4306,9 +4306,9 @@ void SAL_CALL ModuleInvocationProxy::setValue(const OUString& rProperty, const A
|
|||||||
|
|
||||||
SolarMutexGuard guard;
|
SolarMutexGuard guard;
|
||||||
|
|
||||||
OUString aPropertyFunctionName( "Property Set " );
|
OUString aPropertyFunctionName = "Property Set "
|
||||||
aPropertyFunctionName += m_aPrefix;
|
+ m_aPrefix
|
||||||
aPropertyFunctionName += rProperty;
|
+ rProperty;
|
||||||
|
|
||||||
SbxVariable* p = m_xScopeObj->Find( aPropertyFunctionName, SbxClassType::Method );
|
SbxVariable* p = m_xScopeObj->Find( aPropertyFunctionName, SbxClassType::Method );
|
||||||
SbMethod* pMeth = p != nullptr ? dynamic_cast<SbMethod*>( p ) : nullptr;
|
SbMethod* pMeth = p != nullptr ? dynamic_cast<SbMethod*>( p ) : nullptr;
|
||||||
@@ -4345,9 +4345,9 @@ Any SAL_CALL ModuleInvocationProxy::getValue(const OUString& rProperty)
|
|||||||
}
|
}
|
||||||
SolarMutexGuard guard;
|
SolarMutexGuard guard;
|
||||||
|
|
||||||
OUString aPropertyFunctionName( "Property Get " );
|
OUString aPropertyFunctionName = "Property Get "
|
||||||
aPropertyFunctionName += m_aPrefix;
|
+ m_aPrefix
|
||||||
aPropertyFunctionName += rProperty;
|
+ rProperty;
|
||||||
|
|
||||||
SbxVariable* p = m_xScopeObj->Find( aPropertyFunctionName, SbxClassType::Method );
|
SbxVariable* p = m_xScopeObj->Find( aPropertyFunctionName, SbxClassType::Method );
|
||||||
SbMethod* pMeth = p != nullptr ? dynamic_cast<SbMethod*>( p ) : nullptr;
|
SbMethod* pMeth = p != nullptr ? dynamic_cast<SbMethod*>( p ) : nullptr;
|
||||||
@@ -4390,8 +4390,8 @@ Any SAL_CALL ModuleInvocationProxy::invoke( const OUString& rFunction,
|
|||||||
{
|
{
|
||||||
return aRet;
|
return aRet;
|
||||||
}
|
}
|
||||||
OUString aFunctionName = m_aPrefix;
|
OUString aFunctionName = m_aPrefix
|
||||||
aFunctionName += rFunction;
|
+ rFunction;
|
||||||
|
|
||||||
bool bSetRescheduleBack = false;
|
bool bSetRescheduleBack = false;
|
||||||
bool bOldReschedule = true;
|
bool bOldReschedule = true;
|
||||||
|
@@ -742,8 +742,8 @@ void SbModule::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
|
|||||||
|
|
||||||
if( pHint->GetId() == SBX_HINT_DATAWANTED )
|
if( pHint->GetId() == SBX_HINT_DATAWANTED )
|
||||||
{
|
{
|
||||||
OUString aProcName("Property Get ");
|
OUString aProcName = "Property Get "
|
||||||
aProcName += pProcProperty->GetName();
|
+ pProcProperty->GetName();
|
||||||
|
|
||||||
SbxVariable* pMethVar = Find( aProcName, SbxClassType::Method );
|
SbxVariable* pMethVar = Find( aProcName, SbxClassType::Method );
|
||||||
if( pMethVar )
|
if( pMethVar )
|
||||||
@@ -784,14 +784,14 @@ void SbModule::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
|
|||||||
{
|
{
|
||||||
pProcProperty->setSet( false );
|
pProcProperty->setSet( false );
|
||||||
|
|
||||||
OUString aProcName("Property Set ");
|
OUString aProcName = "Property Set "
|
||||||
aProcName += pProcProperty->GetName();
|
+ pProcProperty->GetName();
|
||||||
pMethVar = Find( aProcName, SbxClassType::Method );
|
pMethVar = Find( aProcName, SbxClassType::Method );
|
||||||
}
|
}
|
||||||
if( !pMethVar ) // Let
|
if( !pMethVar ) // Let
|
||||||
{
|
{
|
||||||
OUString aProcName("Property Let " );
|
OUString aProcName = "Property Let "
|
||||||
aProcName += pProcProperty->GetName();
|
+ pProcProperty->GetName();
|
||||||
pMethVar = Find( aProcName, SbxClassType::Method );
|
pMethVar = Find( aProcName, SbxClassType::Method );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1871,8 +1871,8 @@ void SbModule::handleProcedureProperties( SfxBroadcaster& rBC, const SfxHint& rH
|
|||||||
|
|
||||||
if( pHint->GetId() == SBX_HINT_DATAWANTED )
|
if( pHint->GetId() == SBX_HINT_DATAWANTED )
|
||||||
{
|
{
|
||||||
OUString aProcName("Property Get ");
|
OUString aProcName = "Property Get "
|
||||||
aProcName += pProcProperty->GetName();
|
+ pProcProperty->GetName();
|
||||||
|
|
||||||
SbxVariable* pMeth = Find( aProcName, SbxClassType::Method );
|
SbxVariable* pMeth = Find( aProcName, SbxClassType::Method );
|
||||||
if( pMeth )
|
if( pMeth )
|
||||||
@@ -1913,14 +1913,14 @@ void SbModule::handleProcedureProperties( SfxBroadcaster& rBC, const SfxHint& rH
|
|||||||
{
|
{
|
||||||
pProcProperty->setSet( false );
|
pProcProperty->setSet( false );
|
||||||
|
|
||||||
OUString aProcName("Property Set " );
|
OUString aProcName = "Property Set "
|
||||||
aProcName += pProcProperty->GetName();
|
+ pProcProperty->GetName();
|
||||||
pMeth = Find( aProcName, SbxClassType::Method );
|
pMeth = Find( aProcName, SbxClassType::Method );
|
||||||
}
|
}
|
||||||
if( !pMeth ) // Let
|
if( !pMeth ) // Let
|
||||||
{
|
{
|
||||||
OUString aProcName("Property Let " );
|
OUString aProcName = "Property Let "
|
||||||
aProcName += pProcProperty->GetName();
|
+ pProcProperty->GetName();
|
||||||
pMeth = Find( aProcName, SbxClassType::Method );
|
pMeth = Find( aProcName, SbxClassType::Method );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -160,9 +160,9 @@ void SbiSymPool::Add( SbiSymDef* pDef )
|
|||||||
OUString aName( pDef->aName );
|
OUString aName( pDef->aName );
|
||||||
if( pDef->IsStatic() )
|
if( pDef->IsStatic() )
|
||||||
{
|
{
|
||||||
aName = pParser->aGblStrings.Find( nProcId );
|
aName = pParser->aGblStrings.Find( nProcId )
|
||||||
aName += ":";
|
+ ":"
|
||||||
aName += pDef->aName;
|
+ pDef->aName;
|
||||||
}
|
}
|
||||||
pDef->nId = rStrings.Add( aName );
|
pDef->nId = rStrings.Add( aName );
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user