[Libreoffice-commits] .: sc/source

Kohei Yoshida kohei at kemper.freedesktop.org
Tue Feb 15 20:49:55 PST 2011


 sc/source/core/data/table2.cxx     |    9 ++-------
 sc/source/core/data/table3.cxx     |    7 ++++---
 sc/source/ui/docshell/dbdocfun.cxx |    2 ++
 3 files changed, 8 insertions(+), 10 deletions(-)

New commits:
commit 01f778c49597172e0c567ecb1f3f4912e04640cf
Author: Kohei Yoshida <kyoshida at novell.com>
Date:   Tue Feb 15 23:49:17 2011 -0500

    More removal of inc/dec recalc level calls.

diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx
index 7b7d80a..9c12248 100644
--- a/sc/source/core/data/table2.cxx
+++ b/sc/source/core/data/table2.cxx
@@ -2494,16 +2494,11 @@ void ScTable::DBShowRow(SCROW nRow, bool bShow)
 {
     if (VALIDROW(nRow) && pRowFlags)
     {
-        bool bWasVis = !RowHidden(nRow);
-        IncRecalcLevel();
-        InitializeNoteCaptions();
-
         //	Filter-Flag immer setzen, auch wenn Hidden unveraendert
-        SetRowHidden(nRow, nRow, !bShow);
+        bool bChanged = SetRowHidden(nRow, nRow, !bShow);
         SetRowFiltered(nRow, nRow, !bShow);
-    DecRecalcLevel();
 
-        if (bWasVis != bShow)
+        if (bChanged)
         {
             ScChartListenerCollection* pCharts = pDocument->GetChartListenerCollection();
             if ( pCharts )
diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx
index cfb62b7..3f1f319 100644
--- a/sc/source/core/data/table3.cxx
+++ b/sc/source/core/data/table3.cxx
@@ -1639,10 +1639,9 @@ SCSIZE ScTable::Query(ScQueryParam& rParamOrg, BOOL bKeepSub)
                             aParam.nDestCol, aParam.nDestRow, aParam.nDestTab );
     }
 
-    InitializeNoteCaptions();
 
     if (aParam.bInplace)
-        IncRecalcLevel();       // #i116164# once for all entries
+        InitializeNoteCaptions();
 
     SCROW nRealRow2 = aParam.bUseDynamicRange ? aParam.nDynamicEndRow : aParam.nRow2;
     for (SCROW j = aParam.nRow1 + nHeader; j <= nRealRow2; ++j)
@@ -1721,8 +1720,10 @@ SCSIZE ScTable::Query(ScQueryParam& rParamOrg, BOOL bKeepSub)
     if (aParam.bInplace && bStarted)
         DBShowRows(nOldStart,nOldEnd, bOldResult);
 
+    if (aParam.bInplace)
+        SetDrawPageSize();
+
     delete[] pSpecial;
-    SetDrawPageSize();
     return nCount;
 }
 
diff --git a/sc/source/ui/docshell/dbdocfun.cxx b/sc/source/ui/docshell/dbdocfun.cxx
index 4a6e335..487a364 100644
--- a/sc/source/ui/docshell/dbdocfun.cxx
+++ b/sc/source/ui/docshell/dbdocfun.cxx
@@ -1109,7 +1109,9 @@ BOOL ScDBDocFunc::DoSubTotals( SCTAB nTab, const ScSubTotalParam& rParam,
                 Sort( nTab, aSortParam, FALSE, FALSE, bApi );
             }
 
+            pDoc->InitializeNoteCaptions(nTab);
             bSuccess = pDoc->DoSubTotals( nTab, aNewParam );
+            pDoc->SetDrawPageSize(nTab);
         }
         ScRange aDirtyRange( aNewParam.nCol1, aNewParam.nRow1, nTab,
             aNewParam.nCol2, aNewParam.nRow2, nTab );


More information about the Libreoffice-commits mailing list