From c5a0b7af847a71fd50f713934b29305f8ce96c6b Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 3 May 2021 14:09:20 +0200 Subject: loplugin:stringadd improvement for appending numbers I was wrong, the Concat framework already optimised appending numbers by stack-allocating small buffers, so include them in the plugin Change-Id: I922edbdde273c89abfe21d51c5d25dc01c97db25 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115037 Tested-by: Jenkins Reviewed-by: Noel Grandin --- sc/source/core/tool/compiler.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sc/source/core') diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx index 9e8f8929dc12..76a60156fd16 100644 --- a/sc/source/core/tool/compiler.cxx +++ b/sc/source/core/tool/compiler.cxx @@ -1616,7 +1616,7 @@ r1c1_add_col( OUStringBuffer &rBuf, const ScSingleRefData& rRef, const ScAddress { SCCOL nCol = rRef.Col(); if (nCol != 0) - rBuf.append("[").append(static_cast(nCol)).append("]"); + rBuf.append("[" + OUString::number(nCol) + "]"); } else rBuf.append( static_cast(rAbsRef.Col() + 1) ); @@ -1629,7 +1629,7 @@ r1c1_add_row( OUStringBuffer &rBuf, const ScSingleRefData& rRef, const ScAddress { if (rRef.Row() != 0) { - rBuf.append("[").append(rRef.Row() ).append("]"); + rBuf.append("[" + OUString::number(rRef.Row()) + "]"); } } else -- cgit v1.2.3