fdo#57950: Remove some chained appends in basctl

Change-Id: Ib1c14c6712848ebb28f49d50837f691531c1b5d6
Reviewed-on: https://gerrit.libreoffice.org/5479
Reviewed-by: Andrzej J.R. Hunt <andrzej@ahunt.org>
Tested-by: Andrzej J.R. Hunt <andrzej@ahunt.org>
This commit is contained in:
Jelle van der Waa
2013-08-17 21:46:26 +02:00
committed by Andrzej J.R. Hunt
parent 611fd43dd2
commit 4abb7e5c58
3 changed files with 5 additions and 15 deletions

View File

@@ -199,12 +199,7 @@ ModulWindow* Shell::CreateBasWin( const ScriptDocument& rDocument, const OUStrin
ModuleInfoHelper::getObjectName( xLib, rModName, sObjName );
if( !sObjName.isEmpty() )
{
OUStringBuffer aModNameBuf(aModName);
aModNameBuf.append(' ');
aModNameBuf.append('(');
aModNameBuf.append(sObjName);
aModNameBuf.append(')');
aModName = aModNameBuf.makeStringAndClear();
aModName += " (" + sObjName + ")";
}
}
pTabBar->InsertPage( (sal_uInt16)nKey, aModName );

View File

@@ -492,19 +492,16 @@ void TreeListBox::ImpCreateLibSubSubEntriesInVBAMode( SvTreeListEntry* pLibSubRo
// display a nice friendly name in the ObjectModule tab,
// combining the objectname and module name, e.g. Sheet1 ( Financials )
OUStringBuffer aEntryNameBuf( aModName );
OUString aEntryName = aModName;
if( eType == OBJ_TYPE_DOCUMENT_OBJECTS )
{
OUString sObjName;
ModuleInfoHelper::getObjectName( xLib, aModName, sObjName );
if( !sObjName.isEmpty() )
{
aEntryNameBuf.append( " (" );
aEntryNameBuf.append(sObjName);
aEntryNameBuf.append(')');
aEntryName += " (" + sObjName + ")";
}
}
OUString aEntryName(aEntryNameBuf.makeStringAndClear());
SvTreeListEntry* pModuleEntry = FindEntry( pLibSubRootEntry, aEntryName, OBJ_TYPE_MODULE );
if ( !pModuleEntry )
pModuleEntry = AddEntry(

View File

@@ -171,13 +171,11 @@ void ManageLanguageDialog::FillLanguageBox()
{
bool bIsDefault = localesAreEqual( aDefaultLocale, pLocale[i] );
LanguageType eLangType = LanguageTag::convertToLanguageType( pLocale[i] );
OUStringBuffer sLanguageBuf(aLangTable.GetString( eLangType ));
OUString sLanguage = aLangTable.GetString( eLangType );
if ( bIsDefault )
{
sLanguageBuf.append(' ');
sLanguageBuf.append(m_sDefLangStr);
sLanguage += " " + m_sDefLangStr;
}
OUString sLanguage(sLanguageBuf.makeStringAndClear());
sal_uInt16 nPos = m_aLanguageLB.InsertEntry( sLanguage );
m_aLanguageLB.SetEntryData( nPos, new LanguageEntry( sLanguage, pLocale[i], bIsDefault ) );
}