From 73d344c18ead9a905871541d5d0d37c56c598a03 Mon Sep 17 00:00:00 2001 From: Eike Rathke Date: Thu, 24 Nov 2011 23:44:05 +0100 Subject: [PATCH] calc69: #i117952# invalidate page breaks when print range is removed # Original author: Niklas Nebel * found as LGPLv3-only fix at svn rev 1172137 (http://svn.apache.org/viewvc?view=revision&revision=1172137) --- sc/source/core/data/table1.cxx | 1 + sc/source/core/data/table5.cxx | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/sc/source/core/data/table1.cxx b/sc/source/core/data/table1.cxx index e88fba61c1e5..b746ffc863ee 100644 --- a/sc/source/core/data/table1.cxx +++ b/sc/source/core/data/table1.cxx @@ -1792,6 +1792,7 @@ void ScTable::RestorePrintRanges( const ScPrintSaverTab& rSaveTab ) SetRepeatColRange( rSaveTab.GetRepeatCol() ); SetRepeatRowRange( rSaveTab.GetRepeatRow() ); + InvalidatePageBreaks(); // #i117952# forget page breaks for an old print range UpdatePageBreaks(NULL); } diff --git a/sc/source/core/data/table5.cxx b/sc/source/core/data/table5.cxx index c6999dce9f70..e5d8dc85e6d7 100644 --- a/sc/source/core/data/table5.cxx +++ b/sc/source/core/data/table5.cxx @@ -1085,6 +1085,10 @@ Size ScTable::GetPageSize() const 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; -- 2.11.4.GIT