[Libreoffice-commits] core.git: sc/inc sc/qa sc/source

Kohei Yoshida kohei.yoshida at collabora.com
Tue Oct 25 01:51:18 UTC 2016


 sc/inc/document.hxx              |    2 +-
 sc/qa/unit/ucalc_formula.cxx     |    2 +-
 sc/source/core/data/documen7.cxx |    2 +-
 sc/source/core/data/document.cxx |    6 +++---
 sc/source/ui/docshell/docsh.cxx  |    2 +-
 sc/source/ui/docshell/docsh3.cxx |    2 +-
 sc/source/ui/view/gridwin4.cxx   |    2 +-
 7 files changed, 9 insertions(+), 9 deletions(-)

New commits:
commit b5c65b53de6663e12a8192100d6e25494779c5c7
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date:   Thu Oct 20 20:36:40 2016 -0400

    Rename ClearFormulaContext() to make it more representative.
    
    In the future we might put more prep code in here, in addition
    to clearing the context data.
    
    Change-Id: I44256a0dfbe1301e2c1443b291f4635ca0ba80f5

diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index ed7bdab..4e4e8c4 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -2276,7 +2276,7 @@ public:
      * Call this before any operations that might trigger one or more formula
      * cells to get calculated.
      */
-    void ClearFormulaContext();
+    void PrepareFormulaCalc();
 
     SvtBroadcaster* GetBroadcaster( const ScAddress& rPos );
     const SvtBroadcaster* GetBroadcaster( const ScAddress& rPos ) const;
diff --git a/sc/qa/unit/ucalc_formula.cxx b/sc/qa/unit/ucalc_formula.cxx
index 74028fb..2780d08 100644
--- a/sc/qa/unit/ucalc_formula.cxx
+++ b/sc/qa/unit/ucalc_formula.cxx
@@ -702,7 +702,7 @@ void Test::testFetchVectorRefArray()
 
     // Clear everything and start over.
     clearRange(m_pDoc, ScRange(0,0,0,MAXCOL,MAXROW,0));
-    m_pDoc->ClearFormulaContext();
+    m_pDoc->PrepareFormulaCalc();
 
     // Totally empty range in a totally empty column (Column A).
     aArray = m_pDoc->FetchVectorRefArray(ScAddress(0,0,0), 3); // A1:A3
diff --git a/sc/source/core/data/documen7.cxx b/sc/source/core/data/documen7.cxx
index d64b286..27538b6 100644
--- a/sc/source/core/data/documen7.cxx
+++ b/sc/source/core/data/documen7.cxx
@@ -84,7 +84,7 @@ void ScDocument::Broadcast( const ScHint& rHint )
 
 void ScDocument::BroadcastCells( const ScRange& rRange, sal_uInt32 nHint, bool bBroadcastSingleBroadcasters )
 {
-    ClearFormulaContext();
+    PrepareFormulaCalc();
 
     if (!pBASM)
         return;    // Clipboard or Undo
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index c22ac0f..5883506 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -2415,7 +2415,7 @@ ScDocument::NumFmtMergeHandler::~NumFmtMergeHandler()
     mpDoc->pFormatExchangeList = nullptr;
 }
 
-void ScDocument::ClearFormulaContext()
+void ScDocument::PrepareFormulaCalc()
 {
     mpFormulaGroupCxt.reset();
 }
@@ -3826,7 +3826,7 @@ void ScDocument::InterpretDirtyCells( const ScRangeList& rRanges )
     if (!GetAutoCalc())
         return;
 
-    mpFormulaGroupCxt.reset();
+    PrepareFormulaCalc();
 
     for (size_t nPos=0, nRangeCount = rRanges.size(); nPos < nRangeCount; nPos++)
     {
@@ -3867,7 +3867,7 @@ void ScDocument::AddTableOpFormulaCell( ScFormulaCell* pCell )
 
 void ScDocument::CalcAll()
 {
-    ClearFormulaContext();
+    PrepareFormulaCalc();
     ClearLookupCaches();    // Ensure we don't deliver zombie data.
     sc::AutoCalcSwitch aSwitch(*this, true);
     TableContainer::iterator it = maTabs.begin();
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index ca0b2a0..ba3d5de 100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.cxx
@@ -3159,7 +3159,7 @@ ScDocShellModificator::~ScDocShellModificator()
 void ScDocShellModificator::SetDocumentModified()
 {
     ScDocument& rDoc = rDocShell.GetDocument();
-    rDoc.ClearFormulaContext();
+    rDoc.PrepareFormulaCalc();
     if ( !rDoc.IsImportingXML() )
     {
         // AutoCalcShellDisabled temporaer restaurieren
diff --git a/sc/source/ui/docshell/docsh3.cxx b/sc/source/ui/docshell/docsh3.cxx
index 85db59d..da426b5 100644
--- a/sc/source/ui/docshell/docsh3.cxx
+++ b/sc/source/ui/docshell/docsh3.cxx
@@ -86,7 +86,7 @@ void ScDocShell::PostDataChanged()
 {
     Broadcast( SfxHint( FID_DATACHANGED ) );
     SfxGetpApp()->Broadcast(SfxHint( FID_ANYDATACHANGED ));      // Navigator
-    aDocument.ClearFormulaContext();
+    aDocument.PrepareFormulaCalc();
     //! Navigator direkt benachrichtigen!
 }
 
diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index 15edd26..f449f77 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -515,7 +515,7 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod
 
     // Flag drawn formula cells "unchanged".
     rDoc.ResetChanged(ScRange(nX1, nY1, nTab, nX2, nY2, nTab));
-    rDoc.ClearFormulaContext();
+    rDoc.PrepareFormulaCalc();
 }
 
 void ScGridWindow::DrawContent(OutputDevice &rDevice, const ScTableInfo& rTableInfo, ScOutputData& aOutputData,


More information about the Libreoffice-commits mailing list