[
https://issues.apache.org/jira/browse/FOP-2293?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13848039#comment-13848039
]
Vincent Hennebert commented on FOP-2293:
----------------------------------------
Hi Seifeddine,
I've just applied your patch. Among other things, I made the following
modifications:
* In PageBreakingAlgorithm, I reset the {{variant}} field in the
{{considerLegalBreak}} method, so that it doesn't propagate to the subsequent
active nodes.
* In BestFitPenalty, I removed the {{getBesFitPosition}} method and instead
store the position in a field so that it can be accessed directly. That'll do
for now but maybe the whole thing can be further simplified later.
It's maybe time to stress test this implementation with a good set of layout
tests. The two-valid-variants.fo file is a good start because you can easily
make one or the other variant appear in the final output by playing with the
.minimum and .maximum components of the elastic space.
Then you can address the case where the multi-switch ends up in the middle of a
page. A mere glue following the penalty, with the size of the first variant for
its width, should do.
Thanks,
Vincent
> 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_best-fit_ext_rev4.patch,
> FO_multi-switch_best-fit_ext_rev5.patch,
> FO_multi-switch_best-fit_ext_rev6.patch,
> FO_multi-switch_best-fit_ext_rev7.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, two-valid-variants.fo
>
>
> 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.4#6159)