simplify the ReplaceToken() offset logic to absolute offsets

Change-Id: I8d02fb63bc0c5cb48aabaf7a8800f5f9ac95cbf5
This commit is contained in:
Eike Rathke
2016-04-23 14:33:50 +02:00
parent 9185f889ed
commit f41257dc99
4 changed files with 12 additions and 19 deletions

View File

@@ -4325,8 +4325,8 @@ ScTokenArray* ScCompiler::CompileString( const OUString& rFormula )
FormulaToken* pTableRefToken = new ScTableRefToken( pPrev->GetIndex(), ScTableRefToken::TABLE);
maTableRefs.push_back( TableRefEntry( pTableRefToken));
// pPrev may be dead hereafter.
static_cast<ScTokenArray*>(pArr)->ReplaceToken( 1, pTableRefToken,
FormulaTokenArray::ReplaceMode::BACKWARD_CODE_ONLY);
static_cast<ScTokenArray*>(pArr)->ReplaceToken( nIdx, pTableRefToken,
FormulaTokenArray::ReplaceMode::CODE_ONLY);
}
}
switch (eOp)