summaryrefslogtreecommitdiff
path: root/sc/source/ui/app/inputhdl.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-04-29 12:24:31 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-04-29 18:25:31 +0200
commit04aafba860f613c20e7078d038cc83eb02de0b54 (patch)
tree8153152b87089419bde17313d9ac7b9de6fcce32 /sc/source/ui/app/inputhdl.cxx
parent76c793d2acf66f46e9edcda43d2f4327e8374841 (diff)
loplugin:stringadd simplify some *StringBuffer operations
pulled from a larger patch which I created with a more permissive variant of this plugin Change-Id: I7abf1f3f09e84703b6e0e52fe9587dff691b2187 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114875 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/ui/app/inputhdl.cxx')
-rw-r--r--sc/source/ui/app/inputhdl.cxx12
1 files changed, 5 insertions, 7 deletions
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index bca87cd88aaa..69b6142d702f 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -1162,10 +1162,6 @@ void ScInputHandler::ShowArgumentsTip( OUString& rSelText )
if (nStartPosition > 0)
{
- OUStringBuffer aBuf;
- aBuf.append(aNew.subView(0, nStartPosition));
- aBuf.append(u'\x25BA');
- aBuf.append(aNew.subView(nStartPosition));
nArgs = ppFDesc->getParameterCount();
sal_Int16 nVarArgsSet = 0;
if ( nArgs >= PAIRED_VAR_ARGS )
@@ -1180,9 +1176,11 @@ void ScInputHandler::ShowArgumentsTip( OUString& rSelText )
}
if ( nVarArgsSet > 0 && nActive > nArgs )
nActive = nArgs - (nActive - nArgs) % nVarArgsSet;
- aBuf.append( " : " );
- aBuf.append( ppFDesc->getParameterDescription(nActive-1) );
- aNew = aBuf.makeStringAndClear();
+ aNew = OUString::Concat(aNew.subView(0, nStartPosition)) +
+ u"\x25BA" +
+ aNew.subView(nStartPosition) +
+ " : " +
+ ppFDesc->getParameterDescription(nActive-1);
if (eMode != SC_INPUT_TOP)
{
ShowTipBelow( aNew );