summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2011-11-24 23:44:05 +0100
committerEike Rathke <erack@redhat.com>2011-11-25 01:01:17 +0100
commit73d344c18ead9a905871541d5d0d37c56c598a03 (patch)
tree7261f62f19b00161ceae30f2b41b01eb79ac4187
parent871b87f9d3787967bfe1ff9dd9314d7b2a0f19c3 (diff)
calc69: #i117952# invalidate page breaks when print range is removed
# Original author: Niklas Nebel <nn@openoffice.org> * found as LGPLv3-only fix at svn rev 1172137 (http://svn.apache.org/viewvc?view=revision&revision=1172137)
-rw-r--r--sc/source/core/data/table1.cxx1
-rw-r--r--sc/source/core/data/table5.cxx4
2 files changed, 5 insertions, 0 deletions
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;