[Libreoffice-commits] .: sc/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Sun Nov 18 19:06:30 PST 2012


 sc/source/ui/view/output2.cxx |   13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

New commits:
commit 30fa6e86a5bc4e8553f353ecbc17d4ae67874c9b
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Sun Nov 18 21:05:45 2012 -0600

    WaE : shadow variable
    
    Change-Id: I394817653afa738e7e3d19a1d82f892fb3b35c19

diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx
index 7146cd2..ac6365c 100644
--- a/sc/source/ui/view/output2.cxx
+++ b/sc/source/ui/view/output2.cxx
@@ -626,15 +626,16 @@ void ScDrawStringsVars::SetTextToWidthOrHash( ScBaseCell* pCell, long nWidth )
 
     long nMaxDigit = GetMaxDigitWidth();
     sal_uInt16 nNumDigits = static_cast<sal_uInt16>(nWidth / nMaxDigit);
-    OUString sTempOut(aString);
-    if (!pNumFormat->GetOutputString(fVal, nNumDigits, sTempOut))
     {
+        OUString sTempOut(aString);
+        if (!pNumFormat->GetOutputString(fVal, nNumDigits, sTempOut))
+        {
+            aString = sTempOut;
+            // Failed to get output string.  Bail out.
+            return;
+        }
         aString = sTempOut;
-        // Failed to get output string.  Bail out.
-        return;
     }
-    aString = sTempOut;
-
     sal_uInt8 nSignCount = 0, nDecimalCount = 0, nExpCount = 0;
     xub_StrLen nLen = aString.Len();
     sal_Unicode cDecSep = ScGlobal::GetpLocaleData()->getLocaleItem().decimalSeparator.getStr()[0];


More information about the Libreoffice-commits mailing list