diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-05-03 14:09:20 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-05-03 15:32:53 +0200 |
commit | c5a0b7af847a71fd50f713934b29305f8ce96c6b (patch) | |
tree | d7c0193bc183250c36e467f830a4327ab94dc24e /sc/source/ui/view/tabview.cxx | |
parent | d19dbcc139d18771e5e20e82a694f1512476e41c (diff) |
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 <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/ui/view/tabview.cxx')
-rw-r--r-- | sc/source/ui/view/tabview.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sc/source/ui/view/tabview.cxx b/sc/source/ui/view/tabview.cxx index b727d817e185..4fb5d812c8af 100644 --- a/sc/source/ui/view/tabview.cxx +++ b/sc/source/ui/view/tabview.cxx @@ -2410,12 +2410,12 @@ void lcl_createGroupsData( bool bGroupHidden = pEntry->IsHidden(); - rGroupsBuffer - .append("{ \"level\": ").append(sal_Int32(nLevel + 1)).append(", " - "\"index\": ").append(sal_Int32(nIndex)).append(", " - "\"startPos\": ").append(rGroupStartPositions[nLevel]).append(", " - "\"endPos\": ").append(nTotalPx).append(", " - "\"hidden\": ").append(sal_Int32(bGroupHidden ? 1 : 0)).append(" }"); + rGroupsBuffer.append( + "{ \"level\": " + OString::number(nLevel + 1) + ", " + "\"index\": " + OString::number(nIndex) + ", " + "\"startPos\": " + OString::number(rGroupStartPositions[nLevel]) + ", " + "\"endPos\": " + OString::number(nTotalPx) + ", " + "\"hidden\": " + OString::number(bGroupHidden ? 1 : 0) + " }"); // look for the next visible group control at level nLevel bool bFound = false; |