[
https://issues.apache.org/jira/browse/FOP-2293?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Seifeddine Dridi updated FOP-2293:
----------------------------------
Attachment: FO_multi-switch_best-fit_ext_rev3.patch
Thanks Vincent for you review,
I left some old code there because I felt like I might need it later, but with
the changes I've doing lately I guess none of it will be useful to me anymore.
{quote}
MultiCase.isActuated: not sure what you have in mind here? A multi-case cannot
be actuated? Only a multi-toggle can. This method is used in
MultiSwitch.finalizeNode, but I don’t get the point of that latter method?
{quote}
The name is misleading, I changed it to _hasToggle()_ . It returns _true_ if
the multi-case has a multi-toggle and _false_ otherwise. As for the
_finalizeNode()_ function, that's where I determine which multi-case to select.
In case my extension is enabled, I add them all.
I admit that this part of code still needs some polishing, but it's working
fine for now that's why I'm going to leave it like that until I finish
implementing the extension itself.
As for the changes in this patch:
I implemented a new class _WhiteSpaceManager_ which handles the remaining
whitespace at each page. It's better this way because the code is more
centralized now, and it becomes easier to add new features without messing up
the breaking algorithm. However, it remains challenging to add support for
multiple alternatives because of the dynamic nature of the Knuth algorithm --
we can't immediately know if the current alternative will be accepted without
peeking through the next elements -- so I left that case aside and focused on
making the extension work flawlessly with a single multi-case. And it is
working perfectly, as far as I have tested.
Until next time,
Seifeddine
> Whitespace management extension
> -------------------------------
>
> Key: FOP-2293
> URL: https://issues.apache.org/jira/browse/FOP-2293
> Project: Fop
> Issue Type: New Feature
> Components: general
> Affects Versions: trunk
> Reporter: Seifeddine Dridi
> Priority: Minor
> Labels: XSL-FO
> Fix For: trunk
>
> Attachments: FO_multi-switch_best-fit_ext_rev2.patch,
> FO_multi-switch_best-fit_ext_rev3.patch, FO_multi-switch_test.fo,
> FO_multi-switch_with_best-fit_extension.patch, bestfit.fo, doc.pdf,
> multi-switch_bestfit.fo, multiple-feasible-nodes.fo, patch-rev1.1.patch,
> patch-rev1.patch, patch-rev2.patch, patch.patch
>
>
> I have been working on an extension for whitespace management, similar to
> what's described here:
> http://wiki.apache.org/xmlgraphics-fop/WhitespaceManagement
> The logic of the extension is very simple: the user defines a set of
> alternatives that he wishes to insert at the end of a page, then if there is
> enough space left, FOP will pick the alternative that best matches the user's
> selection criteria (first fit, smallest fit, biggest fit).
> This is my first work on FOP and it took me almost 2 months to reach this
> stage in development. But it's not the end of course, so I'm relying on your
> feedback to improve it.
> Thank you
--
This message was sent by Atlassian JIRA
(v6.1#6144)