Commits

Anonymous committed 1c6c8de

calc69: #i117952# invalidate page breaks when print range is removed

Comments (0)

Files changed (2)

sc/source/core/data/table1.cxx

 {
     aPrintRanges.clear();
     bPrintEntireSheet = sal_False;
+    InvalidatePageBreaks();     // #i117952# forget page breaks for an old print range
 
     if (IsStreamValid())
         SetStreamValid(sal_False);
 	SetRepeatColRange( rSaveTab.GetRepeatCol() );
 	SetRepeatRowRange( rSaveTab.GetRepeatRow() );
 
+    InvalidatePageBreaks();     // #i117952# forget page breaks for an old print range
     UpdatePageBreaks(NULL);
 }
 

sc/source/core/data/table5.cxx

 
 void ScTable::SetRepeatArea( SCCOL nStartCol, SCCOL nEndCol, SCROW nStartRow, SCROW nEndRow )
 {
+    // #i117952# page break calculation uses these values (set from ScPrintFunc), not pRepeatColRange/pRepeatRowRange
+    if ( nStartCol != nRepeatStartX || nEndCol != nRepeatEndX || nStartRow != nRepeatStartY || nEndRow != nRepeatEndY )
+        InvalidatePageBreaks();
+
 	nRepeatStartX = nStartCol;
 	nRepeatEndX   = nEndCol;
 	nRepeatStartY = nStartRow;