Kaydet (Commit) 97539f5e authored tarafından Eike Rathke's avatar Eike Rathke

TableRef: let t always point to the current token

Change-Id: Ic7f8dedd8967f1f1fc0025cb2bc3e6c3fda022fd
üst 18cfc7c2
......@@ -1872,16 +1872,16 @@ const FormulaToken* FormulaCompiler::CreateStringFromToken( OUStringBuffer& rBuf
{
// Suppress all TableRef related tokens, the resulting
// range was written by CreateStringFromIndex().
const FormulaToken* p = pArr->PeekNext();
const FormulaToken* const p = pArr->PeekNext();
if (p && p->GetOpCode() == ocTableRefOpen)
{
p = pArr->Next();
t = pArr->Next();
int nLevel = 0;
do
{
// Switch cases correspond with those in
// ScCompiler::HandleTableRef()
switch (p->GetOpCode())
switch (t->GetOpCode())
{
case ocTableRefOpen:
++nLevel;
......@@ -1903,7 +1903,7 @@ const FormulaToken* FormulaCompiler::CreateStringFromToken( OUStringBuffer& rBuf
nLevel = 0;
bNext = false;
}
} while (nLevel && (p = pArr->Next()));
} while (nLevel && (t = pArr->Next()));
}
}
break;
......
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