Jeremias Maerki [Thu, 22 Dec 2005 08:30:25 +0000 (08:30 +0000)]
Merge from Trunk:
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 [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.
Jeremias Maerki [Fri, 9 Dec 2005 08:27:01 +0000 (08:27 +0000)]
The command-line now automatically sets two parameters for any XSLT transformation: "fop-output-format" contains the MIME type of the currently selected output format, "fop-version" contains FOP's version number.
Suggested by: Roland Neilands
Jeremias Maerki [Thu, 8 Dec 2005 15:55:19 +0000 (15:55 +0000)]
Better approach for enforcing the overflow property on block-containers.
Fixed a bug in the PDF and PS renderers concerning the clipping of viewport areas. The order of clipping and establishing the new coordinate system was wrong. Removed an unnecessary save/restoreGraphicsState() pair.
Jeremias Maerki [Thu, 8 Dec 2005 14:55:53 +0000 (14:55 +0000)]
Bugfix: Areas for table-cells that are broken over more than one page are now generated even if all its content is already painted on a previous page. This fixes strange effects like a table grid that is not completely painted.
Some check in the test cases had to be adjusted because the indices weren't correct anymore, since now some previously missing areas are generated.
Jeremias Maerki [Thu, 8 Dec 2005 10:15:33 +0000 (10:15 +0000)]
Looks like the 2-column situation has to be handled differently than the 3-column approach.
The 4-column example shows that my current approach is not good enough and needs to be revisited.
Jeremias Maerki [Wed, 7 Dec 2005 15:15:38 +0000 (15:15 +0000)]
Alternative set of rules for text indent calculation (start-indent and end-indent) which tries to mimic many commercial FO implementation that have chosen to break the specification in this aspect. I think I have found the behaviour for most cases. But I'm operating in reverse-engineering mode here and not all FO implementations behave in the same way!
This is an optional feature that has to be explicitely enabled through the user agent. Otherwise, FOP will behave like before.
In the FO tree tests a processing instruction is used to enable the feature/bug ;-) in the user agent so I can test both cases.
Jeremias Maerki [Wed, 7 Dec 2005 09:40:16 +0000 (09:40 +0000)]
Bugzilla #37815:
Bugfix: The combination of content-width="scale-to-fit" and content-height="100%" did not work as expected due to a datatype conversion bug.
Submitted by: Tom <tom.at.craddock.id.au>
Jeremias Maerki [Wed, 7 Dec 2005 09:01:26 +0000 (09:01 +0000)]
Bugzilla #37813:
Fixed a bug that occurred if the first block was span="all". A page break was inserted in this situation, the first span was calculated as if it were span="none".
Code added to remove empty span areas. This is a lot easier and cleaner than trying not to instantiate the first span right from the beginning.
Jeremias Maerki [Fri, 2 Dec 2005 14:27:35 +0000 (14:27 +0000)]
font-family list still not fully supported but a comma-separated list is now properly tokenized. FOP will now go through all fonts in the list to find one that is available, but it doesn't do so per character, yet.
Jeremias Maerki [Thu, 1 Dec 2005 21:56:02 +0000 (21:56 +0000)]
Fixing two NPEs occurring with a completely empty table where not even the table-cell has at least one block element and relaxed validation is enabled.
Jeremias Maerki [Thu, 1 Dec 2005 16:05:00 +0000 (16:05 +0000)]
Bugfix: Relatively positioned BlockViewports (from block-containers) caused the paint cursor not be be properly advanced when space-before or space-after were present.
Jeremias Maerki [Wed, 30 Nov 2005 08:52:26 +0000 (08:52 +0000)]
Bugfix: Added missing conditionality notification for table-cell content.
Extracted functionality to find a previous break into a helper method in ElementListUtils.
Fixed misguided german->english translation on parameter names (last != previous).
Jeremias Maerki [Thu, 24 Nov 2005 20:08:56 +0000 (20:08 +0000)]
Bugfix for a multi-threading problem:
propertyListTable initialization moved from the constructor to a static block in FOObj.
This fixes NullPointerExceptions in PropertyList.
This was discovered using the application in test/java/org/apache/fop/threading/.
Jeremias Maerki [Thu, 24 Nov 2005 19:41:11 +0000 (19:41 +0000)]
Improvements for leader painting in PDF. "dots" are actually dots now, nicer ridge/groove with lightenColor(), reusing code from border painting.
Leader in PostScript Renderer now, too.
LeaderLM did not set the leader color and the PDF Renderer didn't act on it.
Jeremias Maerki [Thu, 24 Nov 2005 14:54:06 +0000 (14:54 +0000)]
Added support for border-separation.block-progression-direction (only inline-progression-direction worked before).
Bugfix for a special case with vertically spanned cells where a cell might have been swallowed as a whole.
Jeremias Maerki [Thu, 24 Nov 2005 11:14:00 +0000 (11:14 +0000)]
Cleaned up all entries (except whitespace-related stuff) in disabled-testcases.xml.
block_padding_2's expected element list was wrong. An infinite penalty was missing for the "retain" element.
inline-block_keep-together was a misleading name: it is now inline_keep-together.xml.
Bug 36356 actually behaves like it should, now, but the checks were wrong. Only one margin was used in the width calculation and a count() was missing in the second check.
table_border-width_conditionality.xml specified conditionality for start and end edges instead of before and after. The test itself has to be looked at again because shorthands are in use and this case some consequences as discussed earlier.
Another test case could be enabled because it works now: page-number_initial-page-number_2
Jeremias Maerki [Tue, 22 Nov 2005 18:26:26 +0000 (18:26 +0000)]
Merged changes 345575:345890 from branches/fop-0_90 into trunk:
"build/site" is now copied to "docs".
The build directory isn't included in either distribution anymore.
Source distribution doesn't contain fop.jar, javadocs and compiled docs anymore to make the distribution smaller.
KEYS and status.xml and lib/xalan*.txt added (Thanks, Simon).
Added version info to javadocs.
Removed limitation to build javadocs only with JDKs >= 1.4. It works fine for me on Win32 Sun JDK 1.3.1_15.
You can add "javahome.jdk14" to your build-local.properties so Forrest docs can be built during a JDK 1.3 distribution build.
Added release notes to site (Thanks, Christian, for the reminder).
Append JDK indicator to binary distribution using system property java.specification.version.
upgrade guide: new configuration format (CG)
Documented additional known issue with PS Renderer that I didn't have time to fix.
Redirects and release names cleaned up as per Simon's suggestions.
Added link to latest release branch to download page.