diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-10-12 16:00:24 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-10-12 16:05:32 +0200 |
commit | 802f2a420859f6787c86a960aa331245423d5820 (patch) | |
tree | 7bb46760ca0371c958a4a36c966d253f2c59383c /idl | |
parent | e510e9893d5ce99c8dfa9478d6972469fcc339d2 (diff) |
Don't allow O[U]StringBuffer in string concatenation
...as
OStringBuffer b("foo"); b = "bar" + b;
doesn't work as one might expect (see the mail thread starting at
<https://lists.freedesktop.org/archives/libreoffice/2016-October/075464.html>
"concat of OUStringBuffer". That feature was LIBO_INTERNAL_ONLY, anyway. And
of the affected places, MethodDescriptor::getSignature
(codemaker/source/javamaker/javatype.cxx) was the only one that would actually
have benefitted.
Change-Id: Ib84266f43e40c42c2e428f0c0616db8cfa90adff
Diffstat (limited to 'idl')
-rw-r--r-- | idl/source/prj/database.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/idl/source/prj/database.cxx b/idl/source/prj/database.cxx index d001ee4a4386..2b45e6e157e2 100644 --- a/idl/source/prj/database.cxx +++ b/idl/source/prj/database.cxx @@ -220,16 +220,16 @@ bool SvIdlDataBase::ReadIdFile( const OString& rOFileName ) else if( rTok.Is( SvHash_include() ) ) { rTok = aTokStm.GetToken_Next(); - OStringBuffer aName; + OStringBuffer aNameBuf; if( rTok.IsString() ) - aName.append(rTok.GetString()); + aNameBuf.append(rTok.GetString()); else if( rTok.IsChar() && rTok.GetChar() == '<' ) { rTok = aTokStm.GetToken_Next(); while( !rTok.IsEof() && !(rTok.IsChar() && rTok.GetChar() == '>') ) { - aName.append(rTok.GetTokenAsString()); + aNameBuf.append(rTok.GetTokenAsString()); rTok = aTokStm.GetToken_Next(); } if( rTok.IsEof() ) @@ -237,7 +237,8 @@ bool SvIdlDataBase::ReadIdFile( const OString& rOFileName ) throw SvParseException("unexpected eof in #include", rTok); } } - if (!ReadIdFile(aName.toString())) + OString aName(aNameBuf.makeStringAndClear()); + if (!ReadIdFile(aName)) { throw SvParseException("cannot read file: " + aName, rTok); } |