diff options
author | Eike Rathke <erack@redhat.com> | 2015-04-08 16:03:29 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2015-04-08 20:45:46 +0200 |
commit | 2a176c2f658f30cf8b33d9338e931ebf01fd0f3d (patch) | |
tree | a157c545291f4c7e7b29b4ff2fe2c0d0f602b70f /sc | |
parent | a01356af7f53b1cfa648ac3085f9a78cb6de4e0e (diff) |
TableRef: simplify logic a little
The #All keyword can be prefixing a column range anyway, so needs to be
treated like all other keywords.
Change-Id: Ic64a5caeff1c6b2d116b21c0c855c7207d649a8d
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/tool/compiler.cxx | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx index 7295dccd1b4e..400be9a7f3bd 100644 --- a/sc/source/core/tool/compiler.cxx +++ b/sc/source/core/tool/compiler.cxx @@ -4787,17 +4787,23 @@ bool ScCompiler::HandleTableRef() switch (eItem) { case ScTableRefToken::TABLE: - case ScTableRefToken::ALL: { - // Optional [] (or [#All]) may follow. + // Optional [] may follow. if ((bGotToken = GetToken()) && mpToken->GetOpCode() == ocTableRefOpen) { - bool bAll = ((bGotToken = GetToken()) && mpToken->GetOpCode() == ocTableRefItemAll); - if (bGotToken && (!bAll || (bGotToken = GetToken())) && mpToken->GetOpCode() == ocTableRefClose) - bGotToken = false; // get next token below + if ((bGotToken = GetToken())) + { + if (mpToken->GetOpCode() == ocTableRefClose) + bGotToken = false; // get next token below + } } } break; + case ScTableRefToken::ALL: + { + bForwardToClose = true; + } + break; case ScTableRefToken::HEADERS: { if (pDBData->HasHeader()) |