From ab6e2cc40a0c0dde6b98eec000ab94d1c7e35cb1 Mon Sep 17 00:00:00 2001 From: Vincent Hennebert Date: Mon, 18 Jan 2010 12:28:32 +0000 Subject: [PATCH] Bugzilla #46486: having a special page-master for the last page caused loss of content when normal blocks were mixed with blocks spanning all columns. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@900364 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/fop/area/MainReference.java | 14 +- .../org/apache/fop/layoutmgr/PageBreaker.java | 58 ++++---- status.xml | 4 + .../page-sequence_two-column_last-page_1.xml | 122 ++++++++++++++++ .../page-sequence_two-column_last-page_2.xml | 129 +++++++++++++++++ ...age-sequence_two-column_last-page_2bis.xml | 133 +++++++++++++++++ .../page-sequence_two-column_last-page_3.xml | 135 ++++++++++++++++++ .../page-sequence_two-column_last-page_4.xml | 122 ++++++++++++++++ .../page-sequence_two-column_last-page_5.xml | 134 +++++++++++++++++ .../page-sequence_two-column_last-page_6.xml | 129 +++++++++++++++++ 10 files changed, 949 insertions(+), 31 deletions(-) create mode 100644 test/layoutengine/standard-testcases/page-sequence_two-column_last-page_1.xml create mode 100644 test/layoutengine/standard-testcases/page-sequence_two-column_last-page_2.xml create mode 100644 test/layoutengine/standard-testcases/page-sequence_two-column_last-page_2bis.xml create mode 100644 test/layoutengine/standard-testcases/page-sequence_two-column_last-page_3.xml create mode 100644 test/layoutengine/standard-testcases/page-sequence_two-column_last-page_4.xml create mode 100644 test/layoutengine/standard-testcases/page-sequence_two-column_last-page_5.xml create mode 100644 test/layoutengine/standard-testcases/page-sequence_two-column_last-page_6.xml diff --git a/src/java/org/apache/fop/area/MainReference.java b/src/java/org/apache/fop/area/MainReference.java index 0922ebd01..dd53113af 100644 --- a/src/java/org/apache/fop/area/MainReference.java +++ b/src/java/org/apache/fop/area/MainReference.java @@ -19,8 +19,9 @@ package org.apache.fop.area; -import java.util.List; +import java.util.ArrayList; import java.util.Iterator; +import java.util.List; /** * The main-reference-area generated by an fo:region-body @@ -74,6 +75,17 @@ public class MainReference extends Area { return spanAreas; } + /** + * Do not use. Used to handle special page-master for last page: transfer the content + * that had already been added to a normal page to this main reference for the last + * page. TODO this is hacky. + * + * @param spans content already laid out + */ + public void setSpans(List spans) { + spanAreas = new ArrayList(spans); + } + /** * Get the span area currently being filled (i.e., the last span created). * @return the active span. diff --git a/src/java/org/apache/fop/layoutmgr/PageBreaker.java b/src/java/org/apache/fop/layoutmgr/PageBreaker.java index 134e69f31..25ecd5a75 100644 --- a/src/java/org/apache/fop/layoutmgr/PageBreaker.java +++ b/src/java/org/apache/fop/layoutmgr/PageBreaker.java @@ -23,6 +23,7 @@ import java.util.List; import java.util.ListIterator; import org.apache.fop.area.Block; +import org.apache.fop.area.BodyRegion; import org.apache.fop.area.Footnote; import org.apache.fop.area.PageViewport; import org.apache.fop.fo.Constants; @@ -289,7 +290,7 @@ public class PageBreaker extends AbstractBreaker { if (needColumnBalancing) { //column balancing for the last part - doPhase3(alg, partCount, originalList, effectiveList, false); + redoLayout(alg, partCount, originalList, effectiveList); return; } @@ -298,7 +299,7 @@ public class PageBreaker extends AbstractBreaker { //last part is reached if (lastPageMasterDefined) { //last-page condition - doPhase3(alg, partCount, originalList, effectiveList, true); + redoLayout(alg, partCount, originalList, effectiveList); return; } } @@ -308,16 +309,12 @@ public class PageBreaker extends AbstractBreaker { } /** - * Restart the algorithm at the break corresponding - * to the given partCount - * (currently only used to redo the part after the - * last break in case of column-balancing - * and/or a last page-master) + * Restart the algorithm at the break corresponding to the given partCount. Used to + * re-do the part after the last break in case of either column-balancing or a last + * page-master. */ - private void doPhase3(PageBreakingAlgorithm alg, int partCount, - BlockSequence originalList, BlockSequence effectiveList, - boolean isLastPart) { - + private void redoLayout(PageBreakingAlgorithm alg, int partCount, + BlockSequence originalList, BlockSequence effectiveList) { int newStartPos = 0; int restartPoint = pageProvider.getStartingPartIndexForLastPage(partCount); @@ -344,15 +341,10 @@ public class PageBreaker extends AbstractBreaker { pageProvider.setStartOfNextElementList(currentPageNum, pslm.getCurrentPV().getCurrentSpan().getCurrentFlowIndex()); - PageBreakingAlgorithm algRestart = null; - int optimalPageCount; //Make sure we only add the areas we haven't added already effectiveList.ignoreAtStart = newStartPos; - if (isLastPart) { - pageProvider.setLastPageIndex(currentPageNum); - } - + PageBreakingAlgorithm algRestart; if (needColumnBalancing) { AbstractBreaker.log.debug("Column balancing now!!!"); AbstractBreaker.log.debug("==================================================="); @@ -365,7 +357,13 @@ public class PageBreaker extends AbstractBreaker { pslm.getCurrentPV().getBodyRegion().getColumnCount()); AbstractBreaker.log.debug("==================================================="); } else { - //plain last page, no column balancing + // Handle special page-master for last page + BodyRegion currentBody = pageProvider.getPage(false, currentPageNum) + .getPageViewport().getBodyRegion(); + pageProvider.setLastPageIndex(currentPageNum); + BodyRegion lastBody = pageProvider.getPage(false, currentPageNum) + .getPageViewport().getBodyRegion(); + lastBody.getMainReference().setSpans(currentBody.getMainReference().getSpans()); AbstractBreaker.log.debug("Last page handling now!!!"); AbstractBreaker.log.debug("==================================================="); //Restart last page @@ -377,16 +375,25 @@ public class PageBreaker extends AbstractBreaker { AbstractBreaker.log.debug("==================================================="); } - optimalPageCount = algRestart.findBreakingPoints(effectiveList, + int optimalPageCount = algRestart.findBreakingPoints(effectiveList, newStartPos, 1, true, BreakingAlgorithm.ALL_BREAKS); AbstractBreaker.log.debug("restart: optimalPageCount= " + optimalPageCount + " pageBreaks.size()= " + algRestart.getPageBreaks().size()); boolean fitsOnePage - = optimalPageCount <= pslm.getCurrentPV().getBodyRegion().getColumnCount(); + = optimalPageCount <= pslm.getCurrentPV().getBodyRegion().getMainReference().getCurrentSpan().getColumnCount(); - if (isLastPart) { + if (needColumnBalancing) { + if (!fitsOnePage) { + AbstractBreaker.log.warn( + "Breaking algorithm produced more columns than are available."); + /* reenable when everything works + throw new IllegalStateException( + "Breaking algorithm must not produce more columns than available."); + */ + } + } else { if (fitsOnePage) { //Replace last page pslm.setCurrentPage(pageProvider.getPage(false, currentPageNum)); @@ -399,15 +406,6 @@ public class PageBreaker extends AbstractBreaker { pslm.setCurrentPage(pslm.makeNewPage(true, true)); return; } - } else { - if (!fitsOnePage) { - AbstractBreaker.log.warn( - "Breaking algorithm produced more columns than are available."); - /* reenable when everything works - throw new IllegalStateException( - "Breaking algorithm must not produce more columns than available."); - */ - } } addAreas(algRestart, optimalPageCount, originalList, effectiveList); diff --git a/status.xml b/status.xml index 853fbdf16..dcf1712ab 100644 --- a/status.xml +++ b/status.xml @@ -58,6 +58,10 @@ documents. Example: the fix of marks layering will be such a case when it's done. --> + + Bugfix: having a special page-master for the last page caused loss of content when normal + blocks were mixed with blocks spanning all columns. + Added possibility to customize PDF tagging via the ‘role’ property. diff --git a/test/layoutengine/standard-testcases/page-sequence_two-column_last-page_1.xml b/test/layoutengine/standard-testcases/page-sequence_two-column_last-page_1.xml new file mode 100644 index 000000000..ecc348a71 --- /dev/null +++ b/test/layoutengine/standard-testcases/page-sequence_two-column_last-page_1.xml @@ -0,0 +1,122 @@ + + + + + +

+ This test checks that a two-column document with a last page setting is properly rendered. +

+

+ Test case: last content fits on last page without re-layout. +

+
+ + + + + + + + + + + + + + + + + + + + + + + Page Header + + + Page Footer + + + Last Page Header + + + Last Page Footer + + + Lorem ipsum dolor sit amet, consectetur adipiscing elit. + In in egestas nisi. Etiam at ante eget velit placerat ullamcorper. Suspendisse potenti. + Nulla posuere turpis ac orci placerat vitae lacinia lectus tincidunt. Duis ultricies + diam et lectus tempor aliquam. Mauris ligula arcu, hendrerit imperdiet ultrices laoreet, + gravida sit amet metus. Donec vehicula iaculis condimentum. Sed eget tortor nec libero + venenatis tincidunt. + Curabitur dui tortor, congue in condimentum dapibus, + volutpat non ligula. Proin tincidunt, sem eget luctus iaculis, mi neque posuere dui, non + elementum ante diam quis odio. Nam blandit elit massa, vel tempus tortor. Phasellus et + sem nec ante dignissim pellentesque id sed est. Sed vel magna odio, quis condimentum + nibh. Mauris condimentum turpis vitae mauris mattis pulvinar. Donec tortor dolor, + molestie id pellentesque nec, adipiscing in massa. + Morbi semper sodales nisl, vitae sagittis orci adipiscing + feugiat. Quisque consectetur ullamcorper sapien, eget adipiscing orci imperdiet ac. + Integer leo ipsum, aliquam sagittis consequat consectetur, scelerisque nec diam. + Vestibulum urna mi, hendrerit ac lacinia et, eleifend vitae ligula. In a urna + quam. + Duis iaculis ultrices congue. Sed sodales iaculis + dapibus. Aenean vel felis odio, sed facilisis erat. Nam molestie, quam ac aliquam + cursus, lectus lectus ullamcorper massa, eget porttitor erat lectus a mi. Duis quis elit + at nunc convallis tempor sed nec risus. Nullam sit amet ante lectus, rutrum congue mi. + Curabitur dui risus, malesuada at varius vel, aliquam vel elit. Nunc posuere facilisis + risus, vitae ultrices velit tincidunt sed. + Integer dictum erat in nulla + accumsan in tincidunt mauris vehicula. Aenean sed enim ligula, sollicitudin porta magna. + Suspendisse scelerisque tincidunt purus, sit amet viverra libero porta eget. Aliquam + erat volutpat. Curabitur eu tempor leo. + Etiam placerat, ante vel lacinia mattis, tellus lectus + facilisis dui, id accumsan ante neque ut turpis. + + + + + + + + + + + + + + + + + + + +
diff --git a/test/layoutengine/standard-testcases/page-sequence_two-column_last-page_2.xml b/test/layoutengine/standard-testcases/page-sequence_two-column_last-page_2.xml new file mode 100644 index 000000000..75a736065 --- /dev/null +++ b/test/layoutengine/standard-testcases/page-sequence_two-column_last-page_2.xml @@ -0,0 +1,129 @@ + + + + + +

+ This test checks that a two-column document with a last page setting is properly rendered. +

+

+ Test case: last content fits on last page, but must be re-laid out (into two columns instead + of one.) +

+
+ + + + + + + + + + + + + + + + + + + + + + + Page Header + + + Page Footer + + + Last Page Header + + + Last Page Footer + + + Lorem ipsum dolor sit amet, consectetur adipiscing elit. + In in egestas nisi. Etiam at ante eget velit placerat ullamcorper. Suspendisse potenti. + Nulla posuere turpis ac orci placerat vitae lacinia lectus tincidunt. Duis ultricies + diam et lectus tempor aliquam. Mauris ligula arcu, hendrerit imperdiet ultrices laoreet, + gravida sit amet metus. Donec vehicula iaculis condimentum. Sed eget tortor nec libero + venenatis tincidunt. + Curabitur dui tortor, congue in condimentum dapibus, + volutpat non ligula. Proin tincidunt, sem eget luctus iaculis, mi neque posuere dui, non + elementum ante diam quis odio. Nam blandit elit massa, vel tempus tortor. Phasellus et + sem nec ante dignissim pellentesque id sed est. Sed vel magna odio, quis condimentum + nibh. Mauris condimentum turpis vitae mauris mattis pulvinar. Donec tortor dolor, + molestie id pellentesque nec, adipiscing in massa. + Morbi semper sodales nisl, vitae sagittis orci adipiscing + feugiat. Quisque consectetur ullamcorper sapien, eget adipiscing orci imperdiet ac. + Integer leo ipsum, aliquam sagittis consequat consectetur, scelerisque nec diam. + Vestibulum urna mi, hendrerit ac lacinia et, eleifend vitae ligula. In a urna + quam. + Duis iaculis ultrices congue. Sed sodales iaculis + dapibus. Aenean vel felis odio, sed facilisis erat. Nam molestie, quam ac aliquam + cursus, lectus lectus ullamcorper massa, eget porttitor erat lectus a mi. Duis quis elit + at nunc convallis tempor sed nec risus. Nullam sit amet ante lectus, rutrum congue mi. + Curabitur dui risus, malesuada at varius vel, aliquam vel elit. Nunc posuere facilisis + risus, vitae ultrices velit tincidunt sed. + Integer dictum erat in nulla + accumsan in tincidunt mauris vehicula. Aenean sed enim ligula, sollicitudin porta magna. + Suspendisse scelerisque tincidunt purus, sit amet viverra libero porta eget. Aliquam + erat volutpat. Curabitur eu tempor leo. + Etiam placerat, ante vel lacinia mattis, tellus lectus + facilisis dui, id accumsan ante neque ut turpis. Aenean lorem arcu, aliquam vel + tincidunt vel, malesuada quis nulla. Aliquam erat volutpat. Praesent sapien nisl, + malesuada eget hendrerit vel, posuere in lectus. + + + + + + + + + + + + + + + + + + + + + +
diff --git a/test/layoutengine/standard-testcases/page-sequence_two-column_last-page_2bis.xml b/test/layoutengine/standard-testcases/page-sequence_two-column_last-page_2bis.xml new file mode 100644 index 000000000..06ddb601e --- /dev/null +++ b/test/layoutengine/standard-testcases/page-sequence_two-column_last-page_2bis.xml @@ -0,0 +1,133 @@ + + + + + +

+ This test checks that a two-column document with a last page setting is properly rendered. +

+

+ Test case: last content fits on last page, but must be re-laid out (into two columns instead + of one.) +

+

+ Copy of page-sequence_two-column_last-page_2.xml, height of last page increased by 5pt so that + content does not exactly fit and node recovery mechanism is triggered. +

+
+ + + + + + + + + + + + + + + + + + + + + + + Page Header + + + Page Footer + + + Last Page Header + + + Last Page Footer + + + Lorem ipsum dolor sit amet, consectetur adipiscing elit. + In in egestas nisi. Etiam at ante eget velit placerat ullamcorper. Suspendisse potenti. + Nulla posuere turpis ac orci placerat vitae lacinia lectus tincidunt. Duis ultricies + diam et lectus tempor aliquam. Mauris ligula arcu, hendrerit imperdiet ultrices laoreet, + gravida sit amet metus. Donec vehicula iaculis condimentum. Sed eget tortor nec libero + venenatis tincidunt. + Curabitur dui tortor, congue in condimentum dapibus, + volutpat non ligula. Proin tincidunt, sem eget luctus iaculis, mi neque posuere dui, non + elementum ante diam quis odio. Nam blandit elit massa, vel tempus tortor. Phasellus et + sem nec ante dignissim pellentesque id sed est. Sed vel magna odio, quis condimentum + nibh. Mauris condimentum turpis vitae mauris mattis pulvinar. Donec tortor dolor, + molestie id pellentesque nec, adipiscing in massa. + Morbi semper sodales nisl, vitae sagittis orci adipiscing + feugiat. Quisque consectetur ullamcorper sapien, eget adipiscing orci imperdiet ac. + Integer leo ipsum, aliquam sagittis consequat consectetur, scelerisque nec diam. + Vestibulum urna mi, hendrerit ac lacinia et, eleifend vitae ligula. In a urna + quam. + Duis iaculis ultrices congue. Sed sodales iaculis + dapibus. Aenean vel felis odio, sed facilisis erat. Nam molestie, quam ac aliquam + cursus, lectus lectus ullamcorper massa, eget porttitor erat lectus a mi. Duis quis elit + at nunc convallis tempor sed nec risus. Nullam sit amet ante lectus, rutrum congue mi. + Curabitur dui risus, malesuada at varius vel, aliquam vel elit. Nunc posuere facilisis + risus, vitae ultrices velit tincidunt sed. + Integer dictum erat in nulla + accumsan in tincidunt mauris vehicula. Aenean sed enim ligula, sollicitudin porta magna. + Suspendisse scelerisque tincidunt purus, sit amet viverra libero porta eget. Aliquam + erat volutpat. Curabitur eu tempor leo. + Etiam placerat, ante vel lacinia mattis, tellus lectus + facilisis dui, id accumsan ante neque ut turpis. Aenean lorem arcu, aliquam vel + tincidunt vel, malesuada quis nulla. Aliquam erat volutpat. Praesent sapien nisl, + malesuada eget hendrerit vel, posuere in lectus. + + + + + + + + + + + + + + + + + + + + + +
diff --git a/test/layoutengine/standard-testcases/page-sequence_two-column_last-page_3.xml b/test/layoutengine/standard-testcases/page-sequence_two-column_last-page_3.xml new file mode 100644 index 000000000..fa5437323 --- /dev/null +++ b/test/layoutengine/standard-testcases/page-sequence_two-column_last-page_3.xml @@ -0,0 +1,135 @@ + + + + + +

+ This test checks that a two-column document with a last page setting is properly rendered. +

+

+ Test case: last content does not fit on last page, normal page master must be used and empty + last page produced. +

+
+ + + + + + + + + + + + + + + + + + + + + + + Page Header + + + Page Footer + + + Last Page Header + + + Last Page Footer + + + Lorem ipsum dolor sit amet, consectetur adipiscing elit. + In in egestas nisi. Etiam at ante eget velit placerat ullamcorper. Suspendisse potenti. + Nulla posuere turpis ac orci placerat vitae lacinia lectus tincidunt. Duis ultricies + diam et lectus tempor aliquam. Mauris ligula arcu, hendrerit imperdiet ultrices laoreet, + gravida sit amet metus. Donec vehicula iaculis condimentum. Sed eget tortor nec libero + venenatis tincidunt. + Curabitur dui tortor, congue in condimentum dapibus, + volutpat non ligula. Proin tincidunt, sem eget luctus iaculis, mi neque posuere dui, non + elementum ante diam quis odio. Nam blandit elit massa, vel tempus tortor. Phasellus et + sem nec ante dignissim pellentesque id sed est. Sed vel magna odio, quis condimentum + nibh. Mauris condimentum turpis vitae mauris mattis pulvinar. Donec tortor dolor, + molestie id pellentesque nec, adipiscing in massa. + Morbi semper sodales nisl, vitae sagittis orci adipiscing + feugiat. Quisque consectetur ullamcorper sapien, eget adipiscing orci imperdiet ac. + Integer leo ipsum, aliquam sagittis consequat consectetur, scelerisque nec diam. + Vestibulum urna mi, hendrerit ac lacinia et, eleifend vitae ligula. In a urna + quam. + Duis iaculis ultrices congue. Sed sodales iaculis + dapibus. Aenean vel felis odio, sed facilisis erat. Nam molestie, quam ac aliquam + cursus, lectus lectus ullamcorper massa, eget porttitor erat lectus a mi. Duis quis elit + at nunc convallis tempor sed nec risus. Nullam sit amet ante lectus, rutrum congue mi. + Curabitur dui risus, malesuada at varius vel, aliquam vel elit. Nunc posuere facilisis + risus, vitae ultrices velit tincidunt sed. + Integer dictum erat in nulla + accumsan in tincidunt mauris vehicula. Aenean sed enim ligula, sollicitudin porta magna. + Suspendisse scelerisque tincidunt purus, sit amet viverra libero porta eget. Aliquam + erat volutpat. Curabitur eu tempor leo. + Etiam placerat, ante vel lacinia mattis, tellus lectus + facilisis dui, id accumsan ante neque ut turpis. Aenean lorem arcu, aliquam vel + tincidunt vel, malesuada quis nulla. Aliquam erat volutpat. Praesent sapien nisl, + malesuada eget hendrerit vel, posuere in lectus. + Quisque porttitor tellus a leo adipiscing malesuada. Nunc + molestie, erat et ullamcorper vulputate, augue eros lobortis ligula, non fringilla diam + tortor a nunc. Aenean ante sapien, bibendum in gravida rhoncus, mollis ut arcu. Sed + magna massa, feugiat eu adipiscing ac, tincidunt quis mi. Mauris fermentum ullamcorper + magna, eget molestie felis auctor quis. + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/test/layoutengine/standard-testcases/page-sequence_two-column_last-page_4.xml b/test/layoutengine/standard-testcases/page-sequence_two-column_last-page_4.xml new file mode 100644 index 000000000..2d2c14dd7 --- /dev/null +++ b/test/layoutengine/standard-testcases/page-sequence_two-column_last-page_4.xml @@ -0,0 +1,122 @@ + + + + + +

+ This test checks that a two-column document with a last page setting is properly rendered. +

+

+ Test case: last content spans all columns and does not fit on last page, normal page master + must be used and empty last page produced. +

+
+ + + + + + + + + + + + + + + + + + + + + + + Page Header + + + Page Footer + + + Last Page Header + + + Last Page Footer + + + Lorem ipsum dolor sit amet, consectetur adipiscing elit. + In in egestas nisi. Etiam at ante eget velit placerat ullamcorper. Suspendisse potenti. + Nulla posuere turpis ac orci placerat vitae lacinia lectus tincidunt. Duis ultricies + diam et lectus tempor aliquam. Mauris ligula arcu, hendrerit imperdiet ultrices laoreet, + gravida sit amet metus. Donec vehicula iaculis condimentum. Sed eget tortor nec libero + venenatis tincidunt. + Curabitur dui tortor, congue in condimentum dapibus, + volutpat non ligula. Proin tincidunt, sem eget luctus iaculis, mi neque posuere dui, non + elementum ante diam quis odio. Nam blandit elit massa, vel tempus tortor. Phasellus et + sem nec ante dignissim pellentesque id sed est. Sed vel magna odio, quis condimentum + nibh. Mauris condimentum turpis vitae mauris mattis pulvinar. Donec tortor dolor, + molestie id pellentesque nec, adipiscing in massa. + Morbi semper sodales nisl, vitae sagittis orci adipiscing + feugiat. Quisque consectetur ullamcorper sapien, eget adipiscing orci imperdiet ac. + Integer leo ipsum, aliquam sagittis consequat consectetur, scelerisque nec diam. + Vestibulum urna mi, hendrerit ac lacinia et, eleifend vitae ligula. In a urna + quam. + Duis iaculis ultrices congue. Sed sodales iaculis + dapibus. Aenean vel felis odio, sed facilisis erat. Nam molestie, quam ac aliquam + cursus, lectus lectus ullamcorper massa, eget porttitor erat lectus a mi. Duis quis elit + at nunc convallis tempor sed nec risus. Nullam sit amet ante lectus, rutrum congue mi. + Curabitur dui risus, malesuada at varius vel, aliquam vel elit. + Integer dictum erat in nulla accumsan in tincidunt mauris + vehicula. Aenean sed enim ligula, sollicitudin porta magna. Suspendisse scelerisque + tincidunt purus, sit amet viverra libero porta eget. Aliquam erat volutpat. Curabitur eu + tempor leo. + Quisque porttitor tellus a leo + adipiscing malesuada. Nunc molestie, erat et ullamcorper vulputate, augue eros lobortis + ligula, non fringilla diam tortor a nunc. Aenean ante sapien, bibendum in gravida + rhoncus, mollis ut arcu. Sed magna massa, feugiat eu adipiscing ac, tincidunt quis mi. + Mauris fermentum ullamcorper magna, eget molestie felis auctor quis. + + + + + + + + + + + + + + + + + + +
diff --git a/test/layoutengine/standard-testcases/page-sequence_two-column_last-page_5.xml b/test/layoutengine/standard-testcases/page-sequence_two-column_last-page_5.xml new file mode 100644 index 000000000..cf92bdb6d --- /dev/null +++ b/test/layoutengine/standard-testcases/page-sequence_two-column_last-page_5.xml @@ -0,0 +1,134 @@ + + + + + +

+ This test checks that a two-column document with a last page setting is properly rendered. +

+

+ Test case: last content does not fit on last page, and there is not even space left to fit any + part of it after switching to last-page master. +

+
+ + + + + + + + + + + + + + + + + + + + + + + Page Header + + + Page Footer + + + Last Page Header + + + Last Page Footer + + + Lorem ipsum dolor sit amet, consectetur adipiscing elit. + In in egestas nisi. Etiam at ante eget velit placerat ullamcorper. Suspendisse potenti. + Nulla posuere turpis ac orci placerat vitae lacinia lectus tincidunt. Duis ultricies + diam et lectus tempor aliquam. Mauris ligula arcu, hendrerit imperdiet ultrices laoreet, + gravida sit amet metus. Donec vehicula iaculis condimentum. Sed eget tortor nec libero + venenatis tincidunt. + Curabitur dui tortor, congue in condimentum dapibus, + volutpat non ligula. Proin tincidunt, sem eget luctus iaculis, mi neque posuere dui, non + elementum ante diam quis odio. Nam blandit elit massa, vel tempus tortor. Phasellus et + sem nec ante dignissim pellentesque id sed est. Sed vel magna odio, quis condimentum + nibh. Mauris condimentum turpis vitae mauris mattis pulvinar. Donec tortor dolor, + molestie id pellentesque nec, adipiscing in massa. + Morbi semper sodales nisl, vitae sagittis orci adipiscing + feugiat. Quisque consectetur ullamcorper sapien, eget adipiscing orci imperdiet ac. + Integer leo ipsum, aliquam sagittis consequat consectetur, scelerisque nec diam. + Vestibulum urna mi, hendrerit ac lacinia et, eleifend vitae ligula. In a urna + quam. + Duis iaculis ultrices congue. Sed sodales iaculis + dapibus. Aenean vel felis odio, sed facilisis erat. Nam molestie, quam ac aliquam + cursus, lectus lectus ullamcorper massa, eget porttitor erat lectus a mi. Duis quis elit + at nunc convallis tempor sed nec risus. Nullam sit amet ante lectus, rutrum congue mi. + Curabitur dui risus, malesuada at varius vel, aliquam vel elit. + Integer dictum erat in nulla accumsan in tincidunt mauris + vehicula. Aenean sed enim ligula, sollicitudin porta magna. Suspendisse scelerisque + tincidunt purus, sit amet viverra libero porta eget. Aliquam erat volutpat. Curabitur eu + tempor leo. + Etiam placerat, ante vel + lacinia mattis, tellus lectus facilisis dui, id accumsan ante neque ut turpis. Aenean + lorem arcu, aliquam vel tincidunt vel, malesuada quis nulla. Aliquam erat volutpat. + Praesent sapien nisl, malesuada eget hendrerit vel, posuere in lectus. + Quisque porttitor tellus a leo adipiscing malesuada. Nunc + molestie, erat et ullamcorper vulputate, augue eros lobortis ligula, non fringilla diam + tortor a nunc. Aenean ante sapien, bibendum in gravida rhoncus, mollis ut arcu. Sed + magna massa, feugiat eu adipiscing ac, tincidunt quis mi. Mauris fermentum ullamcorper + magna, eget molestie felis auctor quis. + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/test/layoutengine/standard-testcases/page-sequence_two-column_last-page_6.xml b/test/layoutengine/standard-testcases/page-sequence_two-column_last-page_6.xml new file mode 100644 index 000000000..f5ff95269 --- /dev/null +++ b/test/layoutengine/standard-testcases/page-sequence_two-column_last-page_6.xml @@ -0,0 +1,129 @@ + + + + + +

+ This test checks that a two-column document with a last page setting is properly rendered. +

+

+ Test case: last content spans all columns and does not fit on last page, and there is not even + space left to fit any part of it after switching to last-page master. +

+
+ + + + + + + + + + + + + + + + + + + + + + + Page Header + + + Page Footer + + + Last Page Header + + + Last Page Footer + + + Lorem ipsum dolor sit amet, consectetur adipiscing elit. + In in egestas nisi. Etiam at ante eget velit placerat ullamcorper. Suspendisse potenti. + Nulla posuere turpis ac orci placerat vitae lacinia lectus tincidunt. Duis ultricies + diam et lectus tempor aliquam. Mauris ligula arcu, hendrerit imperdiet ultrices laoreet, + gravida sit amet metus. Donec vehicula iaculis condimentum. Sed eget tortor nec libero + venenatis tincidunt. + Curabitur dui tortor, congue in condimentum dapibus, + volutpat non ligula. Proin tincidunt, sem eget luctus iaculis, mi neque posuere dui, non + elementum ante diam quis odio. Nam blandit elit massa, vel tempus tortor. Phasellus et + sem nec ante dignissim pellentesque id sed est. Sed vel magna odio, quis condimentum + nibh. Mauris condimentum turpis vitae mauris mattis pulvinar. Donec tortor dolor, + molestie id pellentesque nec, adipiscing in massa. + Morbi semper sodales nisl, vitae sagittis orci adipiscing + feugiat. Quisque consectetur ullamcorper sapien, eget adipiscing orci imperdiet ac. + Integer leo ipsum, aliquam sagittis consequat consectetur, scelerisque nec diam. + Vestibulum urna mi, hendrerit ac lacinia et, eleifend vitae ligula. In a urna + quam. + Duis iaculis ultrices congue. Sed sodales iaculis + dapibus. Aenean vel felis odio, sed facilisis erat. Nam molestie, quam ac aliquam + cursus, lectus lectus ullamcorper massa, eget porttitor erat lectus a mi. Duis quis elit + at nunc convallis tempor sed nec risus. Nullam sit amet ante lectus, rutrum congue mi. + Curabitur dui risus, malesuada at varius vel, aliquam vel elit. + Integer dictum erat in nulla accumsan in tincidunt mauris + vehicula. Aenean sed enim ligula, sollicitudin porta magna. Suspendisse scelerisque + tincidunt purus, sit amet viverra libero porta eget. Aliquam erat volutpat. Curabitur eu + tempor leo. + Etiam placerat, ante vel lacinia mattis, tellus lectus + facilisis dui, id accumsan ante neque ut turpis. Aenean lorem arcu, aliquam vel + tincidunt vel, malesuada quis nulla. Aliquam erat volutpat. Praesent sapien nisl, + malesuada eget hendrerit vel, posuere in lectus. + Quisque porttitor tellus a leo + adipiscing malesuada. Nunc molestie, erat et ullamcorper vulputate, augue eros lobortis + ligula, non fringilla diam tortor a nunc. Aenean ante sapien, bibendum in gravida + rhoncus, mollis ut arcu. Sed magna massa, feugiat eu adipiscing ac, tincidunt quis mi. + Mauris fermentum ullamcorper magna, eget molestie felis auctor quis. + + + + + + + + + + + + + + + + + + + + +
-- 2.39.5