Glen Mazza wrote:

> --- Victor Mote <[EMAIL PROTECTED]> 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.
> >
> ....
> > 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
> >
>
> Victor,
>
> I checked out a version of trunk the day before
> AddLMVisitor was added (cvs checkout -D 2003-08-17
> xml-fop) and fo:basic-link worked fine before then.
>
> I tracked down the problem: the signature of the
> createArea() method needed to be changed when you
> moved it from fo.flow.BasicLink.addLayoutManager() to
> layoutmgr.AddLMVisitor.serveBasicLink().
>
> (old) BasicLink.addLayoutManager():
>
> lm = new InlineStackingLayoutManager() {
>   protected InlineParent createArea() {
>     InlineParent area = super.createArea();
>       setupLinkArea(parentLM, area);
>       return area;
>     }
>   }
> }
>
> The old code overrides ISLM's createArea(), as
> desired.
>
> (new) AddLMVisitor.serveBasicLink():
>
> lm = new InlineStackingLayoutManager() {
>   protected InlineParent createArea(BasicLink node) {
>     InlineParent area = super.createArea();
>     setupBasicLinkArea(node, parentLM, area);
>     return area;
>   }
> }
>
> The new code just adds an uncalled method to ISLM.
> ISLM calls its own createArea().
>
> Could you take a look at this--it looks like ISLM
> needs to be modified to call a createArea(BasicLink
> node)--which might imply many other types of
> createAreas(xxxx) will be needed in ISLM--or somehow
> setupBasicLinkArea--the only reason why you're adding
> the BL to the signature--needs to be redesigned to
> operate BL-node-free.  There may not be an easy
> solution to this.
>
> Attaching a hyperlinkTest.fo file to help with
> testing.

I just committed a change that fixes this. The solution was actually pretty
simple. I just needed to change the signature back to the old one, and use
the BasicLink object in the anonymous inner class (have to make it final for
that to work).

I also checked the other anonymous inner classes that are similarly created
to see if I had done anything similar. I won't promise that they are
perfect, but it looks the others are correct WRT this issue anyway.

Sorry about the inconvenience, and thanks for all of the grunt work you did
to set this up for me.

Victor Mote

Reply via email to