summaryrefslogtreecommitdiff
path: root/basic/source/uno
diff options
context:
space:
mode:
authorMarcos Paulo de Souza <marcos.souza.org@gmail.com>2012-12-30 13:47:18 -0200
committerLuboš Luňák <l.lunak@suse.cz>2013-01-03 17:07:41 +0000
commit695f4a18e6e538f8d6080f486695e4f58f8bd574 (patch)
treef07bc6fab9e915cc4b50d2e5c94bcebf4ca4ac33 /basic/source/uno
parent87f2e713ea819d1e36084ba7813ee6671237206c (diff)
fdo#57950: Fix some chained appends in basic
Change-Id: Icac8ec992d993748a063aa95cc6f58c24fa87444 Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/1515 Reviewed-by: Luboš Luňák <l.lunak@suse.cz> Tested-by: Luboš Luňák <l.lunak@suse.cz>
Diffstat (limited to 'basic/source/uno')
-rw-r--r--basic/source/uno/namecont.cxx4
-rw-r--r--basic/source/uno/scriptcont.cxx18
2 files changed, 9 insertions, 13 deletions
diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx
index 92b38c6f3836..2a61123290e3 100644
--- a/basic/source/uno/namecont.cxx
+++ b/basic/source/uno/namecont.cxx
@@ -237,9 +237,7 @@ void NameContainer::removeByName( const OUString& aName )
NameContainerNameMap::iterator aIt = mHashMap.find( aName );
if( aIt == mHashMap.end() )
{
- OUString sMessage = OUStringBuffer().append('"')
- .append(aName).append("\" not found")
- .makeStringAndClear();
+ OUString sMessage = "\"" + aName + "\" not found";
throw NoSuchElementException(sMessage, uno::Reference< uno::XInterface >());
}
diff --git a/basic/source/uno/scriptcont.cxx b/basic/source/uno/scriptcont.cxx
index ad5849923fd1..a7f870c240ec 100644
--- a/basic/source/uno/scriptcont.cxx
+++ b/basic/source/uno/scriptcont.cxx
@@ -678,11 +678,10 @@ sal_Bool SfxScriptLibraryContainer::implStorePasswordLibrary( SfxLibrary* pLib,
if( !isLibraryElementValid( pLib->getByName( aElementName ) ) )
{
#if OSL_DEBUG_LEVEL > 0
- OStringBuffer aMessage;
- aMessage.append( "invalid library element '" );
- aMessage.append( OUStringToOString( aElementName, osl_getThreadTextEncoding() ) );
- aMessage.append( "'." );
- OSL_FAIL( aMessage.makeStringAndClear().getStr() );
+ OString aMessage = "invalid library element '" +
+ OUStringToOString( aElementName, osl_getThreadTextEncoding() ) +
+ "'.";
+ OSL_FAIL( aMessage );
#endif
continue;
}
@@ -767,11 +766,10 @@ sal_Bool SfxScriptLibraryContainer::implStorePasswordLibrary( SfxLibrary* pLib,
if( !isLibraryElementValid( pLib->getByName( aElementName ) ) )
{
#if OSL_DEBUG_LEVEL > 0
- OStringBuffer aMessage;
- aMessage.append( "invalid library element '" );
- aMessage.append( OUStringToOString( aElementName, osl_getThreadTextEncoding() ) );
- aMessage.append( "'." );
- OSL_FAIL( aMessage.makeStringAndClear().getStr() );
+ OString aMessage = "invalid library element '" +
+ OUStringToOString( aElementName, osl_getThreadTextEncoding() ) +
+ "'.";
+ OSL_FAIL( aMessage );
#endif
continue;
}