Simon Pepping [Tue, 10 Jan 2006 20:18:13 +0000 (20:18 +0000)]
The last page sequence should also follow its force-page-count trait.
Replace one test case with two leaner test cases, submitted by Gerhard
Oettl, see bug 38087.
Jeremias Maerki [Tue, 10 Jan 2006 13:19:54 +0000 (13:19 +0000)]
Fixed ugly NPE (with no message) when a malconfigured font was processed by the PS Renderer (even when that font is not used). When the font is used we don't get an NPE anymore but a Runtime exception. Not ideal, but a little better, especially because of the error message. I hope that at some point someone finds time to clean up the whole exception handling in FOP.
Manuel Mall [Sat, 7 Jan 2006 13:15:53 +0000 (13:15 +0000)]
Added support for relative font config URLs (metrics-url and embed-url). These URLs are now resolved through the FOP config URI resolver. A new configuration item font-base has been added which defines the base URL to be used for resolution of the font URLs. If it is not given the normal FOP base URL is used. Unrelated to this feature the patch also contains a new image class (java 1.4 specific) for JPEG images. This is for renderers (e.g. AFP) which require access to the decoded JPEG.
Jeremias Maerki [Thu, 5 Jan 2006 10:24:18 +0000 (10:24 +0000)]
Bugzilla #38132:
Bugfix: Certain border styles could lead to a NullPointerException.
inset and groove are now mapped to RTF's "engrave", outset and ridge to "emboss". If no mapping can be found the "solid" style is used. Before null was returned which was the cause for the NPE.
Jeremias Maerki [Wed, 4 Jan 2006 19:30:24 +0000 (19:30 +0000)]
Bugzilla #38102:
Bugfix: Space was not adjusted if the space was on a nested block inside an auto-height block-container. This could lead to content overflowing the bottom of a page.
Note: Tables and lists currently don't offer space adjustments due to the current limits of the element list combination process. Once the stretch/shrink components are handled during element list combination, this will have to be rechecked.
Jeremias Maerki [Tue, 3 Jan 2006 17:35:23 +0000 (17:35 +0000)]
Bugfix: TableCell did not properly report that it generates reference-areas which could lead to wrong inherited values for start-indent and end-indent.
Jeremias Maerki [Tue, 3 Jan 2006 13:08:45 +0000 (13:08 +0000)]
The font loading code now reads the encoding value from the XML font metrics file so that Type 1 fonts like Symbol and ZapfDingbats can be embedded explicitely (Required by PDF/A).
Note that it is necessary to set the encoding value in the font metrics file manually since it cannot be extracted from the PFM file reliably, i.e. for "Symbol" use "SymbolEncoding" and for "ZapfDingbats" use "ZapfDingbatsEncoding".
Manuel Mall [Wed, 28 Dec 2005 03:08:49 +0000 (03:08 +0000)]
LineArea had a finalize method which caused a NPE when called from the garbage collector. I assume it was never intended for this method to be an override of the Java Object finalize method. Renamed the method to finalise.
Jeremias Maerki [Thu, 22 Dec 2005 20:10:54 +0000 (20:10 +0000)]
As announced, I brought FontTriplet to more life by making it Serializable and using it to transport the information about the font in use through the area tree. This has small effects on the test cases as the values in the generated XML are slightly different. While refactoring I saw that there's some room for optimization. Too many objects are still created. It should be quite easy now with the FontTriplet to create a small cache.
Jeremias Maerki [Thu, 22 Dec 2005 10:51:29 +0000 (10:51 +0000)]
More work on preparing for the intermediate format.
Font traits are added in a single place in TraitSetter so it will be easier to change those.
Remove direct references on FObjs in the area tree for regions.
Jeremias Maerki [Thu, 22 Dec 2005 08:51:37 +0000 (08:51 +0000)]
Issue a warning when an unresolved bookmark item is received. This will be currently triggered by bug #37993. This is just to raise awareness of the problem.
Jeremias Maerki [Thu, 22 Dec 2005 07:58:31 +0000 (07:58 +0000)]
Introduced a flag to tell the page breaking to operate in auto-height mode, i.e. no overflows can happen. This disables the overflow warnings when footnote-separators are defined. They don't have an explicit height.
Jeremias Maerki [Wed, 21 Dec 2005 10:20:56 +0000 (10:20 +0000)]
Further decoupling the area tree from the FO tree.
Created a new class org.apache.fop.layoutmgr.Page that holds a reference to the generating SimplePageMaster and the PageViewport. A deserialized area tree doesn't need a reference to the SimplePageMaster.
Renamed PageViewportProvider to PageProvider as it now returns Page instances, not (directly) PageViewports.
Jeremias Maerki [Tue, 20 Dec 2005 12:53:50 +0000 (12:53 +0000)]
First step towards reactivating CachedRenderPagesModel (helps preparing for the intermediate format).
Fix some serialization problems in the area tree.
Jeremias Maerki [Tue, 20 Dec 2005 09:33:44 +0000 (09:33 +0000)]
Bugzilla #37964:
Hard breaks with even-page or odd-page were not handled correctly when spaces were surrounding the break. The code that retrieves the break-class from the penalty assumes that the penalty is on the last element in the list, but the space resolution added additional glues after the penalty.
Jeremias Maerki [Mon, 19 Dec 2005 10:46:54 +0000 (10:46 +0000)]
Update for status page. Table on status of the individual components added. This reflects my own view, not necessarily everyone's. If I'm wrong about anything, please change.
Jeremias Maerki [Fri, 16 Dec 2005 14:40:20 +0000 (14:40 +0000)]
XMLHandler interface changed so it reports whether it supports a particular Renderer instead of reporting the MIME type. One MIME type could be implemented by multiple Renderer implementations so conflicts could occur. Almost all XMLHandler implementations will have a dependency on a particular Renderer implementation.
XMLHandlers are now configurable.
Standard XMLHandlers now get registered through service lookup.
Simplification: XMLHandlers don't need nested classes for the handling functionality anymore. If Batik, for example, is not in the classpath it will already be detected while registering the XMLHandlers.
The RendererContextConstants interface now standardizes some of the keys used in the RendererContext and helps with actually decoupling the XMLHandler implementations from the renderers. This is one step towards making Batik an optional dependency and making it possible to move the SVG functionality to a separate place later.
Extracted the SVG XMLHandler functionality from the sandbox SVGRenderer into a separate class following the example of the other renderers.
Bugfix in PSSVGHandler: Fixed a copy/paste error which could lead to wrong clipping of an SVG image for PostScript output.
Jeremias Maerki [Thu, 15 Dec 2005 22:20:48 +0000 (22:20 +0000)]
NOTE: API changes in a backwards-incompatible way: FOUserAgent.setResolution() -> FOUserAgent.setSourceResolution() and FOUserAgent.setTargetResolution()
Resolution parameter to the user agent is split into:
- a source resolution used to determine the pixel size in SVG images and bitmap without resolution information
- a target resolution used to specify the output resolution of bitmap images generated by bitmap renderers and bitmaps generated by Batik for filter effects.
Jeremias Maerki [Thu, 15 Dec 2005 16:59:37 +0000 (16:59 +0000)]
Bugzilla #37875:
Some content inside a table-header may not have been renderered on pages n > 1 in certain conditions.
LineLM kept state between calls to addAreas which can have ugly side-effects in case of table-headers, for example, where the same positions are rendered more than once. I don't know why the bug only manifests if there's an overflow in the second line of the table-header in the test case.
Jeremias Maerki [Thu, 15 Dec 2005 10:57:45 +0000 (10:57 +0000)]
Attempt at providing context information about the element causing an endless loop because of an area overflow in b-p-direction. This should make the error message more helpful.
Jeremias Maerki [Wed, 14 Dec 2005 16:57:16 +0000 (16:57 +0000)]
Don't hyphenate when wrap is set to "no-wrap".
Hack: Work around an NPE in hyphenation when preserved line feeds are found.
Documenting a bug where linefeeds are painted as "#" and content is painted multiple times when hyphenation is on and linefeed-treatment="preserve".
Jeremias Maerki [Tue, 13 Dec 2005 20:41:28 +0000 (20:41 +0000)]
Restored PNG support for RTF output and fixed two bugs related to image handling (an NPE and an invalid "==" comparison on Strings).
Added a default implementation for loading the raw image. Used by most FopImage implementations.
Jeremias Maerki [Tue, 13 Dec 2005 19:49:16 +0000 (19:49 +0000)]
startVPArea() and endVPArea() made abstract in AbstractRenderer so implementors are forced to deal with the topic.
startVPArea() in Renderers now takes an additional parameter for an optional clipping rectangle. PDF, PS and Java2D renderers now perform proper clipping on viewports if requested.
Fixed various problems in the Java2D renderer and added border and background painting where still missing. Note that there are several code parts that could be easily shared with the AbstractPathOrientedRenderer.
Jeremias Maerki [Tue, 13 Dec 2005 19:48:04 +0000 (19:48 +0000)]
New method: FONode.decorateWithContextInfo() adds context information to an error or log message by either providing the locator information or by gathering context information from the context FOs.
Improved log and error messages in a number of places by adding additional context information that should make it easier to find the location in the source files.
Added a check to detect inline overflows (LineLayoutManager).
Added a check to detect in-page overflows (PageBreakingAlgorithm).
Jeremias Maerki [Mon, 12 Dec 2005 19:28:33 +0000 (19:28 +0000)]
Quick fix to get the size of images right in RTF output. It looks like \picwgoalN|\pichgoalN should not be used together with \picscalexN|\pixscaleyN. Some problems remain with uniform scaling and such.
Added support for SVG in external-graphic. SVG images are converted to JPEG through Batik at 300 dpi. Note that instream-foreign-object is not supported, yet. It might be good to reuse code from external-graphic for that.
Jeremias Maerki [Fri, 9 Dec 2005 09:34:49 +0000 (09:34 +0000)]
Made the locator variable on FONode protected.
Locator information is duplicated using SAX's LocatorImpl. Otherwise, the info returned by the Locator information is only valid during FO tree building and validation.
If desired code could be added to disable storing locator information even if it is available to use less memory (one LocatorImpl instance per FO tree node) in FOTreeBuilder.