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

Kohei Yoshida kohei.yoshida at gmail.com
Tue Jun 25 09:36:47 PDT 2013


 sc/inc/validat.hxx                |    1 -
 sc/source/core/inc/interpre.hxx   |    1 -
 sc/source/filter/xml/xmlexprt.cxx |   13 +------------
 sc/source/ui/view/tabview4.cxx    |   11 +----------
 4 files changed, 2 insertions(+), 24 deletions(-)

New commits:
commit 4f34a4019cc006adfad3332dd05b1c4025da12a2
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date:   Tue Jun 25 12:39:27 2013 -0400

    Remove duplicate code blocks.
    
    Change-Id: Ie014ec8866d9e3055a6e67bd20503fc6fc26f503

diff --git a/sc/inc/validat.hxx b/sc/inc/validat.hxx
index 85737a3..904279a 100644
--- a/sc/inc/validat.hxx
+++ b/sc/inc/validat.hxx
@@ -29,7 +29,6 @@ namespace ValidListType = ::com::sun::star::sheet::TableValidationVisibility;
 class ScPatternAttr;
 class ScTokenArray;
 class ScTypedStrData;
-class ScCellIterator;
 
 enum ScValidationMode
 {
diff --git a/sc/source/core/inc/interpre.hxx b/sc/source/core/inc/interpre.hxx
index 4c8dd4b..75947d6 100644
--- a/sc/source/core/inc/interpre.hxx
+++ b/sc/source/core/inc/interpre.hxx
@@ -49,7 +49,6 @@ struct ScComplexRefData;
 
 class ScToken;
 class ScJumpMatrix;
-class ScCellIterator;
 struct ScRefCellValue;
 
 #define MAXSTACK      (4096 / sizeof(formula::FormulaToken*))
diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx
index 2b72e89..ac5d4b3 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -2052,18 +2052,7 @@ void ScXMLExport::_ExportAutoStyles()
             SCTAB nTabCount = pDoc->GetTableCount();
             for (SCTAB nTab=0; nTab<nTabCount; ++nTab)
                 if (pDoc->IsStreamValid(nTab))
-                {
-                    ScCellIterator aIter( pDoc, ScRange(0, 0, nTab, MAXCOL, MAXROW, nTab) );
-                    for (bool bHas = aIter.first(); bHas; bHas = aIter.next())
-                    {
-                        if (aIter.getType() != CELLTYPE_FORMULA)
-                            continue;
-
-                        ScFormulaCell* pFC = aIter.getFormulaCell();
-                        if (pFC)
-                            pFC->IsValue(); // interpret if dirty
-                    }
-                }
+                    pDoc->InterpretDirtyCells(ScRange(0, 0, nTab, MAXCOL, MAXROW, nTab));
 
             // stored cell styles
             const std::vector<ScCellStyleEntry>& rCellEntries = pSheetData->GetCellStyles();
diff --git a/sc/source/ui/view/tabview4.cxx b/sc/source/ui/view/tabview4.cxx
index 227d3d5..8140d51 100644
--- a/sc/source/ui/view/tabview4.cxx
+++ b/sc/source/ui/view/tabview4.cxx
@@ -506,16 +506,7 @@ void ScTabView::InterpretVisible()
             if (nX2 > MAXCOL) nX2 = MAXCOL;
             if (nY2 > MAXROW) nY2 = MAXROW;
 
-            ScCellIterator aIter(pDoc, ScRange(nX1, nY1, nTab, nX2, nY2, nTab));
-            for (bool bHas = aIter.first(); bHas; bHas = aIter.next())
-            {
-                if (aIter.getType() != CELLTYPE_FORMULA)
-                    continue;
-
-                ScFormulaCell* p = aIter.getFormulaCell();
-                if (p->GetDirty())
-                    p->Interpret();
-            }
+            pDoc->InterpretDirtyCells(ScRange(nX1, nY1, nTab, nX2, nY2, nTab));
         }
     }
 


More information about the Libreoffice-commits mailing list