Glen Mazza wrote:

> FO:Basic-link isn't working (anymore?) in trunk for
> PDF.  It is properly colored blue, but the link is not
> active/clickable.

The "anymore" is the key question. I don't know whether it worked before or
not.

> Per your email here:
> http://marc.theaimsgroup.com/?l=fop-dev&m=106125821432538&w=2
>
> fo:basic-link may have been broken with the addition
> of AddLMVisitor:
> http://cvs.apache.org/viewcvs.cgi/xml-fop/src/java/org/apache/fop/
layoutmgr/AddLMVisitor.java?annotate=1.19

Yes, without some sort of regression testing mechanism, it is possible.
However ...

> I've narrowed the problem to being that
> AddLMVisitor.setupBasicLinkArea() is not being called
> from AddLMVisitor.serveBasicLink().

... compare what is going on in AddLMVisitor to the addLayoutManager()
method that was in revision 1.3 of fo/flow/BasicLink.java.

> Looking at lines 299-302, you have a strange
> createArea() function within braces--I'm unsure what
> you're attempting to do there: this code (which calls
> setupBasicLinkArea()) is never being activated:

It is not really mine -- I just placed it where it is.

> lm = new InlineStackingLayoutManager() {
>     protected InlineParent createArea(BasicLink node)
> {
>         InlineParent area = super.createArea();
>         setupBasicLinkArea(node, parentLM, area);
>         return area;
>     }
> };
>
> This is quite possibly a Java 101 question, but what
> does defining a function in this manner do--does it
> append a new function createArea() to the lm object?

It is an anonymous inner class that I think is overriding the constructor.

> Can we just call setupBasicLinkArea() from within
> serveBasicLink() directly? But how do I get access to
> the parentLM object in order to do that?

I don't know. I recommend going back to a version of the code before the
AddLMVisitor was checked in, and seeing 1) whether it worked properly then,
and 2) what it was doing, and comparing that to what is happening now. The
AddLMVisitor was checked in on Aug 19, 2003 at 0:53:53 (I think that is
GMT). As I think about it, if the setupBasicLinkArea() method was used at
all, I probably should have gotten a compile error when I moved it to
AddLMVisitor. I'll bet that code wasn't being used at all. I'll be glad to
investigate it when I get done with the pioneer LS work (possibly in the
next few days). If it is slowing you down, or if we are pretty sure it
worked before this change, I'll work on it right away.

Victor Mote

Reply via email to