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

Laurent Balland-Poirier laurent.balland-poirier at laposte.net
Mon Aug 15 10:33:56 UTC 2016


 svl/source/numbers/zformat.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit b1ce5db192750210b1546417494664f91759719d
Author: Laurent Balland-Poirier <laurent.balland-poirier at laposte.net>
Date:   Fri Aug 12 11:59:56 2016 +0200

    tdf#101462 tdf#79399 lcl_matchKeywordAndGetNumber returns integer
    
    This prevent [DBNumX] format codes to be recognized
    Fix in the same time tdf#79399 (import of [DBNumX] from XL)
    Do NOT fix yet tdf#79398 (export of [DBNumX] to XL)
    
    Change-Id: I08817818bf0ff30b4704bb69b2ac9aa3890c7aa6
    Reviewed-on: https://gerrit.libreoffice.org/28071
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Eike Rathke <erack at redhat.com>

diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx
index f7face5..d38b3f4 100644
--- a/svl/source/numbers/zformat.cxx
+++ b/svl/source/numbers/zformat.cxx
@@ -1455,13 +1455,13 @@ short SvNumberformat::ImpNextSymbol(OUStringBuffer& rString,
                     eState = SsGetPrefix;
                 }
                 else if ( lcl_matchKeywordAndGetNumber( aBufStr, nPos-1, aDBNum, nDBNum) &&
-                        '1' <= nDBNum && nDBNum <= '9' )
+                        1 <= nDBNum && nDBNum <= 9 )
                 {
                     sBuffSymbol.stripStart('[');
                     sBuffSymbol.append( aBufStr.copy( --nPos, aDBNum.getLength()+1 ));
                     nPos += aDBNum.getLength()+1;
                     //! SymbolType is negative
-                    eSymbolType = sal::static_int_cast< short >( BRACKET_SYMBOLTYPE_DBNUM1 - (nDBNum - '1'));
+                    eSymbolType = sal::static_int_cast< short >( BRACKET_SYMBOLTYPE_DBNUM1 - (nDBNum - 1) );
                     eState = SsGetPrefix;
                 }
                 else


More information about the Libreoffice-commits mailing list