[Libreoffice-commits] core.git: sc/source

László Németh laszlo.nemeth at collabora.com
Fri Jan 30 00:01:49 PST 2015


 sc/source/core/tool/address.cxx |   22 +++++-----------------
 1 file changed, 5 insertions(+), 17 deletions(-)

New commits:
commit 99674f754323ca78ac45499439b9983b31ebd444
Author: László Németh <laszlo.nemeth at collabora.com>
Date:   Fri Jan 30 08:58:23 2015 +0100

    tdf#88810 cleanup (append() for number to string conv.)
    
    Change-Id: I800c8c4a2cb55a8d9f46a5c5cf1f79dd44051dfe

diff --git a/sc/source/core/tool/address.cxx b/sc/source/core/tool/address.cxx
index 8fd08fa..69ed16b 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("]");
         }
     }
 }


More information about the Libreoffice-commits mailing list