Re: [PATCH] BasicLink extends Inline the 2nd
The BasicLink does now extend Inline. All makers should only extend FObj.Maker. Removing parts that are yet to be implemented properly should wait until we have a better understanding of how the properties are going to be used. On Fri, 28 Sep 2001 00:17:30 Enrico Schnepel wrote: > Hello, > > About one month ago I've send a patch to extend Basiclink from Inline and > not > from FObjMixed. There wasn't any reaction. The original email body was: > > I have the problem that I want to specify other inline related properties > > than color ( like text-decoration="underline" ) to basic-link. These are > currently not supported by BasicLink. BasicLink currently extends > FObjMixed. > I have changed BasicLink to "extends Inline" and removed double code. > This > results in visual properties handled by Inline and the LinkSet is set up > by > BasicLink. > > I have attached the patch > > Enrico > > The patch follows now > > SNIP > > Index: src/org/apache/fop/fo/flow/BasicLink.java > === > RCS file: /home/cvspublic/xml-fop/src/org/apache/fop/fo/flow/BasicLink.java,v > retrieving revision 1.8 > diff -r1.8 BasicLink.java > 23c23 > < public static class Maker extends FObj.Maker { > --- > > public static class Maker extends Inline.Maker { > 44,78d43 > < > < // Common Accessibility Properties > < AccessibilityProps mAccProps = propMgr.getAccessibilityProps(); > < > < // Common Aural Properties > < AuralProps mAurProps = propMgr.getAuralProps(); > < > < // Common Border, Padding, and Background Properties > < BorderAndPadding bap = propMgr.getBorderAndPadding(); > < BackgroundProps bProps = propMgr.getBackgroundProps(); > < > < // Common Margin Properties-Inline > < MarginInlineProps mProps = propMgr.getMarginInlineProps(); > < > < // Common Relative Position Properties > < RelativePositionProps mRelProps = > propMgr.getRelativePositionProps(); > < > < // this.properties.get("alignment-adjust"); > < // this.properties.get("alignment-baseline"); > < // this.properties.get("baseline-shift"); > < // this.properties.get("destination-place-offset"); > < // this.properties.get("dominant-baseline"); > < // this.properties.get("external-destination"); > < // this.properties.get("id"); > < // this.properties.get("indicate-destination"); > < // this.properties.get("internal-destination"); > < // this.properties.get("keep-together"); > < // this.properties.get("keep-with-next"); > < // this.properties.get("keep-with-previous"); > < // this.properties.get("line-height"); > < // this.properties.get("line-height-shift-adjustment"); > < // this.properties.get("show-destination"); > < // this.properties.get("target-processing-context"); > < // this.properties.get("target-presentation-context"); > < // this.properties.get("target-stylesheet"); > > SNIP > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, email: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
[PATCH] BasicLink extends Inline the 2nd
Hello, About one month ago I've send a patch to extend Basiclink from Inline and not from FObjMixed. There wasn't any reaction. The original email body was: I have the problem that I want to specify other inline related properties than color ( like text-decoration="underline" ) to basic-link. These are currently not supported by BasicLink. BasicLink currently extends FObjMixed. I have changed BasicLink to "extends Inline" and removed double code. This results in visual properties handled by Inline and the LinkSet is set up by BasicLink. I have attached the patch Enrico The patch follows now SNIP Index: src/org/apache/fop/fo/flow/BasicLink.java === RCS file: /home/cvspublic/xml-fop/src/org/apache/fop/fo/flow/BasicLink.java,v retrieving revision 1.8 diff -r1.8 BasicLink.java 23c23 < public static class Maker extends FObj.Maker { --- > public static class Maker extends Inline.Maker { 44,78d43 < < // Common Accessibility Properties < AccessibilityProps mAccProps = propMgr.getAccessibilityProps(); < < // Common Aural Properties < AuralProps mAurProps = propMgr.getAuralProps(); < < // Common Border, Padding, and Background Properties < BorderAndPadding bap = propMgr.getBorderAndPadding(); < BackgroundProps bProps = propMgr.getBackgroundProps(); < < // Common Margin Properties-Inline < MarginInlineProps mProps = propMgr.getMarginInlineProps(); < < // Common Relative Position Properties < RelativePositionProps mRelProps = propMgr.getRelativePositionProps(); < < // this.properties.get("alignment-adjust"); < // this.properties.get("alignment-baseline"); < // this.properties.get("baseline-shift"); < // this.properties.get("destination-place-offset"); < // this.properties.get("dominant-baseline"); < // this.properties.get("external-destination"); < // this.properties.get("id"); < // this.properties.get("indicate-destination"); < // this.properties.get("internal-destination"); < // this.properties.get("keep-together"); < // this.properties.get("keep-with-next"); < // this.properties.get("keep-with-previous"); < // this.properties.get("line-height"); < // this.properties.get("line-height-shift-adjustment"); < // this.properties.get("show-destination"); < // this.properties.get("target-processing-context"); < // this.properties.get("target-presentation-context"); < // this.properties.get("target-stylesheet"); SNIP - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
BasicLink extends Inline
Hello Foppers, I have the problem that I want to specify other inline related properties than color ( like text-decoration="underline" ) to basic-link. These are currently not supported by BasicLink. BasicLink currently extends FObjMixed. I have changed BasicLink to "extends Inline" and removed double code. This results in visual properties handled by Inline and the LinkSet is set up by BasicLink. I have attached the complete file. Enrico -- GMX - Die Kommunikationsplattform im Internet. http://www.gmx.net /* * $Id: BasicLink.java,v 1.7 2001/08/06 09:12:59 keiron Exp $ * Copyright (C) 2001 The Apache Software Foundation. All rights reserved. * For details on use and redistribution please refer to the * LICENSE file included with these sources. */ package org.apache.fop.fo.flow; // FOP import org.apache.fop.fo.*; import org.apache.fop.apps.FOPException; import org.apache.fop.fo.properties.*; import org.apache.fop.layout.*; import org.apache.fop.datatypes.ColorType; // Java import java.util.Enumeration; import java.awt.Rectangle; public class BasicLink extends Inline { public static class Maker extends Inline.Maker { public FObj make(FObj parent, PropertyList propertyList) throws FOPException { return new BasicLink(parent, propertyList); } } public static FObj.Maker maker() { return new BasicLink.Maker(); } public BasicLink(FObj parent, PropertyList propertyList) throws FOPException { super(parent, propertyList); this.name = "fo:basic-link"; } public Status layout(Area area) throws FOPException { String destination; int linkType; if (!(destination = this.properties.get("internal-destination").getString()).equals("")) { linkType = LinkSet.INTERNAL; } else if (!(destination = this.properties.get("external-destination").getString()).equals("")) { linkType = LinkSet.EXTERNAL; } else { throw new FOPException("internal-destination or external-destination must be specified in basic-link"); } if (this.marker == START) { // initialize id String id = this.properties.get("id").getString(); area.getIDReferences().initializeID(id, area); this.marker = 0; } // new LinkedArea to gather up inlines LinkSet ls = new LinkSet(destination, area, linkType); Page p = area.getPage(); AreaContainer ac = p.getBody().getCurrentColumnArea(); if (ac == null) { throw new FOPException("Couldn't get ancestor AreaContainer when processing basic-link"); } int numChildren = this.children.size(); for (int i = this.marker; i < numChildren; i++) { FONode fo = (FONode)children.elementAt(i); fo.setLinkSet(ls); Status status; if ((status = fo.layout(area)).isIncomplete()) { this.marker = i; return status; } } ls.applyAreaContainerOffsets(ac, area); // pass on command line String mergeLinks = System.getProperty("links.merge"); if ((null != mergeLinks) &&!mergeLinks.equalsIgnoreCase("no")) { ls.mergeLinks(); } p.addLinkSet(ls); return new Status(Status.OK); } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]