summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2017-09-25 13:30:43 +0200
committerEike Rathke <erack@redhat.com>2017-09-25 13:39:41 +0200
commit1015e1f6f0fc14ce988e7b2e8c8eab5c397c00ab (patch)
tree294f61d914355330d7aacfa8cb4c8ee9866924c7 /sc
parent65ec980667d290fd9cf0a9b119f52c86bccf17df (diff)
FormulaTokenArray::Clear() virtual, ScTokenArray::Clear() overrides
A sliced Clear()/ClearScTokenArray() was never intended. Change-Id: I25df3fa8829f6bc8f1dee6ef0d27b28491d6a5c3
Diffstat (limited to 'sc')
-rw-r--r--sc/inc/tokenarray.hxx2
-rw-r--r--sc/source/core/tool/token.cxx5
-rw-r--r--sc/source/filter/inc/tokstack.hxx2
3 files changed, 5 insertions, 4 deletions
diff --git a/sc/inc/tokenarray.hxx b/sc/inc/tokenarray.hxx
index 145972986cba..72039c856a41 100644
--- a/sc/inc/tokenarray.hxx
+++ b/sc/inc/tokenarray.hxx
@@ -59,7 +59,7 @@ public:
(not copied!) */
ScTokenArray( const ScTokenArray& );
virtual ~ScTokenArray() override;
- void ClearScTokenArray();
+ virtual void Clear();
ScTokenArray* Clone() const; /// True copy!
void GenHash();
diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx
index 4d77ad89e1a6..23709d160d33 100644
--- a/sc/source/core/tool/token.cxx
+++ b/sc/source/core/tool/token.cxx
@@ -1813,10 +1813,11 @@ ScTokenArray& ScTokenArray::operator=( const ScTokenArray& rArr )
return *this;
}
-void ScTokenArray::ClearScTokenArray()
+void ScTokenArray::Clear()
{
- Clear();
+ mnHashValue = 0;
meVectorState = FormulaVectorEnabled;
+ FormulaTokenArray::Clear();
}
ScTokenArray* ScTokenArray::Clone() const
diff --git a/sc/source/filter/inc/tokstack.hxx b/sc/source/filter/inc/tokstack.hxx
index 39c6561980e4..1a3776577993 100644
--- a/sc/source/filter/inc/tokstack.hxx
+++ b/sc/source/filter/inc/tokstack.hxx
@@ -381,7 +381,7 @@ inline const TokenId TokenPool::Store()
const inline ScTokenArray* TokenPool::operator []( const TokenId& rId )
{
- pScToken->ClearScTokenArray();
+ pScToken->Clear();
if( rId )
{//...only if rId > 0!