[Libreoffice-commits] .: Branch 'feature/gsoc-calc-perf2' - sc/inc sc/source

Daniel Bankston dbank at kemper.freedesktop.org
Fri Jul 13 22:55:28 PDT 2012


 sc/inc/cell.hxx                   |    2 +-
 sc/inc/document.hxx               |    3 +--
 sc/source/core/data/cell.cxx      |    7 ++-----
 sc/source/core/data/documen4.cxx  |    5 ++---
 sc/source/filter/xml/xmlsubti.cxx |    2 +-
 5 files changed, 7 insertions(+), 12 deletions(-)

New commits:
commit d632a932fe67ec21cd66377cb03d5203a8e34ab4
Author: Daniel Bankston <daniel.e.bankston at gmail.com>
Date:   Sat Jul 14 00:53:07 2012 -0500

    Revert "Fix for ods matrix import performance"
    
    This reverts commit cb14c160489254298eb03f7406107e06395943d1.
    
    This approach causes problems with chained matrix cell dependencies
    initally after load.

diff --git a/sc/inc/cell.hxx b/sc/inc/cell.hxx
index 820ef7b..f609a46 100644
--- a/sc/inc/cell.hxx
+++ b/sc/inc/cell.hxx
@@ -472,7 +472,7 @@ public:
     virtual void    Notify( SvtBroadcaster& rBC, const SfxHint& rHint);
     void            SetCompile( bool bVal ) { bCompile = bVal; }
     ScDocument*     GetDocument() const     { return pDocument; }
-    void            SetMatColsRows( SCCOL nCols, SCROW nRows, bool bSetDirty=true );
+    void            SetMatColsRows( SCCOL nCols, SCROW nRows );
     void            GetMatColsRows( SCCOL& nCols, SCROW& nRows ) const;
 
                     // cell belongs to ChangeTrack and not to the real document
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index 6849c53..6d4a02e 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -770,8 +770,7 @@ public:
                                         const ScMarkData& rMark,
                                         const rtl::OUString& rFormula,
                                         const ScTokenArray* p = NULL,
-                                        const formula::FormulaGrammar::Grammar = formula::FormulaGrammar::GRAM_DEFAULT,
-                                        bool bSetDirty=true );
+                                        const formula::FormulaGrammar::Grammar = formula::FormulaGrammar::GRAM_DEFAULT );
     SC_DLLPUBLIC void           InsertTableOp(const ScTabOpParam& rParam,   // multi-operation
                                   SCCOL nCol1, SCROW nRow1,
                                   SCCOL nCol2, SCROW nRow2, const ScMarkData& rMark);
diff --git a/sc/source/core/data/cell.cxx b/sc/source/core/data/cell.cxx
index ae9c844..82b31f3 100644
--- a/sc/source/core/data/cell.cxx
+++ b/sc/source/core/data/cell.cxx
@@ -1726,7 +1726,7 @@ void ScFormulaCell::InterpretTail( ScInterpretTailParameter eTailParam )
 }
 
 
-void ScFormulaCell::SetMatColsRows( SCCOL nCols, SCROW nRows, bool bSetDirty )
+void ScFormulaCell::SetMatColsRows( SCCOL nCols, SCROW nRows )
 {
     ScMatrixFormulaCellToken* pMat = aResult.GetMatrixFormulaCellTokenNonConst();
     if (pMat)
@@ -1736,10 +1736,7 @@ void ScFormulaCell::SetMatColsRows( SCCOL nCols, SCROW nRows, bool bSetDirty )
         aResult.SetToken( new ScMatrixFormulaCellToken( nCols, nRows));
         // Setting the new token actually forces an empty result at this top
         // left cell, so have that recalculated.
-        //but during ODS import, we don't won't matrix cells to be dirty
-        //or added to the formula tree so we check bSetDirty.
-        if(bSetDirty)
-            SetDirty();
+        SetDirty();
     }
 }
 
diff --git a/sc/source/core/data/documen4.cxx b/sc/source/core/data/documen4.cxx
index 7411ffa..8eca485 100644
--- a/sc/source/core/data/documen4.cxx
+++ b/sc/source/core/data/documen4.cxx
@@ -123,8 +123,7 @@ void ScDocument::InsertMatrixFormula(SCCOL nCol1, SCROW nRow1,
                                      const ScMarkData& rMark,
                                      const rtl::OUString& rFormula,
                                      const ScTokenArray* pArr,
-                                     const formula::FormulaGrammar::Grammar eGram,
-                                     bool bSetDirty )
+                                     const formula::FormulaGrammar::Grammar eGram )
 {
     PutInOrder(nCol1, nCol2);
     PutInOrder(nRow1, nRow2);
@@ -158,7 +157,7 @@ void ScDocument::InsertMatrixFormula(SCCOL nCol1, SCROW nRow1,
         pCell = new ScFormulaCell( this, aPos, pArr, eGram, MM_FORMULA );
     else
         pCell = new ScFormulaCell( this, aPos, rFormula, eGram, MM_FORMULA );
-    pCell->SetMatColsRows( nCol2 - nCol1 + 1, nRow2 - nRow1 + 1, bSetDirty );
+    pCell->SetMatColsRows( nCol2 - nCol1 + 1, nRow2 - nRow1 + 1 );
     itr = rMark.begin();
     for (; itr != itrEnd && *itr < nMax; ++itr)
     {
diff --git a/sc/source/filter/xml/xmlsubti.cxx b/sc/source/filter/xml/xmlsubti.cxx
index b1eeb9d..87cd34e 100644
--- a/sc/source/filter/xml/xmlsubti.cxx
+++ b/sc/source/filter/xml/xmlsubti.cxx
@@ -297,7 +297,7 @@ void ScMyTables::AddMatrixRange(
     pDoc->InsertMatrixFormula(
         aScRange.aStart.Col(), aScRange.aStart.Row(),
         aScRange.aEnd.Col(), aScRange.aEnd.Row(),
-        aMark, EMPTY_STRING, pCode, eGrammar, false );
+        aMark, EMPTY_STRING, pCode, eGrammar );
     delete pCode;
     pDoc->IncXMLImportedFormulaCount( rFormula.getLength() );
 }


More information about the Libreoffice-commits mailing list