[Libreoffice-commits] core.git: Branch 'libreoffice-4-4' - 3 commits - sc/inc sc/source

Eike Rathke erack at redhat.com
Wed Dec 3 09:41:20 PST 2014


 sc/inc/column.hxx                  |    2 +-
 sc/inc/document.hxx                |    2 +-
 sc/inc/table.hxx                   |    2 +-
 sc/source/core/data/documen2.cxx   |    2 +-
 sc/source/core/data/documen4.cxx   |    8 ++++----
 sc/source/core/data/table4.cxx     |    2 +-
 sc/source/ui/docshell/dbdocfun.cxx |    2 +-
 sc/source/ui/docshell/docfunc.cxx  |    4 ++--
 sc/source/ui/undo/undodat.cxx      |    2 +-
 sc/source/ui/undo/undosort.cxx     |    2 +-
 sc/source/ui/view/dbfunc3.cxx      |    2 +-
 11 files changed, 15 insertions(+), 15 deletions(-)

New commits:
commit 632fae27880f552fb20598805a1e15a6d0c35199
Author: Eike Rathke <erack at redhat.com>
Date:   Wed Dec 3 17:47:35 2014 +0100

    remove boolean parameter default from ScDocument::SetDirty
    
    ... and force the caller to make a decision. In fact some needed to
    include empty cells.
    
    Change-Id: I82b6ef72f7ecda6543b3cafc70f475519870b471
    (cherry picked from commit 135b8d6466ade1e8724e604f705f95cecf4c4881)

diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index afa215d..41e1093 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -1012,7 +1012,7 @@ public:
     void            ResetChanged( const ScRange& rRange );
 
     void SetAllFormulasDirty( const sc::SetFormulaDirtyContext& rCxt );
-    void            SetDirty( const ScRange&, bool bIncludeEmptyCells = false );
+    void            SetDirty( const ScRange&, bool bIncludeEmptyCells );
     void            SetTableOpDirty( const ScRange& );  // for Interpreter TableOp
     void            InterpretDirtyCells( const ScRangeList& rRanges );
     SC_DLLPUBLIC void CalcAll();
diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx
index bfa78cb..404dd31 100644
--- a/sc/source/core/data/documen2.cxx
+++ b/sc/source/core/data/documen2.cxx
@@ -1004,7 +1004,7 @@ sal_uLong ScDocument::TransferTab( ScDocument* pSrcDoc, SCTAB nSrcPos,
             sc::StartListeningContext aSLCxt(*this);
             maTabs[nDestPos]->StartListeners(aSLCxt, true);
         }
-        SetDirty( ScRange( 0, 0, nDestPos, MAXCOL, MAXROW, nDestPos));
+        SetDirty( ScRange( 0, 0, nDestPos, MAXCOL, MAXROW, nDestPos), false);
 
         if ( bResultsOnly )
             pSrcDoc->SetAutoCalc( bOldAutoCalcSrc );
diff --git a/sc/source/core/data/documen4.cxx b/sc/source/core/data/documen4.cxx
index 5f11898..b29b1b6 100644
--- a/sc/source/core/data/documen4.cxx
+++ b/sc/source/core/data/documen4.cxx
@@ -126,7 +126,7 @@ bool ScDocument::Solver(SCCOL nFCol, SCROW nFRow, SCTAB nFTab,
             while ( !bDoneIteration && ( nIter++ < nMaxIter ) )
             {
                 *pVCell = fX;
-                SetDirty( aVRange );
+                SetDirty( aVRange, false );
                 pFormula->Interpret();
                 bError = ( pFormula->GetErrCode() != 0 );
                 fF = pFormula->GetValue() - fTargetVal;
@@ -160,7 +160,7 @@ bool ScDocument::Solver(SCCOL nFCol, SCROW nFRow, SCTAB nFTab,
                                 fHorX = fX - fabs( fF ) * fHorTangent;
 
                             *pVCell = fHorX;
-                            SetDirty( aVRange );
+                            SetDirty( aVRange, false );
                             pFormula->Interpret();
                             bHorMoveError = ( pFormula->GetErrCode() != 0 );
                             if ( bHorMoveError )
@@ -224,7 +224,7 @@ bool ScDocument::Solver(SCCOL nFCol, SCROW nFRow, SCTAB nFTab,
             if ( bDoneIteration )
             {
                 *pVCell = nX;
-                SetDirty( aVRange );
+                SetDirty( aVRange, false );
                 pFormula->Interpret();
                 if ( fabs( pFormula->GetValue() - fTargetVal ) > fabs( fF ) )
                     nX = fBestX;
@@ -235,7 +235,7 @@ bool ScDocument::Solver(SCCOL nFCol, SCROW nFRow, SCTAB nFTab,
                 nX = fBestX;
             }
             *pVCell = fSaveVal;
-            SetDirty( aVRange );
+            SetDirty( aVRange, false );
             pFormula->Interpret();
             if ( !bDoneIteration )
             {
diff --git a/sc/source/ui/docshell/dbdocfun.cxx b/sc/source/ui/docshell/dbdocfun.cxx
index 72a11a3..fe254a2 100644
--- a/sc/source/ui/docshell/dbdocfun.cxx
+++ b/sc/source/ui/docshell/dbdocfun.cxx
@@ -1065,7 +1065,7 @@ bool ScDBDocFunc::DoSubTotals( SCTAB nTab, const ScSubTotalParam& rParam,
         }
         ScRange aDirtyRange( aNewParam.nCol1, aNewParam.nRow1, nTab,
             aNewParam.nCol2, aNewParam.nRow2, nTab );
-        rDoc.SetDirty( aDirtyRange );
+        rDoc.SetDirty( aDirtyRange, true );
 
         if (bRecord)
         {
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index 9cd90e8..ae2d64c 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -4148,7 +4148,7 @@ bool ScDocFunc::TabOp( const ScRange& rRange, const ScMarkData* pTabMark,
     if ( aTester.IsEditable() )
     {
         WaitObject aWait( rDocShell.GetActiveDialogParent() );
-        rDoc.SetDirty( rRange );
+        rDoc.SetDirty( rRange, false );
         if ( bRecord )
         {
             //! auch bei Undo selektierte Tabellen beruecksichtigen
@@ -4717,7 +4717,7 @@ bool ScDocFunc::MergeCells( const ScCellMergeOption& rOption, bool bContents, bo
         if (bNeedContents || rOption.mbCenter)
         {
             ScRange aRange(nStartCol, nStartRow, nTab, nEndCol, nEndRow, nTab);
-            rDoc.SetDirty(aRange);
+            rDoc.SetDirty(aRange, true);
         }
 
         bNeedContentsUndo |= bNeedContents;
diff --git a/sc/source/ui/undo/undodat.cxx b/sc/source/ui/undo/undodat.cxx
index ddd57d1..980fd7b 100644
--- a/sc/source/ui/undo/undodat.cxx
+++ b/sc/source/ui/undo/undodat.cxx
@@ -845,7 +845,7 @@ void ScUndoQuery::Undo()
 
     ScRange aDirtyRange( 0 , aQueryParam.nRow1, nTab,
         MAXCOL, aQueryParam.nRow2, nTab );
-    rDoc.SetDirty( aDirtyRange );
+    rDoc.SetDirty( aDirtyRange, true );
 
     DoSdrUndoAction( pDrawUndo, &rDoc );
 
diff --git a/sc/source/ui/undo/undosort.cxx b/sc/source/ui/undo/undosort.cxx
index a4bd1af..c30cd56 100644
--- a/sc/source/ui/undo/undosort.cxx
+++ b/sc/source/ui/undo/undosort.cxx
@@ -46,7 +46,7 @@ void UndoSort::Execute( bool bUndo )
 
     ScUndoUtil::MarkSimpleBlock(pDocShell, maParam.maSortRange);
 
-    rDoc.SetDirty(maParam.maSortRange);
+    rDoc.SetDirty(maParam.maSortRange, true);
     if (!aParam.mbUpdateRefs)
         rDoc.BroadcastCells(aParam.maSortRange, SC_HINT_DATACHANGED);
 
diff --git a/sc/source/ui/view/dbfunc3.cxx b/sc/source/ui/view/dbfunc3.cxx
index ba0d50d..9d739b1 100644
--- a/sc/source/ui/view/dbfunc3.cxx
+++ b/sc/source/ui/view/dbfunc3.cxx
@@ -491,7 +491,7 @@ void ScDBFunc::DoSubTotals( const ScSubTotalParam& rParam, bool bRecord,
         }
         ScRange aDirtyRange( aNewParam.nCol1, aNewParam.nRow1, nTab,
             aNewParam.nCol2, aNewParam.nRow2, nTab );
-        rDoc.SetDirty( aDirtyRange );
+        rDoc.SetDirty( aDirtyRange, true );
 
         if (bRecord)
         {
commit 8525d2327b5b64edabb9a9f5a7e1e659b0fdd2ed
Author: Eike Rathke <erack at redhat.com>
Date:   Wed Dec 3 16:34:35 2014 +0100

    remove boolean parameter default from ScTable::SetDirty()
    
    Change-Id: I37761c07dd72bfa25cc499c8ed41241f1ba56469
    (cherry picked from commit ad4b7986c5ca6a5b97d09a7413adf39440eefb93)

diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx
index 78ca0d8..c7898f1 100644
--- a/sc/inc/table.hxx
+++ b/sc/inc/table.hxx
@@ -532,7 +532,7 @@ public:
     void        ResetChanged( const ScRange& rRange );
 
     void SetAllFormulasDirty( const sc::SetFormulaDirtyContext& rCxt );
-    void        SetDirty( const ScRange&, bool bIncludeEmptyCells = false );
+    void        SetDirty( const ScRange&, bool bIncludeEmptyCells );
     void        SetDirtyAfterLoad();
     void        SetDirtyVar();
     void        SetTableOpDirty( const ScRange& );
commit bf5261c88e1769bf8c383942e8d44d86a7818fa7
Author: Eike Rathke <erack at redhat.com>
Date:   Wed Dec 3 16:13:46 2014 +0100

    get rid of defaulted boolean parameters in ScColumn::SetDirty()
    
    Change-Id: Iba030c1a4fd3dad34bdd61377b73fa76a062b5f8
    (cherry picked from commit a1a1c4600e6c7ee457b62098128b27471c077908)

diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx
index bfe3fb8..7d7e39b 100644
--- a/sc/inc/column.hxx
+++ b/sc/inc/column.hxx
@@ -361,7 +361,7 @@ public:
 
     void SetAllFormulasDirty( const sc::SetFormulaDirtyContext& rCxt );
     void SetDirtyFromClip( SCROW nRow1, SCROW nRow2, sc::ColumnSpanSet& rBroadcastSpans );
-    void SetDirty( SCROW nRow1, SCROW nRow2, bool bBroadcast = true, bool bIncludeEmptyCells = false );
+    void SetDirty( SCROW nRow1, SCROW nRow2, bool bBroadcast, bool bIncludeEmptyCells );
     void        SetDirtyVar();
     void        SetDirtyAfterLoad();
     void        SetTableOpDirty( const ScRange& );
diff --git a/sc/source/core/data/table4.cxx b/sc/source/core/data/table4.cxx
index 13a7baf..84bafad 100644
--- a/sc/source/core/data/table4.cxx
+++ b/sc/source/core/data/table4.cxx
@@ -1184,7 +1184,7 @@ void ScTable::FillFormulaVertical(
 
     std::vector<sc::RowSpan>::const_iterator it = aSpans.begin(), itEnd = aSpans.end();
     for (; it != itEnd; ++it)
-        aCol[nCol].SetDirty(it->mnRow1, it->mnRow2, false);
+        aCol[nCol].SetDirty(it->mnRow1, it->mnRow2, false, false);
 
     rProgress += nRow2 - nRow1 + 1;
     if (pProgress)


More information about the Libreoffice-commits mailing list