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:
committed by
Andrzej J.R. Hunt
parent
611fd43dd2
commit
4abb7e5c58
@@ -199,12 +199,7 @@ ModulWindow* Shell::CreateBasWin( const ScriptDocument& rDocument, const OUStrin
|
|||||||
ModuleInfoHelper::getObjectName( xLib, rModName, sObjName );
|
ModuleInfoHelper::getObjectName( xLib, rModName, sObjName );
|
||||||
if( !sObjName.isEmpty() )
|
if( !sObjName.isEmpty() )
|
||||||
{
|
{
|
||||||
OUStringBuffer aModNameBuf(aModName);
|
aModName += " (" + sObjName + ")";
|
||||||
aModNameBuf.append(' ');
|
|
||||||
aModNameBuf.append('(');
|
|
||||||
aModNameBuf.append(sObjName);
|
|
||||||
aModNameBuf.append(')');
|
|
||||||
aModName = aModNameBuf.makeStringAndClear();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
pTabBar->InsertPage( (sal_uInt16)nKey, aModName );
|
pTabBar->InsertPage( (sal_uInt16)nKey, aModName );
|
||||||
|
@@ -492,19 +492,16 @@ void TreeListBox::ImpCreateLibSubSubEntriesInVBAMode( SvTreeListEntry* pLibSubRo
|
|||||||
|
|
||||||
// display a nice friendly name in the ObjectModule tab,
|
// display a nice friendly name in the ObjectModule tab,
|
||||||
// combining the objectname and module name, e.g. Sheet1 ( Financials )
|
// combining the objectname and module name, e.g. Sheet1 ( Financials )
|
||||||
OUStringBuffer aEntryNameBuf( aModName );
|
OUString aEntryName = aModName;
|
||||||
if( eType == OBJ_TYPE_DOCUMENT_OBJECTS )
|
if( eType == OBJ_TYPE_DOCUMENT_OBJECTS )
|
||||||
{
|
{
|
||||||
OUString sObjName;
|
OUString sObjName;
|
||||||
ModuleInfoHelper::getObjectName( xLib, aModName, sObjName );
|
ModuleInfoHelper::getObjectName( xLib, aModName, sObjName );
|
||||||
if( !sObjName.isEmpty() )
|
if( !sObjName.isEmpty() )
|
||||||
{
|
{
|
||||||
aEntryNameBuf.append( " (" );
|
aEntryName += " (" + sObjName + ")";
|
||||||
aEntryNameBuf.append(sObjName);
|
|
||||||
aEntryNameBuf.append(')');
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
OUString aEntryName(aEntryNameBuf.makeStringAndClear());
|
|
||||||
SvTreeListEntry* pModuleEntry = FindEntry( pLibSubRootEntry, aEntryName, OBJ_TYPE_MODULE );
|
SvTreeListEntry* pModuleEntry = FindEntry( pLibSubRootEntry, aEntryName, OBJ_TYPE_MODULE );
|
||||||
if ( !pModuleEntry )
|
if ( !pModuleEntry )
|
||||||
pModuleEntry = AddEntry(
|
pModuleEntry = AddEntry(
|
||||||
|
@@ -171,13 +171,11 @@ void ManageLanguageDialog::FillLanguageBox()
|
|||||||
{
|
{
|
||||||
bool bIsDefault = localesAreEqual( aDefaultLocale, pLocale[i] );
|
bool bIsDefault = localesAreEqual( aDefaultLocale, pLocale[i] );
|
||||||
LanguageType eLangType = LanguageTag::convertToLanguageType( pLocale[i] );
|
LanguageType eLangType = LanguageTag::convertToLanguageType( pLocale[i] );
|
||||||
OUStringBuffer sLanguageBuf(aLangTable.GetString( eLangType ));
|
OUString sLanguage = aLangTable.GetString( eLangType );
|
||||||
if ( bIsDefault )
|
if ( bIsDefault )
|
||||||
{
|
{
|
||||||
sLanguageBuf.append(' ');
|
sLanguage += " " + m_sDefLangStr;
|
||||||
sLanguageBuf.append(m_sDefLangStr);
|
|
||||||
}
|
}
|
||||||
OUString sLanguage(sLanguageBuf.makeStringAndClear());
|
|
||||||
sal_uInt16 nPos = m_aLanguageLB.InsertEntry( sLanguage );
|
sal_uInt16 nPos = m_aLanguageLB.InsertEntry( sLanguage );
|
||||||
m_aLanguageLB.SetEntryData( nPos, new LanguageEntry( sLanguage, pLocale[i], bIsDefault ) );
|
m_aLanguageLB.SetEntryData( nPos, new LanguageEntry( sLanguage, pLocale[i], bIsDefault ) );
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user