diff options
Diffstat (limited to 'idl/source')
-rw-r--r-- | idl/source/cmptools/lex.cxx | 4 | ||||
-rw-r--r-- | idl/source/objects/object.cxx | 3 | ||||
-rw-r--r-- | idl/source/objects/types.cxx | 2 | ||||
-rw-r--r-- | idl/source/prj/database.cxx | 2 |
4 files changed, 6 insertions, 5 deletions
diff --git a/idl/source/cmptools/lex.cxx b/idl/source/cmptools/lex.cxx index 599b06136008..f479bea4c4b7 100644 --- a/idl/source/cmptools/lex.cxx +++ b/idl/source/cmptools/lex.cxx @@ -254,7 +254,7 @@ bool SvTokenStream::MakeToken( SvToken & rToken ) } else if( c == '"' ) { - OStringBuffer aStr; + OStringBuffer aStr(128); bool bDone = false; while( !bDone && !IsEof() && c ) { @@ -288,7 +288,7 @@ bool SvTokenStream::MakeToken( SvToken & rToken ) } else if( rtl::isAsciiAlpha (static_cast<unsigned char>(c)) || (c == '_') ) { - OStringBuffer aBuf; + OStringBuffer aBuf(64); while( rtl::isAsciiAlphanumeric( static_cast<unsigned char>(c) ) || c == '_' || c == ':') { diff --git a/idl/source/objects/object.cxx b/idl/source/objects/object.cxx index 4becd0240289..a424bb748044 100644 --- a/idl/source/objects/object.cxx +++ b/idl/source/objects/object.cxx @@ -209,7 +209,8 @@ void SvMetaClass::InsertSlots( SvSlotElementList& rList, std::vector<sal_uLong>& { SvClassElement& rElement = aClassElementList[n]; SvMetaClass * pCl = rElement.GetClass(); - OStringBuffer rPre(rPrefix); + OStringBuffer rPre(rPrefix.getLength() + 1 + rElement.GetPrefix().getLength()); + rPre.append(rPrefix); if( !rPre.isEmpty() && !rElement.GetPrefix().isEmpty() ) rPre.append('.'); rPre.append(rElement.GetPrefix()); diff --git a/idl/source/objects/types.cxx b/idl/source/objects/types.cxx index d79efe81fc43..34b0e3b78847 100644 --- a/idl/source/objects/types.cxx +++ b/idl/source/objects/types.cxx @@ -223,7 +223,7 @@ void SvMetaType::WriteSfxItem( WriteStars( rOutStm ); OString aVarName = " a" + rItemName + "_Impl"; - OStringBuffer aAttrArray; + OStringBuffer aAttrArray(1024); sal_uLong nAttrCount = MakeSfx( aAttrArray ); OString aAttrCount( OString::number(nAttrCount)); OString aTypeName = "SfxType" + aAttrCount; diff --git a/idl/source/prj/database.cxx b/idl/source/prj/database.cxx index f76b38687915..b63205a0911b 100644 --- a/idl/source/prj/database.cxx +++ b/idl/source/prj/database.cxx @@ -221,7 +221,7 @@ bool SvIdlDataBase::ReadIdFile( const OString& rOFileName ) else if( rTok.Is( SvHash_include() ) ) { rTok = aTokStm.GetToken_Next(); - OStringBuffer aNameBuf; + OStringBuffer aNameBuf(128); if( rTok.IsString() ) aNameBuf.append(rTok.GetString()); else if( rTok.IsChar() && rTok.GetChar() == '<' ) |