From a952810ccb6730a7e533809eb9fdd29e34fadc9d Mon Sep 17 00:00:00 2001 From: Jeremias Maerki Date: Thu, 15 Dec 2005 10:18:22 +0000 Subject: Added checks that warn about tables and block-containers that are wider than the available content area. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@357000 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/fop/layoutmgr/BlockContainerLayoutManager.java | 9 +++++++++ src/java/org/apache/fop/layoutmgr/table/TableLayoutManager.java | 9 +++++++++ status.xml | 4 ++++ 3 files changed, 22 insertions(+) diff --git a/src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java b/src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java index 3c40a6108..7f9967dbe 100644 --- a/src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java @@ -28,6 +28,7 @@ import org.apache.fop.area.Area; import org.apache.fop.area.BlockViewport; import org.apache.fop.area.Block; import org.apache.fop.area.Trait; +import org.apache.fop.fo.FONode; import org.apache.fop.fo.flow.BlockContainer; import org.apache.fop.fo.properties.CommonAbsolutePosition; import org.apache.fop.area.CTM; @@ -225,6 +226,14 @@ public class BlockContainerLayoutManager extends BlockStackingLayoutManager absoluteCTM = CTM.getCTMandRelDims(getBlockContainerFO().getReferenceOrientation(), getBlockContainerFO().getWritingMode(), rect, relDims); + if (rect.getWidth() > context.getRefIPD()) { + log.warn(FONode.decorateWithContextInfo( + "The extent in inline-progression-direction (width) of a block-container is" + + " bigger than the available space (" + + rect.getWidth() + "mpt > " + context.getRefIPD() + "mpt)", + getBlockContainerFO())); + } + MinOptMax stackLimit = new MinOptMax(relDims.bpd); LinkedList returnedList = null; diff --git a/src/java/org/apache/fop/layoutmgr/table/TableLayoutManager.java b/src/java/org/apache/fop/layoutmgr/table/TableLayoutManager.java index cd5201ca3..630d31b6d 100644 --- a/src/java/org/apache/fop/layoutmgr/table/TableLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/table/TableLayoutManager.java @@ -41,6 +41,7 @@ import org.apache.fop.traits.SpaceVal; import java.util.Iterator; import java.util.LinkedList; import org.apache.fop.datatypes.LengthBase; +import org.apache.fop.fo.FONode; import org.apache.fop.fo.FObj; /** @@ -170,6 +171,14 @@ public class TableLayoutManager extends BlockStackingLayoutManager updateContentAreaIPDwithOverconstrainedAdjust(); } + if (getContentAreaIPD() > context.getRefIPD()) { + log.warn(FONode.decorateWithContextInfo( + "The extent in inline-progression-direction (width) of a table is" + + " bigger than the available space (" + + getContentAreaIPD() + "mpt > " + context.getRefIPD() + "mpt)", + getTable())); + } + // either works out table of column widths or if proportional-column-width function // is used works out total factor, so that value of single unit can be computed. int sumCols = 0; diff --git a/status.xml b/status.xml index a67405174..958eebd8b 100644 --- a/status.xml +++ b/status.xml @@ -27,6 +27,10 @@ + + Added checks that warn about tables and block-containers that are wider than + the available content area. + Bugfix: Footnotes were lost if the footnote appeared in centered text. -- cgit v1.2.3