Bug 42809 - [PATCH] Refactoring of PageSequenceLayoutManager and provide common FObj id property use
Summary: [PATCH] Refactoring of PageSequenceLayoutManager and provide common FObj id p...
Status: CLOSED FIXED
Alias: None
Product: Fop - Now in Jira
Classification: Unclassified
Component: general (show other bugs)
Version: trunk
Hardware: Other other
: P2 normal
Target Milestone: ---
Assignee: fop-dev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-07-04 09:31 UTC by Adrian Cumiskey
Modified: 2012-04-01 06:29 UTC (History)
0 users



Attachments
patch file (151.30 KB, patch)
2007-07-04 09:32 UTC, Adrian Cumiskey
Details | Diff
file list (2.06 KB, text/plain)
2007-07-04 09:32 UTC, Adrian Cumiskey
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Adrian Cumiskey 2007-07-04 09:31:32 UTC
Whilst investigating another bug and reading through and trying to understand
the code I found that the following structural changes to the code made sense :-

* The AreaTreeHandler had several member variables specifically with the remit
of tracking the use of Ids in PageViewPorts so this was factored out into a new
IDTracker class.

* The FlowLayoutManager member variable in PageSequenceLayoutManager was only
referenced within PageBreaker so this member variable was moved out to PageBreaker.

* The PageBreaker inner class of PageSequenceLayoutManager was getting rather
large (larger than its holding class) and had minimal dependencies so I felt it
was deserved moving out to the top level.

* The PageProvider inner class of PageSequenceLayoutManager 
had very little dependencies on its holding class and was has been moved to the
top level.

* I found many instances of an id property and associated getId() accessor
method in FObj descendants so it made sense to have this in the base FObj class
and remove all other instances.  Also added hasId() convenience method.

* BasicLinkLayoutManager makes use of new BasicLink
has(Internal|External)Destination() convenience methods.

* Removed List blockLists argument from the AbstractBreaker/PageBreaker
getNextBlockList() protected method as its only usage is the AbstractBreaker
blockLists member variable.
Comment 1 Adrian Cumiskey 2007-07-04 09:32:04 UTC
Created attachment 20446 [details]
patch file
Comment 2 Adrian Cumiskey 2007-07-04 09:32:29 UTC
Created attachment 20447 [details]
file list
Comment 3 Andreas L. Delmelle 2007-07-06 17:05:50 UTC
I liked it... very much :)

Patch applied. see: http://svn.apache.org/viewvc?view=rev&rev=554094

Nice work, Adrian!
Comment 4 Glenn Adams 2012-04-01 06:29:18 UTC
batch transition pre-FOP1.0 resolved+fixed bugs to closed+fixed