cvs commit: xml-fop/src/java/org/apache/fop/layoutmgr RetrieveMarkerLayoutManager.java
spepping2004/11/15 13:01:40 Modified:src/java/org/apache/fop/layoutmgr RetrieveMarkerLayoutManager.java Log: Made RetrieveMarkerLM implement InlineLevelLM. Revision ChangesPath 1.16 +66 -1 xml-fop/src/java/org/apache/fop/layoutmgr/RetrieveMarkerLayoutManager.java Index: RetrieveMarkerLayoutManager.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/RetrieveMarkerLayoutManager.java,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- RetrieveMarkerLayoutManager.java 13 Nov 2004 20:37:17 - 1.15 +++ RetrieveMarkerLayoutManager.java 15 Nov 2004 21:01:40 - 1.16 @@ -30,7 +30,9 @@ /** * LayoutManager for a block FO. */ -public class RetrieveMarkerLayoutManager extends AbstractLayoutManager { +public class RetrieveMarkerLayoutManager extends AbstractLayoutManager +implements InlineLevelLayoutManager { + private RetrieveMarker fobj; private LayoutManager replaceLM = null; @@ -67,6 +69,9 @@ return replaceLM.getNextBreakPoss(context); } +/** + * @see org.apache.fop.layoutmgr.InlineLevelLayoutManager#getNextKnuthElements + */ public LinkedList getNextKnuthElements(LayoutContext context, int alignment) { loadLM(); @@ -75,6 +80,66 @@ } return ((InlineLevelLayoutManager) replaceLM) .getNextKnuthElements(context, alignment); +} + +/** + * @see org.apache.fop.layoutmgr.InlineLevelLayoutManager#addALetterSpaceTo + */ +public KnuthElement addALetterSpaceTo(KnuthElement element) { +loadLM(); +if (replaceLM == null) { +return null; +} +return ((InlineLevelLayoutManager) replaceLM) +.addALetterSpaceTo(element); +} + +/** + * @see org.apache.fop.layoutmgr.InlineLevelLayoutManager#getWordChars + */ +public void getWordChars(StringBuffer sbChars, Position pos) { +loadLM(); +if (replaceLM != null) { +((InlineLevelLayoutManager) replaceLM) +.getWordChars(sbChars, pos); +} +} + +/** + * @see org.apache.fop.layoutmgr.InlineLevelLayoutManager#hyphenate + */ +public void hyphenate(Position pos, HyphContext hc) { +loadLM(); +if (replaceLM != null) { +((InlineLevelLayoutManager) replaceLM).hyphenate(pos, hc); +} +} + +/** + * @see org.apache.fop.layoutmgr.InlineLevelLayoutManager#applyChanges + */ +public boolean applyChanges(List oldList) { +loadLM(); +if (replaceLM == null) { +return false; +} +return ((InlineLevelLayoutManager) replaceLM) +.applyChanges(oldList); +} + +/** + * @see org.apache.fop.layoutmgr.InlineLevelLayoutManager#getChangedKnuthElements + */ +public LinkedList getChangedKnuthElements(List oldList, + int flaggedPenalty, + int alignment) { +loadLM(); +if (replaceLM == null) { +return null; +} +return ((InlineLevelLayoutManager) replaceLM) + .getChangedKnuthElements(oldList, flaggedPenalty, +alignment); } public void addAreas(PositionIterator parentIter, - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/layoutmgr RetrieveMarkerLayoutManager.java
bckfnn 2004/10/28 03:00:25 Modified:examples/mathml/src/org/apache/fop/mathml MathMLElement.java examples/plan/src/org/apache/fop/plan PlanElement.java src/java/org/apache/fop/apps FOPException.java src/java/org/apache/fop/datatypes LengthBase.java PercentBase.java src/java/org/apache/fop/fo FONode.java FOPropertyMapping.java FOText.java FOTreeBuilder.java FObj.java FObjMixed.java PropertyList.java StaticPropertyList.java XMLObj.java src/java/org/apache/fop/fo/expr NumericProperty.java PropertyException.java PropertyInfo.java PropertyParser.java RelativeNumericProperty.java src/java/org/apache/fop/fo/extensions Bookmarks.java ExtensionObj.java Outline.java src/java/org/apache/fop/fo/extensions/svg SVGElement.java src/java/org/apache/fop/fo/flow BasicLink.java BidiOverride.java Block.java BlockContainer.java Character.java ExternalGraphic.java Float.java Footnote.java FootnoteBody.java InitialPropertySet.java Inline.java InlineContainer.java InstreamForeignObject.java Leader.java ListBlock.java ListItem.java ListItemBody.java ListItemLabel.java Marker.java MultiCase.java MultiProperties.java MultiPropertySet.java MultiSwitch.java MultiToggle.java PageNumber.java PageNumberCitation.java RetrieveMarker.java Table.java TableAndCaption.java TableBody.java TableCaption.java TableCell.java TableColumn.java TableRow.java Wrapper.java src/java/org/apache/fop/fo/pagination ColorProfile.java ConditionalPageMasterReference.java Declarations.java Flow.java LayoutMasterSet.java PageSequence.java PageSequenceMaster.java Region.java RegionBA.java RegionBody.java RegionSE.java RepeatablePageMasterAlternatives.java RepeatablePageMasterReference.java Root.java SimplePageMaster.java SinglePageMasterReference.java StaticContent.java Title.java src/java/org/apache/fop/fo/properties BorderWidthPropertyMaker.java BoxPropShorthandParser.java CommonAbsolutePosition.java CommonAccessibility.java CommonBorderPaddingBackground.java CommonFont.java CommonHyphenation.java CommonMarginBlock.java CommonMarginInline.java CommonRelativePosition.java CompoundPropertyMaker.java CondLengthProperty.java CorrespondingPropertyMaker.java DimensionPropertyMaker.java EnumProperty.java GenericShorthandParser.java IndentPropertyMaker.java KeepProperty.java LengthPairProperty.java LengthProperty.java LengthRangeProperty.java LineHeightPropertyMaker.java PercentLength.java Property.java PropertyMaker.java ShorthandParser.java SpaceProperty.java SpacingPropertyMaker.java src/java/org/apache/fop/layoutmgr RetrieveMarkerLayoutManager.java Added: src/java/org/apache/fop/fo ValidationException.java Log: New exception hierarchy rooted in SAXException and throw clauses on property parsing and retrieval. PR: 31899 Revision ChangesPath 1.8 +3 -3 xml-fop/examples/mathml/src/org/apache/fop/mathml/MathMLElement.java http://cvs.apache.org/viewcvs/xml-fop/examples/mathml/src/org/apache/fop/mathml/MathMLElement.java.diff?r1=1.7&r2=1.8 1.9 +3 -3 xml-fop/examples/plan/src/org/apache/fop/plan/PlanElement.java http://cvs.apache.org/viewcvs/xml-fop/examples/plan/src/org/apache/fop/plan/PlanElement.java.diff?r1=1.8&r2=1.9 1.6 +34 -30xml-fop/src/java/org/apache/fop/apps/FOPException.java http://cvs.apache.org/viewcvs/xml-fop/src/java/org/apache/fop/apps/FOPException.java.diff?r1=1.5&r2=1.6 1.8 +3 -2 xml-fop/src/java/org/apache/fop/datatypes/LengthBase.java http://cvs.apache.org/viewcvs/xml-fop/src/java/org/apache/fop/datatypes/LengthBase.java.diff?r1=1.7&r2=1.8 1.5 +3 -1 xml-fop/src/ja
cvs commit: xml-fop/src/java/org/apache/fop/layoutmgr RetrieveMarkerLayoutManager.java
bckfnn 2004/10/20 14:04:43 Modified:src/java/org/apache/fop/fo FOEventHandler.java FOTreeBuilder.java FObj.java src/java/org/apache/fop/fo/flow Marker.java RetrieveMarker.java src/java/org/apache/fop/layoutmgr RetrieveMarkerLayoutManager.java Added: src/java/org/apache/fop/fo PropertyListMaker.java Log: Fourth phase of performance improvement. - Add PropertyListMaker to support fo:maker and fo:retrieve-marker. PR: 31699 Revision ChangesPath 1.4 +20 -1 xml-fop/src/java/org/apache/fop/fo/FOEventHandler.java Index: FOEventHandler.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/FOEventHandler.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- FOEventHandler.java 30 Sep 2004 19:55:35 - 1.3 +++ FOEventHandler.java 20 Oct 2004 21:04:43 - 1.4 @@ -82,6 +82,11 @@ */ private Set idReferences = new HashSet(); +/* + * The property list maker. + */ +protected PropertyListMaker propertyListMaker; + /** * Main constructor * @param FOUserAgent the apps.FOUserAgent instance for this process @@ -121,6 +126,20 @@ */ public FontInfo getFontInfo() { return this.fontInfo; +} + +/** + * Return the propertyListMaker. +*/ +public PropertyListMaker getPropertyListMaker() { +return propertyListMaker; +} + +/** + * Set a new propertyListMaker. + */ +public void setPropertyListMaker(PropertyListMaker propertyListMaker) { +this.propertyListMaker = propertyListMaker; } /** 1.56 +6 -1 xml-fop/src/java/org/apache/fop/fo/FOTreeBuilder.java Index: FOTreeBuilder.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/FOTreeBuilder.java,v retrieving revision 1.55 retrieving revision 1.56 diff -u -r1.55 -r1.56 --- FOTreeBuilder.java19 Oct 2004 12:52:09 - 1.55 +++ FOTreeBuilder.java20 Oct 2004 21:04:43 - 1.56 @@ -106,7 +106,12 @@ //This creates either an AreaTreeHandler and ultimately a Renderer, or //one of the RTF-, MIF- etc. Handlers. foEventHandler = RendererFactory.createFOEventHandler(foUserAgent, renderType, stream); - +foEventHandler.setPropertyListMaker(new PropertyListMaker() { +public PropertyList make(FObj fobj, PropertyList parentPropertyList) { +return new StaticPropertyList(fobj, parentPropertyList); +} +}); + // Add standard element mappings setupDefaultMappings(); 1.84 +1 -2 xml-fop/src/java/org/apache/fop/fo/FObj.java Index: FObj.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/FObj.java,v retrieving revision 1.83 retrieving revision 1.84 diff -u -r1.83 -r1.84 --- FObj.java 20 Oct 2004 18:21:27 - 1.83 +++ FObj.java 20 Oct 2004 21:04:43 - 1.84 @@ -101,8 +101,7 @@ * Create a default property list for this element. */ protected PropertyList createPropertyList(PropertyList parent, FOEventHandler foEventHandler) throws SAXParseException { -//return foEventHandler.getPropertyListMaker().make(this, parent); -return new StaticPropertyList(this, parent); +return foEventHandler.getPropertyListMaker().make(this, parent); } /** 1.1 xml-fop/src/java/org/apache/fop/fo/PropertyListMaker.java Index: PropertyListMaker.java === /* * Copyright 2004 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /* $Id: PropertyListMaker.java,v 1.1 2004/10/20 21:04:43 bckfnn Exp $ */ package org.apache.fop.fo; /** * A PropertyListMaker is a factory that creates PropertyLists. */ public interface PropertyListMaker { PropertyList make(FObj fobj, PropertyList parentPropertyL
cvs commit: xml-fop/src/java/org/apache/fop/layoutmgr RetrieveMarkerLayoutManager.java
bckfnn 2004/10/10 13:24:16 Modified:src/java/org/apache/fop/layoutmgr RetrieveMarkerLayoutManager.java Log: Fix regression for fo:retrieve-marker. Revision ChangesPath 1.11 +11 -1 xml-fop/src/java/org/apache/fop/layoutmgr/RetrieveMarkerLayoutManager.java Index: RetrieveMarkerLayoutManager.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/RetrieveMarkerLayoutManager.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- RetrieveMarkerLayoutManager.java 7 Sep 2004 20:47:11 - 1.10 +++ RetrieveMarkerLayoutManager.java 10 Oct 2004 20:24:16 - 1.11 @@ -20,6 +20,7 @@ import java.util.ArrayList; import java.util.List; +import java.util.LinkedList; import org.apache.fop.area.Area; import org.apache.fop.fo.flow.Marker; @@ -62,6 +63,15 @@ return replaceLM.getNextBreakPoss(context); } +public LinkedList getNextKnuthElements(LayoutContext context, +int alignment) { +loadLM(); +if (replaceLM == null) { +return null; +} +return replaceLM.getNextKnuthElements(context, alignment); +} + public void addAreas(PositionIterator parentIter, LayoutContext layoutContext) { @@ -96,7 +106,7 @@ List list = new ArrayList(); Marker marker = retrieveMarker(name, position, boundary); if (marker != null) { -marker.addLayoutManager(markerLMList); +marker.addLayoutManager(list); if (list.size() > 0) { replaceLM = (LayoutManager)list.get(0); replaceLM.setParent(this); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]