summaryrefslogtreecommitdiff
path: root/idl
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-02-11 08:38:13 +0200
committerNoel Grandin <noel@peralex.com>2016-02-11 10:01:45 +0200
commit81372804aed6d935cd917f86380ba22097613b6b (patch)
tree4611ab2ec04a3e74f99e87f007c4422a43f3527b /idl
parent4bcc7ddf78ac987dc4b9c80aab203c2e719fb5aa (diff)
simplify some OStringBuffer code
Change-Id: Ic1b0e13a8d77154fa780f6804ee36b5a5d9c7334
Diffstat (limited to 'idl')
-rw-r--r--idl/source/objects/slot.cxx4
-rw-r--r--idl/source/prj/database.cxx10
2 files changed, 4 insertions, 10 deletions
diff --git a/idl/source/objects/slot.cxx b/idl/source/objects/slot.cxx
index 49ab9cd67a30..6cdeea7a69c0 100644
--- a/idl/source/objects/slot.cxx
+++ b/idl/source/objects/slot.cxx
@@ -554,9 +554,7 @@ void SvMetaSlot::Insert( SvSlotElementList& rList, const OString& rPrefix,
static OString MakeSlotName( SvStringHashEntry * pEntry )
{
- OStringBuffer aName("SfxSlotMode::");
- aName.append(pEntry->GetName().toAsciiUpperCase());
- return aName.makeStringAndClear();
+ return "SfxSlotMode::" + pEntry->GetName().toAsciiUpperCase();
};
void SvMetaSlot::WriteSlotStubs( const OString& rShellName,
diff --git a/idl/source/prj/database.cxx b/idl/source/prj/database.cxx
index 03c82c246f1b..e647b964a502 100644
--- a/idl/source/prj/database.cxx
+++ b/idl/source/prj/database.cxx
@@ -184,11 +184,9 @@ bool SvIdlDataBase::ReadIdFile( const OUString & rFileName )
|| pTok->GetChar() == '^'
|| pTok->GetChar() == '~' )
{
- OStringBuffer aStr("unknown operator '");
- aStr.append(pTok->GetChar());
- aStr.append("'in define");
+ OString aStr = "unknown operator '" + OString(pTok->GetChar()) + "'in define";
// set error
- SetError( aStr.makeStringAndClear(), *pTok );
+ SetError( aStr, *pTok );
WriteError( aTokStm );
return false;
}
@@ -244,9 +242,7 @@ bool SvIdlDataBase::ReadIdFile( const OUString & rFileName )
if (!ReadIdFile(OStringToOUString(aName.toString(),
RTL_TEXTENCODING_ASCII_US)))
{
- OStringBuffer aStr("cannot read file: ");
- aStr.append(aName.makeStringAndClear());
- SetError(aStr.makeStringAndClear(), *pTok);
+ SetError("cannot read file: " + aName, *pTok);
WriteError( aTokStm );
return false;
}