You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by ss...@apache.org on 2015/02/09 10:53:37 UTC

svn commit: r1658340 - in /xmlgraphics/fop/trunk: src/java/org/apache/fop/layoutmgr/table/ test/layoutengine/standard-testcases/

Author: ssteiner
Date: Mon Feb  9 09:53:37 2015
New Revision: 1658340

URL: http://svn.apache.org/r1658340
Log:
FOP-2447: Text cut off for changing IPD for page starting with a table

Added:
    xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/flow_changing-ipd_break-before-table2.xml   (with props)
Modified:
    xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/table/TableLayoutManager.java
    xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/flow_changing-ipd_break-before-table.xml

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/table/TableLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/table/TableLayoutManager.java?rev=1658340&r1=1658339&r2=1658340&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/table/TableLayoutManager.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/table/TableLayoutManager.java Mon Feb  9 09:53:37 2015
@@ -296,7 +296,7 @@ public class TableLayoutManager extends
             int breakBefore = BreakUtil.compareBreakClasses(getTable().getBreakBefore(),
                     childLC.getBreakBefore());
             if (breakBefore != Constants.EN_AUTO) {
-                returnList.add(0, new BreakElement(getAuxiliaryPosition(), 0,
+                returnList.add(0, new BreakElement(new LeafPosition(getParent(), 0), 0,
                         -KnuthElement.INFINITE, breakBefore, context));
             }
         }
@@ -305,7 +305,7 @@ public class TableLayoutManager extends
         int breakAfter = BreakUtil.compareBreakClasses(getTable().getBreakAfter(),
                 childLC.getBreakAfter());
         if (breakAfter != Constants.EN_AUTO) {
-            returnList.add(new BreakElement(getAuxiliaryPosition(),
+            returnList.add(new BreakElement(new LeafPosition(getParent(), 0),
                     0, -KnuthElement.INFINITE, breakAfter, context));
         }
 

Modified: xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/flow_changing-ipd_break-before-table.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/flow_changing-ipd_break-before-table.xml?rev=1658340&r1=1658339&r2=1658340&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/flow_changing-ipd_break-before-table.xml (original)
+++ xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/flow_changing-ipd_break-before-table.xml Mon Feb  9 09:53:37 2015
@@ -68,7 +68,7 @@
   <checks>
     <eval expected="Before the table" xpath="//pageViewport[1]//flow/block[1]//text"/>
     <!-- Test does not really matter, just make sure document is processed successfully -->
-    <eval expected="150000"           xpath="//pageViewport[2]//flow/block[1]/@ipd"/>
+    <eval expected="200000"           xpath="//pageViewport[2]//flow/block[1]/@ipd"/>
     <eval expected="22000"            xpath="//pageViewport[2]//flow/block[1]/@bpd"/>
   </checks>
 </testcase>

Added: xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/flow_changing-ipd_break-before-table2.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/flow_changing-ipd_break-before-table2.xml?rev=1658340&view=auto
==============================================================================
--- xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/flow_changing-ipd_break-before-table2.xml (added)
+++ xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/flow_changing-ipd_break-before-table2.xml Mon Feb  9 09:53:37 2015
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<!-- $Id$ -->
+<testcase>
+  <info>
+    <p>
+      Bugfix: 
+    </p>
+  </info>
+  <fo>
+    <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
+      <fo:layout-master-set>
+        <fo:simple-page-master page-width="216mm" page-height="303mm" master-name="Page1">
+          <fo:region-body region-name="PageBody"/>
+        </fo:simple-page-master>
+        <fo:simple-page-master page-width="210mm" page-height="297mm" master-name="Page3">
+          <fo:region-body region-name="PageBody" />
+        </fo:simple-page-master>
+        <fo:page-sequence-master master-name="StatementPages">
+          <fo:repeatable-page-master-alternatives>
+            <fo:conditional-page-master-reference master-reference="Page1" page-position="first"/>
+            <fo:conditional-page-master-reference master-reference="Page3" page-position="last"/>
+            <fo:conditional-page-master-reference master-reference="Page3" page-position="rest"/>
+          </fo:repeatable-page-master-alternatives>
+        </fo:page-sequence-master>
+      </fo:layout-master-set>
+      <fo:page-sequence format="1" id="th_default_sequence1" initial-page-number="auto" master-reference="StatementPages">
+        <fo:flow flow-name="PageBody">
+          <fo:block>Before the table</fo:block>
+          <fo:table table-layout="fixed" page-break-before="always" border-collapse="collapse">
+            <fo:table-column />
+            <fo:table-body>
+              <fo:table-row display-align="center" space-before="7pt" vertical-align="middle" height="1cm">
+                <fo:table-cell background-color="#E6E6E6" border-bottom-color="silver" border-bottom-style="solid" border-bottom-width="1pt">
+                  <fo:block>
+                    <fo:block color="rgb-icc(0, 161, 222, #CMYK, 0.85, 0.19, 0, 0) " font-family="TheSansB7" font-size="12pt" font-style="normal" font-weight="normal" line-height="14pt" text-align="right">Investment details</fo:block>
+                  </fo:block>
+                </fo:table-cell>
+              </fo:table-row>
+
+            </fo:table-body>
+          </fo:table>
+          <fo:block break-before="page"/>
+        </fo:flow>
+      </fo:page-sequence>
+    </fo:root>
+  </fo>
+  <checks>
+    <eval expected="Before the table" xpath="//pageViewport[1]//flow/block[1]//text"/>
+    <eval expected="595275" xpath="//pageViewport[2]//flow/block[1]/@ipd"/>
+    <eval expected="28846" xpath="//pageViewport[2]//flow/block[1]/@bpd"/>
+  </checks>
+</testcase>

Propchange: xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/flow_changing-ipd_break-before-table2.xml
------------------------------------------------------------------------------
    svn:eol-style = native



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org