Kaydet (Commit) 2a176c2f authored tarafından Eike Rathke's avatar Eike Rathke

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
üst a01356af
...@@ -4787,16 +4787,22 @@ bool ScCompiler::HandleTableRef() ...@@ -4787,16 +4787,22 @@ bool ScCompiler::HandleTableRef()
switch (eItem) switch (eItem)
{ {
case ScTableRefToken::TABLE: case ScTableRefToken::TABLE:
case ScTableRefToken::ALL:
{ {
// Optional [] (or [#All]) may follow. // Optional [] may follow.
if ((bGotToken = GetToken()) && mpToken->GetOpCode() == ocTableRefOpen) if ((bGotToken = GetToken()) && mpToken->GetOpCode() == ocTableRefOpen)
{ {
bool bAll = ((bGotToken = GetToken()) && mpToken->GetOpCode() == ocTableRefItemAll); if ((bGotToken = GetToken()))
if (bGotToken && (!bAll || (bGotToken = GetToken())) && mpToken->GetOpCode() == ocTableRefClose) {
if (mpToken->GetOpCode() == ocTableRefClose)
bGotToken = false; // get next token below bGotToken = false; // get next token below
} }
} }
}
break;
case ScTableRefToken::ALL:
{
bForwardToClose = true;
}
break; break;
case ScTableRefToken::HEADERS: case ScTableRefToken::HEADERS:
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment