Done since 0.15 release
-- added vertical alignment for table cell contents [Marcus Crafter]
+- added: fo:character and property 'character' [Fotis Jannidis]
+ (limitation: not included into hyphenation)
+- added vertical alignment for table cell contents [Keiron Liddle]
- added: Finnish hyphenation patterns [Jarno Elovirta]
- added: hyphenation package (Carlos Villegas), integration into Fop [Fotis Jannidis]
- added: interim configuration package [Fotis Jannidis]
- added: FopImage class that uses JAI [Eric Schaeffer] and JAI compile target [Kelly Campbell]
- added: support for rule-style [Fotis Jannidis]
- updated tables to handle headers, footers, keep-with, colspan
- is partly done [Marcus Crafter]
+ is partly done [Keiron Liddle]
- updated: svg stuff for the latest java bindings [Keiron Liddle]
- fixed: enhanced error messages for page layout (region names, master) [Norm Walsh]
- fixed: infinite looping bug when TableCell or TableRow is larger than a page [Hani Elabed]
- fixed: corrected the size of the "-" char [Marcus Crafter]
- fixed: check for unnecessary whitespace at end of line [Marcus Crafter]
-- fixed: moves table completely to next page if first row doesn't fit into last page [Marcus Crafter]
+- fixed: moves table completely to next page if first row doesn't fit into last page [Keiron Liddle]
- fixed: problem where id's where being setup twice for
table row going over the page [Kelly Campbell]
- fixed colspanning so that the cell state keeps track of the
- width so far properly [Marcus Crafter]
+ width so far properly [Keiron Liddle]
- fix to allow JDK 1.1 users to compile and use FOP [Mikko Honkala]
- fix: removing duplicate character mappings [Dharamveer Salecha]
- fix: NullPointerException in FopImageFactory [Kelly Campbell]
-- fixed: space after's where not being removed if table row was being removed [Marcus Crafter]
-- fixed problem with keep-with not storing the correct rows [Marcus Crafter]
+- fixed: space after's where not being removed if table row was being removed [Keiron Liddle]
+- fixed problem with keep-with not storing the correct rows [Keiron Liddle]
Done since 0.14 release
1.One category of tasks will be to implement missing formatting objects.
basic
- fo:character
fo:declarations
fo:multi-case
fo:table-and-caption
border-before-precedence
border-end-precedence
border-start-precedence
- character
clip
column-number
content-type
reference-orientation
relative-align
role
- rule-style
source-document
space-after (full)
space-before (full)
-/*-- $Id$ --
+/*-- $Id$ --
============================================================================
The Apache Software License, Version 1.1
============================================================================
-
+
Copyright (C) 1999 The Apache Software Foundation. All rights reserved.
-
+
Redistribution and use in source and binary forms, with or without modifica-
tion, are permitted provided that the following conditions are met:
-
+
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
-
+
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
-
+
3. The end-user documentation included with the redistribution, if any, must
include the following acknowledgment: "This product includes software
developed by the Apache Software Foundation (http://www.apache.org/)."
Alternately, this acknowledgment may appear in the software itself, if
and wherever such third-party acknowledgments normally appear.
-
+
4. The names "FOP" and "Apache Software Foundation" must not be used to
endorse or promote products derived from this software without prior
written permission. For written permission, please contact
apache@apache.org.
-
+
5. Products derived from this software may not be called "Apache", nor may
"Apache" appear in their name, without prior written permission of the
Apache Software Foundation.
-
+
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
+
This software consists of voluntary contributions made by many individuals
on behalf of the Apache Software Foundation and was originally created by
- James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ James Tauber <jtauber@jtauber.com>. For more information on the Apache
Software Foundation, please see <http://www.apache.org/>.
-
+
*/
package org.apache.fop.fo;
String uri = "http://www.w3.org/1999/XSL/Format";
- builder.addMapping(uri, "root", Root.maker());
+ builder.addMapping(uri, "root", Root.maker());
builder.addMapping(uri, "layout-master-set",
- LayoutMasterSet.maker());
+ LayoutMasterSet.maker());
builder.addMapping(uri, "simple-page-master",
- SimplePageMaster.maker());
- builder.addMapping(uri, "region-body", RegionBody.maker());
- builder.addMapping(uri, "region-before", RegionBefore.maker());
- builder.addMapping(uri, "region-after", RegionAfter.maker());
- builder.addMapping(uri, "page-sequence", PageSequence.maker());
+ SimplePageMaster.maker());
+ builder.addMapping(uri, "region-body", RegionBody.maker());
+ builder.addMapping(uri, "region-before", RegionBefore.maker());
+ builder.addMapping(uri, "region-after", RegionAfter.maker());
+ builder.addMapping(uri, "page-sequence", PageSequence.maker());
builder.addMapping(uri, "page-sequence-master",
- PageSequenceMaster.maker());
+ PageSequenceMaster.maker());
builder.addMapping(uri, "single-page-master-reference",
- SinglePageMasterReference.maker());
+ SinglePageMasterReference.maker());
builder.addMapping(uri, "repeatable-page-master-reference",
- RepeatablePageMasterReference.maker());
+ RepeatablePageMasterReference.maker());
builder.addMapping(uri, "conditional-page-master-reference",
- ConditionalPageMasterReference.maker());
+ ConditionalPageMasterReference.maker());
builder.addMapping(uri, "repeatable-page-master-alternatives",
- RepeatablePageMasterAlternatives.maker());
- builder.addMapping(uri, "flow", Flow.maker());
+ RepeatablePageMasterAlternatives.maker());
+ builder.addMapping(uri, "flow", Flow.maker());
builder.addMapping(uri, "static-content",
StaticContent.maker());
- builder.addMapping(uri, "block", Block.maker());
- builder.addMapping(uri, "block-container", BlockContainer.maker());
+ builder.addMapping(uri, "block", Block.maker());
+ builder.addMapping(uri, "block-container", BlockContainer.maker());
builder.addMapping(uri, "list-block", ListBlock.maker());
builder.addMapping(uri, "list-item", ListItem.maker());
builder.addMapping(uri, "list-item-label",
- ListItemLabel.maker());
+ ListItemLabel.maker());
builder.addMapping(uri, "list-item-body", ListItemBody.maker());
builder.addMapping(uri, "page-number", PageNumber.maker());
builder.addMapping(uri, "page-number-citation", PageNumberCitation.maker());
builder.addMapping(uri, "display-sequence",
- DisplaySequence.maker());
+ DisplaySequence.maker());
builder.addMapping(uri, "inline",
- Inline.maker());
+ Inline.maker());
builder.addMapping(uri, "external-graphic",
ExternalGraphic.maker());
builder.addMapping(uri, "table", Table.maker());
builder.addMapping(uri, "basic-link", BasicLink.maker());
builder.addMapping(uri, "instream-foreign-object", InstreamForeignObject.maker());
builder.addMapping(uri, "leader", Leader.maker());
+ builder.addMapping(uri, "character", org.apache.fop.fo.flow.Character.maker());
}
}
return 1;
}
+ public void addCharacter(FontState fontState, float red, float green,
+ float blue, int wrapOption, LinkSet ls,
+ int whiteSpaceCollapse, char data, boolean ul) {
+
+ this.currentLineArea.changeFont(fontState);
+ this.currentLineArea.changeColor(red, green, blue);
+ this.currentLineArea.changeWrapOption(wrapOption);
+ this.currentLineArea.changeWhiteSpaceCollapse(whiteSpaceCollapse);
+
+ if (ls != null) {
+ this.currentLinkSet = ls;
+ ls.setYOffset(currentHeight);
+ }
+
+ int marker = this.currentLineArea.addCharacter(data, ls, ul);
+ //if character didn't fit into line, open a new one
+ if (marker == org.apache.fop.fo.flow.Character.DOESNOT_FIT) {
+ this.currentLineArea.align(this.align);
+ this.addLineArea(this.currentLineArea);
+
+ this.currentLineArea =
+ new LineArea(fontState, lineHeight, halfLeading,
+ allocationWidth, startIndent, endIndent,
+ currentLineArea);
+ this.currentLineArea.changeFont(fontState);
+ this.currentLineArea.changeColor(red, green, blue);
+ this.currentLineArea.changeWrapOption(wrapOption);
+ this.currentLineArea.changeWhiteSpaceCollapse(
+ whiteSpaceCollapse);
+ if (ls != null) {
+ this.currentLinkSet = ls;
+ ls.setYOffset(currentHeight);
+ }
+
+ this.currentLineArea.addCharacter(data, ls, ul);
+ }
+ this.hasLines = true;
+ }
+
public void end() {
if (this.hasLines) {
} else if (prev == TEXT) {
// if current is WHITESPACE and previous TEXT
-
// the current word made it, so
-
// add the space before the current word (if there
// was some)
/**
* adds pending inline areas to the line area
- * normally done,if the line area is filled and
+ * normally done, when the line area is filled and
* added as child to the parent block area
*/
public void addPending() {
}
return width;
}
+
+ public int addCharacter (char data, LinkSet ls, boolean ul) {
+ InlineArea ia = null;
+ int remainingWidth =
+ this.getContentWidth() - this.getCurrentXPosition();
+ int width = this.currentFontState.width(data);
+ //if it doesn't fit, return
+ if (width > remainingWidth) {
+ return org.apache.fop.fo.flow.Character.DOESNOT_FIT;
+ } else {
+ //if whitespace-collapse == true, discard character
+ if (Character.isSpaceChar(data) && whiteSpaceCollapse == WhiteSpaceCollapse.TRUE) {
+ return org.apache.fop.fo.flow.Character.OK;
+ }
+ //create new InlineArea
+ ia = new InlineArea(currentFontState,
+ this.red, this.green, this.blue,
+ new Character(data).toString(),width);
+ ia.setUnderlined(ul);
+ pendingAreas.addElement(ia);
+ if (Character.isSpaceChar(data)) {
+ this.spaceWidth =+ width;
+ prev = LineArea.WHITESPACE;
+ } else {
+ pendingWidth += width;
+ prev = LineArea.TEXT;
+ }
+ return org.apache.fop.fo.flow.Character.OK;
+ }
+ }
}