[Libreoffice-commits] core.git: Branch 'feature/formula-core-rework' - formula/inc formula/source sc/inc sc/source

Kohei Yoshida kohei.yoshida at gmail.com
Mon Mar 18 07:31:24 PDT 2013


 formula/inc/formula/tokenarray.hxx |    2 ++
 formula/source/core/api/token.cxx  |    5 +++++
 sc/inc/cell.hxx                    |    2 ++
 sc/source/core/data/cell.cxx       |    5 +++++
 4 files changed, 14 insertions(+)

New commits:
commit 6b2abe7e64fbfb517764d4be02771ecc6ddffb63
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date:   Mon Mar 18 10:33:17 2013 -0400

    Skeleton for generating a hash value from an array of token.
    
    To be implemented...
    
    Change-Id: I4704f06b50dcc9dd5e1af9c3531ecd498015811c

diff --git a/formula/inc/formula/tokenarray.hxx b/formula/inc/formula/tokenarray.hxx
index 6cebafb..aa382cd 100644
--- a/formula/inc/formula/tokenarray.hxx
+++ b/formula/inc/formula/tokenarray.hxx
@@ -93,6 +93,8 @@ public:
     FormulaTokenArray( const FormulaTokenArray& );
     virtual ~FormulaTokenArray();
     FormulaTokenArray* Clone() const;    /// True copy!
+
+    size_t GetHash() const;
     void Clear();
     void DelRPN();
     FormulaToken* First() { nIndex = 0; return Next(); }
diff --git a/formula/source/core/api/token.cxx b/formula/source/core/api/token.cxx
index 150be29..f331c1e 100644
--- a/formula/source/core/api/token.cxx
+++ b/formula/source/core/api/token.cxx
@@ -685,6 +685,11 @@ FormulaTokenArray* FormulaTokenArray::Clone() const
     return p;
 }
 
+size_t FormulaTokenArray::GetHash() const
+{
+    return 0;
+}
+
 void FormulaTokenArray::Clear()
 {
     if( nRPN ) DelRPN();
diff --git a/sc/inc/cell.hxx b/sc/inc/cell.hxx
index d9fb42a..944c8dc 100644
--- a/sc/inc/cell.hxx
+++ b/sc/inc/cell.hxx
@@ -427,6 +427,8 @@ public:
 
     ScFormulaCell( const ScFormulaCell& rCell, ScDocument& rDoc, const ScAddress& rPos, int nCloneFlags = SC_CLONECELL_DEFAULT );
 
+    size_t GetHash() const;
+
     void            GetFormula( rtl::OUString& rFormula,
                                 const formula::FormulaGrammar::Grammar = formula::FormulaGrammar::GRAM_DEFAULT ) const;
     void            GetFormula( rtl::OUStringBuffer& rBuffer,
diff --git a/sc/source/core/data/cell.cxx b/sc/source/core/data/cell.cxx
index e37fbd2..a7133c2 100644
--- a/sc/source/core/data/cell.cxx
+++ b/sc/source/core/data/cell.cxx
@@ -884,6 +884,11 @@ ScFormulaCell::~ScFormulaCell()
 #endif
 }
 
+size_t ScFormulaCell::GetHash() const
+{
+    return pCode->GetHash();
+}
+
 void ScFormulaCell::GetFormula( rtl::OUStringBuffer& rBuffer,
                                 const FormulaGrammar::Grammar eGrammar ) const
 {


More information about the Libreoffice-commits mailing list