From: Karen Lease Date: Sat, 16 Dec 2000 21:55:53 +0000 (+0000) Subject: Make getContentWidth method public X-Git-Tag: pre-columns~7 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=0368d11ef81d15428c1943b3d9d73b2598286d4b;p=xmlgraphics-fop.git Make getContentWidth method public git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@193879 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/org/apache/fop/fo/flow/Block.java b/src/org/apache/fop/fo/flow/Block.java index c2a4fe6fc..f5979d0eb 100644 --- a/src/org/apache/fop/fo/flow/Block.java +++ b/src/org/apache/fop/fo/flow/Block.java @@ -127,6 +127,7 @@ public class Block extends FObjMixed { public Status layout(Area area) throws FOPException { // MessageHandler.error(" b:LAY[" + marker + "] "); + if (this.marker == BREAK_AFTER) { return new Status(Status.OK); } @@ -167,6 +168,7 @@ public class Block extends FObjMixed { "background-color").getColorType(); this.paddingTop = this.properties.get("padding").getLength().mvalue(); + this.paddingLeft = this.paddingTop; this.paddingRight = this.paddingTop; this.paddingBottom = this.paddingTop; @@ -334,6 +336,7 @@ public class Block extends FObjMixed { blockArea.setIDReferences(area.getIDReferences()); blockArea.setTableCellXOffset(area.getTableCellXOffset()); + int numChildren = this.children.size(); for (int i = this.marker; i < numChildren; i++) { FONode fo = (FONode) children.elementAt(i); @@ -426,13 +429,12 @@ public class Block extends FObjMixed { } - /** - * Return the content width of the boxes generated by this FO. - */ - protected int getContentWidth() { - if (blockArea != null) - return blockArea.getContentWidth(); //getAllocationWidth()?? - else - return 0; // not laid out yet - } + /** + * Return the content width of the boxes generated by this FO. + */ + public int getContentWidth() { + if (blockArea != null) + return blockArea.getContentWidth(); //getAllocationWidth()?? + else return 0; // not laid out yet + } } diff --git a/src/org/apache/fop/fo/flow/BlockContainer.java b/src/org/apache/fop/fo/flow/BlockContainer.java index 04bbdad1e..77831b5e1 100644 --- a/src/org/apache/fop/fo/flow/BlockContainer.java +++ b/src/org/apache/fop/fo/flow/BlockContainer.java @@ -277,9 +277,14 @@ public class BlockContainer extends FObj { * Return the content width of the boxes generated by this block * container FO. */ - protected int getContentWidth() { + public int getContentWidth() { if (areaContainer != null) return areaContainer.getContentWidth(); //getAllocationWidth()?? else return 0; // not laid out yet } + + public boolean generatesReferenceAreas() { + return true; + } + } diff --git a/src/org/apache/fop/fo/flow/Flow.java b/src/org/apache/fop/fo/flow/Flow.java index 70b677979..ed3bad8a8 100644 --- a/src/org/apache/fop/fo/flow/Flow.java +++ b/src/org/apache/fop/fo/flow/Flow.java @@ -169,7 +169,7 @@ public class Flow extends FObj { * Return the content width of this flow (really of the region * in which it is flowing). */ - protected int getContentWidth() { + public int getContentWidth() { if (area != null) return area.getContentWidth(); //getAllocationWidth()?? else return 0; // not laid out yet diff --git a/src/org/apache/fop/fo/flow/Table.java b/src/org/apache/fop/fo/flow/Table.java index daffbe5a3..796f0039d 100644 --- a/src/org/apache/fop/fo/flow/Table.java +++ b/src/org/apache/fop/fo/flow/Table.java @@ -323,7 +323,7 @@ public class Table extends FObj { /** * Return the content width of the boxes generated by this table FO. */ - protected int getContentWidth() { + public int getContentWidth() { if (areaContainer != null) return areaContainer.getContentWidth(); //getAllocationWidth()?? else return 0; // not laid out yet diff --git a/src/org/apache/fop/fo/pagination/Region.java b/src/org/apache/fop/fo/pagination/Region.java index 8893fae8c..449982bca 100644 --- a/src/org/apache/fop/fo/pagination/Region.java +++ b/src/org/apache/fop/fo/pagination/Region.java @@ -158,4 +158,8 @@ public abstract class Region extends FObj name.equals( "xsl-footnote-separator" )); } + public boolean generatesReferenceAreas() { + return true; + } + }