diff options
author | Eike Rathke <erack@redhat.com> | 2015-04-22 22:06:27 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2015-04-23 15:18:00 +0200 |
commit | 97539f5eb1d1f6ba3349bdfcbd71b8256370a783 (patch) | |
tree | ea9542d5fd79510be5bdfbf5028980009d3e95e9 /formula/source | |
parent | 18cfc7c2d2ea2bad17a07bf8975fd7b9200850b3 (diff) |
TableRef: let t always point to the current token
Change-Id: Ic7f8dedd8967f1f1fc0025cb2bc3e6c3fda022fd
Diffstat (limited to 'formula/source')
-rw-r--r-- | formula/source/core/api/FormulaCompiler.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/formula/source/core/api/FormulaCompiler.cxx b/formula/source/core/api/FormulaCompiler.cxx index e8b24708e555..515c1fad05b7 100644 --- a/formula/source/core/api/FormulaCompiler.cxx +++ b/formula/source/core/api/FormulaCompiler.cxx @@ -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; |