summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLászló Németh <laszlo.nemeth@collabora.com>2015-01-30 08:58:23 +0100
committerLászló Németh <laszlo.nemeth@collabora.com>2015-01-30 08:58:23 +0100
commit99674f754323ca78ac45499439b9983b31ebd444 (patch)
tree24bcb2b38f23c4a82da9abb74bb8b852ad8d07f1
parentaac8aa2b74c6a3e2b85ecbe41068cc0ea257295b (diff)
tdf#88810 cleanup (append() for number to string conv.)
Change-Id: I800c8c4a2cb55a8d9f46a5c5cf1f79dd44051dfe
-rw-r--r--sc/source/core/tool/address.cxx22
1 files changed, 5 insertions, 17 deletions
diff --git a/sc/source/core/tool/address.cxx b/sc/source/core/tool/address.cxx
index 8fd08fa82782..69ed16ba666d 100644
--- a/sc/source/core/tool/address.cxx
+++ b/sc/source/core/tool/address.cxx
@@ -1710,21 +1710,11 @@ template <typename T > static inline void lcl_a1_append_c ( T &rString, int nCol
lcl_ScColToAlpha( rString, sal::static_int_cast<SCCOL>(nCol) );
}
-static inline void lcl_string_append_number(OUStringBuffer &rString, int nNumber)
-{
- rString.append(OUString::number( nNumber ));
-}
-
-static inline void lcl_string_append_number(OStringBuffer &rString, int nNumber)
-{
- rString.append(OString::number( nNumber ));
-}
-
template <typename T > static inline void lcl_a1_append_r ( T &rString, int nRow, bool bIsAbs )
{
if ( bIsAbs )
rString.append("$");
- lcl_string_append_number(rString, nRow+1 );
+ rString.append( nRow + 1 );
}
template <typename T > static inline void lcl_r1c1_append_c ( T &rString, int nCol, bool bIsAbs,
@@ -1733,14 +1723,13 @@ template <typename T > static inline void lcl_r1c1_append_c ( T &rString, int nC
rString.append("C");
if (bIsAbs)
{
- lcl_string_append_number(rString, nCol + 1 );
+ rString.append( nCol + 1 );
}
else
{
nCol -= rDetails.nCol;
if (nCol != 0) {
- lcl_string_append_number(rString.append("["), nCol );
- rString.append("]");
+ rString.append("[").append(nCol).append("]");
}
}
}
@@ -1751,14 +1740,13 @@ template <typename T > static inline void lcl_r1c1_append_r ( T &rString, int nR
rString.append("R");
if (bIsAbs)
{
- lcl_string_append_number(rString, nRow + 1 );
+ rString.append( nRow + 1 );
}
else
{
nRow -= rDetails.nRow;
if (nRow != 0) {
- lcl_string_append_number(rString.append("["), nRow);
- rString.append("]");
+ rString.append("[").append(nRow).append("]");
}
}
}