diff options
author | Noel Grandin <noel@peralex.com> | 2013-11-20 10:05:20 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-11-20 10:07:32 +0200 |
commit | 1730df0127ff230cf6c89f4815f5b59c8603fa2b (patch) | |
tree | 4d5b32ea155c173fe3cfd905bb148e0998286d9a /idl | |
parent | 52bbd9cc00b5a1e15e4f96b5c5fa5e75855692c1 (diff) |
remove unnecessary RTL_CONSTASCII_STRINGPARAM in OString::append
Convert code like:
aOStringBuf.append( RTL_CONSTASCII_STRINGPARAM( " is missing )") );
to:
aOStringBuf.append( " is missing )" );
which compiles down to the same code.
Change-Id: I3d8ed0cbf96a881686524a167412d5f303c06b71
Diffstat (limited to 'idl')
-rw-r--r-- | idl/source/objects/bastype.cxx | 12 | ||||
-rw-r--r-- | idl/source/objects/object.cxx | 10 | ||||
-rw-r--r-- | idl/source/objects/types.cxx | 10 | ||||
-rw-r--r-- | idl/source/prj/database.cxx | 19 |
4 files changed, 23 insertions, 28 deletions
diff --git a/idl/source/objects/bastype.cxx b/idl/source/objects/bastype.cxx index 5678a6500643..171c32cc78ce 100644 --- a/idl/source/objects/bastype.cxx +++ b/idl/source/objects/bastype.cxx @@ -172,7 +172,7 @@ OString SvBOOL::GetSvIdlString( SvStringHashEntry * pName ) return pName->GetName(); return OStringBuffer(pName->GetName()). - append(RTL_CONSTASCII_STRINGPARAM("(FALSE)")). + append("(FALSE)"). makeStringAndClear(); } @@ -239,9 +239,8 @@ sal_Bool SvNumberIdentifier::ReadSvIdl( SvIdlDataBase & rBase, } else { - OStringBuffer aStr(RTL_CONSTASCII_STRINGPARAM( - "no value for identifier <")); - aStr.append(getString()).append(RTL_CONSTASCII_STRINGPARAM("> ")); + OStringBuffer aStr("no value for identifier <"); + aStr.append(getString()).append("> "); rBase.SetError( aStr.makeStringAndClear(), rInStm.GetToken() ); rBase.WriteError( rInStm ); } @@ -266,9 +265,8 @@ sal_Bool SvNumberIdentifier::ReadSvIdl( SvIdlDataBase & rBase, } else { - OStringBuffer aStr(RTL_CONSTASCII_STRINGPARAM( - "no value for identifier <")); - aStr.append(getString()).append(RTL_CONSTASCII_STRINGPARAM("> ")); + OStringBuffer aStr("no value for identifier <"); + aStr.append(getString()).append("> "); rBase.SetError( aStr.makeStringAndClear(), rInStm.GetToken() ); rBase.WriteError( rInStm ); } diff --git a/idl/source/objects/object.cxx b/idl/source/objects/object.cxx index e265af7255db..d826561fd838 100644 --- a/idl/source/objects/object.cxx +++ b/idl/source/objects/object.cxx @@ -329,9 +329,9 @@ sal_Bool SvMetaClass::TestAttribute( SvIdlDataBase & rBase, SvTokenStream & rInS OSL_FAIL( pS->GetSlotId().getString().getStr() ); OSL_FAIL( rAttr.GetSlotId().getString().getStr() ); - OStringBuffer aStr(RTL_CONSTASCII_STRINGPARAM("Attribute's ")); + OStringBuffer aStr("Attribute's "); aStr.append(pS->GetName().getString()); - aStr.append(RTL_CONSTASCII_STRINGPARAM(" with different id's")); + aStr.append(" with different id's"); rBase.SetError(aStr.makeStringAndClear(), rInStm.GetToken()); rBase.WriteError( rInStm ); return sal_False; @@ -348,11 +348,11 @@ sal_Bool SvMetaClass::TestAttribute( SvIdlDataBase & rBase, SvTokenStream & rInS OSL_FAIL( pS->GetSlotId().getString().getStr() ); OSL_FAIL( rAttr.GetSlotId().getString().getStr() ); - OStringBuffer aStr(RTL_CONSTASCII_STRINGPARAM("Attribute ")); + OStringBuffer aStr("Attribute "); aStr.append(pS->GetName().getString()); - aStr.append(RTL_CONSTASCII_STRINGPARAM(" and Attribute ")); + aStr.append(" and Attribute "); aStr.append(rAttr.GetName().getString()); - aStr.append(RTL_CONSTASCII_STRINGPARAM(" with equal id's")); + aStr.append(" with equal id's"); rBase.SetError(aStr.makeStringAndClear(), rInStm.GetToken()); rBase.WriteError( rInStm ); return sal_False; diff --git a/idl/source/objects/types.cxx b/idl/source/objects/types.cxx index 5bdd292e9178..15b835f9f67e 100644 --- a/idl/source/objects/types.cxx +++ b/idl/source/objects/types.cxx @@ -871,7 +871,7 @@ void SvMetaType::SetType( int nT ) else if( nType == TYPE_CLASS ) { OStringBuffer aTmp(C_PREF); - aTmp.append(RTL_CONSTASCII_STRINGPARAM("Object *")); + aTmp.append("Object *"); aCName.setString(aTmp.makeStringAndClear()); } } @@ -901,7 +901,7 @@ const OString& SvMetaType::GetBasicName() const OString SvMetaType::GetBasicPostfix() const { // MBN and Co always want "As xxx" - return OStringBuffer(RTL_CONSTASCII_STRINGPARAM(" As ")). + return OStringBuffer(" As "). append(GetBasicName()). makeStringAndClear(); } @@ -1401,10 +1401,10 @@ void SvMetaType::WriteSfxItem( const OString& rItemName, SvIdlDataBase &, SvStream & rOutStm ) { WriteStars( rOutStm ); - OStringBuffer aVarName(RTL_CONSTASCII_STRINGPARAM(" a")); - aVarName.append(rItemName).append(RTL_CONSTASCII_STRINGPARAM("_Impl")); + OStringBuffer aVarName(" a"); + aVarName.append(rItemName).append("_Impl"); - OStringBuffer aTypeName(RTL_CONSTASCII_STRINGPARAM("SfxType")); + OStringBuffer aTypeName("SfxType"); OStringBuffer aAttrArray; sal_uLong nAttrCount = MakeSfx( aAttrArray ); OString aAttrCount( diff --git a/idl/source/prj/database.cxx b/idl/source/prj/database.cxx index 474b70a70c49..b42c5728930c 100644 --- a/idl/source/prj/database.cxx +++ b/idl/source/prj/database.cxx @@ -231,8 +231,7 @@ sal_Bool SvIdlDataBase::ReadIdFile( const OUString & rFileName ) aDefName = pTok->GetString(); else { - OString aStr(RTL_CONSTASCII_STRINGPARAM( - "unexpected token after define")); + OString aStr("unexpected token after define"); // set error SetError( aStr, pTok ); WriteError( aTokStm ); @@ -288,7 +287,7 @@ sal_Bool SvIdlDataBase::ReadIdFile( const OUString & rFileName ) { if( !InsertId( aDefName, nVal ) ) { - OString aStr(RTL_CONSTASCII_STRINGPARAM("hash table overflow: ")); + OString aStr("hash table overflow: "); SetError( aStr, pTok ); WriteError( aTokStm ); return sal_False; @@ -312,8 +311,7 @@ sal_Bool SvIdlDataBase::ReadIdFile( const OUString & rFileName ) } if( pTok->IsEof() ) { - OString aStr(RTL_CONSTASCII_STRINGPARAM( - "unexpected eof in #include")); + OString aStr("unexpected eof in #include"); // set error SetError(aStr, pTok); WriteError( aTokStm ); @@ -323,8 +321,7 @@ sal_Bool SvIdlDataBase::ReadIdFile( const OUString & rFileName ) if (!ReadIdFile(OStringToOUString(aName.toString(), RTL_TEXTENCODING_ASCII_US))) { - OStringBuffer aStr(RTL_CONSTASCII_STRINGPARAM( - "cannot read file: ")); + OStringBuffer aStr("cannot read file: "); aStr.append(aName.makeStringAndClear()); SetError(aStr.makeStringAndClear(), pTok); WriteError( aTokStm ); @@ -569,7 +566,7 @@ void SvIdlDataBase::WriteError( SvTokenStream & rInStm ) // error text if( !aError.GetText().isEmpty() ) { - aErrorText.append(RTL_CONSTASCII_STRINGPARAM("may be <")); + aErrorText.append("may be <"); aErrorText.append(aError.GetText()); } SvToken * pPrevTok = NULL; @@ -583,11 +580,11 @@ void SvIdlDataBase::WriteError( SvTokenStream & rInStm ) } // error position - aErrorText.append(RTL_CONSTASCII_STRINGPARAM("> at ( ")); + aErrorText.append("> at ( "); aErrorText.append(static_cast<sal_Int64>(aError.nLine)); - aErrorText.append(RTL_CONSTASCII_STRINGPARAM(", ")); + aErrorText.append(", "); aErrorText.append(static_cast<sal_Int64>(aError.nColumn)); - aErrorText.append(RTL_CONSTASCII_STRINGPARAM(" )")); + aErrorText.append(" )"); // reset error aError = SvIdlError(); |