[Libreoffice-commits] core.git: 2 commits - include/formula sc/inc sc/source
Eike Rathke
erack at redhat.com
Mon Sep 25 11:46:31 UTC 2017
include/formula/tokenarray.hxx | 3 ++-
sc/inc/tokenarray.hxx | 2 +-
sc/source/core/tool/token.cxx | 7 +++++--
sc/source/filter/inc/tokstack.hxx | 2 +-
4 files changed, 9 insertions(+), 5 deletions(-)
New commits:
commit 81e60100ca8995be9d1c98167935245d878c446f
Author: Eike Rathke <erack at redhat.com>
Date: Mon Sep 25 13:44:38 2017 +0200
ScTokenArray::operator=: assign also mnHashValue and meVectorState
They now were left cleared, and before Clear() was virtual even left in the
previous state.
Change-Id: I2a1b5f5db24419645f5716938e0b8da4546d7453
diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx
index 23709d160d33..aa3fff9226d4 100644
--- a/sc/source/core/tool/token.cxx
+++ b/sc/source/core/tool/token.cxx
@@ -1810,6 +1810,8 @@ ScTokenArray& ScTokenArray::operator=( const ScTokenArray& rArr )
{
Clear();
Assign( rArr );
+ mnHashValue = rArr.mnHashValue;
+ meVectorState = rArr.meVectorState;
return *this;
}
commit 1015e1f6f0fc14ce988e7b2e8c8eab5c397c00ab
Author: Eike Rathke <erack at redhat.com>
Date: Mon Sep 25 13:30:43 2017 +0200
FormulaTokenArray::Clear() virtual, ScTokenArray::Clear() overrides
A sliced Clear()/ClearScTokenArray() was never intended.
Change-Id: I25df3fa8829f6bc8f1dee6ef0d27b28491d6a5c3
diff --git a/include/formula/tokenarray.hxx b/include/formula/tokenarray.hxx
index 891b793c3f10..92c39bd4c60a 100644
--- a/include/formula/tokenarray.hxx
+++ b/include/formula/tokenarray.hxx
@@ -297,6 +297,8 @@ public:
FormulaTokenArray( const FormulaTokenArray& );
virtual ~FormulaTokenArray();
+ virtual void Clear();
+
void SetFromRangeName( bool b ) { mbFromRangeName = b; }
bool IsFromRangeName() const { return mbFromRangeName; }
@@ -310,7 +312,6 @@ public:
*/
bool IsShareable() const { return mbShareable; }
- void Clear();
void DelRPN();
FormulaToken* FirstToken() const;
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!
More information about the Libreoffice-commits
mailing list