bckfnn 2004/10/19 14:43:25 Modified: src/java/org/apache/fop/fo/flow Inline.java src/java/org/apache/fop/fo InlineCharIterator.java Log: Third phase of performance improvement. - Use CommonBorderPaddingBackground. PR: 31699 Revision Changes Path 1.31 +14 -1 xml-fop/src/java/org/apache/fop/fo/flow/Inline.java Index: Inline.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/flow/Inline.java,v retrieving revision 1.30 retrieving revision 1.31 diff -u -r1.30 -r1.31 --- Inline.java 19 Oct 2004 13:45:37 -0000 1.30 +++ Inline.java 19 Oct 2004 21:43:25 -0000 1.31 @@ -18,6 +18,8 @@ package org.apache.fop.fo.flow; +import java.util.List; + // XML import org.xml.sax.Locator; import org.xml.sax.SAXParseException; @@ -38,6 +40,7 @@ import org.apache.fop.fo.properties.CommonRelativePosition; import org.apache.fop.fo.properties.KeepProperty; import org.apache.fop.fo.properties.LengthRangeProperty; +import org.apache.fop.layoutmgr.InlineLayoutManager; /** * Class modelling the fo:inline formatting object. @@ -216,7 +219,17 @@ * @see org.apache.fop.fo.FObjMixed#charIterator */ public CharIterator charIterator() { - return new InlineCharIterator(this, propMgr.getBorderAndPadding()); + return new InlineCharIterator(this, commonBorderPaddingBackground); + } + + /** + * @see org.apache.fop.fo.FObj#addLayoutManager(List) + */ + public void addLayoutManager(List list) { + if (getChildNodes() != null) { + InlineLayoutManager lm = new InlineLayoutManager(this); + list.add(lm); + } } /** 1.7 +9 -9 xml-fop/src/java/org/apache/fop/fo/InlineCharIterator.java Index: InlineCharIterator.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/InlineCharIterator.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- InlineCharIterator.java 27 Feb 2004 17:57:40 -0000 1.6 +++ InlineCharIterator.java 19 Oct 2004 21:43:25 -0000 1.7 @@ -18,7 +18,7 @@ package org.apache.fop.fo; -import org.apache.fop.fo.properties.CommonBorderAndPadding; +import org.apache.fop.fo.properties.CommonBorderPaddingBackground; import org.apache.fop.util.CharUtilities; import java.util.NoSuchElementException; @@ -30,19 +30,19 @@ /** * @param fobj the object for whose character contents and for whose * descendant's character contents should be iterated - * @param bap the CommonBorderAndPadding properties to be applied + * @param bpb the CommonBorderPaddingBackground properties to be applied */ - public InlineCharIterator(FObj fobj, CommonBorderAndPadding bap) { + public InlineCharIterator(FObj fobj, CommonBorderPaddingBackground bpb) { super(fobj); - checkBoundaries(bap); + checkBoundaries(bpb); } - private void checkBoundaries(CommonBorderAndPadding bap) { - bStartBoundary = (bap.getBorderStartWidth(false) > 0 - || bap.getPaddingStart(false) > 0); - bEndBoundary = (bap.getBorderEndWidth(false) > 0 - || bap.getPaddingEnd(false) > 0); + private void checkBoundaries(CommonBorderPaddingBackground bpb) { + bStartBoundary = (bpb.getBorderStartWidth(false) > 0 + || bpb.getPaddingStart(false) > 0); + bEndBoundary = (bpb.getBorderEndWidth(false) > 0 + || bpb.getPaddingEnd(false) > 0); } /**
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]