[ooo-build-commit] .: sc/inc sc/source

Kohei Yoshida kohei at kemper.freedesktop.org
Mon Oct 4 13:29:17 PDT 2010


 sc/inc/document.hxx                |    2 ++
 sc/inc/table.hxx                   |    2 +-
 sc/source/core/data/documen9.cxx   |    8 ++++++++
 sc/source/core/data/table2.cxx     |    4 ----
 sc/source/core/tool/consoli.cxx    |    2 ++
 sc/source/ui/docshell/olinefun.cxx |    9 ++++++++-
 6 files changed, 21 insertions(+), 6 deletions(-)

New commits:
commit 7009566d8229416fa203928d5defd83aee2014d1
Author: Kohei Yoshida <kyoshida at novell.com>
Date:   Mon Oct 4 16:28:31 2010 -0400

    Ported calc-perf-outlining-with-notes.diff from ooo-build.

diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index c59576b..6596dea 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -835,6 +835,8 @@ public:
         @param bForced  True = always create all captions, false = skip when Undo is disabled. */
     void            InitializeAllNoteCaptions( bool bForced = false );
 
+    void            SetDrawPageSize(SCTAB nTab);
+
     BOOL            ExtendMergeSel( SCCOL nStartCol, SCROW nStartRow,
                                 SCCOL& rEndCol, SCROW& rEndRow, const ScMarkData& rMark,
                                 BOOL bRefresh = FALSE, BOOL bAttrs = FALSE );
diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx
index 0e37f1b..f1d87e1 100644
--- a/sc/inc/table.hxx
+++ b/sc/inc/table.hxx
@@ -778,6 +778,7 @@ public:
     BOOL		IsSortCollatorGlobal() const;
     void		InitSortCollator( const ScSortParam& rPar );
     void		DestroySortCollator();
+    void        SetDrawPageSize( bool bResetStreamValid = true, bool bUpdateNoteCaptionPos = true );
 
 private:
     void		FillSeries( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
@@ -857,7 +858,6 @@ private:
     BOOL 		GetNextSpellingCell(SCCOL& rCol, SCROW& rRow, BOOL bInSel,
                                     const ScMarkData& rMark) const;
     BOOL		GetNextMarkedCell( SCCOL& rCol, SCROW& rRow, const ScMarkData& rMark );
-    void        SetDrawPageSize( bool bResetStreamValid = true, bool bUpdateNoteCaptionPos = true );
     BOOL		TestTabRefAbs(SCTAB nTable);
     void 		CompileDBFormula();
     void 		CompileDBFormula( BOOL bCreateFormulaString );
diff --git a/sc/source/core/data/documen9.cxx b/sc/source/core/data/documen9.cxx
index fcf21f2..ef2988c 100644
--- a/sc/source/core/data/documen9.cxx
+++ b/sc/source/core/data/documen9.cxx
@@ -226,6 +226,14 @@ void ScDocument::UpdateDrawPrinter()
     }
 }
 
+void ScDocument::SetDrawPageSize(SCTAB nTab)
+{
+    if (!ValidTab(nTab) || !pTab[nTab])
+        return;
+
+    pTab[nTab]->SetDrawPageSize();
+}
+
 sal_Bool ScDocument::IsChart( const SdrObject* pObject )
 {
     // #109985#
diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx
index d7068ce..3522f2c 100644
--- a/sc/source/core/data/table2.cxx
+++ b/sc/source/core/data/table2.cxx
@@ -2528,8 +2528,6 @@ void ScTable::ShowRow(SCROW nRow, bool bShow)
         bool bWasVis = !RowHidden(nRow);
         if (bWasVis != bShow)
         {
-            IncRecalcLevel();
-            InitializeNoteCaptions();
             ScDrawLayer* pDrawLayer = pDocument->GetDrawLayer();
             if (pDrawLayer)
             {
@@ -2544,8 +2542,6 @@ void ScTable::ShowRow(SCROW nRow, bool bShow)
             SetRowHidden(nRow, nRow, !bShow);
             if (bShow)
                 SetRowFiltered(nRow, nRow, false);
-        DecRecalcLevel();
-
             ScChartListenerCollection* pCharts = pDocument->GetChartListenerCollection();
             if ( pCharts )
                 pCharts->SetRangeDirty(ScRange( 0, nRow, nTab, MAXCOL, nRow, nTab ));
diff --git a/sc/source/core/tool/consoli.cxx b/sc/source/core/tool/consoli.cxx
index b1b018c..4fa6d3f 100644
--- a/sc/source/core/tool/consoli.cxx
+++ b/sc/source/core/tool/consoli.cxx
@@ -820,8 +820,10 @@ void ScConsData::OutputToDocument( ScDocument* pDestDoc, SCCOL nCol, SCROW nRow,
                 SCROW nOutEnd = nRow+nArrY+nNeeded-1;
                 BOOL bSize = FALSE;
                 pOutArr->Insert( nOutStart, nOutEnd, bSize );
+                pDestDoc->InitializeNoteCaptions(nTab);
                 for (SCROW nOutRow=nOutStart; nOutRow<=nOutEnd; nOutRow++)
                     pDestDoc->ShowRow( nOutRow, nTab, FALSE );
+                pDestDoc->SetDrawPageSize(nTab);
                 pDestDoc->UpdateOutlineRow( nOutStart, nOutEnd, nTab, FALSE );
 
                 //	Zwischentitel
diff --git a/sc/source/ui/docshell/olinefun.cxx b/sc/source/ui/docshell/olinefun.cxx
index 105783b..2a6a3cf 100644
--- a/sc/source/ui/docshell/olinefun.cxx
+++ b/sc/source/ui/docshell/olinefun.cxx
@@ -392,6 +392,7 @@ BOOL ScOutlineDocFunc::SelectLevel( SCTAB nTab, BOOL bColumns, USHORT nLevel,
                                     bColumns, nLevel ) );
     }
 
+    pDoc->InitializeNoteCaptions(nTab);
     ScSubOutlineIterator aIter( pArray );					// alle Eintraege
     ScOutlineEntry* pEntry;
     while ((pEntry=aIter.GetNext()) != NULL)
@@ -425,6 +426,7 @@ BOOL ScOutlineDocFunc::SelectLevel( SCTAB nTab, BOOL bColumns, USHORT nLevel,
         }
     }
 
+    pDoc->SetDrawPageSize(nTab);
     pDoc->UpdatePageBreaks( nTab );
 
     if (bPaint)
@@ -505,6 +507,7 @@ BOOL ScOutlineDocFunc::ShowMarkedOutlines( const ScRange& rRange, BOOL bRecord,
         nMax=0;
         pArray = pTable->GetRowArray();
         ScSubOutlineIterator aRowIter( pArray );
+        pDoc->InitializeNoteCaptions(nTab);
         while ((pEntry=aRowIter.GetNext()) != NULL)
         {
             nStart = pEntry->GetStart();
@@ -521,10 +524,10 @@ BOOL ScOutlineDocFunc::ShowMarkedOutlines( const ScRange& rRange, BOOL bRecord,
             if ( !pDoc->RowFiltered( i,nTab ) )				// weggefilterte nicht einblenden
                 pDoc->ShowRow( i, nTab, TRUE );
 
+        pDoc->SetDrawPageSize(nTab);
         pDoc->UpdatePageBreaks( nTab );
 
         rDocShell.PostPaint( 0,0,nTab, MAXCOL,MAXROW,nTab, PAINT_GRID | PAINT_LEFT | PAINT_TOP );
-
         rDocShell.SetDocumentModified();
         bDone = TRUE;
 
@@ -671,6 +674,7 @@ BOOL ScOutlineDocFunc::ShowOutline( SCTAB nTab, BOOL bColumns, USHORT nLevel, US
 
 //!	HideCursor();
 
+    pDoc->InitializeNoteCaptions(nTab);
     pEntry->SetHidden(FALSE);
     SCCOLROW i;
     for ( i = nStart; i <= nEnd; i++ )
@@ -701,6 +705,7 @@ BOOL ScOutlineDocFunc::ShowOutline( SCTAB nTab, BOOL bColumns, USHORT nLevel, US
 
     pArray->SetVisibleBelow( nLevel, nEntry, TRUE, TRUE );
 
+    pDoc->SetDrawPageSize(nTab);
     pDoc->InvalidatePageBreaks(nTab);
     pDoc->UpdatePageBreaks( nTab );
 
@@ -755,6 +760,7 @@ BOOL ScOutlineDocFunc::HideOutline( SCTAB nTab, BOOL bColumns, USHORT nLevel, US
 
 //!	HideCursor();
 
+    pDoc->InitializeNoteCaptions(nTab);
     pEntry->SetHidden(TRUE);
     SCCOLROW i;
     for ( i = nStart; i <= nEnd; i++ )
@@ -767,6 +773,7 @@ BOOL ScOutlineDocFunc::HideOutline( SCTAB nTab, BOOL bColumns, USHORT nLevel, US
 
     pArray->SetVisibleBelow( nLevel, nEntry, FALSE );
 
+    pDoc->SetDrawPageSize(nTab);
     pDoc->InvalidatePageBreaks(nTab);
     pDoc->UpdatePageBreaks( nTab );
 


More information about the ooo-build-commit mailing list