[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - sc/source
Eike Rathke (via logerrit)
logerrit at kemper.freedesktop.org
Wed Jul 1 08:11:39 UTC 2020
sc/source/core/tool/compiler.cxx | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
New commits:
commit 5637b974912b29805be8af85d39086bab5697aa1
Author: Eike Rathke <erack at redhat.com>
AuthorDate: Tue Jun 30 17:28:39 2020 +0200
Commit: Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Wed Jul 1 10:11:06 2020 +0200
Resolves: tdf#131424 separator in TableRef column specifier is valid
Even only a separator or any operator single character.
Change-Id: I102dd7fd49c1a6a7f1d8c39f4a6139a51dbebe51
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97535
Reviewed-by: Eike Rathke <erack at redhat.com>
Tested-by: Jenkins
(cherry picked from commit f02207acc00787f29bc9e8992b1e2f3a182de43c)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97506
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index 9cdc0c8fc427..6e12d8100ed3 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -2106,6 +2106,8 @@ sal_Int32 ScCompiler::NextSymbol(bool bInArray)
case ssSkipString:
case ssGetReference:
case ssSkipReference:
+ case ssGetTableRefItem:
+ case ssGetTableRefColumn:
break;
default:
if (eState == ssGetChar)
@@ -4265,12 +4267,20 @@ bool ScCompiler::NextNewToken( bool bInArray )
bMayBeFuncName = ScGlobal::getCharClassPtr()->isLetter( aTmpStr, 0 );
bAsciiNonAlnum = false;
}
- if (bAsciiNonAlnum && cSymbol[1] == 0)
+
+ // Within a TableRef anything except an unescaped '[' or ']' is an item
+ // or a column specifier, do not attempt to recognize any other single
+ // operator there so even [,] or [+] for a single character column
+ // specifier works. Note that space between two ocTableRefOpen is not
+ // supported (Table[ [ColumnSpec]]), not only here. Note also that Table[]
+ // without any item or column specifier is valid.
+ if (bAsciiNonAlnum && cSymbol[1] == 0 && (eLastOp != ocTableRefOpen || cSymbol[0] == '[' || cSymbol[0] == ']'))
{
// Shortcut for operators and separators that need no further checks or upper.
if (IsOpCode( OUString( cSymbol), bInArray ))
return true;
}
+
if ( bMayBeFuncName )
{
// a function name must be followed by a parenthesis
More information about the Libreoffice-commits
mailing list