[Libreoffice-commits] core.git: basctl/source
Jelle van der Waa
jelle at vdwaa.nl
Sun Aug 18 06:49:29 PDT 2013
basctl/source/basicide/basides2.cxx | 7 +------
basctl/source/basicide/bastype2.cxx | 7 ++-----
basctl/source/dlged/managelang.cxx | 6 ++----
3 files changed, 5 insertions(+), 15 deletions(-)
New commits:
commit 4abb7e5c5874fd53fd4c7a758faa03fe8216a0ee
Author: Jelle van der Waa <jelle at vdwaa.nl>
Date: Sat Aug 17 21:46:26 2013 +0200
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 at ahunt.org>
Tested-by: Andrzej J.R. Hunt <andrzej at ahunt.org>
diff --git a/basctl/source/basicide/basides2.cxx b/basctl/source/basicide/basides2.cxx
index 052486c..1b09690 100644
--- a/basctl/source/basicide/basides2.cxx
+++ b/basctl/source/basicide/basides2.cxx
@@ -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 );
diff --git a/basctl/source/basicide/bastype2.cxx b/basctl/source/basicide/bastype2.cxx
index 4d2e7e9..2da3fcc 100644
--- a/basctl/source/basicide/bastype2.cxx
+++ b/basctl/source/basicide/bastype2.cxx
@@ -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(
diff --git a/basctl/source/dlged/managelang.cxx b/basctl/source/dlged/managelang.cxx
index dc5326e..de1a571 100644
--- a/basctl/source/dlged/managelang.cxx
+++ b/basctl/source/dlged/managelang.cxx
@@ -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 ) );
}
More information about the Libreoffice-commits
mailing list