Uploaded image for project: 'FOP'
  1. FOP
  2. FOP-1387

[PATCH] Refactoring of PageSequenceLayoutManager and provide common FObj id property use

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Resolution: Fixed
    • 2.5
    • None
    • unqualified
    • None
    • Operating System: other
      Platform: Other
    • 42809

    Description

      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.

      Attachments

        1. diff.txt
          151 kB
          Adrian Cumiskey
        2. filelist.txt
          2 kB
          Adrian Cumiskey

        Activity

          People

            fop-dev@xmlgraphics.apache.org fop-dev
            dev@cumiskey.com Adrian Cumiskey
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: