diff options
Diffstat (limited to 'src')
4 files changed, 22 insertions, 7 deletions
diff --git a/src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java b/src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java index 979868183..70ad376c0 100644 --- a/src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java @@ -1040,9 +1040,6 @@ public class BlockContainerLayoutManager extends BlockStackingLayoutManager impl /** {@inheritDoc} */ public boolean handleOverflow(int milliPoints) { - if (width.getEnum() == EN_AUTO) { - return false; - } if (milliPoints > this.horizontalOverflow) { this.horizontalOverflow = milliPoints; } diff --git a/src/java/org/apache/fop/layoutmgr/BlockLevelEventProducer.java b/src/java/org/apache/fop/layoutmgr/BlockLevelEventProducer.java index d9de09a46..387e5bbb9 100644 --- a/src/java/org/apache/fop/layoutmgr/BlockLevelEventProducer.java +++ b/src/java/org/apache/fop/layoutmgr/BlockLevelEventProducer.java @@ -132,6 +132,23 @@ public interface BlockLevelEventProducer extends EventProducer { Locator loc) throws LayoutException; /** + * Contents overflow a static region viewport. + * @param source the event source + * @param elementName the formatting object + * @param page the page number/name where the overflow happened + * @param amount the amount by which the contents overflow (in mpt) + * @param clip true if the content will be clipped + * @param canRecover indicates whether FOP can recover from this problem and continue working + * @param loc the location of the error or null + * @throws LayoutException the layout error provoked by the method call + * @event.severity FATAL + */ + void staticRegionOverflow(Object source, String elementName, + String page, + int amount, boolean clip, boolean canRecover, + Locator loc) throws LayoutException; + + /** * Indicates that FOP doesn't support flows that are not mapped to region-body, yet. * @param source the event source * @param flowName the flow name diff --git a/src/java/org/apache/fop/layoutmgr/BlockLevelEventProducer.xml b/src/java/org/apache/fop/layoutmgr/BlockLevelEventProducer.xml index 5431e3ec5..477133ae1 100644 --- a/src/java/org/apache/fop/layoutmgr/BlockLevelEventProducer.xml +++ b/src/java/org/apache/fop/layoutmgr/BlockLevelEventProducer.xml @@ -22,9 +22,10 @@ <message key="tableFixedAutoWidthNotSupported">table-layout="fixed" and width="auto", but auto-layout not supported => assuming width="100%".{{locator}}</message> <message key="objectTooWide">The extent in inline-progression-direction (width) of a {elementName} is bigger than the available space ({effIPD}mpt > {maxIPD}mpt).{{locator}}</message> <message key="overconstrainedAdjustEndIndent">An {elementName} {{locator}} is wider than the available room in inline-progression-dimension. Adjusting end-indent based on overconstrained geometry rules (XSL 1.1, ch. 5.3.4)</message> - <message key="viewportIPDOverflow">The contents of {elementName} exceed its 'width' value by {amount} millipoints.{clip,if, Content will be clipped.}{{locator}}</message> - <message key="viewportBPDOverflow">The contents of {elementName} exceed its 'height' value by {amount} millipoints.{clip,if, Content will be clipped.}{{locator}}</message> - <message key="regionOverflow">The contents of {elementName} on page {page} exceed its 'extent' value by {amount} millipoints.{clip,if, Content will be clipped.}{{locator}}</message> + <message key="viewportIPDOverflow">Content overflows the viewport of an {elementName} in inline-progression direction by {amount} millipoints.{clip,if, Content will be clipped.}{{locator}}</message> + <message key="viewportBPDOverflow">Content overflows the viewport of an {elementName} in block-progression direction by {amount} millipoints.{clip,if, Content will be clipped.}{{locator}}</message> + <message key="staticRegionOverflow">The contents of {elementName} on page {page} exceed its 'extent' value by {amount} millipoints.{clip,if, Content will be clipped.}{{locator}}</message> + <message key="regionOverflow">The contents of {elementName} on page {page} exceed its viewport by {amount} millipoints.{clip,if, Content will be clipped.}{{locator}}</message> <message key="flowNotMappingToRegionBody">Flow "{flowName}" does not map to the region-body in page-master "{masterName}". FOP presently does not support this.{{locator}}</message> <message key="pageSequenceMasterExhausted">Subsequences exhausted in page-sequence-master "{pageSequenceMasterName}", {canRecover,if,using previous subsequence,cannot recover}.{{locator}}</message> <message key="missingSubsequencesInPageSequenceMaster">No subsequences in page-sequence-master "{pageSequenceMasterName}".{{locator}}</message> diff --git a/src/java/org/apache/fop/layoutmgr/StaticContentLayoutManager.java b/src/java/org/apache/fop/layoutmgr/StaticContentLayoutManager.java index f7f563ea8..7caa31cfb 100644 --- a/src/java/org/apache/fop/layoutmgr/StaticContentLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/StaticContentLayoutManager.java @@ -147,7 +147,7 @@ public class StaticContentLayoutManager extends BlockStackingLayoutManager { boolean canRecover = (regionFO.getOverflow() != EN_ERROR_IF_OVERFLOW); boolean needClip = (regionFO.getOverflow() == Constants.EN_HIDDEN || regionFO.getOverflow() == Constants.EN_ERROR_IF_OVERFLOW); - eventProducer.regionOverflow(this, regionFO.getName(), + eventProducer.staticRegionOverflow(this, regionFO.getName(), page, breaker.getOverflowAmount(), needClip, canRecover, getStaticContentFO().getLocator()); |