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

Eike Rathke erack at redhat.com
Wed Feb 7 21:25:38 UTC 2018


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

New commits:
commit 30083601334279f33a3021dfe7d22970d02c8e9e
Author: Eike Rathke <erack at redhat.com>
Date:   Wed Feb 7 22:21:51 2018 +0100

    tdf#115493 postpone name resolution after unsuccessful IsNamedRange()
    
    ... for names used in named expressions when compiling during
    import and collecting named expressions, to not match an arbitrary
    other name.
    
    Change-Id: I02a92747a1485b46873281de98879a89385d4622

diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index b029b560e5d5..68e814e23c44 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -4275,6 +4275,15 @@ bool ScCompiler::NextNewToken( bool bInArray )
 
         if (IsNamedRange( aUpper ))
             return true;
+
+        // Compiling a named expression during collecting them in import shall
+        // not match arbitrary names that otherwise if all named expressions
+        // were present would be recognized as named expression. Such name will
+        // flag an error below and will be recompiled in a second step later
+        // with ScRangeData::CompileUnresolvedXML()
+        if (meExtendedErrorDetection == EXTENDED_ERROR_DETECTION_NAME_NO_BREAK && pDoc->IsImportingXML())
+            break;  // while
+
         // Preserve case of file names in external references.
         bool bInvalidExternalNameRange;
         if (IsExternalNamedRange( aOrg, bInvalidExternalNameRange ))


More information about the Libreoffice-commits mailing list