diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-08-28 15:09:33 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-08-29 09:05:18 +0200 |
commit | 4c91b89d8ce9c34179f31854dc88bd0a9fa84cba (patch) | |
tree | 1fe9cc9db455779d33c24320fedc1e25888b3e5c /sc | |
parent | a1f31211920bfae1a21ea375fa5280c9c6595e15 (diff) |
new loplugin:oustringbuffer
look for places where we are appending the temporary result of adding
strings together, to an OUStringBuffer, where we could rather call
append repeatedly and avoid the temporary creation
Change-Id: I481435124291ac7fb54b91a78344a9fe5b379a82
Reviewed-on: https://gerrit.libreoffice.org/59708
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/tool/chgtrack.cxx | 4 | ||||
-rw-r--r-- | sc/source/core/tool/compiler.cxx | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/sc/source/core/tool/chgtrack.cxx b/sc/source/core/tool/chgtrack.cxx index 149a7f016c7a..b1d8fcc18a1a 100644 --- a/sc/source/core/tool/chgtrack.cxx +++ b/sc/source/core/tool/chgtrack.cxx @@ -437,7 +437,7 @@ void ScChangeAction::GetDescription( if (GetType() == SC_CAT_MOVE) { aBuf.append( - ScResId(STR_CHANGED_MOVE_REJECTION_WARNING) + " "); + ScResId(STR_CHANGED_MOVE_REJECTION_WARNING)).append(" "); rStr = aBuf.makeStringAndClear(); return; } @@ -445,7 +445,7 @@ void ScChangeAction::GetDescription( if (IsInsertType()) { aBuf.append( - ScResId(STR_CHANGED_DELETE_REJECTION_WARNING) + " "); + ScResId(STR_CHANGED_DELETE_REJECTION_WARNING)).append(" "); rStr = aBuf.makeStringAndClear(); return; } diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx index 39a70965e205..e86e2d756e78 100644 --- a/sc/source/core/tool/compiler.cxx +++ b/sc/source/core/tool/compiler.cxx @@ -658,7 +658,7 @@ static OUString lcl_makeExternalNameStr(const OUString& rFile, const OUString& r OUStringBuffer aBuf(aFile.getLength() + aName.getLength() + 9); if (bODF) aBuf.append( '['); - aBuf.append( "'" + aFile + "'" + OUStringLiteral1(cSep)); + aBuf.append( "'" ).append( aFile ).append( "'" ).append( OUStringLiteral1(cSep) ); if (bODF) aBuf.append( "$$'" ); aBuf.append( aName); @@ -910,7 +910,7 @@ struct ConventionOOO_A1 : public Convention_A1 else aFile = INetURLObject::decode(rFileName, INetURLObject::DecodeMechanism::Unambiguous); - rBuffer.append("'" + aFile.replaceAll("'", "''") + "'#"); + rBuffer.append("'").append(aFile.replaceAll("'", "''")).append("'#"); if (!rRef.IsTabRel()) rBuffer.append('$'); |