diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-04-21 13:48:45 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-04-22 21:42:14 +0200 |
commit | 75997f13ee3a71d6c994392264b0190bd7bb6756 (patch) | |
tree | 4dc35a2e62e41d4b1f7953367419ff3fb072635f /sc/source/core | |
parent | b546af03ab9e371c70ce72562bc0a492972a8585 (diff) |
no need to create temporaries when appending number to O[U]StringBuffer
Change-Id: I36d82423b5f75010552696a66cec7e53ee265ce4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114395
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/core')
-rw-r--r-- | sc/source/core/tool/address.cxx | 2 | ||||
-rw-r--r-- | sc/source/core/tool/compiler.cxx | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/sc/source/core/tool/address.cxx b/sc/source/core/tool/address.cxx index fb086018a972..06ffd08c7d44 100644 --- a/sc/source/core/tool/address.cxx +++ b/sc/source/core/tool/address.cxx @@ -2505,7 +2505,7 @@ OUString ScAddress::GetColRowString() const case formula::FormulaGrammar::CONV_XL_A1: case formula::FormulaGrammar::CONV_XL_OOX: lcl_ScColToAlpha( aString, nCol); - aString.append(OUString::number(nRow+1)); + aString.append(nRow+1); break; case formula::FormulaGrammar::CONV_XL_R1C1: diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx index 1ee6b9ec9592..233038b90c24 100644 --- a/sc/source/core/tool/compiler.cxx +++ b/sc/source/core/tool/compiler.cxx @@ -1602,7 +1602,7 @@ struct ConventionXL_OOX : public ConventionXL_A1 static void makeExternalDocStr( OUStringBuffer& rBuffer, sal_uInt16 nFileId ) { - rBuffer.append('[').append( OUString::number( nFileId+1)).append(']'); + rBuffer.append('[').append( static_cast<sal_Int32>(nFileId+1) ).append(']'); } }; @@ -1616,10 +1616,10 @@ r1c1_add_col( OUStringBuffer &rBuf, const ScSingleRefData& rRef, const ScAddress { SCCOL nCol = rRef.Col(); if (nCol != 0) - rBuf.append("[").append(OUString::number(nCol)).append("]"); + rBuf.append("[").append(static_cast<sal_Int32>(nCol)).append("]"); } else - rBuf.append( OUString::number( rAbsRef.Col() + 1 ) ); + rBuf.append( static_cast<sal_Int32>(rAbsRef.Col() + 1) ); } static void r1c1_add_row( OUStringBuffer &rBuf, const ScSingleRefData& rRef, const ScAddress& rAbsRef ) @@ -1629,11 +1629,11 @@ r1c1_add_row( OUStringBuffer &rBuf, const ScSingleRefData& rRef, const ScAddress { if (rRef.Row() != 0) { - rBuf.append("[").append( OUString::number(rRef.Row()) ).append("]"); + rBuf.append("[").append(rRef.Row() ).append("]"); } } else - rBuf.append( OUString::number( rAbsRef.Row() + 1 ) ); + rBuf.append( rAbsRef.Row() + 1 ); } namespace { |