diff options
author | Eike Rathke <erack@redhat.com> | 2015-07-31 21:06:57 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2015-07-31 21:10:35 +0200 |
commit | a713fb5e3ac8b521abd441f040853f439f1a3f7c (patch) | |
tree | bfe08151881e2513c0f91d0bd55ac755ad244c9e | |
parent | 1f44d9b74a5e2d8c249c6f65a29cb2583a9c5235 (diff) |
TableRef: implement ScTableRefToken::IsGlobal() override
To diustinguish from formula::FormulaToken::IsGlobal() virtual dummy
implementation error message and spot code that possibly makes false
assumptions about svIndex tokens.
Change-Id: I5c4a62dc5fdf3a97b7a4d143ce1e419f15a8fdb0
-rw-r--r-- | sc/inc/token.hxx | 1 | ||||
-rw-r--r-- | sc/source/core/tool/token.cxx | 9 |
2 files changed, 10 insertions, 0 deletions
diff --git a/sc/inc/token.hxx b/sc/inc/token.hxx index 3e4f7f88542f..e13039c9e73f 100644 --- a/sc/inc/token.hxx +++ b/sc/inc/token.hxx @@ -231,6 +231,7 @@ public: virtual sal_uInt16 GetIndex() const SAL_OVERRIDE; virtual void SetIndex( sal_uInt16 n ) SAL_OVERRIDE; + virtual bool IsGlobal() const SAL_OVERRIDE; virtual bool operator==( const formula::FormulaToken& rToken ) const SAL_OVERRIDE; virtual FormulaToken* Clone() const SAL_OVERRIDE { return new ScTableRefToken(*this); } diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx index e9a9afab6595..8a67152008de 100644 --- a/sc/source/core/tool/token.cxx +++ b/sc/source/core/tool/token.cxx @@ -934,6 +934,15 @@ void ScTableRefToken::SetIndex( sal_uInt16 n ) mnIndex = n; } +bool ScTableRefToken::IsGlobal() const +{ + // Code asking for this may have to be adapted as it might assume an + // svIndex token would always be ocName or ocDBArea. + SAL_WARN("sc.core","ScTableRefToken::IsGlobal - maybe adapt caller to know about TableRef?"); + // Database range is always global. + return true; +} + ScTableRefToken::Item ScTableRefToken::GetItem() const { return meItem; |