diff options
author | Laurent Balland-Poirier <laurent.balland-poirier@laposte.net> | 2016-08-12 11:59:56 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2016-08-15 10:32:36 +0000 |
commit | b1ce5db192750210b1546417494664f91759719d (patch) | |
tree | 2bc78c49073f015ce267c2fe820480d72e0d368e | |
parent | 581ea5dc351232f9b7b70bdcfe909d288298035e (diff) |
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@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
-rw-r--r-- | svl/source/numbers/zformat.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx index f7face59ccf4..d38b3f479da2 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 |