diff options
-rw-r--r-- | formula/source/core/api/FormulaCompiler.cxx | 7 | ||||
-rw-r--r-- | include/formula/FormulaCompiler.hxx | 1 | ||||
-rw-r--r-- | sc/inc/compiler.hxx | 1 | ||||
-rw-r--r-- | sc/source/core/tool/compiler.cxx | 19 |
4 files changed, 27 insertions, 1 deletions
diff --git a/formula/source/core/api/FormulaCompiler.cxx b/formula/source/core/api/FormulaCompiler.cxx index e0bed7fa03f9..6af9f367a9ef 100644 --- a/formula/source/core/api/FormulaCompiler.cxx +++ b/formula/source/core/api/FormulaCompiler.cxx @@ -1112,7 +1112,7 @@ bool FormulaCompiler::GetToken() } else if( mpToken->GetOpCode() == ocTableRef ) { - /* TODO: return HandleTableRef() */ ; + return HandleTableRef(); } return true; } @@ -2104,6 +2104,11 @@ bool FormulaCompiler::HandleDbData() return true; } +bool FormulaCompiler::HandleTableRef() +{ + return true; +} + void FormulaCompiler::CreateStringFromSingleRef( OUStringBuffer& /*rBuffer*/, FormulaToken* /*pTokenP*/) const { } diff --git a/include/formula/FormulaCompiler.hxx b/include/formula/FormulaCompiler.hxx index adf593c4d676..7f9097b64e64 100644 --- a/include/formula/FormulaCompiler.hxx +++ b/include/formula/FormulaCompiler.hxx @@ -282,6 +282,7 @@ protected: virtual bool HandleRange(); virtual bool HandleColRowName(); virtual bool HandleDbData(); + virtual bool HandleTableRef(); virtual void CreateStringFromExternal(OUStringBuffer& rBuffer, FormulaToken* pTokenP) const; virtual void CreateStringFromSingleRef(OUStringBuffer& rBuffer,FormulaToken* pTokenP) const; diff --git a/sc/inc/compiler.hxx b/sc/inc/compiler.hxx index 5838a5a2fd73..f1b83d90126c 100644 --- a/sc/inc/compiler.hxx +++ b/sc/inc/compiler.hxx @@ -453,6 +453,7 @@ private: virtual bool HandleRange() SAL_OVERRIDE; virtual bool HandleColRowName() SAL_OVERRIDE; virtual bool HandleDbData() SAL_OVERRIDE; + virtual bool HandleTableRef() SAL_OVERRIDE; virtual formula::FormulaTokenRef ExtendRangeReference( formula::FormulaToken & rTok1, formula::FormulaToken & rTok2, bool bReuseDoubleRef ) SAL_OVERRIDE; virtual void CreateStringFromExternal(OUStringBuffer& rBuffer, formula::FormulaToken* pTokenP) const SAL_OVERRIDE; diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx index 8a33babd3697..6bdf70abdc03 100644 --- a/sc/source/core/tool/compiler.cxx +++ b/sc/source/core/tool/compiler.cxx @@ -4601,6 +4601,25 @@ bool ScCompiler::HandleDbData() return true; } +bool ScCompiler::HandleTableRef() +{ + ScDBData* pDBData = pDoc->GetDBCollection()->getNamedDBs().findByIndex(mpToken->GetIndex()); + if ( !pDBData ) + SetError(errNoName); + else if (mbJumpCommandReorder) + { + /* TODO: handle it */ +#if 0 + ScTokenArray* pNew = new ScTokenArray(); + pNew->AddDoubleReference( aRefData ); + PushTokenArray( pNew, true ); + pNew->Reset(); + return GetToken(); +#endif + } + return true; +} + FormulaTokenRef ScCompiler::ExtendRangeReference( FormulaToken & rTok1, FormulaToken & rTok2, bool bReuseDoubleRef ) { return extendRangeReference( rTok1, rTok2, aPos,bReuseDoubleRef ); |