diff options
author | Kohei Yoshida <kohei.yoshida@collabora.com> | 2016-10-20 20:36:40 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@collabora.com> | 2016-10-24 21:50:47 -0400 |
commit | b5c65b53de6663e12a8192100d6e25494779c5c7 (patch) | |
tree | 94543849b1213e1a5f4707bbb37287e4196fe529 | |
parent | tdf#103389: Resaving a DOCX document with two canvases leads to a broken file. (diff) | |
download | core-b5c65b53de6663e12a8192100d6e25494779c5c7.tar.gz core-b5c65b53de6663e12a8192100d6e25494779c5c7.zip |
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
-rw-r--r-- | sc/inc/document.hxx | 2 | ||||
-rw-r--r-- | sc/qa/unit/ucalc_formula.cxx | 2 | ||||
-rw-r--r-- | sc/source/core/data/documen7.cxx | 2 | ||||
-rw-r--r-- | sc/source/core/data/document.cxx | 6 | ||||
-rw-r--r-- | sc/source/ui/docshell/docsh.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/docshell/docsh3.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/view/gridwin4.cxx | 2 |
7 files changed, 9 insertions, 9 deletions
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx index ed7bdab69488..4e4e8c43934b 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 74028fb323ab..2780d083c45f 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 d64b286d4638..27538b6dbab2 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 c22ac0f1fa3c..5883506b2195 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 ca0b2a0bfe03..ba3d5de7f0e2 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 85db59dc18b0..da426b5516f4 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 15edd268d280..f449f7791f3a 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, |