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 ac...@apache.org on 2008/06/17 12:30:55 UTC
svn commit: r668608 [2/2] - in
/xmlgraphics/fop/branches/Temp_AFPGOCAResources: ./ lib/build/
src/java/org/apache/fop/layoutmgr/ src/java/org/apache/fop/layoutmgr/inline/
test/layoutengine/standard-testcases/
Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/inline/AbstractGraphicsLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/inline/AbstractGraphicsLayoutManager.java?rev=668608&r1=668607&r2=668608&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/inline/AbstractGraphicsLayoutManager.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/inline/AbstractGraphicsLayoutManager.java Tue Jun 17 03:30:54 2008
@@ -39,16 +39,14 @@
*/
public abstract class AbstractGraphicsLayoutManager extends LeafNodeLayoutManager {
- /** The graphics object this LM deals with */
- protected AbstractGraphics fobj;
-
/**
- * Constructor
- * @param node the formatting object that creates this area
+ * Constructor.
+ *
+ * @param node
+ * the formatting object that creates this area
*/
public AbstractGraphicsLayoutManager(AbstractGraphics node) {
super(node);
- fobj = node;
}
/**
@@ -57,6 +55,7 @@
* @return the viewport inline area
*/
private Viewport getInlineArea() {
+ final AbstractGraphics fobj = (AbstractGraphics)this.fobj;
Dimension intrinsicSize = new Dimension(
fobj.getIntrinsicWidth(),
fobj.getIntrinsicHeight());
@@ -113,6 +112,7 @@
/** {@inheritDoc} */
protected AlignmentContext makeAlignmentContext(LayoutContext context) {
+ final AbstractGraphics fobj = (AbstractGraphics)this.fobj;
return new AlignmentContext(
get(context).getAllocBPD()
, fobj.getAlignmentAdjust()
@@ -128,7 +128,7 @@
* the viewport.
* @return the appropriate area
*/
- abstract Area getChildArea();
+ protected abstract Area getChildArea();
// --------- Property Resolution related functions --------- //
@@ -138,31 +138,14 @@
public int getBaseLength(int lengthBase, FObj fobj) {
switch (lengthBase) {
case LengthBase.IMAGE_INTRINSIC_WIDTH:
- return getIntrinsicWidth();
+ return ((AbstractGraphics)fobj).getIntrinsicWidth();
case LengthBase.IMAGE_INTRINSIC_HEIGHT:
- return getIntrinsicHeight();
+ return ((AbstractGraphics)fobj).getIntrinsicHeight();
case LengthBase.ALIGNMENT_ADJUST:
return get(null).getBPD();
default: // Delegate to super class
return super.getBaseLength(lengthBase, fobj);
}
}
-
- /**
- * Returns the intrinsic width of the e-g.
- * @return the width of the element
- */
- protected int getIntrinsicWidth() {
- return fobj.getIntrinsicWidth();
- }
-
- /**
- * Returns the intrinsic height of the e-g.
- * @return the height of the element
- */
- protected int getIntrinsicHeight() {
- return fobj.getIntrinsicHeight();
- }
-
}
Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/inline/ExternalGraphicLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/inline/ExternalGraphicLayoutManager.java?rev=668608&r1=668607&r2=668608&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/inline/ExternalGraphicLayoutManager.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/inline/ExternalGraphicLayoutManager.java Tue Jun 17 03:30:54 2008
@@ -29,24 +29,20 @@
*/
public class ExternalGraphicLayoutManager extends AbstractGraphicsLayoutManager {
- private ExternalGraphic fobj;
-
/**
- * Constructor
- * @param node the fo:external-graphic formatting object that creates the area
+ * Constructor.
+ *
+ * @param node
+ * the fo:external-graphic formatting object that creates the
+ * area
*/
public ExternalGraphicLayoutManager(ExternalGraphic node) {
super(node);
- this.fobj = node;
}
/** {@inheritDoc} */
protected Area getChildArea() {
- Image img = new Image(fobj.getSrc());
- if (fobj.hasExtensionAttachments()) {
- img.setExtensionAttachments(fobj.getExtensionAttachments());
- }
- return img;
+ return new Image(((ExternalGraphic) fobj).getSrc());
}
}
Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/inline/InstreamForeignObjectLM.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/inline/InstreamForeignObjectLM.java?rev=668608&r1=668607&r2=668608&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/inline/InstreamForeignObjectLM.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/inline/InstreamForeignObjectLM.java Tue Jun 17 03:30:54 2008
@@ -29,20 +29,19 @@
*/
public class InstreamForeignObjectLM extends AbstractGraphicsLayoutManager {
- private InstreamForeignObject fobj;
-
/**
- * Constructor
- * @param node the formatting object that creates this area
+ * Constructor.
+ *
+ * @param node
+ * the formatting object that creates this area
*/
public InstreamForeignObjectLM(InstreamForeignObject node) {
super(node);
- fobj = node;
}
/** {@inheritDoc} */
protected Area getChildArea() {
- XMLObj child = (XMLObj) fobj.getChildXMLObj();
+ XMLObj child = ((InstreamForeignObject) fobj).getChildXMLObj();
org.w3c.dom.Document doc = child.getDOMDocument();
String ns = child.getNamespaceURI();
Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/inline/LeafNodeLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/inline/LeafNodeLayoutManager.java?rev=668608&r1=668607&r2=668608&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/inline/LeafNodeLayoutManager.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/inline/LeafNodeLayoutManager.java Tue Jun 17 03:30:54 2008
@@ -91,7 +91,7 @@
/**
- * Create a Leaf node layout mananger.
+ * Create a Leaf node layout manager.
* @param node the FObj to attach to this LM.
*/
public LeafNodeLayoutManager(FObj node) {
@@ -99,7 +99,7 @@
}
/**
- * Create a Leaf node layout mananger.
+ * Create a Leaf node layout manager.
*/
public LeafNodeLayoutManager() {
}
Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java?rev=668608&r1=668607&r2=668608&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java Tue Jun 17 03:30:54 2008
@@ -387,9 +387,8 @@
InlineLevelEventProducer eventProducer
= InlineLevelEventProducer.Provider.get(
getFObj().getUserAgent().getEventBroadcaster());
- eventProducer.lineOverflows(this, addedPositions + 1,
+ eventProducer.lineOverflows(this, bestActiveNode.line,
-lack, getFObj().getLocator());
- String textDiff = (lack < -50000 ? "more than 50 points" : (-lack) + "mpt");
}
}
Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/status.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/status.xml?rev=668608&r1=668607&r2=668608&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/status.xml (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/status.xml Tue Jun 17 03:30:54 2008
@@ -53,6 +53,11 @@
<changes>
<release version="FOP Trunk" date="TBD">
+ <action context="Layout" dev="LF" type="fix">
+ Fixed an inconsistency in footnote handling that led to unnecessary
+ empty areas in pages whose last normal line contains footnotes
+ when the page bpd is not the same for all pages.
+ </action>
<!-- change reverted, to be added back later
<action context="Renderers" dev="AC" importance="high" type="add">
Added SVG support for AFP (GOCA).
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org