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

TableRef: need to distinguish between entire table and All specified

Change-Id: I507b6dfc0ce1a7b0f28142b05e15834ad6e6ac80
üst 519d2f6e
...@@ -215,11 +215,12 @@ public: ...@@ -215,11 +215,12 @@ public:
enum Item enum Item
{ {
ALL = 0, TABLE = 0,
HEADERS = 1, ALL = 1,
DATA = 2, HEADERS = 2,
TOTALS = 4, DATA = 4,
THIS_ROW = 8 TOTALS = 8,
THIS_ROW = 16
}; };
ScTableRefToken( sal_uInt16 nIndex, Item eItem ); ScTableRefToken( sal_uInt16 nIndex, Item eItem );
......
...@@ -3938,7 +3938,7 @@ ScTokenArray* ScCompiler::CompileString( const OUString& rFormula ) ...@@ -3938,7 +3938,7 @@ ScTokenArray* ScCompiler::CompileString( const OUString& rFormula )
const FormulaToken* pPrev = pArr->PeekPrev( nIdx); const FormulaToken* pPrev = pArr->PeekPrev( nIdx);
if (pPrev && pPrev->GetOpCode() == ocDBArea) if (pPrev && pPrev->GetOpCode() == ocDBArea)
{ {
FormulaToken* pTableRefToken = new ScTableRefToken( pPrev->GetIndex(), ScTableRefToken::ALL); FormulaToken* pTableRefToken = new ScTableRefToken( pPrev->GetIndex(), ScTableRefToken::TABLE);
maTableRefs.push_back( TableRefEntry( pTableRefToken)); maTableRefs.push_back( TableRefEntry( pTableRefToken));
// pPrev may be dead hereafter. // pPrev may be dead hereafter.
static_cast<ScTokenArray*>(pArr)->ReplaceToken( 1, pTableRefToken); static_cast<ScTokenArray*>(pArr)->ReplaceToken( 1, pTableRefToken);
...@@ -4700,7 +4700,7 @@ bool ScCompiler::HandleTableRef() ...@@ -4700,7 +4700,7 @@ bool ScCompiler::HandleTableRef()
ScTokenArray* pNew = new ScTokenArray(); ScTokenArray* pNew = new ScTokenArray();
ScTableRefToken::Item eItem = pTR->GetItem(); ScTableRefToken::Item eItem = pTR->GetItem();
bool bGotToken = false; bool bGotToken = false;
if (eItem == ScTableRefToken::ALL) if (eItem == ScTableRefToken::TABLE || eItem == ScTableRefToken::ALL)
{ {
ScComplexRefData aRefData; ScComplexRefData aRefData;
aRefData.InitFlags(); aRefData.InitFlags();
......
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