summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2013-01-21 17:56:25 +0100
committerPetr Mladek <pmladek@suse.cz>2013-03-04 17:09:14 +0100
commitbd05750982b42ace4bce798ec3e06e7a40cb1f4d (patch)
treeec2e83e933c2226987cac8d6042f11d500961a8d /sc
parent19c31098c4da2a84a0fa960cbf5dcea50292c456 (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: I28d2e2492bddc02c07e139edbc69595a4f3f4a63 Reviewed-on: https://gerrit.libreoffice.org/1797 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.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index 062c494af2cd..f128e0009cf5 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -3693,7 +3693,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;