From: Jeremias Maerki Date: Sun, 1 Apr 2007 10:02:43 +0000 (+0000) Subject: Bugfix for keep-with-next inside tables: X-Git-Tag: fop-0_94~162 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=5ac9b91bfbbe06b232c188ec2d0f0b150661ddb0;p=xmlgraphics-fop.git Bugfix for keep-with-next inside tables: Once a keep-with-next was set inside a table, the FO following the table would always be glued to the previous table. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@524571 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/java/org/apache/fop/layoutmgr/table/TableContentLayoutManager.java b/src/java/org/apache/fop/layoutmgr/table/TableContentLayoutManager.java index 44a13af8b..c3e1a41da 100644 --- a/src/java/org/apache/fop/layoutmgr/table/TableContentLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/table/TableContentLayoutManager.java @@ -235,6 +235,12 @@ public class TableContentLayoutManager implements PercentBaseContext { if (!isSeparateBorderModel()) { resolveNormalBeforeAfterBordersForRowGroup(rowGroup, iter); } + + //Reset keep-with-next when remaining inside the table. + //The context flag is only used to propagate keep-with-next to the outside. + //The clearing is ok here because createElementsForRowGroup already handles + //the keep when inside a table. + context.setFlags(LayoutContext.KEEP_WITH_NEXT_PENDING, false); //Element list creation createElementsForRowGroup(context, alignment, bodyType, diff --git a/status.xml b/status.xml index 4772cb821..105fe986d 100644 --- a/status.xml +++ b/status.xml @@ -28,6 +28,10 @@ + + Fixed a problem with keep-with-next on table-rows. Once a keep-with-next was set + inside a table, the FO following the table would always be glued to the previous table. + Fixed a problem with the auto-rotate-landscape setting in the PostScript renderer. It didn't generate the right setpagedevice command. diff --git a/test/layoutengine/standard-testcases/table-row_keep-with-next2.xml b/test/layoutengine/standard-testcases/table-row_keep-with-next2.xml new file mode 100644 index 000000000..55086e577 --- /dev/null +++ b/test/layoutengine/standard-testcases/table-row_keep-with-next2.xml @@ -0,0 +1,69 @@ + + + + + +

+ This test checks keep-with-next behaviour on a table-row. +

+

+ There used to be a bug where the keep-with-next signal wouldn't get cleared and + resulted in too little break possibilities. +

+
+ + + + + + + + + + + + + + + line1 + + + + + line1 + line2 + + + + + block + + + + + + + + + + + + 3 + + +