https://issues.apache.org/bugzilla/show_bug.cgi?id=44794





--- Comment #5 from Andreas L. Delmelle <[EMAIL PROTECTED]>  2008-05-09 
04:25:53 PST ---

Thanks for the confirmation.

In the meantime, I succeeded in getting the resolution for blocks correct, by
modifying BlockLM.addAreas().

Instead of simply 'notifyEndOfLayout()', I added:

if (this.isLast(lastPos)) {
  notifyEndOfLayout();
}

'lastPos' is set a bit higher up to the last position returned by the
position-iterator.

This seems to do the trick.

Now, I'm a bit wary of adding the same check to /all/ related LMs
(code-duplication), so will try to implement it in a way that this can be
handled by the superclass BlockStackingLM. That way, the problem can be solved
for all the related LMs in one go.
Implementing it in AbstractLM could, at the same time, solve the problem for
inlines.

Something like:

AbstractLayoutManager.checkEndOfLayout(Position pos) {
  if (this.isLast(lastPos) {
    notifyEndOfLayout();
  }
}

which can then be called by the subclasses, instead of directly calling
notifyEndOfLayout().


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

Reply via email to