diff options
author | Eike Rathke <erack@redhat.com> | 2018-02-07 22:21:51 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-02-09 11:18:05 +0100 |
commit | 04835fd953d28e44843e9473be4f4d99a24eddf0 (patch) | |
tree | b21ea1ec2197f7edd852b4fd213f9b5be80f8756 | |
parent | 2758c87e0483ca80a388f0ce00f785c65ad94af5 (diff) |
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
(cherry picked from commit 30083601334279f33a3021dfe7d22970d02c8e9e)
Reviewed-on: https://gerrit.libreoffice.org/49396
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | sc/source/core/tool/compiler.cxx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx index 3c6365a5e7c6..cf1a5b0eb01a 100644 --- a/sc/source/core/tool/compiler.cxx +++ b/sc/source/core/tool/compiler.cxx @@ -4274,6 +4274,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 )) |