summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremias Maerki <jeremias@apache.org>2005-12-15 10:18:22 +0000
committerJeremias Maerki <jeremias@apache.org>2005-12-15 10:18:22 +0000
commita952810ccb6730a7e533809eb9fdd29e34fadc9d (patch)
tree8cc4dad9f6ef7f9d7bd615283a638ce2a0762792
parent2a0cb0999572a6a7a8a759711ca88a5b770dfaa6 (diff)
downloadxmlgraphics-fop-a952810ccb6730a7e533809eb9fdd29e34fadc9d.tar.gz
xmlgraphics-fop-a952810ccb6730a7e533809eb9fdd29e34fadc9d.zip
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
-rw-r--r--src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java9
-rw-r--r--src/java/org/apache/fop/layoutmgr/table/TableLayoutManager.java9
-rw-r--r--status.xml4
3 files changed, 22 insertions, 0 deletions
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 @@
<changes>
<release version="FOP Trunk">
+ <action context="Code" dev="JM" type="add">
+ Added checks that warn about tables and block-containers that are wider than
+ the available content area.
+ </action>
<action context="Code" dev="JM" type="fix" fixes-bug="37880">
Bugfix: Footnotes were lost if the footnote appeared in centered text.
</action>