Simon Pepping [Fri, 9 Jul 2004 17:27:12 +0000 (17:27 +0000)]
Implementing user configuration file.
Adding debug logging for user configuration, user PDF filters and user
fonts.
Adding reporting of mime type to renderers.
PR:
Obtained from:
Submitted by:
Reviewed by:
Removed DocumentReader/DocumentInputSource from the API in favor of the
JAXP identity transformation for DOM Tree Handling. JAXP seems to be
the right way for us to go for 1.0 for DOM documents, and I think we can
make the change now, with few people using HEAD in production.
Still, we'll listen to the user email list on this change as a judge
of whether these classes need to return.
1.) Moved the Renderer creation further down from AreaTree to RenderPagesModel (subclass of AreaTreeModel). Still have the issue of the four-param constructor a bit messy, also some of the exceptions I have to declare to be thrown may not be necessary.
2.) Removed encapsulation-breaking methods from AreaTree; dropped the AreaTreeBuilder class as it wasn't conformant with our API and required too many objects to expose internal functionality.
3.) Validity checking added for fo:title, however still won't work as #PCDATA needs <fo:blocks> around it within FOP, but the Recommendation bans those for fo:title.
4.) isInlineItem() added to FObj, as a quick check for the %inline; parameter entity as defined in spec.
I am hoping this will streamline the code more.
Main drawback I can see is that the AreaTree constructor
gets a bit ugly--from one parameter, the Renderer,
to four (the items needed to create a Renderer.) Perhaps
we can have AreaTree construct the FontInfo object in the
future, dropping us to a three-parameter constructor.
Glen Mazza [Sun, 27 Jun 2004 13:29:32 +0000 (13:29 +0000)]
1.) Moved Renderer instantiation from Driver to FOTreeHandler, as it is the only
FOInputHandler subclass concerned with Renderer creation. (MIFHandler and RTFHandler
are hardcoded to a particular renderer-type).
2.) Added a RendererOverride member variable in FOUserAgent, for use by
AWTRenderer as well as external (i.e. user-defined) renderers. FOTreeHandler coded
to reference it.
3.) Flow validity checking which was added yesterday temporarily commented-out;
I misread the content model from the spec (I will have to account for fo:markers
as initial children.)
Glen Mazza [Sat, 26 Jun 2004 19:37:13 +0000 (19:37 +0000)]
1. Output constant types (RENDER_PDF, RENDER_PS, etc.) made common between
CommandLineOptions and Driver, and factored into fo.Constants interface.
2. New Driver(AWTRenderer renderer) constructor added in apps.Driver for
the AWTRenderer (which does reloading, unique among the output types.) Note
reloading currently doesn't work--AWTRenderer not yet functional.
3. Driver.hasData() method removed from API--a search on when it was implemented
dates it to 2001, when reset() was coded. Unsure of its need, and so
removed until we have user requests for it.
4. Renderers abstracted away from API in favor of just calling .setRenderer(int Rendertype),
and configuring user-configurable options in FOUserAgent.
5. Driver.setRenderer(String <renderer class name>) also dropped. If external user
need for it, can be re-implemented fairly easily via a "renderer override" string in FOUserAgent, for which FOTreeHandler can read and use instead.
6. Validity checking added to fo:flow, and convenience functions defining the "%block;"
parameter entity and neutral containers as defined in 6.2 of spec [1] added to FObj.
Glen Mazza [Fri, 25 Jun 2004 23:35:00 +0000 (23:35 +0000)]
1.) Moved the CommandLineOptions' InputHandler object into FOUserAgent, allowing
for a no-parameter constructor for AWTRenderer (like the other renderers). (Code is
not yet ideal in AWTRenderer, but will do the task.)
2.) AWT renderer handling now more similar to the other renderers
(simplifications in Driver, Fop).
3.) Driver.getRenderer() removed from API. (Renderer configuration now mostly
done through FOUserAgent, and setup of renderer prior to calling setRenderer().)
4.) Validity checking added to region-after, -start, -end, and -before.
Glen Mazza [Wed, 23 Jun 2004 00:25:27 +0000 (00:25 +0000)]
1.) Moving renderer-specific customization variables (producer, creator, create date) to FOUserAgent, those renderers which can work with these values can read them from passed-in FOUserAgent instance.
2.) Version.getVersion() moved to Fop.getVersion().
Glen Mazza [Sun, 20 Jun 2004 12:35:17 +0000 (12:35 +0000)]
1.) Removed the get/setLogger methods from Driver, obsolete with Commons-Logging.
2.) Updated examples and documentation.
3.) Added a -v option to show version of FOP being used.
Glen Mazza [Sun, 20 Jun 2004 07:46:13 +0000 (07:46 +0000)]
1. Created own logger for AbstractRenderer, removed logger setter from Renderer interface.
2. Validity checking for fo:repeatable-page-master-alternatives.
Glen Mazza [Fri, 18 Jun 2004 04:13:54 +0000 (04:13 +0000)]
1. FOTreeBuilder modified to handle more of the renderer initialization.
2. AreaTree now takes a Renderer as a constructor, handles RenderPagesModel initialization.
3. FontInfo object moved from Driver/Document to fo.FOInputHandler.
4. getFontState/getFontInfo now take a fontInfo object directly instead of a apps.Document.
5. validity checking added to PageSequence.java
Glen Mazza [Thu, 17 Jun 2004 07:02:13 +0000 (07:02 +0000)]
1. Child element validity checking added for fo:page-sequence-master.
2. AreaTree object moved from Document/Driver to FOTreeHandler, as it is specific to this subclass of FOInputHandler only (RTFHandler and MIFHandler don't use area trees).
Glen Mazza [Wed, 16 Jun 2004 23:40:58 +0000 (23:40 +0000)]
1. Valid node checking for LayoutMasterSet done.
2. Additional error message provided for missing required child elements of a node.
3. Removal of elementName from property list; redundant (retrievable via getFObj.getName()). Adding getName() to FObj so the element so fObj.getName() works.
(Vielen Dank, Simon!)
4. Moving locator information from FObj to FONode so non-XSL NS elements will also have this information.
Glen Mazza [Wed, 16 Jun 2004 00:27:27 +0000 (00:27 +0000)]
1.) Check for fo:color-profile made to ensure no child elements during processing.
2.) Error messages for bad fo: files now give locator (line/col. #) information.
3.) Parent of the fo:root (FO Tree) "lowered" from apps.Document to fo.FOInputHandler;
IDReferences moved from former to latter.
Glen Mazza [Sun, 13 Jun 2004 19:58:58 +0000 (19:58 +0000)]
1.) App now returns an error if no page-sequence declared within fo:root.
2.) Standardized node names via a new static FONode.getNodeName() method
3.) Declarations object now tied to Root object, will no longer return NPE
if empty (bug fixed).
4.) AreaTreeControl removed in favor of direct connection between Document
and the Area Tree.
Glen Mazza [Sat, 12 Jun 2004 23:18:53 +0000 (23:18 +0000)]
Created a validateChildNode() in FONode for better syntax checking in the
fo document: e.g., preventing two fo:layout-master-set's from occurring within
an fo:root, requiring fo:page-sequence to follow the fo:l-m-s
(and fo:declarations, if present). Currently just validates fo:root's children--validateChildNode() needs to be overridden in other FObj subclasses
to do the same for other formatting objects. Comments most welcome.
Glen Mazza [Sat, 12 Jun 2004 18:03:47 +0000 (18:03 +0000)]
Removed get/setUserAgent() initializations from the LayoutManagers. (Infrequently
called, and already obtainable through AbstractLayoutManager's FObj member
variable.)
Glen Mazza [Tue, 8 Jun 2004 02:28:37 +0000 (02:28 +0000)]
Removed the new apps.Document from public access within Driver, at least until the former class' methods have been finalized and its API benefits over apps.Driver better declared.
Simon Pepping [Sat, 29 May 2004 09:07:59 +0000 (09:07 +0000)]
Remove trailing spaces at the end of a paragraph.
Modify the way to deal with BPs which have not been added to
vecInlineBreaks.
See bug 28706. The code was rewritten w.r.t. the submitted patch.
Simon Pepping [Sat, 29 May 2004 08:50:46 +0000 (08:50 +0000)]
Solve a few problems concerning hyphenation:
- show the '-' at the end of the hyphenated lines
- use the fo:hyphenate property to enable hyphenation, instead of the alignment
- specify the hyphenation character using the fo:hyphenation-character property
Patch by Luca Furini, bug 27773
Glen Mazza [Wed, 26 May 2004 05:09:00 +0000 (05:09 +0000)]
Removed getPropertyList() method from PropertyManager, as that method
is already available on the FObj (which owns both the PropertyList and the
PropertyManager.)
Glen Mazza [Sat, 22 May 2004 21:44:38 +0000 (21:44 +0000)]
PR:
Obtained from:
Submitted by:
Reviewed by:
Made propertyList member variable of fo.FObj protected (instead of public).
Property value queries routed through FObj instead of PropertyList.
Glen Mazza [Wed, 19 May 2004 22:37:53 +0000 (22:37 +0000)]
Spelled out FO element maker classes in order to make its toString()
readable during debugging (without needing to provide individual toString() overrides).
was causing a line to draw across the entire page, because the cell width present in
fo:table-cell's Block was not copied into the inner fo:block's Block. (This problem did not
occur if the border-bottom attribute was set in fo:table-cell.)
Removed currently unused Document object from the LayoutStrategy (the latter
class is already a child of Document, and a two-way interface appears unneeded.)
PDFRenderer does not presently support out-of-order rendering (e.g.,
a 10 page document that has an "ending page" fo:page-number-citation in use
will have page 10 printed first, then pages 1-9). Turning this value to false
has the pages generate in correct order.
Logger "LogFactory.getLog(PDFObject.class.getPackage().getName())" was
causing null pointer exceptions when the Ant task is run (although not with
command-line usage); switched to "LogFactory.getLog(PDFObject.class.getName())",
which works for both command-line and Ant task.
New FontInfo class (original design was from Layout.FontInfo, and was removed
and placed into the Document class last year). This class is to be an encapsulation
of the Font information within apps.Document, also to be used in Transcoder and other
non-XSL-specific classes and packages instead of an apps.Document object, in those
cases where the latter either presents too much information and/or is not relevant
for referenced class' task. Currently not used, pending new patch in Bugzilla.
Ordinary Java code should never throw Error instances, use RuntimeException instead. That said, RuntimeException is equally suboptimal here. We should probably create an exception class like SAXException for the handler methods.
Another attempt at fixing the space removal issue. This method
combines the long-standing previous method (the one that removed spaces
between words correctly, at a cost of a leading extra space for the first
FOText instance of an fo:block) with my later patch (which would
fix the extra space issue but had problems with spaces between words). It
appears to work well, but the fo:inline issues Simon brought up will still
need further work.
Some improvements on the quality fallback for text (use stroking when in doubt).
PSGenerator returns the PS level to use.
Start bringing back bitmap support.
Changed logging to use "static" loggers from Jakarta Commons Logging (via LogFactory).
Changed the way Commons Logging is set up.
Some touch-up in the code.