diff options
author | Eike Rathke <erack@redhat.com> | 2013-01-21 17:56:25 +0100 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2013-01-21 17:45:39 +0000 |
commit | 2883078230239b935e750e5f5b3ce7e174a4fabb (patch) | |
tree | 0f8cc2b6cff5b103d96746b434beac683c273e9b /sc | |
parent | dc62ab3a0c41fe91f776929824a7f7109508a0ae (diff) |
resolved fdo#59583 prevent inappropriate column/row label detection
If followed by '(' (with or without space inbetween) an identifier can
not be a column/row label. Prevent arbitrary content detection in case a
macro function of the same name is meant (fdo#59583) or if it wouldn't
resolve to a known function name at all, that earlier resulted in #REF!
instead of #NAME? in the case of unknown function but label found.
(cherry picked from commit aa2b8bde171bf9562536dc14b2cf81d81e31b438)
Change-Id: Ib86687bdecfcf5897f4700086fc9969cc3fab0f0
Reviewed-on: https://gerrit.libreoffice.org/1796
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/tool/compiler.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx index b6183ba58483..74c2be979849 100644 --- a/sc/source/core/tool/compiler.cxx +++ b/sc/source/core/tool/compiler.cxx @@ -3687,7 +3687,9 @@ bool ScCompiler::NextNewToken( bool bInArray ) return true; if (IsDBRange( aUpper )) return true; - if (IsColRowName( aUpper )) + // If followed by '(' (with or without space inbetween) it can not be a + // column/row label. Prevent arbitrary content detection. + if (!bMayBeFuncName && IsColRowName( aUpper )) return true; if (bMayBeFuncName && IsMacro( aUpper )) return true; |