[Libreoffice-commits] core.git: Branch 'libreoffice-4-4' - sc/source

Eike Rathke erack at redhat.com
Tue Jun 30 04:42:55 PDT 2015


 sc/source/core/tool/compiler.cxx |   12 ++++++++++++
 1 file changed, 12 insertions(+)

New commits:
commit fb799a2f6fc21bde34cd36763f6003b845c6a093
Author: Eike Rathke <erack at redhat.com>
Date:   Thu Jun 25 22:54:37 2015 +0200

    tdf#44419 in second reference part stop number parsing at separator
    
    Change-Id: I70218bc41df0d56ab42d652aa7ac51733dc06f4b
    (cherry picked from commit 71dba79c1c84d693a59c53a8965caef0ddd1c2cc)
    Reviewed-on: https://gerrit.libreoffice.org/16496
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index f192230..cef2cf7 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -2367,6 +2367,18 @@ Label_MaskStateMachine:
             }
             else
             {
+                // When having parsed a second reference part, ensure that the
+                // i18n parser did not mistakingly parse a number that included
+                // a separator which happened to be meant as a parameter
+                // separator instead.
+                if (mnRangeOpPosInSymbol >= 0 && (aRes.TokenType & KParseType::ASC_NUMBER))
+                {
+                    for (sal_Int32 i = nSrcPos; i < aRes.EndPos; ++i)
+                    {
+                        if (pStart[i] == cSep)
+                            aRes.EndPos = i;    // also ends for
+                    }
+                }
                 aSymbol.append( pStart + nSrcPos, aRes.EndPos - nSrcPos);
                 nSrcPos = aRes.EndPos;
                 c = pStart[nSrcPos];


More information about the Libreoffice-commits mailing list