cvs commit: xml-fop/src/documentation/resources/images logo2.svg
vmote 2003/12/05 11:13:06 Added: src/documentation/resources/images logo2.svg Log: add svg image for new FOP logo Revision ChangesPath 1.1 xml-fop/src/documentation/resources/images/logo2.svg http://cvs.apache.org/viewcvs/xml-fop/src/documentation/resources/images/logo2.svg?rev=1.1 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop README
vmote 2003/11/29 06:39:46 Modified:.README Log: fix typo in README; see http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25080 Revision ChangesPath 1.16 +1 -1 xml-fop/README Index: README === RCS file: /home/cvs/xml-fop/README,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- README30 Nov 2002 08:54:25 - 1.15 +++ README29 Nov 2003 14:39:46 - 1.16 @@ -8,7 +8,7 @@ directly on screen. FOP is part of Apache's XML project. The homepage of FOP is -http:/xml.apache.org/fop +http://xml.apache.org/fop HTML-Documentation can be found in the subdirectory xml-fop/docs/html-docs. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop README
vmote 2003/11/29 06:49:32 Modified:.Tag: fop-0_20_2-maintain README Log: fix typo in README; see http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25080 Revision ChangesPath No revision No revision 1.14.4.3 +9 -9 xml-fop/README Index: README === RCS file: /home/cvs/xml-fop/README,v retrieving revision 1.14.4.2 retrieving revision 1.14.4.3 diff -u -r1.14.4.2 -r1.14.4.3 --- README10 Dec 2002 10:06:35 - 1.14.4.2 +++ README29 Nov 2003 14:49:32 - 1.14.4.3 @@ -3,14 +3,14 @@ What is FOP? FOP is the world's first print formatter driven by XSL formatting objects. It is a Java application that reads a formatting object -tree conforming to the XSL-FO Version 1.0 W3C Recommendation and -then turns it into a PDF document or allows you to preview it -directly on screen. - -FOP is part of Apache's XML project. The homepage of FOP is -http:/xml.apache.org/fop +tree conforming to the XSL-FO Version 1.0 W3C Recommendation and +then turns it into a PDF document or allows you to preview it +directly on screen. -HTML-Documentation can be found in the subdirectory build/site +FOP is part of Apache's XML project. The homepage of FOP is +http://xml.apache.org/fop + +HTML-Documentation can be found in the subdirectory build/site The names of the committers of this project and what the developers are working on can be found in the file STATUS in root. @@ -19,12 +19,12 @@ Please report bugs to bugzilla at http://nagoya.apache.org/bugzilla/ -Discussion of Fop takes place in [EMAIL PROTECTED] (subscribe at +Discussion of Fop takes place in [EMAIL PROTECTED] (subscribe at [EMAIL PROTECTED]) User questions should be sent to [EMAIL PROTECTED] Archives are available at: http://marc.theaimsgroup.com -Before you post any questions, please have a look at the FAQ at +Before you post any questions, please have a look at the FAQ at build/site/faq.html (or http://xml.apache.org/fop/faq.html for latest version) Another FAQ is available at: http://www.owal.co.uk/cgi-bin/fopfaq.cgi - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/documentation/content/xdocs/dev tools.xml
vmote 2003/11/25 07:29:38 Modified:src/documentation/content/xdocs resources.xml src/documentation/content/xdocs/dev tools.xml Log: add some cvs and xsl-fo resources Revision ChangesPath 1.33 +2 -1 xml-fop/src/documentation/content/xdocs/resources.xml Index: resources.xml === RCS file: /home/cvs/xml-fop/src/documentation/content/xdocs/resources.xml,v retrieving revision 1.32 retrieving revision 1.33 diff -u -r1.32 -r1.33 --- resources.xml 12 Nov 2003 15:29:59 - 1.32 +++ resources.xml 25 Nov 2003 15:29:38 - 1.33 @@ -68,6 +68,7 @@ li[online article] jump href=http://www.sun.com/software/xml/developers/slides-dtd/;Using Formatting Objects with the Slides DTD/jump, by Paul Sandoz./li li[online article] jump href=http://www.xml.com/pub/a/2001/01/17/xsl-fo/index.html;Using XSL Formatting Objects/jump, by J. David Eisenberg./li li[online reference] jump href=http://zvon.org/xxl/xslfoReference/Output/index.html;XSL FO reference/jump, by Miloslav Nic./li + li[online reference] jump href=http://www.dpawson.co.uk/xsl/sect3/index.html;Dave Pawson's XSL-FO FAQ/jump./li li[online book] jump href=http://www.dpawson.co.uk/xsl/sect3/bk/index.html;An introduction to XSL Formatting Objects/jump, by Dave Pawson. See hardcopy version below./li li[book] jump href=http://www.oreilly.com/catalog/xslfo;XSL-FO/jump, by Dave Pawson, O'Reilly amp; Associates, 2002, ISBN 0-596-00355-2. See online version above./li li[book] jump href=http://www.phptr.com/browse/product.asp?product_id={CEA527AF-412D-49DA-8C1F-46E0A519B8D8};Definitive XSL-FO/jump, by G. Ken Holman, Prentice Hall PTR, 2003, ISBN 0-131-40374-5./li 1.9 +14 -1 xml-fop/src/documentation/content/xdocs/dev/tools.xml Index: tools.xml === RCS file: /home/cvs/xml-fop/src/documentation/content/xdocs/dev/tools.xml,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- tools.xml 13 Nov 2003 18:01:49 - 1.8 +++ tools.xml 25 Nov 2003 15:29:38 - 1.9 @@ -77,6 +77,19 @@ liOn a Linux/Unix machine, you will want to redirect the output from the above command into a file. If you are using GNU WinCVS, you can cut the output from the console window and paste it into a file. The -w ignores whitespace differences. The -u puts the diff in universal format. You may wish to use the -N option as well, which is supposed to treat new files as if there were an old 0 byte file -- in other words, it is supposed to include the new file in the patch. However, it only operates on files that have been added to the CVS repository, which cannot be done without commit access./li /ul /section + section id=cvs-doc +titleDocumentation/title +ul + li[online resource] jump href=http://www.cvshome.org;The CVS Home Page/jump./li + li[electronic manual] jump href=http://www.cvshome.org/docs/manual;The Cederqvist/jump (official CVS manual). +Note that this manual applies to the command-line version of CVS./li + li[book] jump href=http://www.oreilly.com/catalog/cvs;Essential CVS/jump, by Jennifer Vesperman (O'Reilly amp; Associates)./li + li[book] jump href=http://www.oreilly.com/catalog/cvspr2;The CVS Pocket Reference/jump, by Gregor N. Purdy (O'Reilly amp; Associates)./li + li[book] Open Source Development with CVS, by Moshe Bar and Karl Franz Fogel (Paraglyph Press, ISBN 1-932111-81-6)./li + li[book] jump href=http://www.oreilly.com/catalog/rcs;Applying RCS and SCCS/jump, by Dan Bolinger and Tan Bronson (O'Reilly amp; Associates). +RCS is used by CVS for its file operations (CVS is kind of a wrapper around RCS)./li +/ul + /section /section section id=ide titleIntegrated Development Environments (IDEs)/title - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/render/rtf TextAttributesConverter.java
vmote 2003/11/19 10:03:56 Modified:src/java/org/apache/fop/render/rtf TextAttributesConverter.java Log: fix Unicode encoding problem in comments Revision ChangesPath 1.4 +27 -27 xml-fop/src/java/org/apache/fop/render/rtf/TextAttributesConverter.java Index: TextAttributesConverter.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/render/rtf/TextAttributesConverter.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- TextAttributesConverter.java 8 Nov 2003 19:58:03 - 1.3 +++ TextAttributesConverter.java 19 Nov 2003 18:03:56 - 1.4 @@ -72,16 +72,16 @@ /** Converts FO properties to RtfAttributes * @author Bertrand Delacretaz [EMAIL PROTECTED] * @author Andreas Putz [EMAIL PROTECTED] - * @author Boris Poudérous [EMAIL PROTECTED] + * @author Boris Poud#x00E9;rous [EMAIL PROTECTED] * @author Peter Herweg, [EMAIL PROTECTED] - * @author Normand Massé + * @author Normand Mass#x00E9; * @author Chris Scott * @author rmarra */ class TextAttributesConverter { private static Logger log = new ConsoleLogger(); - + /** * Converts all known text FO properties to RtfAttributes * @param props list of FO properites, which are to be converted @@ -96,7 +96,7 @@ } else { attrib = new RtfAttributes(); } - + attrBlockFontFamily(props, attrib); attrBlockFontWeight(props, attrib); attrBlockFontSize(props, attrib); @@ -107,10 +107,10 @@ attrBlockSpaceBeforeAfter(props, attrib); attrBlockMargins(props, attrib); attrBlockTextAlign(props, attrib); - -return attrib; + +return attrib; } - + /** * Converts all character related FO properties to RtfAttributes. * @param props list of FO properites, which are to be converted @@ -141,9 +141,9 @@ private static void attrBlockFontFamily(PropertyList properties, RtfAttributes rtfAttr) { String fopValue = properties.get(font-family).getString(); - + if (fopValue != null) { -rtfAttr.set(RtfText.ATTR_FONT_FAMILY, +rtfAttr.set(RtfText.ATTR_FONT_FAMILY, RtfFontManager.getInstance().getFontNumber(fopValue)); } } @@ -152,7 +152,7 @@ int fopValue = properties.get(font-size).getLength().getValue() / 500; rtfAttr.set(fs, fopValue); } - + private static void attrBlockFontColor(PropertyList properties, RtfAttributes rtfAttr) { // Cell background color ColorTypeProperty colorTypeProp = (ColorTypeProperty)properties.get(color); @@ -172,7 +172,7 @@ } } } - + private static void attrBlockFontWeight(PropertyList properties, RtfAttributes rtfAttr) { @@ -192,7 +192,7 @@ rtfAttr.set(RtfText.ATTR_ITALIC, 0); } } - + private static void attrBlockFontUnderline(PropertyList properties, RtfAttributes rtfAttr) { EnumProperty enumProp = (EnumProperty)properties.get(text-decoration); if (enumProp.getEnum() == Constants.UNDERLINE) { @@ -201,39 +201,39 @@ rtfAttr.set(RtfText.ATTR_UNDERLINE, 0); } } - + private static void attrBlockSpaceBeforeAfter(PropertyList properties, RtfAttributes rtfAttr) { SpaceProperty spaceProp = null; - + //space-before spaceProp = (SpaceProperty)properties.get(space-before); if (spaceProp != null) { Float f = new Float( spaceProp.getLengthRange().getOptimum().getLength().getValue() / 1000f); String sValue = f.toString() + pt; - + try { rtfAttr.set( RtfText.SPACE_BEFORE, - (int)FoUnitsConverter.getInstance().convertToTwips(sValue)); +(int)FoUnitsConverter.getInstance().convertToTwips(sValue)); } catch (FOPException fe) { -log.warn(attrBlockSpaceBeforeAfter: + fe.getMessage()); +log.warn(attrBlockSpaceBeforeAfter: + fe.getMessage()); } } - + //space-after spaceProp = (SpaceProperty)properties.get(space-after); if (spaceProp != null) { Float f = new Float( spaceProp.getLengthRange().getOptimum().getLength().getValue() / 1000f); String sValue = f.toString() + pt; - + try { rtfAttr.set
cvs commit: xml-fop/src/java/org/apache/fop/layout LayoutStrategy.java
vmote 2003/11/19 10:32:33 Modified:src/java/org/apache/fop/apps Driver.java src/java/org/apache/fop/layout LayoutStrategy.java Log: 1. add method to LayoutStrategy indicating whether an FO Tree should be built for this strategy 2. add logic in Driver.render() to handle the case of a LayoutStrategy that does not want to build an FO Tree Revision ChangesPath 1.49 +17 -0 xml-fop/src/java/org/apache/fop/apps/Driver.java Index: Driver.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/apps/Driver.java,v retrieving revision 1.48 retrieving revision 1.49 diff -u -r1.48 -r1.49 --- Driver.java 8 Nov 2003 15:16:53 - 1.48 +++ Driver.java 19 Nov 2003 18:32:33 - 1.49 @@ -600,6 +600,23 @@ public synchronized void render(XMLReader parser, InputSource source) throws FOPException { parser.setContentHandler(getContentHandler()); + +/** + * The following statement handles the case of a LayoutStrategy that + * does not wish to build an FO Tree, but wishes to parse the incoming + * document some other way. This applies primarily to the alt-design + * system. + */ +if (currentDocument.getLayoutStrategy() != null) { +if (currentDocument.getLayoutStrategy().foTreeNeeded() != true) { +currentDocument.getLayoutStrategy().format(null, null); +return; +} +} + +/** + * For all other cases, we wish to parse normally. + */ try { if (foInputHandler instanceof FOTreeHandler) { FOTreeHandler foTreeHandler = (FOTreeHandler)foInputHandler; 1.6 +11 -1 xml-fop/src/java/org/apache/fop/layout/LayoutStrategy.java Index: LayoutStrategy.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layout/LayoutStrategy.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- LayoutStrategy.java 20 Aug 2003 19:46:47 - 1.5 +++ LayoutStrategy.java 19 Nov 2003 18:32:33 - 1.6 @@ -86,4 +86,14 @@ */ public abstract void format (PageSequence pageSeq, AreaTree areaTree) throws FOPException; + +/** + * Indicates whether an FO Tree should be built for this layout strategy. + * Override this in subclasses if an FO Tree is not needed. + * @return true if an FO Tree is needed, false otherwise + */ +public boolean foTreeNeeded() { +return true; +} + } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/documentation/content/xdocs/dev testing.xml
vmote 2003/11/13 09:41:20 Modified:src/documentation/content/xdocs/dev testing.xml Log: 1. add section regarding basic/API tests 2. add warning that the functional testing is inoperative Revision ChangesPath 1.5 +9 -1 xml-fop/src/documentation/content/xdocs/dev/testing.xml Index: testing.xml === RCS file: /home/cvs/xml-fop/src/documentation/content/xdocs/dev/testing.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- testing.xml 12 Nov 2003 15:24:53 - 1.4 +++ testing.xml 13 Nov 2003 17:41:20 - 1.5 @@ -17,8 +17,16 @@ lilink href=http://gump.cocoondev.org/xml-fop-maintenance.html;Gump build for the Maintenance Branch/link/li /ul /section +section id=basic + titleBasic/API Testing/title + pThere is a group of basic API tests that are included in the build process. +For these tests to occur, JUnit must be available to Ant (simply copy junit.jar into Ant's lib directory). +The build will then report error(s) if the high-level APIs for Driver and the Transcoders fail. +The tests do not check the output, but only ensure that something is generated and without exceptions./p +/section section id=functional titleFunctional Testing/title + warningThe functional testing section on this page is currently inoperative./warning section titleRunning and Using Tests/title p - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/documentation/content/xdocs/dev tools.xml
vmote 2003/11/13 10:01:49 Modified:src/documentation/content/xdocs/dev tools.xml Log: add developer checklist Revision ChangesPath 1.8 +11 -1 xml-fop/src/documentation/content/xdocs/dev/tools.xml Index: tools.xml === RCS file: /home/cvs/xml-fop/src/documentation/content/xdocs/dev/tools.xml,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- tools.xml 12 Nov 2003 15:24:53 - 1.7 +++ tools.xml 13 Nov 2003 18:01:49 - 1.8 @@ -8,6 +8,16 @@ /header body pThis page documents items that may be helpful to other developers, especially to those who are new to FOP. Exhaustive treatment of these topics is better suited to other fora, but the information presented here is intended to deal with FOP-specific issues related to these tools, especially gotchas, and to help developers get jump-started./p +section id=checklist + titleDeveloper Checklist/title + pHere is a (probably not comprehensive) list of tools you will need to be a successful FOP developer:/p + ul +liA java IDE (see link href=#ideIDE/link)./li +liAnt (see link href=../compiling.htmlBuilding FOP/link)./li +licheckstyle (see link href=conventions.html#java-checkstyleCheckstyle/link on the conventions page)./li +liJUnit (see link href=testing.html#basicBasic Testing/link)./li + /ul +/section section id=general titleGeneral Developer Information/title pSee link href=http://www.apache.org/dev/contributors.html;the Apache Contributors Tech Guide/link for useful information and links for Apache developers, including help with tools and procedures./p - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/documentation/content/xdocs anttask.xml bugs.xml compiling.xml compliance.xml configuration.xml download.xml embedding.xml examples.xml extensions.xml faq.xml fo.xml fonts.xml gethelp.xml graphics.xml hyphenation.xml index.xml license.xml logocontest.xml maillist.xml news.xml output.xml pdfencryption.xml relnotes.xml resources.xml running.xml servlets.xml status.xml tabs.xml team.xml
vmote 2003/11/12 07:12:00 Modified:src/documentation/content/xdocs anttask.xml bugs.xml compiling.xml compliance.xml configuration.xml download.xml embedding.xml examples.xml extensions.xml faq.xml fo.xml fonts.xml gethelp.xml graphics.xml hyphenation.xml index.xml license.xml logocontest.xml maillist.xml news.xml output.xml pdfencryption.xml relnotes.xml resources.xml running.xml servlets.xml status.xml tabs.xml team.xml Log: update URLs for DTDs Revision ChangesPath 1.8 +2 -2 xml-fop/src/documentation/content/xdocs/anttask.xml Index: anttask.xml === RCS file: /home/cvs/xml-fop/src/documentation/content/xdocs/anttask.xml,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- anttask.xml 17 Oct 2003 22:21:53 - 1.7 +++ anttask.xml 12 Nov 2003 15:11:59 - 1.8 @@ -1,6 +1,6 @@ ?xml version=1.0 standalone=no? !DOCTYPE document PUBLIC -//APACHE//DTD Documentation V1.1//EN - http://cvs.apache.org/viewcvs.cgi/*checkout*/xml-forrest/src/resources/schema/dtd/document-v11.dtd; + http://cvs.apache.org/viewcvs.cgi/*checkout*/xml-forrest/src/core/context/resources/schema/dtd/document-v12.dtd; document header 1.7 +2 -2 xml-fop/src/documentation/content/xdocs/bugs.xml Index: bugs.xml === RCS file: /home/cvs/xml-fop/src/documentation/content/xdocs/bugs.xml,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- bugs.xml 15 Sep 2003 20:54:01 - 1.6 +++ bugs.xml 12 Nov 2003 15:11:59 - 1.7 @@ -1,6 +1,6 @@ ?xml version=1.0 standalone=no? !DOCTYPE document PUBLIC -//APACHE//DTD Documentation V1.1//EN - http://cvs.apache.org/viewcvs.cgi/*checkout*/xml-forrest/src/resources/schema/dtd/document-v11.dtd; + http://cvs.apache.org/viewcvs.cgi/*checkout*/xml-forrest/src/core/context/resources/schema/dtd/document-v12.dtd; document header 1.11 +2 -2 xml-fop/src/documentation/content/xdocs/compiling.xml Index: compiling.xml === RCS file: /home/cvs/xml-fop/src/documentation/content/xdocs/compiling.xml,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- compiling.xml 16 Oct 2003 15:06:33 - 1.10 +++ compiling.xml 12 Nov 2003 15:11:59 - 1.11 @@ -1,6 +1,6 @@ ?xml version=1.0 standalone=no? !DOCTYPE document PUBLIC -//APACHE//DTD Documentation V1.1//EN - http://cvs.apache.org/viewcvs.cgi/*checkout*/xml-forrest/src/resources/schema/dtd/document-v11.dtd; + http://cvs.apache.org/viewcvs.cgi/*checkout*/xml-forrest/src/core/context/resources/schema/dtd/document-v12.dtd; document header 1.24 +1 -1 xml-fop/src/documentation/content/xdocs/compliance.xml Index: compliance.xml === RCS file: /home/cvs/xml-fop/src/documentation/content/xdocs/compliance.xml,v retrieving revision 1.23 retrieving revision 1.24 diff -u -r1.23 -r1.24 --- compliance.xml15 Sep 2003 20:54:01 - 1.23 +++ compliance.xml12 Nov 2003 15:11:59 - 1.24 @@ -1,6 +1,6 @@ ?xml version=1.0 encoding=UTF-8? !DOCTYPE compliance PUBLIC -//APACHE//DTD Compliance V1.0//EN - http://cvs.apache.org/viewcvs.cgi/*checkout*/xml-fop/src/documentation/resources/schema/dtd/compliance-v10.dtd?rev=1.6; + http://cvs.apache.org/viewcvs.cgi/*checkout*/xml-fop/src/documentation/resources/schema/dtd/compliance-v10.dtd; compliance head 1.16 +2 -2 xml-fop/src/documentation/content/xdocs/configuration.xml Index: configuration.xml === RCS file: /home/cvs/xml-fop/src/documentation/content/xdocs/configuration.xml,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- configuration.xml 15 Sep 2003 20:54:01 - 1.15 +++ configuration.xml 12 Nov 2003 15:11:59 - 1.16 @@ -1,6 +1,6 @@ ?xml version=1.0 standalone=no? !DOCTYPE document PUBLIC -//APACHE//DTD Documentation V1.1//EN - http://cvs.apache.org/viewcvs.cgi/*checkout*/xml-forrest/src/resources/schema/dtd/document-v11.dtd; + http://cvs.apache.org/viewcvs.cgi/*checkout*/xml-forrest/src/core/context/resources/schema/dtd/document-v12.dtd; document header 1.14 +2 -2 xml-fop/src/documentation/content/xdocs/download.xml Index: download.xml
cvs commit: xml-fop/src/documentation/content/xdocs resources.xml
vmote 2003/11/12 07:29:59 Modified:src/documentation/content/xdocs resources.xml Log: add link for UTR-14 Revision ChangesPath 1.32 +7 -1 xml-fop/src/documentation/content/xdocs/resources.xml Index: resources.xml === RCS file: /home/cvs/xml-fop/src/documentation/content/xdocs/resources.xml,v retrieving revision 1.31 retrieving revision 1.32 diff -u -r1.31 -r1.32 --- resources.xml 12 Nov 2003 15:11:59 - 1.31 +++ resources.xml 12 Nov 2003 15:29:59 - 1.32 @@ -46,6 +46,12 @@ /li /ul /section + section id=specs-unicode +titleUnicode/title +ul + lijump href=http://www.unicode.org/reports/tr14;UTR-14 (Unicode Standard Annex #14: Line Breaking Properties)/jump/li +/ul + /section section id=specs-other titleOther/title ul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/documentation/content/xdocs faq.xml fo.xml
vmote 2003/11/12 09:28:07 Modified:src/documentation/content/xdocs faq.xml fo.xml Log: add doc for using current date and time, and create an FAQ referencing it Revision ChangesPath 1.40 +6 -0 xml-fop/src/documentation/content/xdocs/faq.xml Index: faq.xml === RCS file: /home/cvs/xml-fop/src/documentation/content/xdocs/faq.xml,v retrieving revision 1.39 retrieving revision 1.40 diff -u -r1.39 -r1.40 --- faq.xml 12 Nov 2003 15:11:59 - 1.39 +++ faq.xml 12 Nov 2003 17:28:07 - 1.40 @@ -972,6 +972,12 @@ /p /answer /faq +faq id=xslt-current-date + question(XSLT) How can I use the current date and time in my document?/question + answer +pSee link href=fo.html#xslt-dateCurrent Date and Time/link./p + /answer +/faq /part part id=part-help titleGeneral suggestions. How to solve problems./title 1.9 +22 -1 xml-fop/src/documentation/content/xdocs/fo.xml Index: fo.xml === RCS file: /home/cvs/xml-fop/src/documentation/content/xdocs/fo.xml,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- fo.xml12 Nov 2003 15:11:59 - 1.8 +++ fo.xml12 Nov 2003 17:28:07 - 1.9 @@ -82,6 +82,27 @@ /p /section /section +section id=xslt + titleXSLT Issues/title + section id=xslt-date +titleCurrent Date and Time/title +pXSL-FO does not currently have a function for retrieving the current date and time. +However, in some cases, XSLT can be used to place the current date and time into the XSL-FO document as it is generated./p +pOne possibility is to use the link href=http://exslt.org/date/index.html;exslt date and time extension/link./p +pAnother possibility is to use java or javascript (or perhaps some other language). +Here is an example, using java, that works with Xalan. First, create the appropriate namespace:/p +source![CDATA[xsl:stylesheet version=1.0 + ... + xmlns:java=http://xml.apache.org/xslt/java; exclude-result-prefixes=java + ...]]/source +pNext, use the java language to retrieve and format the current date and time. +Here is an example template:/p +source![CDATA[xsl:template match=TodaysDate +xsl:value-of select=java:format(java:java.text.SimpleDateFormat.new +(' d, , h:mm:ss a (zz)'), java:java.util.Date.new())/ + /xsl:template]]/source + /section +/section section id=xsl-fo titleXSL-FO Issues/title section id=fo-center-vertical - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/documentation/content/xdocs fo.xml
vmote 2003/11/12 09:41:06 Modified:src/documentation/content/xdocs fo.xml Log: make external site a jump instead of link Revision ChangesPath 1.10 +2 -2 xml-fop/src/documentation/content/xdocs/fo.xml Index: fo.xml === RCS file: /home/cvs/xml-fop/src/documentation/content/xdocs/fo.xml,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- fo.xml12 Nov 2003 17:28:07 - 1.9 +++ fo.xml12 Nov 2003 17:41:06 - 1.10 @@ -88,7 +88,7 @@ titleCurrent Date and Time/title pXSL-FO does not currently have a function for retrieving the current date and time. However, in some cases, XSLT can be used to place the current date and time into the XSL-FO document as it is generated./p -pOne possibility is to use the link href=http://exslt.org/date/index.html;exslt date and time extension/link./p +pOne possibility is to use the jump href=http://exslt.org/date/index.html;exslt date and time extension/jump./p pAnother possibility is to use java or javascript (or perhaps some other language). Here is an example, using java, that works with Xalan. First, create the appropriate namespace:/p source![CDATA[xsl:stylesheet version=1.0 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/documentation/content/xdocs fonts.xml
vmote 2003/10/16 07:35:11 Modified:src/documentation/content/xdocs fonts.xml Log: correct doc re: use of custome fonts from the AWT and Print renderers Revision ChangesPath 1.20 +3 -3 xml-fop/src/documentation/content/xdocs/fonts.xml Index: fonts.xml === RCS file: /home/cvs/xml-fop/src/documentation/content/xdocs/fonts.xml,v retrieving revision 1.19 retrieving revision 1.20 diff -u -r1.19 -r1.20 --- fonts.xml 15 Sep 2003 20:54:01 - 1.19 +++ fonts.xml 16 Oct 2003 14:35:11 - 1.20 @@ -54,14 +54,14 @@ tdAWT/td tdif available from OS/td tdyes/td - tdno/td + tdyes/td tdn/a (display only)/td /tr tr tdPrint/td tdif available from OS/td tdyes/td - tdno/td + tdyes/td tdcontrolled by OS printer driver/td /tr tr - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/documentation/content/xdocs compiling.xml
vmote 2003/10/16 08:06:33 Modified:src/documentation/content/xdocs compiling.xml Log: partially implement patch submitted by Clay Leeds (see http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23821) Revision ChangesPath 1.10 +5 -9 xml-fop/src/documentation/content/xdocs/compiling.xml Index: compiling.xml === RCS file: /home/cvs/xml-fop/src/documentation/content/xdocs/compiling.xml,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- compiling.xml 15 Sep 2003 20:54:01 - 1.9 +++ compiling.xml 16 Oct 2003 15:06:33 - 1.10 @@ -20,19 +20,17 @@ titleJDK/title p Building FOP requires a minimum Java Development Kit (JDK/SDK) of 1.3 -(A Java Runtime Environment ist not sufficient) +(A Java Runtime Environment is not sufficient). /p /section section id=env-classpath titleCLASSPATH/title -pThere is no generally no need to setup a classpath. -All libraries needed to compile FOP are included in the source distribution and are referenced by the build script. +pThere is generally no need to setup a classpath. All libraries needed to compile FOP are included in the source distribution and are referenced by the build script. You will only need to adjust the classpath if you build FOP in some other way. See the build scripts (build.bat for Windows, and build.sh for Unix) for details./p /section section id=env-java-home titleJAVA_HOME/title -pAnt, which is used by the build script, requires that the environment variable JAVA_HOME point to your local JDK root directory. -This is true even if you use JDK 1.2 or above, which normally don't need this setting./p +pThe build script uses link href=http://jakarta.apache.org/ant/;Ant/link, a popular java-based build tool, which requires that the environment variable JAVA_HOME point to your local JDK root directory. This is true even if you use JDK 1.2 or above, which normally don't need this setting./p /section /section section id=build-script @@ -40,9 +38,7 @@ pBuild FOP by executing the build script, which is located in the FOP root directory. The Windows batch file is build.bat, and the Unix shell script is build.sh. The examples below are for running the shell script, but except for the build file extension, the syntax is identical./p -pThe build script uses link href=http://jakarta.apache.org/ant/;Ant/link, a popular java-based build tool. -The file build.xml in the FOP root directory is the blueprint that Ant uses for the build. -It contains information for numerous build targets, many of which are building blocks to more useful target, and others which are primarily used by the FOP developers. +pThe file build.xml in the FOP root directory is the blueprint that Ant uses for the build. It contains information for numerous build targets, many of which are building blocks to more useful target, and others which are primarily used by the FOP developers. You may benefit from looking through this file to learn more about the various build targets. To obtain a complete list of useful build targets:/p sourcebuild.sh -projecthelp/source - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/documentation/content/xdocs/dev conventions.xml
vmote 2003/10/16 09:50:13 Modified:src/documentation/content/xdocs/dev conventions.xml Log: update code conventions from resolved issues on the FOPDevelopersStyleGuide wiki Revision ChangesPath 1.6 +20 -5 xml-fop/src/documentation/content/xdocs/dev/conventions.xml Index: conventions.xml === RCS file: /home/cvs/xml-fop/src/documentation/content/xdocs/dev/conventions.xml,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- conventions.xml 15 Sep 2003 20:54:03 - 1.5 +++ conventions.xml 16 Oct 2003 16:50:13 - 1.6 @@ -20,7 +20,7 @@ titleJava/title section id=java-style titleJava Style/title -pIn order to facilitate the human reading of FOP source code, the FOP developers have agreed on a set of coding conventions. +pIn order to facilitate the human reading of FOP source code, reduce churning in code, and prevent disputes, the FOP developers have agreed on a set of coding conventions. The basis of these coding conventions is documented in the link href=http://xml.apache.org/source.html;Apache XML Project Guidelines/link, which requires that strongall Java Language source code in the repository must be written in conformance to Sun's/strong link href=http://java.sun.com/docs/codeconv/html/CodeConvTOC.doc.html;Code Conventions for the Java Programming Language/link. In addition, the FOP developers have agreed to other conventions, which are summarized in the following table:/p table @@ -35,21 +35,28 @@ tdcheckstyle/td /tr tr -tdNo tabs in content/td +tdNo tabs in content./td tdProgrammers should not have to adjust the tab settings in their editor to be able to read the source code./td tdcheckstyle/td /tr tr -tdIndentation of 4 spaces per level/td +tdIndentation of 4 spaces per level./td tdMaximize readability./td tdNot enforced/td /tr tr -tdComments must be in English/td +tdComments, identifiers, and project documentation must be in English. +In general, other languages must not be used, except in translated documentation and language-specific i10n files. +/td tdTo avoid the need for everyone to learn all languages, English has become the standard language for many technology projects, and is the only human language that all FOP developers are expected to know./td tdNot enforced/td /tr tr +tdAmerican English spelling should be used. Alternative spelling and idioms are tolerated, but may be changed by anyone to American./td +tdSome standard is useful, and American English is widely used and accepted for technology standards and projects./td +tdNot enforced./td + /tr + tr tdFully qualify all import statements (no import java.util.*)/td tdClarity/td tdcheckstyle/td @@ -68,6 +75,14 @@ tdWrite appropriate javadoc entries for all public and protected classes, methods, and variables./td tdBasic API documentation is needed./td tdcheckstyle/td + /tr + tr +tdPersonal attribution in the source code, such as @author tags and attribution comments should not be used. +Excepted from this general rule are potentially confusing or wide-ranging changes. +If such changes prove useful over time, the related comments should be removed./td +tdPersonal attribution tends to clutter the code. +The relevant historical information that might be useful for problem-solving is tracked in the code repository./td +tdNot enforced. Anyone is free to remove such comments./td /tr /table pFor developers that dislike these conventions, one workaround is to develop using their own style, then use a formatting tool like link href=http://astyle.sourceforge.net/;astyle/link (Artistic Style) before committing./p - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/documentation/content/xdocs team.xml
vmote 2003/10/16 10:19:59 Modified:src/documentation/content/xdocs team.xml Log: add Mark Lillywhite to list of former committers Revision ChangesPath 1.16 +2 -1 xml-fop/src/documentation/content/xdocs/team.xml Index: team.xml === RCS file: /home/cvs/xml-fop/src/documentation/content/xdocs/team.xml,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- team.xml 15 Sep 2003 20:54:01 - 1.15 +++ team.xml 16 Oct 2003 17:19:59 - 1.16 @@ -55,6 +55,7 @@ li id=sglink href=mailto:[EMAIL PROTECTED]Stanislav Gorkhover/link/li li id=fjlink href=mailto:[EMAIL PROTECTED]Fotis Jannidis/link/li li id=kllink href=mailto:[EMAIL PROTECTED]Karen Lease/link/li +li id=mllink href=mailto:[EMAIL PROTECTED]Mark Lillywhite/link/li li id=jnlink href=mailto:[EMAIL PROTECTED]Jordan Naftolin/link/li li id=aslink href=mailto:[EMAIL PROTECTED]Arved Sandstrom/link/li li id=eslink href=mailto:[EMAIL PROTECTED]Eric Schaeffer/link/li - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/documentation/content/xdocs team.xml
vmote 2003/10/16 12:06:31 Modified:src/documentation/content/xdocs team.xml Log: correct Mark Lillywhite status Revision ChangesPath 1.17 +7 -2 xml-fop/src/documentation/content/xdocs/team.xml Index: team.xml === RCS file: /home/cvs/xml-fop/src/documentation/content/xdocs/team.xml,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- team.xml 16 Oct 2003 17:19:59 - 1.16 +++ team.xml 16 Oct 2003 19:06:31 - 1.17 @@ -55,11 +55,16 @@ li id=sglink href=mailto:[EMAIL PROTECTED]Stanislav Gorkhover/link/li li id=fjlink href=mailto:[EMAIL PROTECTED]Fotis Jannidis/link/li li id=kllink href=mailto:[EMAIL PROTECTED]Karen Lease/link/li -li id=mllink href=mailto:[EMAIL PROTECTED]Mark Lillywhite/link/li li id=jnlink href=mailto:[EMAIL PROTECTED]Jordan Naftolin/link/li li id=aslink href=mailto:[EMAIL PROTECTED]Arved Sandstrom/link/li li id=eslink href=mailto:[EMAIL PROTECTED]Eric Schaeffer/link/li li id=awlink href=mailto:[EMAIL PROTECTED]Art Welch/link/li + /ul +/section +section id=contribute-former + titleFormer Contributors/title + ul +li id=mllink href=mailto:[EMAIL PROTECTED]Mark Lillywhite/link/li /ul /section section id=expertise - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/rtf/rtflib/rtfdoc RtfSection.java
vmote 2003/10/15 10:00:58 Modified:src/java/org/apache/fop/rtf/renderer RTFHandler.java src/java/org/apache/fop/rtf/rtflib/rtfdoc RtfSection.java Added: src/java/org/apache/fop/rtf/renderer PageAttributesConverter.java Log: apply patch from Peter Herweg for RTF pagination properties (see http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23464) Revision ChangesPath 1.26 +18 -0 xml-fop/src/java/org/apache/fop/rtf/renderer/RTFHandler.java Index: RTFHandler.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/rtf/renderer/RTFHandler.java,v retrieving revision 1.25 retrieving revision 1.26 diff -u -r1.25 -r1.26 --- RTFHandler.java 27 Sep 2003 20:57:48 - 1.25 +++ RTFHandler.java 15 Oct 2003 17:00:57 - 1.26 @@ -74,6 +74,7 @@ import org.apache.fop.fo.flow.TableRow; import org.apache.fop.fo.pagination.Flow; import org.apache.fop.fo.pagination.PageSequence; +import org.apache.fop.fo.pagination.SimplePageMaster; import org.apache.fop.fo.properties.Constants; import org.apache.fop.fo.Property; import org.apache.fop.apps.Document; @@ -179,6 +180,23 @@ public void startPageSequence(PageSequence pageSeq) { try { sect = docArea.newSection(); + +//read page size and margins, if specified +Property prop; +if((prop=pageSeq.properties.get(master-reference))!=null) { +String reference=prop.getString(); + +SimplePageMaster pagemaster= +pageSeq.getLayoutMasterSet().getSimplePageMaster(reference); + +//only simple-page-master supported, so pagemaster may be null +if(pagemaster!=null) { +sect.getRtfAttributes().set( +PageAttributesConverter.convertPageAttributes( +pagemaster.properties,null)); +} +} + builderContext.pushContainer(sect); bHeaderSpecified = false; 1.1 xml-fop/src/java/org/apache/fop/rtf/renderer/PageAttributesConverter.java Index: PageAttributesConverter.java === /* * *The Apache Software License, Version 1.1 * * * Copyright (C) 1999-2003 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 *[EMAIL PROTECTED] * * 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 * APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- * DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON * 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
cvs commit: xml-fop/examples/fo/basic images.fo
vmote 2003/10/12 12:49:30 Modified:examples/fo/basic images.fo Log: add fox:destination elements Revision ChangesPath 1.3 +18 -3 xml-fop/examples/fo/basic/images.fo Index: images.fo === RCS file: /home/cvs/xml-fop/examples/fo/basic/images.fo,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- images.fo 29 Jan 2003 16:07:20 - 1.2 +++ images.fo 12 Oct 2003 19:49:30 - 1.3 @@ -1,6 +1,8 @@ ?xml version=1.0 encoding=utf-8? -fo:root font-family=Times Roman font-size=12pt text-align=center xmlns:fo=http://www.w3.org/1999/XSL/Format; +fo:root font-family=Times Roman font-size=12pt text-align=center +xmlns:fo=http://www.w3.org/1999/XSL/Format; +xmlns:fox=http://xml.apache.org/fop/extensions; fo:layout-master-set fo:simple-page-master master-name=right @@ -41,43 +43,56 @@ fo:flow flow-name=xsl-region-body fo:block font-size=18pt font-weight=bold1. FOP test for images/fo:block fo:block id=N2531 + fox:destination internal-destination=N2531/ fo:block font-size=16pt font-weight=bold space-before.minimum=1em space-before.optimum=1.5em space-before.maximum=2emA GIF image in FOP/fo:block fo:block fo:external-graphic src=file:../graphics/xml_feather.gif/ /fo:block /fo:block fo:block id=N2535 + fox:destination internal-destination=N2535/ fo:block font-size=16pt font-weight=bold space-before.minimum=1em space-before.optimum=1.5em space-before.maximum=2emA transparent GIF image in FOP/fo:block fo:block fo:external-graphic src=file:../graphics/xml_feather_transparent.gif/ /fo:block /fo:block fo:block id=N2545 + fox:destination internal-destination=N2545/ fo:block font-size=16pt font-weight=bold space-before.minimum=1em space-before.optimum=1.5em space-before.maximum=2emA JPEG image in FOP/fo:block fo:block fo:external-graphic src=file:../graphics/fop.jpg/ /fo:block /fo:block fo:block id=N2550 + fox:destination internal-destination=N2550/ fo:block font-size=16pt font-weight=bold space-before.minimum=1em space-before.optimum=1.5em space-before.maximum=2emA BMP image in FOP/fo:block fo:block fo:external-graphic src=file:../graphics/linux.bmp/ /fo:block /fo:block fo:block id=N2559 + fox:destination internal-destination=N2559/ fo:block font-size=16pt font-weight=bold space-before.minimum=1em space-before.optimum=1.5em space-before.maximum=2em/ This section is only required to show that the layout still works. /fo:block /fo:flow + /fo:page-sequence fo:page-sequence id=N2561 master-reference=psmOddEven + fo:static-content flow-name=xsl-region-after fo:block text-align-last=center font-size=10pt -fo:page-number//fo:block + fo:page-number/ +/fo:block /fo:static-content + fo:flow flow-name=xsl-region-body -fo:block font-size=18pt font-weight=boldA. Appendix/fo:block/fo:flow +fo:block id=AppendixA font-size=18pt font-weight=boldA. Appendix/fo:block + fox:destination internal-destination=AppendixA/ +/fo:flow + /fo:page-sequence + /fo:root - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/documentation/content/xdocs extensions.xml
vmote 2003/10/12 12:49:54 Modified:src/documentation/content/xdocs extensions.xml Log: fix typo Revision ChangesPath 1.13 +2 -2 xml-fop/src/documentation/content/xdocs/extensions.xml Index: extensions.xml === RCS file: /home/cvs/xml-fop/src/documentation/content/xdocs/extensions.xml,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- extensions.xml15 Sep 2003 20:54:01 - 1.12 +++ extensions.xml12 Oct 2003 19:49:54 - 1.13 @@ -19,7 +19,7 @@ /p /section section id=fo-extensions - titleFO Extentions/title + titleFO Extensions/title section id=fox-namespace titleNamespace/title pBy convention, FO extensions in FOP use the fox: namespace identifier. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/layoutmgr AddLMVisitor.java
vmote 2003/10/12 13:06:57 Modified:src/java/org/apache/fop/layoutmgr AddLMVisitor.java Log: fix signature problem in inner class for InlineStackingLayoutManager -- attempt to pass BasicLink as an argument changed the signature of the overridden createArea() method, causing the superclass method to be used in error instead Revision ChangesPath 1.21 +3 -3 xml-fop/src/java/org/apache/fop/layoutmgr/AddLMVisitor.java Index: AddLMVisitor.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/AddLMVisitor.java,v retrieving revision 1.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- AddLMVisitor.java 10 Oct 2003 15:56:57 - 1.20 +++ AddLMVisitor.java 12 Oct 2003 20:06:57 - 1.21 @@ -292,11 +292,11 @@ /** * Add start and end properties for the link */ -public void serveBasicLink(BasicLink node) { +public void serveBasicLink(final BasicLink node) { node.setup(); InlineStackingLayoutManager lm; lm = new InlineStackingLayoutManager() { -protected InlineParent createArea(BasicLink node) { +protected InlineParent createArea() { InlineParent area = super.createArea(); setupBasicLinkArea(node, parentLM, area); return area; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/image ImageFactory.java
vmote 2003/10/10 08:40:31 Modified:src/java/org/apache/fop/area AreaTree.java AreaTreeControl.java src/java/org/apache/fop/fo/pagination LayoutMasterSet.java PageSequence.java src/java/org/apache/fop/image ImageFactory.java Log: open up access in misc places by either adding accessor methods or by loosening acess control Revision ChangesPath 1.6 +4 -0 xml-fop/src/java/org/apache/fop/area/AreaTree.java Index: AreaTree.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/area/AreaTree.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- AreaTree.java 6 Oct 2003 16:38:48 - 1.5 +++ AreaTree.java 10 Oct 2003 15:40:31 - 1.6 @@ -284,4 +284,8 @@ return data; } +public AreaTreeControl getAreaTreeControl() { +return atControl; +} + } 1.2 +10 -1 xml-fop/src/java/org/apache/fop/area/AreaTreeControl.java Index: AreaTreeControl.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/area/AreaTreeControl.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- AreaTreeControl.java 6 Oct 2003 16:38:48 - 1.1 +++ AreaTreeControl.java 10 Oct 2003 15:40:31 - 1.2 @@ -57,6 +57,9 @@ // Avalon import org.apache.avalon.framework.logger.Logger; +// Java +import java.util.Set; + /** * An interface for classes that are conceptually the parent class of the * area.AreaTree object. The purpose of the interface is to keep the AreaTree @@ -75,5 +78,11 @@ * @return the Logger being used with this FO Tree */ Logger getLogger(); + +/** + * The current set of IDs in the document. + * @return the Set of IDReferences in the document. + */ +Set getIDReferences(); } 1.4 +2 -2 xml-fop/src/java/org/apache/fop/fo/pagination/LayoutMasterSet.java Index: LayoutMasterSet.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/pagination/LayoutMasterSet.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- LayoutMasterSet.java 16 Sep 2003 05:21:06 - 1.3 +++ LayoutMasterSet.java 10 Oct 2003 15:40:31 - 1.4 @@ -176,7 +176,7 @@ * duplicate, that it maps to the same region-class. * @throws FOPException if there's a name duplication */ -protected void checkRegionNames() throws FOPException { +public void checkRegionNames() throws FOPException { Map allRegions = new java.util.HashMap(); for (Iterator spm = simplePageMasters.values().iterator(); spm.hasNext();) { @@ -210,7 +210,7 @@ * @param regionName name of the region * @return true when the region name specified has a region in this LayoutMasterSet */ -protected boolean regionNameExists(String regionName) { +public boolean regionNameExists(String regionName) { for (Iterator e = simplePageMasters.values().iterator(); e.hasNext();) { if (((SimplePageMaster)e.next()).regionNameExists(regionName)) { 1.15 +12 -12xml-fop/src/java/org/apache/fop/fo/pagination/PageSequence.java Index: PageSequence.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/pagination/PageSequence.java,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- PageSequence.java 19 Sep 2003 18:17:40 - 1.14 +++ PageSequence.java 10 Oct 2003 15:40:31 - 1.15 @@ -70,10 +70,10 @@ // // intial-page-number types // -private static final int EXPLICIT = 0; -private static final int AUTO = 1; -private static final int AUTO_EVEN = 2; -private static final int AUTO_ODD = 3; +public static final int EXPLICIT = 0; +public static final int AUTO = 1; +public static final int AUTO_EVEN = 2; +public static final int AUTO_ODD = 3; // // associations @@ -96,7 +96,7 @@ /** * Map of flows to their flow name (flow-name, Flow) */ -private HashMap flowMap; +public HashMap flowMap; // according to communication from Paul Grosso (XSL-List, // 001228, Number 406), confusion in spec section 6.4.5 about @@ -113,19 +113,19 @@ // page number and related formatting variables private String ipnValue; -private int currentPageNumber = 0; +public int currentPageNumber = 0
cvs commit: xml-fop/src/java/org/apache/fop/util CharUtilities.java
vmote 2003/10/10 08:56:57 Modified:src/java/org/apache/fop/fo/flow PageNumberCitation.java src/java/org/apache/fop/fonts Font.java src/java/org/apache/fop/layoutmgr AddLMVisitor.java TextLayoutManager.java src/java/org/apache/fop/util CharUtilities.java Log: move static methods getCharWidth and getWordWidth from util.CharUtilities to instance methods in fonts.Font Revision ChangesPath 1.17 +1 -2 xml-fop/src/java/org/apache/fop/fo/flow/PageNumberCitation.java Index: PageNumberCitation.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/flow/PageNumberCitation.java,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- PageNumberCitation.java 19 Sep 2003 14:33:15 - 1.16 +++ PageNumberCitation.java 10 Oct 2003 15:56:57 - 1.17 @@ -96,8 +96,7 @@ public int getStringWidth(String str) { int width = 0; for (int count = 0; count str.length(); count++) { -width += CharUtilities.getCharWidth(str.charAt(count), -fontState); +width += fontState.getCharWidth(str.charAt(count)); } return width; } 1.5 +96 -1 xml-fop/src/java/org/apache/fop/fonts/Font.java Index: Font.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fonts/Font.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- Font.java 14 Aug 2003 19:16:41 - 1.4 +++ Font.java 10 Oct 2003 15:56:57 - 1.5 @@ -207,7 +207,102 @@ sbuf.append(')'); return sbuf.toString(); } -} +/** + * Helper method for getting the width of a unicode char + * from the current fontstate. + * This also performs some guessing on widths on various + * versions of space that might not exists in the font. + * @param c character to inspect + * @param fs FontState to use + * @return the width of the character + */ +public int getCharWidth(char c) { +int width; + +if ((c == '\n') || (c == '\r') || (c == '\t') || (c == '\u00A0')) { +width = getCharWidth(' '); +} else { +width = getWidth(mapChar(c)); +if (width = 0) { +// Estimate the width of spaces not represented in +// the font +int em = getWidth(mapChar('m')); +int en = getWidth(mapChar('n')); +if (em = 0) { +em = 500 * getFontSize(); +} +if (en = 0) { +en = em - 10; +} + +if (c == ' ') { +width = em; +} +if (c == '\u2000') { +width = en; +} +if (c == '\u2001') { +width = em; +} +if (c == '\u2002') { +width = em / 2; +} +if (c == '\u2003') { +width = getFontSize(); +} +if (c == '\u2004') { +width = em / 3; +} +if (c == '\u2005') { +width = em / 4; +} +if (c == '\u2006') { +width = em / 6; +} +if (c == '\u2007') { +width = getCharWidth(' '); +} +if (c == '\u2008') { +width = getCharWidth('.'); +} +if (c == '\u2009') { +width = em / 5; +} +if (c == '\u200A') { +width = 5; +} +if (c == '\u200B') { +width = 100; +} +if (c == '\u202F') { +width = getCharWidth(' ') / 2; +} +if (c == '\u3000') { +width = getCharWidth(' ') * 2; +} +} +} + +return width; +} + +/** + * Calculates the word width. + */ +public int getWordWidth(String word) { +if (word == null) +return 0; +int wordLength = word.length(); +int width = 0; +char[] characters = new char[wordLength]; +word.getChars(0, wordLength, characters, 0); +for (int i = 0; i wordLength; i++) { +width
cvs commit: xml-fop/src/java/org/apache/fop/layoutmgr LayoutManagerLS.java
vmote 2003/10/06 08:52:46 Modified:src/java/org/apache/fop/area AreaTree.java src/java/org/apache/fop/layoutmgr LayoutManagerLS.java Log: move logic for creating area tree bookmarks from layoutmgr/LayoutManagerLS to area/AreaTree: 1. because it is not layout related 2. so that it can be reused by other Layout Strategies Revision ChangesPath 1.3 +43 -1 xml-fop/src/java/org/apache/fop/area/AreaTree.java Index: AreaTree.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/area/AreaTree.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- AreaTree.java 10 Sep 2003 06:25:36 - 1.2 +++ AreaTree.java 6 Oct 2003 15:52:46 - 1.3 @@ -50,6 +50,10 @@ */ package org.apache.fop.area; +import org.apache.fop.area.extensions.BookmarkData; +import org.apache.fop.fo.extensions.Outline; +import org.apache.fop.apps.Document; + import java.util.ArrayList; import java.util.List; import java.util.Map; @@ -233,5 +237,43 @@ } model.endDocument(); } -} +/** + * When this element is finished then it can create + * the bookmark data from the child elements and add + * the extension to the area tree. + */ +public void addBookmarksToAreaTree(Document document) { +if (document.getBookmarks() == null) { +return; +} +document.getDriver().getLogger().debug(adding bookmarks to area tree); +BookmarkData data = new BookmarkData(); +for (int count = 0; count document.getBookmarks().getOutlines().size(); count++) { +Outline out = (Outline)(document.getBookmarks().getOutlines()).get(count); +data.addSubData(createBookmarkData(out)); +} +// add data to area tree for resolving and handling +AreaTree at = document.getAreaTree(); +at.addTreeExtension(data); +data.setAreaTree(at); +} + +/** + * Create and return the bookmark data for this outline. + * This creates a bookmark data with the destination + * and adds all the data from child outlines. + * + * @return the new bookmark data + */ +public BookmarkData createBookmarkData(Outline outline) { +BookmarkData data = new BookmarkData(outline.getInternalDestination()); +data.setLabel(outline.getLabel()); +for (int count = 0; count outline.getOutlines().size(); count++) { +Outline out = (Outline)(outline.getOutlines()).get(count); +data.addSubData(createBookmarkData(out)); +} +return data; +} + +} 1.16 +2 -42 xml-fop/src/java/org/apache/fop/layoutmgr/LayoutManagerLS.java Index: LayoutManagerLS.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/LayoutManagerLS.java,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- LayoutManagerLS.java 19 Sep 2003 14:33:15 - 1.15 +++ LayoutManagerLS.java 6 Oct 2003 15:52:46 - 1.16 @@ -54,8 +54,6 @@ import org.apache.fop.apps.FOPException; import org.apache.fop.area.AreaTree; import org.apache.fop.area.Title; -import org.apache.fop.area.extensions.BookmarkData; -import org.apache.fop.fo.extensions.Outline; import org.apache.fop.fo.pagination.PageSequence; import org.apache.fop.layout.LayoutStrategy; @@ -96,7 +94,7 @@ return; } -addBookmarksToAreaTree(); +areaTree.addBookmarksToAreaTree(this.document); // Initialize if already used? //this.layoutMasterSet.resetPageMasters(); @@ -131,44 +129,6 @@ pageSeq.setCurrentPageNumber(pageLM.getPageCount()); // Tell the root the last page number we created. pageSeq.getRoot().setRunningPageNumberCounter(pageSeq.getCurrentPageNumber()); -} - -/** - * When this element is finished then it can create - * the bookmark data from the child elements and add - * the extension to the area tree. - */ -public void addBookmarksToAreaTree() { -if (document.getBookmarks() == null) { -return; -} -document.getDriver().getLogger().debug(adding bookmarks to area tree); -BookmarkData data = new BookmarkData(); -for (int count = 0; count document.getBookmarks().getOutlines().size(); count++) { -Outline out = (Outline)(document.getBookmarks().getOutlines()).get(count); -data.addSubData(createBookmarkData(out)); -} -// add data to area tree for resolving and handling -AreaTree
cvs commit: xml-fop/src/java/org/apache/fop/area AreaTree.java
vmote 2003/10/06 09:06:11 Modified:src/java/org/apache/fop/area AreaTree.java Log: cleanup bookmark logic and doc a bit Revision ChangesPath 1.4 +5 -7 xml-fop/src/java/org/apache/fop/area/AreaTree.java Index: AreaTree.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/area/AreaTree.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- AreaTree.java 6 Oct 2003 15:52:46 - 1.3 +++ AreaTree.java 6 Oct 2003 16:06:11 - 1.4 @@ -239,9 +239,7 @@ } /** - * When this element is finished then it can create - * the bookmark data from the child elements and add - * the extension to the area tree. + * Create the bookmark data in the area tree. */ public void addBookmarksToAreaTree(Document document) { if (document.getBookmarks() == null) { @@ -253,10 +251,8 @@ Outline out = (Outline)(document.getBookmarks().getOutlines()).get(count); data.addSubData(createBookmarkData(out)); } -// add data to area tree for resolving and handling -AreaTree at = document.getAreaTree(); -at.addTreeExtension(data); -data.setAreaTree(at); +addTreeExtension(data); +data.setAreaTree(this); } /** @@ -264,6 +260,8 @@ * This creates a bookmark data with the destination * and adds all the data from child outlines. * + * @param outline the Outline object for which a bookmark entry should be + * created * @return the new bookmark data */ public BookmarkData createBookmarkData(Outline outline) { - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/tools AreaTreeBuilder.java
vmote 2003/10/06 09:38:48 Modified:src/java/org/apache/fop/apps Document.java Driver.java src/java/org/apache/fop/area AreaTree.java src/java/org/apache/fop/layoutmgr LayoutManagerLS.java src/java/org/apache/fop/tools AreaTreeBuilder.java Added: src/java/org/apache/fop/area AreaTreeControl.java Log: 1. add an AreaTreeControl interface 2. make apps/Document implement it 3. tie the AreaTree to an AreaTreeControl object 4. clean up AreaTree to use its parent AreaTreeControl object Revision ChangesPath 1.9 +4 -2 xml-fop/src/java/org/apache/fop/apps/Document.java Index: Document.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/apps/Document.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- Document.java 2 Sep 2003 13:56:40 - 1.8 +++ Document.java 6 Oct 2003 16:38:48 - 1.9 @@ -61,6 +61,7 @@ import org.apache.fop.apps.FOUserAgent; import org.apache.fop.area.AreaTree; +import org.apache.fop.area.AreaTreeControl; import org.apache.fop.area.AreaTreeModel; import org.apache.fop.fo.extensions.Bookmarks; @@ -83,7 +84,8 @@ * Class storing information for the FOP Document being processed, and managing * the processing of it. */ -public class Document implements FOTreeControl, FOTreeListener { +public class Document implements FOTreeControl, FOTreeListener, +AreaTreeControl { /** The parent Driver object */ private Driver driver; 1.42 +1 -1 xml-fop/src/java/org/apache/fop/apps/Driver.java Index: Driver.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/apps/Driver.java,v retrieving revision 1.41 retrieving revision 1.42 diff -u -r1.41 -r1.42 --- Driver.java 17 Sep 2003 16:48:02 - 1.41 +++ Driver.java 6 Oct 2003 16:38:48 - 1.42 @@ -590,7 +590,7 @@ if (foInputHandler instanceof FOTreeHandler) { FOTreeHandler foTreeHandler = (FOTreeHandler)foInputHandler; foTreeHandler.addFOTreeListener(currentDocument); -currentDocument.areaTree = new AreaTree(); +currentDocument.areaTree = new AreaTree(currentDocument); currentDocument.atModel = new RenderPagesModel(renderer); //this.atModel = new CachedRenderPagesModel(renderer); currentDocument.areaTree.setTreeModel(currentDocument.atModel); 1.5 +15 -5 xml-fop/src/java/org/apache/fop/area/AreaTree.java Index: AreaTree.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/area/AreaTree.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- AreaTree.java 6 Oct 2003 16:06:11 - 1.4 +++ AreaTree.java 6 Oct 2003 16:38:48 - 1.5 @@ -83,6 +83,7 @@ // allows for different models to deal with adding/rendering // in different situations private AreaTreeModel model; +private AreaTreeControl atControl; // hashmap of arraylists containing pages with id area private Map idLocations = new HashMap(); @@ -91,6 +92,15 @@ private List treeExtensions = new ArrayList(); /** + * Constructor. + * @param atControl the AreaTreeControl object controlling this AreaTree + */ +public AreaTree (AreaTreeControl atControl) { +this.atControl = atControl; +} + + +/** * Create a new store pages model. * @return StorePagesModel the new model */ @@ -241,14 +251,14 @@ /** * Create the bookmark data in the area tree. */ -public void addBookmarksToAreaTree(Document document) { -if (document.getBookmarks() == null) { +public void addBookmarksToAreaTree() { +if (atControl.getBookmarks() == null) { return; } -document.getDriver().getLogger().debug(adding bookmarks to area tree); +atControl.getLogger().debug(adding bookmarks to area tree); BookmarkData data = new BookmarkData(); -for (int count = 0; count document.getBookmarks().getOutlines().size(); count++) { -Outline out = (Outline)(document.getBookmarks().getOutlines()).get(count); +for (int count = 0; count atControl.getBookmarks().getOutlines().size(); count++) { +Outline out = (Outline)(atControl.getBookmarks().getOutlines()).get(count); data.addSubData(createBookmarkData(out)); } addTreeExtension(data); 1.1 xml-fop/src/java/org/apache/fop/area
cvs commit: xml-fop/src/java/org/apache/fop/layoutmgr LayoutManagerLS.java
vmote 2003/10/06 09:55:58 Modified:src/java/org/apache/fop/apps Document.java src/java/org/apache/fop/layoutmgr LayoutManagerLS.java Log: move creation of bookmarks in AreaTree from LayoutManagerLS to Document, so that it automatically occurs for all LayoutStrategies Revision ChangesPath 1.10 +2 -1 xml-fop/src/java/org/apache/fop/apps/Document.java Index: Document.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/apps/Document.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- Document.java 6 Oct 2003 16:38:48 - 1.9 +++ Document.java 6 Oct 2003 16:55:58 - 1.10 @@ -344,6 +344,7 @@ */ public void foPageSequenceComplete (FOTreeEvent event) throws FOPException { PageSequence pageSeq = event.getPageSequence(); +areaTree.addBookmarksToAreaTree(); layoutStrategy.format(pageSeq, areaTree); } 1.18 +1 -3 xml-fop/src/java/org/apache/fop/layoutmgr/LayoutManagerLS.java Index: LayoutManagerLS.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/LayoutManagerLS.java,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- LayoutManagerLS.java 6 Oct 2003 16:38:48 - 1.17 +++ LayoutManagerLS.java 6 Oct 2003 16:55:58 - 1.18 @@ -94,8 +94,6 @@ return; } -areaTree.addBookmarksToAreaTree(); - // Initialize if already used? //this.layoutMasterSet.resetPageMasters(); if (pageSeq.getPageSequenceMaster() != null) { - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/fo FObj.java
vmote 2003/10/06 17:36:14 Modified:src/java/org/apache/fop/fo FObj.java Log: port from maintenance branch the variables that are used to track an object's location in the input file Revision ChangesPath 1.20 +7 -0 xml-fop/src/java/org/apache/fop/fo/FObj.java Index: FObj.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/FObj.java,v retrieving revision 1.19 retrieving revision 1.20 diff -u -r1.19 -r1.20 --- FObj.java 19 Sep 2003 14:33:15 - 1.19 +++ FObj.java 7 Oct 2003 00:36:14 - 1.20 @@ -110,6 +110,13 @@ super(parent); } +/** Marks input file containing this object **/ +public String systemId; +/** Marks line number of this object in the input file **/ +public int line; +/** Marks column number of this object in the input file **/ +public int column; + /** * Set the name of this element. * The prepends fo: to the name to indicate it is in the fo namespace. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/util CharUtilities.java
vmote 2003/10/06 17:43:06 Modified:src/java/org/apache/fop/util CharUtilities.java Log: port layout/FontState.getWordWidth from maintenance branch Revision ChangesPath 1.5 +29 -13xml-fop/src/java/org/apache/fop/util/CharUtilities.java Index: CharUtilities.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/util/CharUtilities.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- CharUtilities.java14 Aug 2003 15:31:10 - 1.4 +++ CharUtilities.java7 Oct 2003 00:43:06 - 1.5 @@ -3,34 +3,34 @@ * *The Apache Software License, Version 1.1 * - * + * * Copyright (C) 1999-2003 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 *[EMAIL PROTECTED] - * + * * 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 @@ -42,12 +42,12 @@ * (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 [EMAIL PROTECTED]. For more information on the Apache * Software Foundation, please see http://www.apache.org/. - */ + */ package org.apache.fop.util; import org.apache.fop.fonts.Font; @@ -58,7 +58,7 @@ */ public class CharUtilities { -/** +/** * Character code used to signal a character boundary in * inline content, such as an inline with borders and padding * or a nested block object. @@ -93,7 +93,7 @@ protected CharUtilities() { throw new UnsupportedOperationException(); } - + /** * Return the appropriate CharClass constant for the type * of the passed character. @@ -184,6 +184,22 @@ } } +return width; +} + +/** + * Calculates the word width. + */ +public static int getWordWidth(String word, Font fs) { +if (word == null) +return 0; +int wordLength = word.length(); +int width = 0; +char[] characters = new char[wordLength]; +word.getChars(0, wordLength, characters, 0); +for (int i = 0; i wordLength; i++) { +width += getCharWidth(characters[i], fs); +} return width; } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/layoutmgr LayoutManagerLS.java
vmote 2003/10/06 17:44:31 Modified:src/java/org/apache/fop/layoutmgr LayoutManagerLS.java Log: remove unused variable Revision ChangesPath 1.19 +1 -2 xml-fop/src/java/org/apache/fop/layoutmgr/LayoutManagerLS.java Index: LayoutManagerLS.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/LayoutManagerLS.java,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- LayoutManagerLS.java 6 Oct 2003 16:55:58 - 1.18 +++ LayoutManagerLS.java 7 Oct 2003 00:44:31 - 1.19 @@ -100,7 +100,6 @@ pageSeq.getPageSequenceMaster().reset(); } -int firstAvailPageNumber = 0; pageSeq.initPageNumber(); // This will layout pages and add them to the area tree - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/apps FOPException.java
vmote 2003/09/25 11:42:21 Modified:src/java/org/apache/fop/apps FOPException.java Log: port maintenance branch improvements in apps/FOPException to the trunk Revision ChangesPath 1.4 +20 -0 xml-fop/src/java/org/apache/fop/apps/FOPException.java Index: FOPException.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/apps/FOPException.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- FOPException.java 1 Sep 2003 13:31:24 - 1.3 +++ FOPException.java 25 Sep 2003 18:42:20 - 1.4 @@ -60,6 +60,9 @@ private static final String EXCEPTION_SEPARATOR = \n-\n; private Throwable exception; +private String systemId; +private int line; +private int column; /** * create a new FOP Exception @@ -70,6 +73,13 @@ super(message); } +public FOPException(String message, String systemId, int line, int column) { +super(message); +this.systemId = systemId; +this.line = line; +this.column = column; +} + /** * * @param e Throwable object @@ -103,6 +113,16 @@ */ public Throwable getException() { return exception; +} + +public void setLocation(String systemId, int line, int column) { +this.systemId = systemId; +this.line = line; +this.column = column; +} + +public boolean isLocationSet() { +return line=0; } /** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/org/apache/fop/viewer Command.java LoadableProperties.java MessageException.java MessagesDialog.java SecureResourceBundle.java Translator.java UserMessage.java
vmote 2003/09/24 03:17:24 Modified:src/org/apache/fop/render/awt Tag: fop-0_20_2-maintain AWTRenderer.java src/org/apache/fop/render/ps Tag: fop-0_20_2-maintain PSRenderer.java src/org/apache/fop/viewer Tag: fop-0_20_2-maintain Command.java LoadableProperties.java MessageException.java MessagesDialog.java SecureResourceBundle.java Translator.java UserMessage.java Log: 1. fix some line-ending problems 2. convert files with non-ASCII characters to UTF-8 Revision ChangesPath No revision No revision 1.38.2.14 +60 -60xml-fop/src/org/apache/fop/render/awt/Attic/AWTRenderer.java Index: AWTRenderer.java === RCS file: /home/cvs/xml-fop/src/org/apache/fop/render/awt/Attic/AWTRenderer.java,v retrieving revision 1.38.2.13 retrieving revision 1.38.2.14 diff -u -r1.38.2.13 -r1.38.2.14 --- AWTRenderer.java 20 Sep 2003 21:04:24 - 1.38.2.13 +++ AWTRenderer.java 24 Sep 2003 10:17:23 - 1.38.2.14 @@ -50,65 +50,65 @@ */ package org.apache.fop.render.awt; -import org.apache.fop.apps.FOPException; -import org.apache.fop.datatypes.ColorType; -import org.apache.fop.image.FopImage; -import org.apache.fop.image.ImageArea; -import org.apache.fop.image.SVGImage; -import org.apache.fop.image.FopImageException; -import org.apache.fop.layout.Page; -import org.apache.fop.layout.FontInfo; -import org.apache.fop.layout.DisplaySpace; -import org.apache.fop.layout.FontState; -import org.apache.fop.layout.BlockArea; -import org.apache.fop.layout.BorderAndPadding; -import org.apache.fop.layout.inline.WordArea; -import org.apache.fop.layout.inline.InlineSpace; -import org.apache.fop.layout.inline.LeaderArea; -import org.apache.fop.layout.inline.ForeignObjectArea; -import org.apache.fop.render.AbstractRenderer; -import org.apache.fop.svg.SVGArea; -import org.apache.fop.viewer.ProgressListener; -import org.apache.fop.viewer.Translator; - -import org.w3c.dom.svg.SVGAElement; -import org.w3c.dom.svg.SVGDocument; -import org.w3c.dom.svg.SVGSVGElement; -import org.w3c.dom.Document; - -import org.apache.batik.bridge.GVTBuilder; -import org.apache.batik.bridge.BridgeContext; -import org.apache.batik.bridge.ViewBox; -import org.apache.batik.gvt.GraphicsNode; -import org.apache.batik.gvt.event.EventDispatcher; - -import java.awt.Color; -import java.awt.Graphics2D; -import java.awt.Component; -import java.awt.Graphics; -import java.awt.Point; -import java.awt.RenderingHints; -import java.awt.FontMetrics; -import java.awt.Dimension; -import java.awt.Image; -import java.awt.font.LineMetrics; -import java.awt.geom.Rectangle2D; -import java.awt.geom.AffineTransform; -import java.awt.geom.Dimension2D; -import java.awt.geom.NoninvertibleTransformException; -import java.awt.image.BufferedImage; -import java.awt.print.Printable; -import java.awt.print.Pageable; -import java.awt.print.PageFormat; -import java.awt.print.PrinterException; -import java.awt.print.Paper; -import java.io.OutputStream; -import java.io.IOException; -import java.net.MalformedURLException; -import java.net.URL; -import java.util.Vector; -import java.util.Map; -import javax.swing.ImageIcon; +import org.apache.fop.apps.FOPException; +import org.apache.fop.datatypes.ColorType; +import org.apache.fop.image.FopImage; +import org.apache.fop.image.ImageArea; +import org.apache.fop.image.SVGImage; +import org.apache.fop.image.FopImageException; +import org.apache.fop.layout.Page; +import org.apache.fop.layout.FontInfo; +import org.apache.fop.layout.DisplaySpace; +import org.apache.fop.layout.FontState; +import org.apache.fop.layout.BlockArea; +import org.apache.fop.layout.BorderAndPadding; +import org.apache.fop.layout.inline.WordArea; +import org.apache.fop.layout.inline.InlineSpace; +import org.apache.fop.layout.inline.LeaderArea; +import org.apache.fop.layout.inline.ForeignObjectArea; +import org.apache.fop.render.AbstractRenderer; +import org.apache.fop.svg.SVGArea; +import org.apache.fop.viewer.ProgressListener; +import org.apache.fop.viewer.Translator; + +import org.w3c.dom.svg.SVGAElement; +import org.w3c.dom.svg.SVGDocument; +import org.w3c.dom.svg.SVGSVGElement; +import org.w3c.dom.Document; + +import org.apache.batik.bridge.GVTBuilder; +import org.apache.batik.bridge.BridgeContext; +import org.apache.batik.bridge.ViewBox; +import org.apache.batik.gvt.GraphicsNode; +import org.apache.batik.gvt.event.EventDispatcher; + +import java.awt.Color; +import java.awt.Graphics2D; +import java.awt.Component; +import java.awt.Graphics; +import
cvs commit: xml-fop/src/org/apache/fop/image JimiImage.java
vmote 2003/09/21 04:50:53 Modified:src/org/apache/fop/apps Tag: fop-0_20_2-maintain AWTStarter.java CommandLineStarter.java InputHandler.java PrintStarter.java XSLTInputHandler.java src/org/apache/fop/configuration Tag: fop-0_20_2-maintain ConfigurationReader.java src/org/apache/fop/datatypes Tag: fop-0_20_2-maintain ColorType.java ToBeImplementedProperty.java src/org/apache/fop/extensions Tag: fop-0_20_2-maintain ExtensionObj.java Label.java Outline.java src/org/apache/fop/image Tag: fop-0_20_2-maintain JimiImage.java Log: remove some global imports Revision ChangesPath No revision No revision 1.9.2.7 +33 -29xml-fop/src/org/apache/fop/apps/Attic/AWTStarter.java Index: AWTStarter.java === RCS file: /home/cvs/xml-fop/src/org/apache/fop/apps/Attic/AWTStarter.java,v retrieving revision 1.9.2.6 retrieving revision 1.9.2.7 diff -u -r1.9.2.6 -r1.9.2.7 --- AWTStarter.java 25 Feb 2003 10:18:31 - 1.9.2.6 +++ AWTStarter.java 21 Sep 2003 11:50:52 - 1.9.2.7 @@ -3,34 +3,34 @@ * *The Apache Software License, Version 1.1 * - * + * * Copyright (C) 1999-2003 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 *[EMAIL PROTECTED] - * + * * 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 @@ -42,12 +42,12 @@ * (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 [EMAIL PROTECTED]. For more information on the Apache * Software Foundation, please see http://www.apache.org/. - */ + */ package org.apache.fop.apps; /* * originally contributed by @@ -56,24 +56,28 @@ * Stanislav Gorkhover: [EMAIL PROTECTED] * Modified to use streaming API by Mark Lillywhite, [EMAIL PROTECTED] */ -import org.apache.fop.viewer.*; -import org.apache.fop.render.awt.*; -import java.awt.event.WindowAdapter; -import java.awt.event.WindowEvent; - - -import javax.swing.UIManager; -import java.awt.*; - -// SAX -import org.xml.sax.XMLReader; - -// Avalon -import org.apache.avalon.framework.logger.ConsoleLogger; - -// Java -import java.io.InputStream; -import java.net.URL; +import org.apache.fop.viewer.PreviewDialog; +import org.apache.fop.viewer.Translator; +import org.apache.fop.viewer.SecureResourceBundle; +import org.apache.fop.viewer.UserMessage; +import org.apache.fop.render.awt.AWTRenderer; +import java.awt.event.WindowAdapter; +import java.awt.event.WindowEvent; + + +import javax.swing.UIManager; +import
cvs commit: xml-fop/src/java/org/apache/fop/rtf/renderer RTFHandler.java
vmote 2003/09/21 15:21:11 Modified:src/java/org/apache/fop/rtf/renderer RTFHandler.java Log: reset background-color for each paragraph, submitted by Peter Herweg, see http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23302 Revision ChangesPath 1.24 +8 -3 xml-fop/src/java/org/apache/fop/rtf/renderer/RTFHandler.java Index: RTFHandler.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/rtf/renderer/RTFHandler.java,v retrieving revision 1.23 retrieving revision 1.24 diff -u -r1.23 -r1.24 --- RTFHandler.java 19 Sep 2003 18:27:59 - 1.23 +++ RTFHandler.java 21 Sep 2003 22:21:11 - 1.24 @@ -689,6 +689,12 @@ rtfAttr.set(rtfValue); } +/** + * Reads background-color from bl and writes it to rtfAttr. + * + * @param bl the Block object the properties are read from + * @param rtfAttr the RtfAttributes object the attributes are written to + */ private void attrBlockBackgroundColor(Block bl, RtfAttributes rtfAttr) { ColorType fopValue = bl.properties.get(background-color).getColorType(); int rtfColor = 0; @@ -696,12 +702,11 @@ actually a transparent black, which is generally not suitable as a default here. Changing FOP's default to white causes problems in PDF output, so we will look for the default here change it to - white. */ + auto. */ if ((fopValue.getRed() == 0) (fopValue.getGreen() == 0) (fopValue.getBlue() == 0) (fopValue.getAlpha() == 0)) { -rtfColor = RtfColorTable.getInstance().getColorNumber(white).intValue(); +rtfColor = 0; //=auto currentRTFBackgroundColor = -1; -return; } else { rtfColor = convertFOPColorToRTF(fopValue); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/org/apache/fop/viewer Command.java GoToPageDialog.java IconToolBar.java LoadableProperties.java MessagesDialog.java PreviewDialog.java PreviewDialogAboutBox.java SecureResourceBundle.java UserMessage.java
vmote 2003/09/20 11:59:50 Modified:src/org/apache/fop/svg Tag: fop-0_20_2-maintain PDFAElementBridge.java PDFANode.java PDFDocumentGraphics2D.java PDFGraphics2D.java PDFImageElementBridge.java PDFTranscoder.java SVGArea.java SVGElement.java SVGObj.java SVGUserAgent.java SVGUtilities.java src/org/apache/fop/tools Tag: fop-0_20_2-maintain DocumentInputSource.java DocumentReader.java TestConverter.java src/org/apache/fop/tools/anttasks Tag: fop-0_20_2-maintain Compare.java RunTest.java SerializeHyphPattern.java src/org/apache/fop/tools/xslt Tag: fop-0_20_2-maintain TraxTransform.java XSLTransform.java src/org/apache/fop/viewer Tag: fop-0_20_2-maintain Command.java GoToPageDialog.java IconToolBar.java LoadableProperties.java MessagesDialog.java PreviewDialog.java PreviewDialogAboutBox.java SecureResourceBundle.java UserMessage.java Log: remove some global imports Revision ChangesPath No revision No revision 1.3.2.3 +20 -19xml-fop/src/org/apache/fop/svg/Attic/PDFAElementBridge.java http://cvs.apache.org/viewcvs/xml-fop/src/org/apache/fop/svg/Attic/PDFAElementBridge.java.diff?r1=1.3.2.2r2=1.3.2.3 1.5.2.3 +19 -19xml-fop/src/org/apache/fop/svg/Attic/PDFANode.java http://cvs.apache.org/viewcvs/xml-fop/src/org/apache/fop/svg/Attic/PDFANode.java.diff?r1=1.5.2.2r2=1.5.2.3 1.11.2.3 +33 -27xml-fop/src/org/apache/fop/svg/Attic/PDFDocumentGraphics2D.java http://cvs.apache.org/viewcvs/xml-fop/src/org/apache/fop/svg/Attic/PDFDocumentGraphics2D.java.diff?r1=1.11.2.2r2=1.11.2.3 1.20.2.13 +66 -32xml-fop/src/org/apache/fop/svg/Attic/PDFGraphics2D.java http://cvs.apache.org/viewcvs/xml-fop/src/org/apache/fop/svg/Attic/PDFGraphics2D.java.diff?r1=1.20.2.12r2=1.20.2.13 1.1.2.4 +11 -11xml-fop/src/org/apache/fop/svg/Attic/PDFImageElementBridge.java http://cvs.apache.org/viewcvs/xml-fop/src/org/apache/fop/svg/Attic/PDFImageElementBridge.java.diff?r1=1.1.2.3r2=1.1.2.4 1.11.2.6 +58 -60xml-fop/src/org/apache/fop/svg/Attic/PDFTranscoder.java http://cvs.apache.org/viewcvs/xml-fop/src/org/apache/fop/svg/Attic/PDFTranscoder.java.diff?r1=1.11.2.5r2=1.11.2.6 1.10.2.2 +16 -16xml-fop/src/org/apache/fop/svg/Attic/SVGArea.java http://cvs.apache.org/viewcvs/xml-fop/src/org/apache/fop/svg/Attic/SVGArea.java.diff?r1=1.10.2.1r2=1.10.2.2 1.16.2.9 +25 -20xml-fop/src/org/apache/fop/svg/Attic/SVGElement.java http://cvs.apache.org/viewcvs/xml-fop/src/org/apache/fop/svg/Attic/SVGElement.java.diff?r1=1.16.2.8r2=1.16.2.9 1.7.2.4 +15 -13xml-fop/src/org/apache/fop/svg/Attic/SVGObj.java http://cvs.apache.org/viewcvs/xml-fop/src/org/apache/fop/svg/Attic/SVGObj.java.diff?r1=1.7.2.3r2=1.7.2.4 1.2.2.8 +19 -19xml-fop/src/org/apache/fop/svg/Attic/SVGUserAgent.java http://cvs.apache.org/viewcvs/xml-fop/src/org/apache/fop/svg/Attic/SVGUserAgent.java.diff?r1=1.2.2.7r2=1.2.2.8 1.2.2.2 +21 -20xml-fop/src/org/apache/fop/svg/Attic/SVGUtilities.java http://cvs.apache.org/viewcvs/xml-fop/src/org/apache/fop/svg/Attic/SVGUtilities.java.diff?r1=1.2.2.1r2=1.2.2.2 No revision No revision 1.2.2.2 +13 -13xml-fop/src/org/apache/fop/tools/Attic/DocumentInputSource.java http://cvs.apache.org/viewcvs/xml-fop/src/org/apache/fop/tools/Attic/DocumentInputSource.java.diff?r1=1.2.2.1r2=1.2.2.2 1.2.2.3 +30 -19xml-fop/src/org/apache/fop/tools/Attic/DocumentReader.java http://cvs.apache.org/viewcvs/xml-fop/src/org/apache/fop/tools/Attic/DocumentReader.java.diff?r1=1.2.2.2r2=1.2.2.3 1.15.2.5 +40 -27xml-fop/src/org/apache/fop/tools/Attic/TestConverter.java http://cvs.apache.org/viewcvs/xml-fop/src/org/apache/fop/tools/Attic/TestConverter.java.diff?r1=1.15.2.4r2=1.15.2.5 No revision No revision 1.2.2.4 +23 -18xml-fop/src/org/apache/fop/tools/anttasks/Attic/Compare.java http://cvs.apache.org/viewcvs/xml-fop/src/org/apache/fop/tools/anttasks/Attic/Compare.java.diff?r1=1.2.2.3r2=1.2.2.4 1.5.2.4 +22 -19xml-fop/src/org/apache/fop/tools/anttasks/Attic/RunTest.java http://cvs.apache.org/viewcvs/xml-fop/src/org/apache/fop/tools/anttasks/Attic/RunTest.java.diff?r1=1.5.2.3r2=1.5.2.4 1.2.2.2 +21 -18 xml-fop/src/org/apache/fop/tools/anttasks/Attic/SerializeHyphPattern.java http://cvs.apache.org/viewcvs/xml-fop/src/org/apache/fop/tools/anttasks/Attic/SerializeHyphPattern.java.diff
cvs commit: xml-fop/src/org/apache/fop/fo/pagination ConditionalPageMasterReference.java LayoutMasterSet.java PageMasterReference.java PageSequence.java PageSequenceMaster.java RegionAfter.java RegionBefore.java RegionEnd.java RegionStart.java RepeatablePageMasterAlternatives.java RepeatablePageMasterReference.java Root.java SimplePageMaster.java SinglePageMasterReference.java
vmote 2003/09/20 18:04:21 Modified:src/org/apache/fop/fo Tag: fop-0_20_2-maintain FOText.java Property.java StandardElementMapping.java Title.java Unknown.java XMLElement.java XMLObj.java src/org/apache/fop/fo/expr Tag: fop-0_20_2-maintain LabelEndFunction.java PropertyParser.java src/org/apache/fop/fo/flow Tag: fop-0_20_2-maintain AbstractFlow.java AbstractTableBody.java BasicLink.java BidiOverride.java Block.java BlockContainer.java Character.java ExternalGraphic.java Float.java Flow.java Footnote.java FootnoteBody.java InitialPropertySet.java Inline.java InlineContainer.java InstreamForeignObject.java Leader.java ListBlock.java ListItem.java ListItemBody.java ListItemLabel.java Marker.java MultiCase.java MultiProperties.java MultiPropertySet.java MultiSwitch.java MultiToggle.java PageNumber.java PageNumberCitation.java StaticContent.java Table.java TableAndCaption.java TableBody.java TableCaption.java TableCell.java TableColumn.java TableFooter.java TableHeader.java TableRow.java Wrapper.java src/org/apache/fop/fo/pagination Tag: fop-0_20_2-maintain ConditionalPageMasterReference.java LayoutMasterSet.java PageMasterReference.java PageSequence.java PageSequenceMaster.java RegionAfter.java RegionBefore.java RegionEnd.java RegionStart.java RepeatablePageMasterAlternatives.java RepeatablePageMasterReference.java Root.java SimplePageMaster.java SinglePageMasterReference.java Log: remove some global imports Revision ChangesPath No revision No revision 1.24.2.9 +22 -19xml-fop/src/org/apache/fop/fo/Attic/FOText.java http://cvs.apache.org/viewcvs/xml-fop/src/org/apache/fop/fo/Attic/FOText.java.diff?r1=1.24.2.8r2=1.24.2.9 1.18.2.5 +29 -22xml-fop/src/org/apache/fop/fo/Attic/Property.java http://cvs.apache.org/viewcvs/xml-fop/src/org/apache/fop/fo/Attic/Property.java.diff?r1=1.18.2.4r2=1.18.2.5 1.26.2.5 +66 -17xml-fop/src/org/apache/fop/fo/Attic/StandardElementMapping.java http://cvs.apache.org/viewcvs/xml-fop/src/org/apache/fop/fo/Attic/StandardElementMapping.java.diff?r1=1.26.2.4r2=1.26.2.5 1.4.2.5 +21 -14xml-fop/src/org/apache/fop/fo/Attic/Title.java http://cvs.apache.org/viewcvs/xml-fop/src/org/apache/fop/fo/Attic/Title.java.diff?r1=1.4.2.4r2=1.4.2.5 1.2.2.5 +13 -13xml-fop/src/org/apache/fop/fo/Attic/Unknown.java http://cvs.apache.org/viewcvs/xml-fop/src/org/apache/fop/fo/Attic/Unknown.java.diff?r1=1.2.2.4r2=1.2.2.5 1.1.2.5 +14 -14xml-fop/src/org/apache/fop/fo/Attic/XMLElement.java http://cvs.apache.org/viewcvs/xml-fop/src/org/apache/fop/fo/Attic/XMLElement.java.diff?r1=1.1.2.4r2=1.1.2.5 1.2.2.8 +22 -21xml-fop/src/org/apache/fop/fo/Attic/XMLObj.java http://cvs.apache.org/viewcvs/xml-fop/src/org/apache/fop/fo/Attic/XMLObj.java.diff?r1=1.2.2.7r2=1.2.2.8 No revision No revision 1.2.2.4 +19 -16xml-fop/src/org/apache/fop/fo/expr/Attic/LabelEndFunction.java http://cvs.apache.org/viewcvs/xml-fop/src/org/apache/fop/fo/expr/Attic/LabelEndFunction.java.diff?r1=1.2.2.3r2=1.2.2.4 1.6.2.5 +24 -20xml-fop/src/org/apache/fop/fo/expr/Attic/PropertyParser.java http://cvs.apache.org/viewcvs/xml-fop/src/org/apache/fop/fo/expr/Attic/PropertyParser.java.diff?r1=1.6.2.4r2=1.6.2.5 No revision No revision 1.1.2.7 +19 -16xml-fop/src/org/apache/fop/fo/flow/Attic/AbstractFlow.java http://cvs.apache.org/viewcvs/xml-fop/src/org/apache/fop/fo/flow/Attic/AbstractFlow.java.diff?r1=1.1.2.6r2=1.1.2.7 1.1.2.11 +30 -21xml-fop/src/org/apache/fop/fo/flow/Attic/AbstractTableBody.java http://cvs.apache.org/viewcvs/xml-fop/src/org/apache/fop/fo/flow/Attic/AbstractTableBody.java.diff?r1=1.1.2.10r2=1.1.2.11 1.8.2.9 +35 -23xml-fop/src/org/apache/fop/fo/flow/Attic/BasicLink.java http://cvs.apache.org/viewcvs/xml-fop/src/org/apache/fop/fo/flow/Attic/BasicLink.java.diff?r1=1.8.2.8r2=1.8.2.9 1.4.2.5 +18 -14xml-fop/src/org/apache/fop/fo/flow/Attic/BidiOverride.java http://cvs.apache.org/viewcvs/xml-fop/src/org/apache/fop/fo/flow/Attic
cvs commit: xml-fop/src/java/org/apache/fop/rtf/renderer RTFHandler.java
vmote 2003/09/19 11:17:40 Modified:src/java/org/apache/fop/fo FOInputHandler.java FOTreeHandler.java src/java/org/apache/fop/fo/flow PageNumber.java src/java/org/apache/fop/fo/pagination PageSequence.java src/java/org/apache/fop/mif MIFHandler.java src/java/org/apache/fop/rtf/renderer RTFHandler.java Log: add support for xsl-region-before, xsl-region-after and fo:page-number tag, submitted by Peter Herweg, see http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23274 Revision ChangesPath 1.10 +17 -1 xml-fop/src/java/org/apache/fop/fo/FOInputHandler.java Index: FOInputHandler.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/FOInputHandler.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- FOInputHandler.java 16 Sep 2003 17:33:06 - 1.9 +++ FOInputHandler.java 19 Sep 2003 18:17:40 - 1.10 @@ -61,6 +61,7 @@ import org.apache.fop.fo.flow.Leader; import org.apache.fop.fo.flow.ListBlock; import org.apache.fop.fo.flow.ListItem; +import org.apache.fop.fo.flow.PageNumber; import org.apache.fop.fo.flow.Table; import org.apache.fop.fo.flow.TableColumn; import org.apache.fop.fo.flow.TableBody; @@ -131,6 +132,21 @@ public abstract void endPageSequence(PageSequence pageSeq) throws FOPException; /** + * + * @param pagenum PageNumber that is starting. + */ +public abstract void startPageNumber(PageNumber pagenum); + +/** + * + * @param pagenum PageNumber that is ending. + */ +public abstract void endPageNumber(PageNumber pagenum); + +/** + * This method is called to indicate the start of a new fo:flow or fo:static-content. + * This method also handles fo:static-content tags, because the StaticContent class + * is derived from the Flow class. * * @param fl Flow that is starting. */ 1.9 +15 -1 xml-fop/src/java/org/apache/fop/fo/FOTreeHandler.java Index: FOTreeHandler.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/FOTreeHandler.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- FOTreeHandler.java16 Sep 2003 17:33:06 - 1.8 +++ FOTreeHandler.java19 Sep 2003 18:17:40 - 1.9 @@ -65,6 +65,7 @@ import org.apache.fop.fo.flow.Leader; import org.apache.fop.fo.flow.ListBlock; import org.apache.fop.fo.flow.ListItem; +import org.apache.fop.fo.flow.PageNumber; import org.apache.fop.fo.flow.Table; import org.apache.fop.fo.flow.TableColumn; import org.apache.fop.fo.flow.TableBody; @@ -514,4 +515,17 @@ } } +/** + * + * @param pagenum PageNumber that is starting. + */ +public void startPageNumber(PageNumber pagenum) { +} + +/** + * + * @param pagenum PageNumber that is ending. + */ +public void endPageNumber(PageNumber pagenum) { +} } 1.16 +19 -0 xml-fop/src/java/org/apache/fop/fo/flow/PageNumber.java Index: PageNumber.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/flow/PageNumber.java,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- PageNumber.java 19 Sep 2003 14:33:15 - 1.15 +++ PageNumber.java 19 Sep 2003 18:17:40 - 1.16 @@ -50,6 +50,11 @@ */ package org.apache.fop.fo.flow; +// XML +import org.xml.sax.Attributes; + +// FOP +import org.apache.fop.apps.FOPException; import org.apache.fop.datatypes.ColorType; import org.apache.fop.fo.FONode; import org.apache.fop.fo.FOTreeVisitor; @@ -146,4 +151,18 @@ fotv.servePageNumber(this); } +/** + * @see org.apache.fop.fo.FObj#handleAttrs + */ +public void handleAttrs(Attributes attlist) throws FOPException { +super.handleAttrs(attlist); + +setup(); + +getFOTreeControl().getFOInputHandler().startPageNumber(this); +} + +protected void end() { +getFOTreeControl().getFOInputHandler().endPageNumber(this); +} } 1.14 +4 -0 xml-fop/src/java/org/apache/fop/fo/pagination/PageSequence.java Index: PageSequence.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/pagination/PageSequence.java,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- PageSequence.java 16 Sep 2003 05:21:06 - 1.13 +++ PageSequence.java 19 Sep 2003 18:17:40 -
cvs commit: xml-fop/src/java/org/apache/fop/rtf/renderer RTFHandler.java
vmote 2003/09/19 11:27:59 Modified:src/java/org/apache/fop/rtf/renderer RTFHandler.java Log: style changes only Revision ChangesPath 1.23 +72 -61xml-fop/src/java/org/apache/fop/rtf/renderer/RTFHandler.java Index: RTFHandler.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/rtf/renderer/RTFHandler.java,v retrieving revision 1.22 retrieving revision 1.23 diff -u -r1.22 -r1.23 --- RTFHandler.java 19 Sep 2003 18:17:40 - 1.22 +++ RTFHandler.java 19 Sep 2003 18:27:59 - 1.23 @@ -115,15 +115,15 @@ private RtfDocumentArea docArea; private RtfParagraph para; private boolean warned = false; -private boolean bPrevHeaderSpecified=false;//true, if there has been a - //header in any page-sequence -private boolean bPrevFooterSpecified=false;//true, if there has been a - //footer in any page-sequence +private boolean bPrevHeaderSpecified = false;//true, if there has been a + //header in any page-sequence +private boolean bPrevFooterSpecified = false;//true, if there has been a + //footer in any page-sequence private boolean bHeaderSpecified = false; //true, if there is a header //in current page-sequence private boolean bFooterSpecified = false; //true, if there is a footer //in current page-sequence -private BuilderContext m_context = new BuilderContext(null); +private BuilderContext builderContext = new BuilderContext(null); private static final String ALPHA_WARNING = WARNING: RTF renderer is + veryveryalpha at this time, see class org.apache.fop.rtf.renderer.RTFHandler; @@ -136,6 +136,7 @@ /** * Creates a new RTF structure handler. + * @param doc the Document for which this RTFHandler is processing * @param os OutputStream to write to */ public RTFHandler(Document doc, OutputStream os) { @@ -178,10 +179,10 @@ public void startPageSequence(PageSequence pageSeq) { try { sect = docArea.newSection(); -m_context.pushContainer(sect); +builderContext.pushContainer(sect); -bHeaderSpecified=false; -bFooterSpecified=false; +bHeaderSpecified = false; +bFooterSpecified = false; } catch (IOException ioe) { // FIXME could we throw Exception in all FOInputHandler events? log.error(startPageSequence: + ioe.getMessage()); @@ -193,7 +194,7 @@ * @see org.apache.fop.fo.FOInputHandler#endPageSequence(PageSequence) */ public void endPageSequence(PageSequence pageSeq) throws FOPException { -m_context.popContainer(); +builderContext.popContainer(); } /** @@ -205,20 +206,24 @@ // if there is no header in current page-sequence but there has been // a header in a previous page-sequence, insert an empty header. if (bPrevHeaderSpecified !bHeaderSpecified) { -RtfAttributes attr=new RtfAttributes(); +RtfAttributes attr = new RtfAttributes(); attr.set(RtfBefore.HEADER); -final IRtfBeforeContainer contBefore = (IRtfBeforeContainer)m_context.getContainer(IRtfBeforeContainer.class,true,this); +final IRtfBeforeContainer contBefore = +(IRtfBeforeContainer)builderContext.getContainer +(IRtfBeforeContainer.class, true, this); contBefore.newBefore(attr); } // if there is no footer in current page-sequence but there has been // a footer in a previous page-sequence, insert an empty footer. if (bPrevFooterSpecified !bFooterSpecified) { -RtfAttributes attr=new RtfAttributes(); +RtfAttributes attr = new RtfAttributes(); attr.set(RtfAfter.FOOTER); -final IRtfAfterContainer contAfter = (IRtfAfterContainer)m_context.getContainer(IRtfAfterContainer.class,true,this); +final IRtfAfterContainer contAfter = +(IRtfAfterContainer)builderContext.getContainer +(IRtfAfterContainer.class, true, this); contAfter.newAfter(attr); } @@ -227,40 +232,44 @@ sect.newParagraph().newText
cvs commit: xml-fop/src/java/org/apache/fop/apps Driver.java
vmote 2003/09/17 09:25:47 Modified:src/java/org/apache/fop/apps Driver.java Log: set the (default) LayoutStrategy only if it has not been set already Revision ChangesPath 1.40 +3 -1 xml-fop/src/java/org/apache/fop/apps/Driver.java Index: Driver.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/apps/Driver.java,v retrieving revision 1.39 retrieving revision 1.40 diff -u -r1.39 -r1.40 --- Driver.java 10 Sep 2003 06:25:36 - 1.39 +++ Driver.java 17 Sep 2003 16:25:47 - 1.40 @@ -581,7 +581,9 @@ /** LayoutStrategy is hard-wired for now, but needs to be made accessible through the API and/or configuration */ if (foInputHandler instanceof FOTreeHandler) { -currentDocument.setLayoutStrategy(new LayoutManagerLS(currentDocument)); +if (currentDocument.getLayoutStrategy() == null) { +currentDocument.setLayoutStrategy(new LayoutManagerLS(currentDocument)); +} } treeBuilder.foTreeControl = currentDocument; try { - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/apps Driver.java
vmote 2003/09/17 09:48:02 Modified:src/java/org/apache/fop/apps Driver.java Log: add accessor methods for currentDocument Revision ChangesPath 1.41 +16 -1 xml-fop/src/java/org/apache/fop/apps/Driver.java Index: Driver.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/apps/Driver.java,v retrieving revision 1.40 retrieving revision 1.41 diff -u -r1.40 -r1.41 --- Driver.java 17 Sep 2003 16:25:47 - 1.40 +++ Driver.java 17 Sep 2003 16:48:02 - 1.41 @@ -686,5 +686,20 @@ } } -} +/** + * Public accessor for setting the currentDocument to process. + * @param document the Document object that should be processed. + */ +public void setCurrentDocument(Document document) { +currentDocument = document; +} + +/** + * Public accessor for getting the currentDocument + * @return the currentDocument + */ +public Document getCurrentDocument() { + return currentDocument; +} +} - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/datatypes ColorType.java
vmote 2003/09/16 07:14:05 Modified:src/java/org/apache/fop/datatypes ColorType.java Log: correct computation of integer conversion, as per patch submitted by Peter Herweg -- see http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23080 Revision ChangesPath 1.4 +1 -1 xml-fop/src/java/org/apache/fop/datatypes/ColorType.java Index: ColorType.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/datatypes/ColorType.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- ColorType.java1 Sep 2003 01:28:51 - 1.3 +++ ColorType.java16 Sep 2003 14:14:04 - 1.4 @@ -254,7 +254,7 @@ if (floatValue 0) { floatValue = 0; } -return (int) floatValue * 255; +return (int) (floatValue * 255); } /** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/rtf/rtflib/rtfdoc RtfColorTable.java
vmote 2003/09/16 07:50:16 Modified:src/java/org/apache/fop/rtf/renderer RTFHandler.java src/java/org/apache/fop/rtf/rtflib/rtfdoc RtfColorTable.java Log: make RtfColorTable.getColorNumber return an Integer instead of int, so that it can return a null value -- submitted by Peter Herweg, see http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23082 Revision ChangesPath 1.18 +2 -2 xml-fop/src/java/org/apache/fop/rtf/renderer/RTFHandler.java Index: RTFHandler.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/rtf/renderer/RTFHandler.java,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- RTFHandler.java 9 Sep 2003 14:31:08 - 1.17 +++ RTFHandler.java 16 Sep 2003 14:50:16 - 1.18 @@ -452,7 +452,7 @@ white. */ if ((fopValue.getRed() == 0) (fopValue.getGreen() == 0) (fopValue.getBlue() == 0) (fopValue.getAlpha() == 0)) { -rtfColor = RtfColorTable.getInstance().getColorNumber(white); +rtfColor = RtfColorTable.getInstance().getColorNumber(white).intValue(); } else { rtfColor = convertFOPColorToRTF(fopValue); } @@ -472,7 +472,7 @@ int greenComponent = ColorType.convertChannelToInteger (fopColor.getGreen()); int blueComponent = ColorType.convertChannelToInteger (fopColor.getBlue()); return RtfColorTable.getInstance().getColorNumber(redComponent, -greenComponent, blueComponent); +greenComponent, blueComponent).intValue(); } } 1.7 +14 -14 xml-fop/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfColorTable.java Index: RtfColorTable.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfColorTable.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- RtfColorTable.java5 Jul 2003 03:23:23 - 1.6 +++ RtfColorTable.java16 Sep 2003 14:50:16 - 1.7 @@ -131,14 +131,14 @@ * Initialize the color table. */ private void init () { -addNamedColor(black, getColorNumber (0, 0, 0)); -addNamedColor(white, getColorNumber (255, 255, 255)); -addNamedColor(red, getColorNumber (255, 0, 0)); -addNamedColor(green, getColorNumber (0, 255, 0)); -addNamedColor(blue, getColorNumber (0, 0, 255)); -addNamedColor(cyan, getColorNumber (0, 255, 255)); -addNamedColor(magenta, getColorNumber (255, 0, 255)); -addNamedColor(yellow, getColorNumber (255, 255, 0)); +addNamedColor(black, getColorNumber (0, 0, 0).intValue()); +addNamedColor(white, getColorNumber (255, 255, 255).intValue()); +addNamedColor(red, getColorNumber (255, 0, 0).intValue()); +addNamedColor(green, getColorNumber (0, 255, 0).intValue()); +addNamedColor(blue, getColorNumber (0, 0, 255).intValue()); +addNamedColor(cyan, getColorNumber (0, 255, 255).intValue()); +addNamedColor(magenta, getColorNumber (255, 0, 255).intValue()); +addNamedColor(yellow, getColorNumber (255, 255, 0).intValue()); getColorNumber (0, 0, 128); getColorNumber (0, 128, 128); @@ -150,7 +150,7 @@ // Added by Normand Masse // Gray color added -addNamedColor(gray, getColorNumber(128, 128, 128)); +addNamedColor(gray, getColorNumber(128, 128, 128).intValue()); getColorNumber (192, 192, 192); } @@ -168,8 +168,8 @@ * @param name a named color * @return the RTF number of a named color, or null if name not found */ -public int getColorNumber (String name) { -return ((Integer)namedColors.get(name.toLowerCase())).intValue(); +public Integer getColorNumber (String name) { +return ((Integer)namedColors.get(name.toLowerCase())); } /** @@ -181,7 +181,7 @@ * * @return The number of the color in the table */ -public int getColorNumber (int red, int green, int blue) { +public Integer getColorNumber (int red, int green, int blue) { Integer identifier = new Integer (determineIdentifier (red, green, blue)); Object o = colorIndex.get (identifier); int retVal; @@ -194,7 +194,7 @@ retVal = ((Integer) o).intValue (); } -return retVal + 1; +return new Integer(retVal + 1); } /** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/rtf/renderer RTFHandler.java
vmote 2003/09/16 10:33:07 Modified:src/java/org/apache/fop/fo FOInputHandler.java FOTreeHandler.java src/java/org/apache/fop/mif MIFHandler.java src/java/org/apache/fop/rtf/renderer RTFHandler.java Log: add structure for handling table columns in fo/FOInputHandler and its subclasses -- submitted by Peter Herweg, see http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23085 Revision ChangesPath 1.9 +14 -1 xml-fop/src/java/org/apache/fop/fo/FOInputHandler.java Index: FOInputHandler.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/FOInputHandler.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- FOInputHandler.java 1 Sep 2003 19:21:07 - 1.8 +++ FOInputHandler.java 16 Sep 2003 17:33:06 - 1.9 @@ -62,6 +62,7 @@ import org.apache.fop.fo.flow.ListBlock; import org.apache.fop.fo.flow.ListItem; import org.apache.fop.fo.flow.Table; +import org.apache.fop.fo.flow.TableColumn; import org.apache.fop.fo.flow.TableBody; import org.apache.fop.fo.flow.TableCell; import org.apache.fop.fo.flow.TableRow; @@ -166,6 +167,18 @@ * @param tbl Table that is ending. */ public abstract void endTable(Table tbl); + +/** + * + * @param tc TableColumn that is starting; + */ +public abstract void startColumn(TableColumn tc); + +/** + * + * @param tc TableColumn that is ending; + */ +public abstract void endColumn(TableColumn tc); /** * 1.8 +16 -1 xml-fop/src/java/org/apache/fop/fo/FOTreeHandler.java Index: FOTreeHandler.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/FOTreeHandler.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- FOTreeHandler.java22 Aug 2003 17:21:48 - 1.7 +++ FOTreeHandler.java16 Sep 2003 17:33:06 - 1.8 @@ -66,6 +66,7 @@ import org.apache.fop.fo.flow.ListBlock; import org.apache.fop.fo.flow.ListItem; import org.apache.fop.fo.flow.Table; +import org.apache.fop.fo.flow.TableColumn; import org.apache.fop.fo.flow.TableBody; import org.apache.fop.fo.flow.TableCell; import org.apache.fop.fo.flow.TableRow; @@ -247,6 +248,20 @@ * @see org.apache.fop.fo.FOInputHandler#endTable(Table) */ public void endTable(Table tbl) { +} + +/** + * + * @param tc TableColumn that is starting; + */ +public void startColumn(TableColumn tc) { +} + +/** + * + * @param tc TableColumn that is ending; + */ +public void endColumn(TableColumn tc) { } /** 1.12 +15 -0 xml-fop/src/java/org/apache/fop/mif/MIFHandler.java Index: MIFHandler.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/mif/MIFHandler.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- MIFHandler.java 20 Aug 2003 18:09:45 - 1.11 +++ MIFHandler.java 16 Sep 2003 17:33:06 - 1.12 @@ -73,6 +73,7 @@ import org.apache.fop.fo.flow.ListBlock; import org.apache.fop.fo.flow.ListItem; import org.apache.fop.fo.flow.Table; +import org.apache.fop.fo.flow.TableColumn; import org.apache.fop.fo.flow.TableBody; import org.apache.fop.fo.flow.TableCell; import org.apache.fop.fo.flow.TableRow; @@ -234,6 +235,20 @@ * @see org.apache.fop.fo.FOInputHandler#endTable(Table) */ public void endTable(Table tbl) { +} + +/** + * + * @param tc TableColumn that is starting; + */ +public void startColumn(TableColumn tc) { +} + +/** + * + * @param tc TableColumn that is ending; + */ +public void endColumn(TableColumn tc) { } /** 1.19 +15 -0 xml-fop/src/java/org/apache/fop/rtf/renderer/RTFHandler.java Index: RTFHandler.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/rtf/renderer/RTFHandler.java,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- RTFHandler.java 16 Sep 2003 14:50:16 - 1.18 +++ RTFHandler.java 16 Sep 2003 17:33:07 - 1.19 @@ -66,6 +66,7 @@ import org.apache.fop.fo.flow.ListBlock; import org.apache.fop.fo.flow.ListItem; import org.apache.fop.fo.flow.Table; +import org.apache.fop.fo.flow.TableColumn; import org.apache.fop.fo.flow.TableBody; import org.apache.fop.fo.flow.TableCell; import org.apache.fop.fo.flow.TableRow; @@ -249,6 +250,20
cvs commit: xml-fop/src/java/org/apache/fop/fo/flow Table.java TableCell.java TableColumn.java TableRow.java
vmote 2003/09/16 11:11:52 Modified:src/java/org/apache/fop/fo/flow Table.java TableCell.java TableColumn.java TableRow.java Log: trigger event handling for start and end of table, cell, column, and row, primarily for the benefit of the structure handlers (mif/rtf) -- submitted by Peter Herweg, see http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23103 Revision ChangesPath 1.8 +19 -1 xml-fop/src/java/org/apache/fop/fo/flow/Table.java Index: Table.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/flow/Table.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- Table.java16 Sep 2003 05:21:05 - 1.7 +++ Table.java16 Sep 2003 18:11:52 - 1.8 @@ -53,7 +53,11 @@ // Java import java.util.ArrayList; +// XML +import org.xml.sax.Attributes; + // FOP +import org.apache.fop.apps.FOPException; import org.apache.fop.datatypes.ColorType; import org.apache.fop.datatypes.LengthRange; import org.apache.fop.fo.FONode; @@ -224,5 +228,19 @@ fotv.serveTable(this); } -} +/** + * @see org.apache.fop.fo.FObj#handleAttrs + */ +public void handleAttrs(Attributes attlist) throws FOPException { +super.handleAttrs(attlist); + +setupID(); +getFOTreeControl().getFOInputHandler().startTable(this); +} + +protected void end() { +getFOTreeControl().getFOInputHandler().endTable(this); +} + +} 1.7 +5 -0 xml-fop/src/java/org/apache/fop/fo/flow/TableCell.java Index: TableCell.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/flow/TableCell.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- TableCell.java16 Sep 2003 05:21:05 - 1.6 +++ TableCell.java16 Sep 2003 18:11:52 - 1.7 @@ -159,6 +159,8 @@ public void handleAttrs(Attributes attlist) throws FOPException { super.handleAttrs(attlist); doSetup();// init some basic property values + +getFOTreeControl().getFOInputHandler().startCell(this); } /** @@ -386,4 +388,7 @@ fotv.serveTableCell(this); } +protected void end() { +getFOTreeControl().getFOInputHandler().endCell(this); +} } 1.9 +19 -0 xml-fop/src/java/org/apache/fop/fo/flow/TableColumn.java Index: TableColumn.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/flow/TableColumn.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- TableColumn.java 16 Sep 2003 05:21:05 - 1.8 +++ TableColumn.java 16 Sep 2003 18:11:52 - 1.9 @@ -50,7 +50,11 @@ */ package org.apache.fop.fo.flow; +// XML +import org.xml.sax.Attributes; + // FOP +import org.apache.fop.apps.FOPException; import org.apache.fop.datatypes.ColorType; import org.apache.fop.datatypes.Length; import org.apache.fop.fo.FONode; @@ -168,5 +172,20 @@ fotv.serveTableColumn(this); } +/** + * Overriden from FObj. + * @param attlist Collection of attributes passed to us from the parser. + * @throws FOPException for FO errors + */ +public void handleAttrs(Attributes attlist) throws FOPException { +super.handleAttrs(attlist); +doSetup();// init some basic property values + +getFOTreeControl().getFOInputHandler().startColumn(this); +} + +protected void end() { +getFOTreeControl().getFOInputHandler().endColumn(this); +} } 1.7 +19 -1 xml-fop/src/java/org/apache/fop/fo/flow/TableRow.java Index: TableRow.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/flow/TableRow.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- TableRow.java 16 Sep 2003 05:21:05 - 1.6 +++ TableRow.java 16 Sep 2003 18:11:52 - 1.7 @@ -50,7 +50,11 @@ */ package org.apache.fop.fo.flow; +// XML +import org.xml.sax.Attributes; + // FOP +import org.apache.fop.apps.FOPException; import org.apache.fop.datatypes.ColorType; import org.apache.fop.datatypes.KeepValue; import org.apache.fop.fo.FONode; @@ -162,5 +166,19 @@ fotv.serveTableRow(this); } -} +/** + * @see org.apache.fop.fo.FObj#handleAttrs + */ +public void handleAttrs(Attributes attlist) throws FOPException { +super.handleAttrs(attlist); + +setupID
cvs commit: xml-fop/src/java/org/apache/fop/layoutmgr AddLMVisitor.java
vmote 2003/09/15 10:45:49 Modified:src/java/org/apache/fop/layoutmgr AddLMVisitor.java Log: make instance variables protected instead of private to make subclassing easier Revision ChangesPath 1.18 +3 -3 xml-fop/src/java/org/apache/fop/layoutmgr/AddLMVisitor.java Index: AddLMVisitor.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/AddLMVisitor.java,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- AddLMVisitor.java 12 Sep 2003 18:57:34 - 1.17 +++ AddLMVisitor.java 15 Sep 2003 17:45:49 - 1.18 @@ -140,11 +140,11 @@ /** The List object to which methods in this class should add Layout * Managers */ -private List currentLMList; +protected List currentLMList; /** A List object which can be used to save and restore the currentLMList if * another List should temporarily be used */ -private List saveLMList; +protected List saveLMList; /** * - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/documentation/content/xdocs/dev api-doc.xml conventions.xml doc.xml extensions.xml faq.xml fonts.xml implement.xml index.xml release.xml rtflib.xml svg.xml testing.xml tools.xml
vmote 2003/09/15 13:54:03 Modified:src/documentation/content/xdocs anttask.xml bugs.xml compiling.xml compliance.xml configuration.xml download.xml embedding.xml examples.xml extensions.xml fo.xml fonts.xml gethelp.xml graphics.xml hyphenation.xml index.xml license.xml logocontest.xml maillist.xml news.xml output.xml pdfencryption.xml relnotes.xml resources.xml running.xml servlets.xml status.xml team.xml src/documentation/content/xdocs/design areas.xml breakpos.xml embedding.xml extending.xml fotree.xml images.xml index.xml layout.xml optimise.xml parsing.xml pdf-library.xml properties.xml renderers.xml startup.xml svg.xml useragent.xml src/documentation/content/xdocs/dev api-doc.xml conventions.xml doc.xml extensions.xml faq.xml fonts.xml implement.xml index.xml release.xml rtflib.xml svg.xml testing.xml tools.xml Log: add version tag to most documents Revision ChangesPath 1.6 +1 -0 xml-fop/src/documentation/content/xdocs/anttask.xml Index: anttask.xml === RCS file: /home/cvs/xml-fop/src/documentation/content/xdocs/anttask.xml,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- anttask.xml 30 Jul 2003 22:01:35 - 1.5 +++ anttask.xml 15 Sep 2003 20:54:01 - 1.6 @@ -5,6 +5,7 @@ document header titleAnt task/title +version$Revision$/version /header body p 1.6 +2 -1 xml-fop/src/documentation/content/xdocs/bugs.xml Index: bugs.xml === RCS file: /home/cvs/xml-fop/src/documentation/content/xdocs/bugs.xml,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- bugs.xml 5 Apr 2003 19:29:26 - 1.5 +++ bugs.xml 15 Sep 2003 20:54:01 - 1.6 @@ -4,7 +4,8 @@ document header -titleBugs and Other Trackable Issues/title +titleFOP: Bugs and Other Trackable Issues/title +version$Revision$/version /header body p 1.9 +1 -0 xml-fop/src/documentation/content/xdocs/compiling.xml Index: compiling.xml === RCS file: /home/cvs/xml-fop/src/documentation/content/xdocs/compiling.xml,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- compiling.xml 17 Jun 2003 19:04:05 - 1.8 +++ compiling.xml 15 Sep 2003 20:54:01 - 1.9 @@ -5,6 +5,7 @@ document header titleFOP: Building from Source Code/title +version$Revision$/version /header body section id=build-needed 1.23 +1 -1 xml-fop/src/documentation/content/xdocs/compliance.xml Index: compliance.xml === RCS file: /home/cvs/xml-fop/src/documentation/content/xdocs/compliance.xml,v retrieving revision 1.22 retrieving revision 1.23 diff -u -r1.22 -r1.23 --- compliance.xml1 Sep 2003 12:15:52 - 1.22 +++ compliance.xml15 Sep 2003 20:54:01 - 1.23 @@ -4,7 +4,7 @@ compliance head -titleFOP Standards Compliance/title +titleFOP: Standards Compliance/title subtitleProgress Report on Standard Features Implemented/subtitle /head body 1.15 +1 -0 xml-fop/src/documentation/content/xdocs/configuration.xml Index: configuration.xml === RCS file: /home/cvs/xml-fop/src/documentation/content/xdocs/configuration.xml,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- configuration.xml 11 Jul 2003 19:01:54 - 1.14 +++ configuration.xml 15 Sep 2003 20:54:01 - 1.15 @@ -5,6 +5,7 @@ document header titleFOP: Configuration/title +version$Revision$/version /header body 1.13 +1 -0 xml-fop/src/documentation/content/xdocs/download.xml Index: download.xml === RCS file: /home/cvs/xml-fop/src/documentation/content/xdocs/download.xml,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- download.xml 12 Aug 2003 00:00:52 - 1.12 +++ download.xml 15 Sep 2003 20:54:01 - 1.13 @@ -5,6 +5,7 @@ document header titleFOP: Downloading A Distribution/title +version$Revision
cvs commit: xml-fop/src/documentation/resources/images EmbeddingExampleFO2PDF.svg EmbeddingExampleObj2PDF.svg EmbeddingExampleObj2XML.svg EmbeddingExampleXML2FO.svg EmbeddingExampleXML2PDF.svg
vmote 2003/09/13 12:44:22 Modified:src/documentation/resources/images EmbeddingExampleFO2PDF.svg EmbeddingExampleObj2PDF.svg EmbeddingExampleObj2XML.svg EmbeddingExampleXML2FO.svg EmbeddingExampleXML2PDF.svg Added: src/documentation sitemap-0.5.xmap Log: apply patch submitted by Jeff Turner to get FOP's site working with Forrest 0.5 -- see http://marc.theaimsgroup.com/?l=fop-devm=106327974618690w=2 Revision ChangesPath 1.1 xml-fop/src/documentation/sitemap-0.5.xmap Index: sitemap-0.5.xmap === ?xml version=1.0? !-- === Default Forrest sitemap, defining the whole site. Delegates to the other *.xmap files. See http://xml.apache.org/forrest/sitemap-ref.html $Revision: 1.1 $ -- map:sitemap xmlns:map=http://apache.org/cocoon/sitemap/1.0; map:components map:generators default=file map:generator name=file src=org.apache.cocoon.generation.FileGenerator / !-- map:generator name=html src=org.apache.cocoon.generation.HTMLGenerator jtidy-configjtidy.properties/jtidy-config /map:generator map:generator name=directory src=org.apache.cocoon.generation.DirectoryGenerator / -- /map:generators map:transformers default=xslt !-- Generates @id attributes from title strings -- map:transformer name=idgen src=org.apache.cocoon.transformation.IdGeneratorTransformer element//*[local-name() = 'section']/element idtitle/text()/id /map:transformer !-- Rewrites links, e.g. transforming href=site:index to href=../index.html -- !-- See http://xml.apache.org/forrest/sitemap-ref.html#linkrewriting_impl -- map:transformer name=linkrewriter logger=sitemap.transformer.linkrewriter src=org.apache.cocoon.transformation.LinkRewriterTransformer link-attrshref src/link-attrs schemessite ext/schemes input-module name=site input-module name=linkmap file src={src} reloadable=true / /input-module prefix/site///prefix suffix/@href/suffix /input-module input-module name=ext input-module name=linkmap file src={src} reloadable=true / /input-module prefix/site/external-refs///prefix suffix/@href/suffix /input-module /map:transformer map:transformer name=xpath logger=sitemap.transformer.xpath src=org.apache.cocoon.transformation.XPathTransformer / map:transformer name=xslt src=org.apache.cocoon.transformation.TraxTransformer logger=sitemap.transformer.xslt pool-max=32 pool-min=8 pool-grow=2 use-request-parametersfalse/use-request-parameters use-browser-capabilities-dbfalse/use-browser-capabilities-db use-delifalse/use-deli transformer-factoryorg.apache.xalan.processor.TransformerFactoryImpl/transformer-factory !--transformer-factorycom.icl.saxon.TransformerFactoryImpl/transformer-factory-- !--transformer-factoryorg.apache.xalan.xsltc.trax.TransformerFactoryImpl/transformer-factory-- /map:transformer map:transformer name=xinclude src=org.apache.cocoon.transformation.XIncludeTransformer logger=sitemap.transformer.xinclude pool-grow=2 pool-max=16 pool-min=2 / /map:transformers map:readers default=resource map:reader name=resource src=org.apache.cocoon.reading.ResourceReader/ /map:readers map:serializers default=html map:serializer name=html mime-type=text/html src=org.apache.cocoon.serialization.HTMLSerializer doctype-public-//W3C//DTD HTML 4.01 Transitional//EN/doctype-public doctype-systemhttp://www.w3.org/TR/html4/loose.dtd/doctype-system /map:serializer map:serializer name=xml mime-type=text/xml src=org.apache.cocoon.serialization.XMLSerializer/ map:serializer name=xml-document mime-type=text/xml src=org.apache.cocoon.serialization.XMLSerializer cdata-section-elementssource/cdata-section-elements doctype-public-//APACHE//DTD Documentation V1.2//EN/doctype-public doctype-systemdocument-v12.dtd/doctype-system /map:serializer map:serializer name=fo2pdf src=org.apache.cocoon.serialization.FOPSerializer mime-type=application/pdf / !-- == FOP Additions == -- map:serializer name=svg2pdf mime-type=application/pdf src=org.apache.cocoon.serialization.SVGSerializer parameter name=transcoder value
cvs commit: xml-fop/src/documentation sitemap-0.5.xmap
vmote 2003/09/13 12:57:28 Modified:src/documentation sitemap-0.5.xmap Log: convert DOS line-endings to Unix (oops) Revision ChangesPath 1.2 +441 -441 xml-fop/src/documentation/sitemap-0.5.xmap Index: sitemap-0.5.xmap === RCS file: /home/cvs/xml-fop/src/documentation/sitemap-0.5.xmap,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- sitemap-0.5.xmap 13 Sep 2003 19:44:22 - 1.1 +++ sitemap-0.5.xmap 13 Sep 2003 19:57:28 - 1.2 @@ -1,441 +1,441 @@ -?xml version=1.0? -!-- === -Default Forrest sitemap, defining the whole site. -Delegates to the other *.xmap files. See -http://xml.apache.org/forrest/sitemap-ref.html - -$Revision$ - -- - - -map:sitemap xmlns:map=http://apache.org/cocoon/sitemap/1.0; - map:components -map:generators default=file - map:generator name=file src=org.apache.cocoon.generation.FileGenerator / - !-- - map:generator name=html src=org.apache.cocoon.generation.HTMLGenerator -jtidy-configjtidy.properties/jtidy-config - /map:generator - map:generator name=directory src=org.apache.cocoon.generation.DirectoryGenerator / - -- -/map:generators - -map:transformers default=xslt - !-- Generates @id attributes from title strings -- - map:transformer name=idgen src=org.apache.cocoon.transformation.IdGeneratorTransformer -element//*[local-name() = 'section']/element -idtitle/text()/id - /map:transformer - - !-- Rewrites links, e.g. transforming href=site:index to href=../index.html -- - !-- See http://xml.apache.org/forrest/sitemap-ref.html#linkrewriting_impl -- - map:transformer name=linkrewriter logger=sitemap.transformer.linkrewriter src=org.apache.cocoon.transformation.LinkRewriterTransformer -link-attrshref src/link-attrs -schemessite ext/schemes - -input-module name=site - input-module name=linkmap -file src={src} reloadable=true / - /input-module - prefix/site///prefix - suffix/@href/suffix -/input-module -input-module name=ext - input-module name=linkmap -file src={src} reloadable=true / - /input-module - prefix/site/external-refs///prefix - suffix/@href/suffix -/input-module - /map:transformer - - map:transformer name=xpath logger=sitemap.transformer.xpath src=org.apache.cocoon.transformation.XPathTransformer / - map:transformer name=xslt src=org.apache.cocoon.transformation.TraxTransformer logger=sitemap.transformer.xslt pool-max=32 pool-min=8 pool-grow=2 -use-request-parametersfalse/use-request-parameters -use-browser-capabilities-dbfalse/use-browser-capabilities-db -use-delifalse/use-deli - transformer-factoryorg.apache.xalan.processor.TransformerFactoryImpl/transformer-factory - !--transformer-factorycom.icl.saxon.TransformerFactoryImpl/transformer-factory-- - !--transformer-factoryorg.apache.xalan.xsltc.trax.TransformerFactoryImpl/transformer-factory-- - /map:transformer - - map:transformer name=xinclude src=org.apache.cocoon.transformation.XIncludeTransformer logger=sitemap.transformer.xinclude pool-grow=2 pool-max=16 pool-min=2 / -/map:transformers - -map:readers default=resource - map:reader name=resource src=org.apache.cocoon.reading.ResourceReader/ -/map:readers - -map:serializers default=html - map:serializer name=html mime-type=text/html src=org.apache.cocoon.serialization.HTMLSerializer -doctype-public-//W3C//DTD HTML 4.01 Transitional//EN/doctype-public -doctype-systemhttp://www.w3.org/TR/html4/loose.dtd/doctype-system - /map:serializer - - map:serializer name=xml mime-type=text/xml src=org.apache.cocoon.serialization.XMLSerializer/ - - map:serializer name=xml-document mime-type=text/xml src=org.apache.cocoon.serialization.XMLSerializer -cdata-section-elementssource/cdata-section-elements -doctype-public-//APACHE//DTD Documentation V1.2//EN/doctype-public -doctype-systemdocument-v12.dtd/doctype-system - /map:serializer - - map:serializer name=fo2pdf src=org.apache.cocoon.serialization.FOPSerializer mime-type=application/pdf / - - !-- == FOP Additions == -- - map:serializer name=svg2pdf mime-type=application/pdf src=org.apache.cocoon.serialization.SVGSerializer -parameter name=transcoder value=org.apache.fop.svg.PDFTranscoder/ - /map:serializer
cvs commit: xml-fop/src/java/org/apache/fop/layoutmgr AbstractLayoutManager.java AddLMVisitor.java BlockLayoutManager.java ContentLayoutManager.java LMiter.java LayoutManagerLS.java LayoutProcessor.java PageLayoutManager.java
vmote 2003/09/12 11:57:35 Modified:src/java/org/apache/fop/layoutmgr AbstractLayoutManager.java AddLMVisitor.java BlockLayoutManager.java ContentLayoutManager.java LMiter.java LayoutManagerLS.java LayoutProcessor.java PageLayoutManager.java Log: 1. tie the LMIter objects to their LM parent 2. tie the PageLayoutManager object to its parent LayoutManagerLS 3. create methods for going up the LM tree to get to the LayoutManagerLS 4. store an AddLMVisitor object in LayoutManagerLS so that subclasses can be stored there and used instead of AddLMVisitor itself (so that third-party users can subclass instead of modifying AddLMVisitor) 5. use the stored AddLMVisitor instead of creating one for each LMIter 6. add some accessor methods to AddLMVisitor so that subclasses can use Lists stored therein Revision ChangesPath 1.3 +19 -11 xml-fop/src/java/org/apache/fop/layoutmgr/AbstractLayoutManager.java Index: AbstractLayoutManager.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/AbstractLayoutManager.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- AbstractLayoutManager.java22 Aug 2003 17:42:41 - 1.2 +++ AbstractLayoutManager.java12 Sep 2003 18:57:34 - 1.3 @@ -3,34 +3,34 @@ * *The Apache Software License, Version 1.1 * - * + * * Copyright (C) 1999-2003 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 *[EMAIL PROTECTED] - * + * * 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 @@ -42,12 +42,12 @@ * (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 [EMAIL PROTECTED]. For more information on the Apache * Software Foundation, please see http://www.apache.org/. - */ + */ package org.apache.fop.layoutmgr; import org.apache.fop.fo.FObj; @@ -94,7 +94,7 @@ this.fobj = fo; foID = fobj.getID(); markers = fobj.getMarkers(); -childLMiter = new LMiter(fobj.getChildren()); +childLMiter = new LMiter(this, fobj.getChildren()); } /** @@ -121,6 +121,14 @@ public void setParent(LayoutProcessor lm) { this.parentLM = lm; +} + +public LayoutProcessor getParent() { +return this.parentLM; +} + +public LayoutManagerLS getLayoutManagerLS() { +return getParent().getLayoutManagerLS(); } // /** 1.17 +20 -4 xml-fop/src/java/org/apache/fop/layoutmgr/AddLMVisitor.java Index: AddLMVisitor.java === RCS file: /home
cvs commit: xml-fop/src/java/org/apache/fop/area AreaTree.java
vmote 2003/09/09 23:25:36 Modified:src/java/org/apache/fop/apps Driver.java src/java/org/apache/fop/area AreaTree.java Log: remove unneeded reference to Renderer from within the area package Revision ChangesPath 1.39 +2 -1 xml-fop/src/java/org/apache/fop/apps/Driver.java Index: Driver.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/apps/Driver.java,v retrieving revision 1.38 retrieving revision 1.39 diff -u -r1.38 -r1.39 --- Driver.java 2 Sep 2003 13:56:40 - 1.38 +++ Driver.java 10 Sep 2003 06:25:36 - 1.39 @@ -52,6 +52,7 @@ // FOP import org.apache.fop.area.AreaTree; +import org.apache.fop.area.RenderPagesModel; import org.apache.fop.fo.ElementMapping; import org.apache.fop.fo.FOTreeBuilder; @@ -588,7 +589,7 @@ FOTreeHandler foTreeHandler = (FOTreeHandler)foInputHandler; foTreeHandler.addFOTreeListener(currentDocument); currentDocument.areaTree = new AreaTree(); -currentDocument.atModel = AreaTree.createRenderPagesModel(renderer); +currentDocument.atModel = new RenderPagesModel(renderer); //this.atModel = new CachedRenderPagesModel(renderer); currentDocument.areaTree.setTreeModel(currentDocument.atModel); try { 1.2 +10 -21xml-fop/src/java/org/apache/fop/area/AreaTree.java Index: AreaTree.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/area/AreaTree.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- AreaTree.java 11 Mar 2003 13:05:27 - 1.1 +++ AreaTree.java 10 Sep 2003 06:25:36 - 1.2 @@ -3,34 +3,34 @@ * *The Apache Software License, Version 1.1 * - * + * * Copyright (C) 1999-2003 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 *[EMAIL PROTECTED] - * + * * 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 @@ -42,16 +42,14 @@ * (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 [EMAIL PROTECTED]. For more information on the Apache * Software Foundation, please see http://www.apache.org/. - */ + */ package org.apache.fop.area; -import org.apache.fop.render.Renderer; - import java.util.ArrayList; import java.util.List; import java.util.Map; @@ -87,15 +85,6 @@ // list of id's yet to be resolved and arraylists of pages private Map resolve = new HashMap(); private List treeExtensions = new ArrayList(); - -/** - * Create a render pages area tree model. - * @param rend
cvs commit: xml-fop/src/java/org/apache/fop/render/xml XMLRenderer.java
vmote 2003/09/10 11:42:23 Modified:src/java/org/apache/fop/area/inline Character.java InlineArea.java InlineParent.java Leader.java Space.java Viewport.java Word.java src/java/org/apache/fop/render AbstractRenderer.java src/java/org/apache/fop/render/xml XMLRenderer.java Added: src/java/org/apache/fop/area/inline InlineAreaVisitor.java Log: add InlineAreaVisitor interface to make Area Tree more independent of Rendering Revision ChangesPath 1.2 +15 -16xml-fop/src/java/org/apache/fop/area/inline/Character.java Index: Character.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/area/inline/Character.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- Character.java11 Mar 2003 13:05:40 - 1.1 +++ Character.java10 Sep 2003 18:42:22 - 1.2 @@ -3,34 +3,34 @@ * *The Apache Software License, Version 1.1 * - * + * * Copyright (C) 1999-2003 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 *[EMAIL PROTECTED] - * + * * 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 @@ -42,16 +42,14 @@ * (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 [EMAIL PROTECTED]. For more information on the Apache * Software Foundation, please see http://www.apache.org/. - */ + */ package org.apache.fop.area.inline; -import org.apache.fop.render.Renderer; - /** * Single character inline area. * This inline area holds a single character. @@ -69,12 +67,13 @@ } /** - * Render this inline area. + * Handle InlineAreaVisitor request by passing this back to it. * - * @param renderer the renderer to render this character area + * @param visitor the InlineAreaVisitor wishing to process this. + * @see org.apache.fop.area.inline.InlineAreaVisitor */ -public void render(Renderer renderer) { -renderer.renderCharacter(this); +public void acceptVisitor(InlineAreaVisitor visitor) { +visitor.serveVisitor(this); } /** 1.2 +15 -16xml-fop/src/java/org/apache/fop/area/inline/InlineArea.java Index: InlineArea.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/area/inline/InlineArea.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- InlineArea.java 11 Mar 2003 13:05:40 - 1.1 +++ InlineArea.java 10 Sep 2003 18:42:22 - 1.2 @@ -3,34 +3,34
cvs commit: xml-fop/src/java/org/apache/fop/rtf/renderer RTFHandler.java
vmote 2003/09/09 07:31:08 Modified:src/java/org/apache/fop/rtf/renderer RTFHandler.java Log: add support for font-size and font-weight, as per patch from Peter Herweg (mailto:[EMAIL PROTECTED]) Revision ChangesPath 1.17 +18 -0 xml-fop/src/java/org/apache/fop/rtf/renderer/RTFHandler.java Index: RTFHandler.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/rtf/renderer/RTFHandler.java,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- RTFHandler.java 1 Sep 2003 01:28:51 - 1.16 +++ RTFHandler.java 9 Sep 2003 14:31:08 - 1.17 @@ -186,6 +186,9 @@ RtfAttributes rtfAttr = new RtfAttributes(); attrBlockTextAlign(bl, rtfAttr); attrBlockBackgroundColor(bl, rtfAttr); +attrBlockFontSize(bl, rtfAttr); +attrBlockFontWeight(bl, rtfAttr); + para = sect.newParagraph(rtfAttr); } catch (IOException ioe) { // FIXME could we throw Exception in all FOInputHandler events? @@ -397,6 +400,21 @@ } catch (IOException ioe) { // FIXME could we throw Exception in all FOInputHandler events? throw new Error(IOException: + ioe); +} +} + +private void attrBlockFontSize(Block bl, RtfAttributes rtfAttr){ +int fopValue = bl.properties.get(font-size).getLength().getValue()/500; +rtfAttr.set(fs,fopValue); +} + +private void attrBlockFontWeight(Block bl, RtfAttributes rtfAttr){ +String fopValue = bl.properties.get(font-weight).getString(); +if(fopValue==bold || fopValue==700){ +rtfAttr.set(b,1); +} +else{ +rtfAttr.set(b,0); } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/fo/extensions/svg SVGElementMapping.java
vmote 2003/09/08 09:32:01 Modified:src/java/org/apache/fop/fo/extensions/svg SVGElementMapping.java Log: remove extraneous import statement Revision ChangesPath 1.2 +12 -14 xml-fop/src/java/org/apache/fop/fo/extensions/svg/SVGElementMapping.java Index: SVGElementMapping.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/extensions/svg/SVGElementMapping.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- SVGElementMapping.java28 Aug 2003 19:49:44 - 1.1 +++ SVGElementMapping.java8 Sep 2003 16:32:01 - 1.2 @@ -3,34 +3,34 @@ * *The Apache Software License, Version 1.1 * - * + * * Copyright (C) 1999-2003 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 *[EMAIL PROTECTED] - * + * * 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 @@ -42,12 +42,12 @@ * (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 [EMAIL PROTECTED]. For more information on the Apache * Software Foundation, please see http://www.apache.org/. - */ + */ package org.apache.fop.fo.extensions.svg; import java.util.HashMap; @@ -59,8 +59,6 @@ import org.apache.batik.util.XMLResourceDescriptor; import org.apache.batik.dom.svg.SVGDOMImplementation; -import org.apache.fop.svg.*; - /** * Setup the SVG element mapping. * This adds the svg element mappings used to create the objects @@ -81,7 +79,7 @@ try { XMLResourceDescriptor.setXMLParserClassName( FOFileHandler.getParserClassName()); - + foObjs = new HashMap(); foObjs.put(svg, new SE()); foObjs.put(DEFAULT, new SVGMaker()); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/fo/pagination Flow.java PageSequence.java Title.java
vmote 2003/09/01 18:31:36 Modified:src/java/org/apache/fop/apps Document.java Driver.java src/java/org/apache/fop/fo FONode.java FOText.java FOTreeBuilder.java FOTreeControl.java FObj.java FObjMixed.java src/java/org/apache/fop/fo/flow Block.java Leader.java PageNumber.java PageNumberCitation.java src/java/org/apache/fop/fo/pagination Flow.java PageSequence.java Title.java Log: Remove all storage of fo/FOInputHandler from within the FO Tree itself, in favor of storing it one time in apps/Document and getting it from there when needed. Makes everything cleaner, and uses less memory, at the probable expense of some processing time (to go up the tree to get to Document). Revision ChangesPath 1.7 +15 -2 xml-fop/src/java/org/apache/fop/apps/Document.java Index: Document.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/apps/Document.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- Document.java 1 Sep 2003 19:21:07 - 1.6 +++ Document.java 2 Sep 2003 01:31:36 - 1.7 @@ -62,6 +62,7 @@ import org.apache.fop.area.AreaTreeModel; import org.apache.fop.fo.extensions.Bookmarks; +import org.apache.fop.fo.FOInputHandler; import org.apache.fop.fo.FOTreeControl; import org.apache.fop.fo.FOTreeEvent; import org.apache.fop.fo.FOTreeListener; @@ -112,6 +113,12 @@ private Set idReferences = new HashSet(); /** + * Structure handler used to notify structure events + * such as start end element. + */ +public FOInputHandler foInputHandler; + +/** * Main constructor * @param driver the Driver object that is the parent of this Document */ @@ -383,5 +390,11 @@ return idReferences; } -} +/** + * @return the FOInputHandler for parsing this FO Tree + */ +public FOInputHandler getFOInputHandler() { +return foInputHandler; +} +} 1.37 +1 -0 xml-fop/src/java/org/apache/fop/apps/Driver.java Index: Driver.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/apps/Driver.java,v retrieving revision 1.36 retrieving revision 1.37 diff -u -r1.36 -r1.37 --- Driver.java 23 Aug 2003 17:38:12 - 1.36 +++ Driver.java 2 Sep 2003 01:31:36 - 1.37 @@ -576,6 +576,7 @@ currentDocument = new Document(this); } parser.setContentHandler(getContentHandler()); +currentDocument.foInputHandler = foInputHandler; /** LayoutStrategy is hard-wired for now, but needs to be made accessible through the API and/or configuration */ if (foInputHandler instanceof FOTreeHandler) { 1.11 +0 -7 xml-fop/src/java/org/apache/fop/fo/FONode.java Index: FONode.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/FONode.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- FONode.java 1 Sep 2003 18:33:05 - 1.10 +++ FONode.java 2 Sep 2003 01:31:36 - 1.11 @@ -118,13 +118,6 @@ } /** - * Sets the structure handler to send events to. - * @param foih FOInputHandler instance - */ -public void setFOInputHandler(FOInputHandler foih) { -} - -/** * Do something with the attributes for this element * @param attlist Collection of attributes passed to us from the parser. * @throws FOPException for errors or inconsistencies in the attributes 1.10 +1 -6 xml-fop/src/java/org/apache/fop/fo/FOText.java Index: FOText.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/FOText.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- FOText.java 22 Aug 2003 05:43:27 - 1.9 +++ FOText.java 2 Sep 2003 01:31:36 - 1.10 @@ -76,7 +76,7 @@ * the character array containing the text */ public char[] ca; -private int start; +public int start; /** * the length of the character array containing the text @@ -137,11 +137,6 @@ textInfo = ti; createBlockPointers(); textTransform(); -} - -public void setFOInputHandler(FOInputHandler foih) { -super.setFOInputHandler(foih); -foInputHandler.characters(ca, start, length); } /** 1.16 +0 -1
cvs commit: xml-fop/src/java/org/apache/fop/layoutmgr AddLMVisitor.java
vmote 2003/09/02 06:56:40 Modified:src/java/org/apache/fop/apps Document.java Driver.java src/java/org/apache/fop/fo FONode.java FOTreeBuilder.java FOTreeControl.java FObjMixed.java src/java/org/apache/fop/fo/extensions/svg SVGElement.java src/java/org/apache/fop/fo/flow ExternalGraphic.java src/java/org/apache/fop/layoutmgr AddLMVisitor.java Log: Remove storage of apps/FOUserAgent from fo/FONode in favor of storing it once in a higher level class (currently Driver), and accessing it from there. Cleaner design, uses less memory, at the expense of some additional processing time to come up the tree to find the information. Revision ChangesPath 1.8 +20 -1 xml-fop/src/java/org/apache/fop/apps/Document.java Index: Document.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/apps/Document.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- Document.java 2 Sep 2003 01:31:36 - 1.7 +++ Document.java 2 Sep 2003 13:56:40 - 1.8 @@ -58,6 +58,8 @@ // FOP +import org.apache.fop.apps.FOUserAgent; + import org.apache.fop.area.AreaTree; import org.apache.fop.area.AreaTreeModel; @@ -74,6 +76,9 @@ // SAX import org.xml.sax.SAXException; +// Avalon +import org.apache.avalon.framework.logger.Logger; + /** * Class storing information for the FOP Document being processed, and managing * the processing of it. @@ -395,6 +400,20 @@ */ public FOInputHandler getFOInputHandler() { return foInputHandler; +} + +/** + * @return the Logger to be used for processing this Document + */ +public Logger getLogger() { +return getDriver().getLogger(); +} + +/** + * @return the FOUserAgent used for processing this document + */ +public FOUserAgent getUserAgent() { +return getDriver().getUserAgent(); } } 1.38 +1 -1 xml-fop/src/java/org/apache/fop/apps/Driver.java Index: Driver.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/apps/Driver.java,v retrieving revision 1.37 retrieving revision 1.38 diff -u -r1.37 -r1.38 --- Driver.java 2 Sep 2003 01:31:36 - 1.37 +++ Driver.java 2 Sep 2003 13:56:40 - 1.38 @@ -274,7 +274,7 @@ userAgent = agent; } -private FOUserAgent getUserAgent() { +protected FOUserAgent getUserAgent() { if (userAgent == null) { userAgent = new FOUserAgent(); userAgent.enableLogging(getLogger()); 1.12 +2 -13 xml-fop/src/java/org/apache/fop/fo/FONode.java Index: FONode.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/FONode.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- FONode.java 2 Sep 2003 01:31:36 - 1.11 +++ FONode.java 2 Sep 2003 13:56:40 - 1.12 @@ -69,9 +69,6 @@ * */ public abstract class FONode { - -/** FO User Agent for this node (for logger etc.)*/ -protected FOUserAgent userAgent; /** Parent FO node */ protected FONode parent; /** Name of the node */ @@ -98,15 +95,7 @@ * @return the logger */ public Logger getLogger() { -return userAgent.getLogger(); -} - -/** - * Sets the user agent for the node. - * @param ua the user agent - */ -public void setUserAgent(FOUserAgent ua) { -userAgent = ua; +return getFOTreeControl().getLogger(); } /** @@ -114,7 +103,7 @@ * @return FOUserAgent */ public FOUserAgent getUserAgent() { -return userAgent; +return getFOTreeControl().getUserAgent(); } /** 1.17 +0 -5 xml-fop/src/java/org/apache/fop/fo/FOTreeBuilder.java Index: FOTreeBuilder.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/FOTreeBuilder.java,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- FOTreeBuilder.java2 Sep 2003 01:31:36 - 1.16 +++ FOTreeBuilder.java2 Sep 2003 13:56:40 - 1.17 @@ -278,11 +278,6 @@ try { fobj = fobjMaker.make(currentFObj); fobj.setName(localName); -// set the user agent for resolving user agent values -fobj.setUserAgent(userAgent); -// set the structure handler so that appropriate
cvs commit: xml-fop/src/documentation/content/xdocs compliance.xml
vmote 2003/09/01 05:15:52 Modified:src/documentation/content/xdocs compliance.xml Log: add comments about current implementation of block-container object, submitted by Chris Bowditch [EMAIL PROTECTED]; see http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22811 Revision ChangesPath 1.22 +4 -1 xml-fop/src/documentation/content/xdocs/compliance.xml Index: compliance.xml === RCS file: /home/cvs/xml-fop/src/documentation/content/xdocs/compliance.xml,v retrieving revision 1.21 retrieving revision 1.22 diff -u -r1.21 -r1.22 --- compliance.xml26 Aug 2003 21:56:28 - 1.21 +++ compliance.xml1 Sep 2003 12:15:52 - 1.22 @@ -45,7 +45,10 @@ /level-2 level-2 name=Block Formatting Objects citation=§6.5 extURL=slice6.html#section-N12764-Block-level-Formatting-Objects ref-name=block level-3 name=block citation=§6.5.2 extURL=slice6.html#fo_block compliance-level=1 comply=yes/ - level-3 name=block-container citation=§6.5.3 extURL=slice6.html#fo_block-container compliance-level=2 comply=partial/ + level-3 name=block-container citation=§6.5.3 extURL=slice6.html#fo_block-container compliance-level=2 comply=partial +commentCurrently only works as direct child of fo:flow./comment +commentFor absolute positioning, use 'position=absolute' (as 'absolute-position=absolute' is not implemented), and specify all four of left, top, width and height/comment + /level-3 /level-2 level-2 name=Inline Formatting Objects citation=§6.6 extURL=slice6.html#section-N13277-Inline-level-Formatting-Objects ref-name=inline level-3 name=bidi-override citation=§6.6.2 extURL=slice6.html#fo_bidi-override compliance-level=2 comply=no/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/apps CommandLineOptions.java Document.java FOPException.java FOUserAgent.java InputHandler.java
vmote 2003/09/01 06:31:24 Modified:src/java/org/apache/fop/apps CommandLineOptions.java Document.java FOPException.java FOUserAgent.java InputHandler.java Log: style/javadoc changes only Revision ChangesPath 1.13 +13 -13xml-fop/src/java/org/apache/fop/apps/CommandLineOptions.java Index: CommandLineOptions.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/apps/CommandLineOptions.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- CommandLineOptions.java 12 Aug 2003 22:40:49 - 1.12 +++ CommandLineOptions.java 1 Sep 2003 13:31:24 - 1.13 @@ -64,31 +64,31 @@ */ public class CommandLineOptions { -/* input / output not set */ +/** input / output not set */ public static final int NOT_SET = 0; -/* input: fo file */ +/** input: fo file */ public static final int FO_INPUT = 1; -/* input: xml+xsl file */ +/** input: xml+xsl file */ public static final int XSLT_INPUT = 2; -/* output: pdf file */ +/** output: pdf file */ public static final int PDF_OUTPUT = 1; -/* output: screen using swing */ +/** output: screen using swing */ public static final int AWT_OUTPUT = 2; -/* output: mif file */ +/** output: mif file */ public static final int MIF_OUTPUT = 3; -/* output: sent swing rendered file to printer */ +/** output: sent swing rendered file to printer */ public static final int PRINT_OUTPUT = 4; -/* output: pcl file */ +/** output: pcl file */ public static final int PCL_OUTPUT = 5; -/* output: postscript file */ +/** output: postscript file */ public static final int PS_OUTPUT = 6; -/* output: text file */ +/** output: text file */ public static final int TXT_OUTPUT = 7; -/* output: svg file */ +/** output: svg file */ public static final int SVG_OUTPUT = 8; -/* output: XML area tree */ +/** output: XML area tree */ public static final int AREA_OUTPUT = 9; -/* output: RTF file */ +/** output: RTF file */ public static final int RTF_OUTPUT = 10; /* show configuration information */ 1.5 +12 -4 xml-fop/src/java/org/apache/fop/apps/Document.java Index: Document.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/apps/Document.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- Document.java 26 Aug 2003 19:28:46 - 1.4 +++ Document.java 1 Sep 2003 13:31:24 - 1.5 @@ -95,10 +95,9 @@ */ private LayoutStrategy layoutStrategy = null; -/** - * The current AreaTree for the PageSequence being rendered. - */ +/** The current AreaTree for the PageSequence being rendered. */ public AreaTree areaTree; +/** The AreaTreeModel for the PageSequence being rendered. */ public AreaTreeModel atModel; private Bookmarks bookmarks = null; @@ -350,10 +349,19 @@ return areaTree; } +/** + * Set the Bookmarks object for this Document + * @param bookmarks the Bookmarks object containing the bookmarks for this + * Document + */ public void setBookmarks(Bookmarks bookmarks) { this.bookmarks = bookmarks; } +/** + * Public accessor for the Bookmarks for this Document + * @return the Bookmarks for this Document + */ public Bookmarks getBookmarks() { return bookmarks; } 1.3 +4 -0 xml-fop/src/java/org/apache/fop/apps/FOPException.java Index: FOPException.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/apps/FOPException.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- FOPException.java 5 Jul 2003 09:28:34 - 1.2 +++ FOPException.java 1 Sep 2003 13:31:24 - 1.3 @@ -105,6 +105,10 @@ return exception; } +/** + * Attempts to recast the exception as other Throwable types. + * @return the exception recast as another type if possible, otherwise null. + */ protected Throwable getRootException() { Throwable result = exception; 1.4 +3 -1 xml-fop/src/java/org/apache/fop/apps/FOUserAgent.java Index: FOUserAgent.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/apps/FOUserAgent.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4
cvs commit: xml-fop/src/java/org/apache/fop/fo ToBeImplementedElement.java Unknown.java UnknownXMLObj.java XMLElement.java XMLObj.java
vmote 2003/09/01 06:42:35 Modified:src/java/org/apache/fop/fo ToBeImplementedElement.java Unknown.java UnknownXMLObj.java XMLElement.java XMLObj.java Log: style/javadoc changes only Revision ChangesPath 1.4 +6 -0 xml-fop/src/java/org/apache/fop/fo/ToBeImplementedElement.java Index: ToBeImplementedElement.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/ToBeImplementedElement.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- ToBeImplementedElement.java 19 Aug 2003 00:53:52 - 1.3 +++ ToBeImplementedElement.java 1 Sep 2003 13:42:35 - 1.4 @@ -67,6 +67,12 @@ + \ is not yet implemented.); } +/** + * This is a hook for an FOTreeVisitor subclass to be able to access + * this object. + * @param fotv the FOTreeVisitor subclass that can access this object. + * @see org.apache.fop.fo.FOTreeVisitor + */ public void acceptVisitor(FOTreeVisitor fotv) { fotv.serveVisitor(this); } 1.4 +6 -0 xml-fop/src/java/org/apache/fop/fo/Unknown.java Index: Unknown.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/Unknown.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- Unknown.java 19 Aug 2003 00:53:53 - 1.3 +++ Unknown.java 1 Sep 2003 13:42:35 - 1.4 @@ -84,6 +84,12 @@ getLogger().debug(Layout Unknown element); } +/** + * This is a hook for an FOTreeVisitor subclass to be able to access + * this object. + * @param fotv the FOTreeVisitor subclass that can access this object. + * @see org.apache.fop.fo.FOTreeVisitor + */ public void acceptVisitor(FOTreeVisitor fotv) { fotv.serveVisitor(this); } 1.4 +6 -0 xml-fop/src/java/org/apache/fop/fo/UnknownXMLObj.java Index: UnknownXMLObj.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/UnknownXMLObj.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- UnknownXMLObj.java19 Aug 2003 00:53:53 - 1.3 +++ UnknownXMLObj.java1 Sep 2003 13:42:35 - 1.4 @@ -118,6 +118,12 @@ super.addCharacters(data, start, length); } +/** + * This is a hook for an FOTreeVisitor subclass to be able to access + * this object. + * @param fotv the FOTreeVisitor subclass that can access this object. + * @see org.apache.fop.fo.FOTreeVisitor + */ public void acceptVisitor(FOTreeVisitor fotv) { fotv.serveVisitor(this); } 1.3 +6 -0 xml-fop/src/java/org/apache/fop/fo/XMLElement.java Index: XMLElement.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/XMLElement.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- XMLElement.java 19 Aug 2003 00:53:53 - 1.2 +++ XMLElement.java 1 Sep 2003 13:42:35 - 1.3 @@ -86,6 +86,12 @@ return namespace; } +/** + * This is a hook for an FOTreeVisitor subclass to be able to access + * this object. + * @param fotv the FOTreeVisitor subclass that can access this object. + * @see org.apache.fop.fo.FOTreeVisitor + */ public void acceptVisitor(FOTreeVisitor fotv) { fotv.serveVisitor(this); } 1.5 +6 -0 xml-fop/src/java/org/apache/fop/fo/XMLObj.java Index: XMLObj.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/XMLObj.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- XMLObj.java 19 Aug 2003 00:53:53 - 1.4 +++ XMLObj.java 1 Sep 2003 13:42:35 - 1.5 @@ -231,6 +231,12 @@ element.appendChild(text); } +/** + * This is a hook for an FOTreeVisitor subclass to be able to access + * this object. + * @param fotv the FOTreeVisitor subclass that can access this object. + * @see org.apache.fop.fo.FOTreeVisitor + */ public void acceptVisitor(FOTreeVisitor fotv) { fotv.serveVisitor(this); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/layoutmgr PageLayoutManager.java
vmote 2003/09/01 07:11:51 Modified:src/java/org/apache/fop/layoutmgr PageLayoutManager.java Log: 1. reduce visibility of many classes 2. some style/javadoc changes Revision ChangesPath 1.19 +11 -15xml-fop/src/java/org/apache/fop/layoutmgr/PageLayoutManager.java Index: PageLayoutManager.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/PageLayoutManager.java,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- PageLayoutManager.java29 Aug 2003 20:02:11 - 1.18 +++ PageLayoutManager.java1 Sep 2003 14:11:51 - 1.19 @@ -92,7 +92,7 @@ import java.awt.Rectangle; import java.util.Iterator; import java.awt.geom.Rectangle2D; -import org.apache.fop.traits.*; +import org.apache.fop.traits.MinOptMax; /** * LayoutManager for a PageSequence and its flow. @@ -610,7 +610,7 @@ * * @param breakVal the break value to handle */ -protected void handleBreak(int breakVal) { +private void handleBreak(int breakVal) { if (breakVal == Constants.COLUMN) { if (curSpan != null curSpan.getColumnCount() != curSpanColumns) { @@ -727,7 +727,7 @@ * @return the page viewport created for the page number * @throws FOPException if there is an error creating page */ -public PageViewport createPage(boolean bIsBlank, boolean bIsLast) +private PageViewport createPage(boolean bIsBlank, boolean bIsLast) throws FOPException { currentSimplePageMaster = getSimplePageMasterToUse(bIsBlank); Region body = currentSimplePageMaster.getRegion(Region.BODY); @@ -760,7 +760,7 @@ .getNextSimplePageMaster(isOddPage, isFirstPage, bIsBlank); } -public PageViewport createPageAreas(SimplePageMaster spm) { +private PageViewport createPageAreas(SimplePageMaster spm) { int pageWidth = spm.properties.get(page-width).getLength().getValue(); int pageHeight = @@ -819,8 +819,8 @@ * @param pageCTM page coordinate transformation matrix * @return the new region viewport */ -public RegionViewport makeRegionViewport(Region r, FODimension reldims, CTM pageCTM) { -Rectangle2D relRegionRect = r. getViewportRectangle(reldims); +private RegionViewport makeRegionViewport(Region r, FODimension reldims, CTM pageCTM) { +Rectangle2D relRegionRect = r.getViewportRectangle(reldims); Rectangle2D absRegionRect = pageCTM.transform(relRegionRect); // Get the region viewport rectangle in absolute coords by // transforming it using the page CTM @@ -836,7 +836,7 @@ * * @param r the region viewport */ -protected void setRegionViewportTraits(Region r, RegionViewport rv) { +private void setRegionViewportTraits(Region r, RegionViewport rv) { // Common Border, Padding, and Background Properties CommonBorderAndPadding bap = r.getPropertyManager().getBorderAndPadding(); CommonBackground bProps = r.getPropertyManager().getBackgroundProps(); @@ -844,11 +844,7 @@ TraitSetter.addBackground(rv, bProps); } -/** - * Override the inherited method. - * @see org.apache.fop.fo.pagination.Region#makeRegionReferenceArea(Rectangle2D) - */ -public RegionReference makeRegionBodyReferenceArea(Region r, +private RegionReference makeRegionBodyReferenceArea(Region r, Rectangle2D absRegVPRect) { // Should set some column stuff here I think, or put it elsewhere BodyRegion body = new BodyRegion(); @@ -877,7 +873,7 @@ * height=top-bottom * @return a new region reference area */ -public RegionReference makeRegionReferenceArea(Region r, +private RegionReference makeRegionReferenceArea(Region r, Rectangle2D absRegVPRect) { RegionReference rr = new RegionReference(r.getRegionClassCode()); setRegionPosition(r, rr, absRegVPRect); @@ -892,7 +888,7 @@ * @param r the region reference area * @param absRegVPRect the rectangle to place the region contents */ -public void setRegionPosition(Region r, RegionReference rr, +private void setRegionPosition(Region r, RegionReference rr, Rectangle2D absRegVPRect) { FODimension reldims = new FODimension(0, 0); rr.setCTM(CTM.getCTMandRelDims(r.getPropertyManager().getAbsRefOrient(), @@ -902,7 +898,7 @@ /** * @return a StaticContent layout manager */ -public StaticContentLayoutManager getStaticContentLayoutManager(StaticContent sc) { +private
cvs commit: xml-fop/src/java/org/apache/fop/render/ps PSRenderer.java
vmote 2003/09/01 07:19:35 Modified:src/java/org/apache/fop/render AbstractRenderer.java src/java/org/apache/fop/render/awt AWTRenderer.java src/java/org/apache/fop/render/pdf PDFRenderer.java src/java/org/apache/fop/render/ps PSRenderer.java Log: clean up some gump javadoc warnings Revision ChangesPath 1.12 +2 -2 xml-fop/src/java/org/apache/fop/render/AbstractRenderer.java Index: AbstractRenderer.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/render/AbstractRenderer.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- AbstractRenderer.java 1 Sep 2003 01:28:51 - 1.11 +++ AbstractRenderer.java 1 Sep 2003 14:19:34 - 1.12 @@ -330,8 +330,8 @@ /** * Handle the traits for a region - * This is used to draw the traits for the given page region - * (see Sect. 6.4.1.2 of XSL-FO spec.) + * This is used to draw the traits for the given page region. + * (See Sect. 6.4.1.2 of XSL-FO spec.) * @param rv the RegionViewport whose region is to be drawn */ protected void handleRegionTraits(RegionViewport rv) { 1.11 +17 -17xml-fop/src/java/org/apache/fop/render/awt/AWTRenderer.java Index: AWTRenderer.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/render/awt/AWTRenderer.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- AWTRenderer.java 1 Sep 2003 01:28:51 - 1.10 +++ AWTRenderer.java 1 Sep 2003 14:19:34 - 1.11 @@ -106,7 +106,7 @@ protected double scaleFactor = 100.0; protected int pageNumber = 0; protected Vector pageViewportList = new java.util.Vector(); -protected Vector pageList = new java.util.Vector(); +protected Vector pageList = new java.util.Vector(); protected BufferedImage currentPageImage = null; /** Font configuration */ @@ -243,15 +243,15 @@ frame.setStatus(translator.getString(Status.Build.FO.tree)); return frame; } - + /** This method override only stores the PageViewport in a vector. * No actual rendering performed -- this is done by getPageImage(pageNum) instead. * @param pageViewport the codePageViewport/code object supplied by the Area Tree - * @see org.apache.fop.render.Renderer + * @see org.apache.fop.render.Renderer */ public void renderPage(PageViewport pageViewport) throws IOException, FOPException { pageViewportList.add(pageViewport); -pageList.add(pageViewport.getPage().clone()); +pageList.add(pageViewport.getPage().clone()); } /** Generates a desired page from the renderer's page viewport vector. @@ -261,13 +261,13 @@ */ public BufferedImage getPageImage(int pageNum) throws FOPException { if (pageNum 0 || pageNum = pageViewportList.size()) { -throw new FOPException(out-of-range page number ( + pageNum -+ ) requested; only + pageViewportList.size() +throw new FOPException(out-of-range page number ( + pageNum ++ ) requested; only + pageViewportList.size() + page(s) available.); } PageViewport pageViewport = (PageViewport) pageViewportList.get(pageNum); Page page = (Page) pageList.get(pageNum); - + Rectangle2D bounds = pageViewport.getViewArea(); int pageWidth = (int)((float) bounds.getWidth() / 1000f + .5); int pageHeight = (int)((float) bounds.getHeight() / 1000f + .5); @@ -276,7 +276,7 @@ + + bounds.getY() + + bounds.getWidth() + + bounds.getHeight()); -*/ +*/ currentPageImage = new BufferedImage((int)((pageWidth * (int)scaleFactor) / 100), (int)((pageHeight * (int)scaleFactor) / 100), @@ -290,7 +290,7 @@ AffineTransform at = graphics.getTransform(); at.scale(scaleFactor / 100.0, scaleFactor / 100.0); graphics.setTransform(at); - + // draw page frame graphics.setColor(Color.white); graphics.fillRect(0, 0, pageWidth, pageHeight); @@ -309,8 +309,8 @@ /** * Handle the traits for a region - * This is used to draw the traits for the given page region - * (see Sect. 6.4.1.2 of XSL-FO spec.) + * This is used to draw the traits for the given page region. + * (See Sect. 6.4.1.2 of XSL-FO spec.) * @param region the RegionViewport whose region is to be drawn */ protected void
cvs commit: xml-fop/src/java/org/apache/fop/fo FOInputHandler.java FOTreeControl.java FObj.java
vmote 2003/09/01 12:21:08 Modified:src/java/org/apache/fop/apps Document.java src/java/org/apache/fop/fo FOInputHandler.java FOTreeControl.java FObj.java Log: move storage of ID references from fo/FOInputHandler to fo/FOTreeControl (implemented in apps/Document) Revision ChangesPath 1.6 +18 -1 xml-fop/src/java/org/apache/fop/apps/Document.java Index: Document.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/apps/Document.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- Document.java 1 Sep 2003 13:31:24 - 1.5 +++ Document.java 1 Sep 2003 19:21:07 - 1.6 @@ -53,6 +53,9 @@ // Java import java.util.Map; import java.io.IOException; +import java.util.Set; +import java.util.HashSet; + // FOP import org.apache.fop.area.AreaTree; @@ -103,6 +106,12 @@ private Bookmarks bookmarks = null; /** + * The current set of id's in the FO tree. + * This is used so we know if the FO tree contains duplicates. + */ +private Set idReferences = new HashSet(); + +/** * Main constructor * @param driver the Driver object that is the parent of this Document */ @@ -364,6 +373,14 @@ */ public Bookmarks getBookmarks() { return bookmarks; +} + +/** + * Retuns the set of ID references. + * @return the ID references + */ +public Set getIDReferences() { +return idReferences; } } 1.8 +1 -19 xml-fop/src/java/org/apache/fop/fo/FOInputHandler.java Index: FOInputHandler.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/FOInputHandler.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- FOInputHandler.java 21 Aug 2003 19:22:21 - 1.7 +++ FOInputHandler.java 1 Sep 2003 19:21:07 - 1.8 @@ -50,10 +50,6 @@ */ package org.apache.fop.fo; -// Java -import java.util.Set; -import java.util.HashSet; - // Avalon import org.apache.avalon.framework.logger.AbstractLogEnabled; @@ -87,12 +83,6 @@ */ public abstract class FOInputHandler extends AbstractLogEnabled { /** - * The current set of id's in the FO tree. - * This is used so we know if the FO tree contains duplicates. - */ -private Set idReferences = new HashSet(); - -/** * The FOTreeControl object that is controlling the FO Tree being built */ public FOTreeControl foTreeControl = null; @@ -104,14 +94,6 @@ */ public FOInputHandler(FOTreeControl foTreeControl) { this.foTreeControl = foTreeControl; -} - -/** - * Retuns the set of ID references. - * @return the ID references - */ -public Set getIDReferences() { -return idReferences; } /** 1.6 +8 -1 xml-fop/src/java/org/apache/fop/fo/FOTreeControl.java Index: FOTreeControl.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/FOTreeControl.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- FOTreeControl.java1 Sep 2003 18:33:05 - 1.5 +++ FOTreeControl.java1 Sep 2003 19:21:07 - 1.6 @@ -53,6 +53,7 @@ // Java import java.util.Map; +import java.util.Set; // FOP import org.apache.fop.fo.extensions.Bookmarks; @@ -106,5 +107,11 @@ * @return the Bookmark object encapsulating the bookmarks for the FO Tree. */ Bookmarks getBookmarks(); + +/** + * Returns the set of ID references found in the FO Tree. + * @return the ID references + */ +Set getIDReferences(); } 1.16 +1 -1 xml-fop/src/java/org/apache/fop/fo/FObj.java Index: FObj.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/FObj.java,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- FObj.java 24 Aug 2003 22:15:51 - 1.15 +++ FObj.java 1 Sep 2003 19:21:07 - 1.16 @@ -285,7 +285,7 @@ if (prop != null) { String str = prop.getString(); if (str != null !str.equals()) { -Set idrefs = foInputHandler.getIDReferences(); +Set idrefs = getFOTreeControl().getIDReferences(); if (!idrefs.contains(str)) { id = str; idrefs.add(id
cvs commit: xml-fop/src/java/org/apache/fop/fo FONode.java FOTreeBuilder.java FOTreeControl.java FObjMixed.java GenericShorthandParser.java InlineCharIterator.java OneCharIterator.java PropertyManager.java XMLElement.java
vmote 2003/09/01 11:33:06 Modified:src/java/org/apache/fop/fo FONode.java FOTreeBuilder.java FOTreeControl.java FObjMixed.java GenericShorthandParser.java InlineCharIterator.java OneCharIterator.java PropertyManager.java XMLElement.java Log: checkstyle/javadoc changes only Revision ChangesPath 1.10 +4 -2 xml-fop/src/java/org/apache/fop/fo/FONode.java Index: FONode.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/FONode.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- FONode.java 22 Aug 2003 17:42:41 - 1.9 +++ FONode.java 1 Sep 2003 18:33:05 - 1.10 @@ -61,9 +61,8 @@ // FOP import org.apache.fop.apps.FOPException; -import org.apache.fop.fo.FOTreeControl; import org.apache.fop.util.CharUtilities; -import org.apache.fop.apps.*; +import org.apache.fop.apps.FOUserAgent; /** * base class for nodes in the XML tree @@ -197,6 +196,9 @@ return null; } +/** + * @return an iterator for the characters in this node + */ public CharIterator charIterator() { return new OneCharIterator(CharUtilities.CODE_EOT); } 1.15 +2 -2 xml-fop/src/java/org/apache/fop/fo/FOTreeBuilder.java Index: FOTreeBuilder.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/FOTreeBuilder.java,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- FOTreeBuilder.java28 Aug 2003 19:49:44 - 1.14 +++ FOTreeBuilder.java1 Sep 2003 18:33:05 - 1.15 @@ -54,7 +54,6 @@ import java.util.HashMap; import java.util.Map; import java.util.Set; -import org.apache.fop.fo.FOTreeControl; import org.apache.fop.fo.pagination.Root; // SAX @@ -74,7 +73,7 @@ import java.util.Enumeration; import java.util.Iterator; import java.util.List; -import org.apache.fop.apps.*; +import org.apache.fop.apps.FOUserAgent; /** * SAX Handler that passes parsed data to the various @@ -123,6 +122,7 @@ private FOUserAgent userAgent; +/** The FOTreeControl object managing the FO Tree that is being built */ public FOTreeControl foTreeControl; /** 1.5 +37 -12xml-fop/src/java/org/apache/fop/fo/FOTreeControl.java Index: FOTreeControl.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/FOTreeControl.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- FOTreeControl.java26 Aug 2003 17:15:14 - 1.4 +++ FOTreeControl.java1 Sep 2003 18:33:05 - 1.5 @@ -66,20 +66,45 @@ * with information about the environment, and to keep track of meta-type * information. */ - public interface FOTreeControl { -public String fontLookup(String family, String style, +/** + * @param family the font family + * @param style the font style + * @param weight the font weight + * @return the String font name matching the parameters + */ +String fontLookup(String family, String style, int weight); -public FontMetrics getMetricsFor(String fontName); - -public boolean isSetupValid(); - -public Map getFonts(); - -public void setBookmarks(Bookmarks bookmarks); - -public Bookmarks getBookmarks(); +/** + * @param fontName the String containing the font name for which a + * FontMetrics object is desired + * @return the FontMetrics object matching the fontName parameter + */ +FontMetrics getMetricsFor(String fontName); + +/** + * @return true if the default font has been properly setup + */ +boolean isSetupValid(); + +/** + * @return a Map containing the Fonts used in this FO Tree + */ +Map getFonts(); + +/** + * Sets the Bookmark object which encapsulates the bookmarks for the FO + * Tree. + * @param bookmarks the Bookmark object encapsulating the bookmarks for this + * FO Tree. + */ +void setBookmarks(Bookmarks bookmarks); + +/** + * @return the Bookmark object encapsulating the bookmarks for the FO Tree. + */ +Bookmarks getBookmarks(); } 1.12 +0 -2 xml-fop/src/java/org/apache/fop/fo/FObjMixed.java Index: FObjMixed.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/FObjMixed.java,v retrieving revision 1.11
cvs commit: xml-fop/src/java/org/apache/fop/layoutmgr LayoutManagerLS.java
vmote 2003/09/01 11:48:10 Modified:src/java/org/apache/fop/layoutmgr LayoutManagerLS.java Log: remove some convoluted and unnecessary logic -- we already know the Document that is being processed Revision ChangesPath 1.12 +4 -8 xml-fop/src/java/org/apache/fop/layoutmgr/LayoutManagerLS.java Index: LayoutManagerLS.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/LayoutManagerLS.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- LayoutManagerLS.java 27 Aug 2003 19:00:10 - 1.11 +++ LayoutManagerLS.java 1 Sep 2003 18:48:10 - 1.12 @@ -149,13 +149,9 @@ data.addSubData(createBookmarkData(out)); } // add data to area tree for resolving and handling -if (document.getBookmarks().getFOInputHandler() instanceof FOTreeHandler) { -FOTreeHandler foth = (FOTreeHandler)document.getBookmarks().getFOInputHandler(); -Document doc = (Document)foth.foTreeControl; -AreaTree at = doc.getAreaTree(); -at.addTreeExtension(data); -data.setAreaTree(at); -} +AreaTree at = document.getAreaTree(); +at.addTreeExtension(data); +data.setAreaTree(at); } /** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/render/pdf FopPDFImage.java
vmote 2003/08/30 10:59:54 Modified:src/java/org/apache/fop/image AbstractFopImage.java FopImage.java GifImage.java JAIImage.java JimiImage.java src/java/org/apache/fop/render/pdf FopPDFImage.java Log: for generic FOP image processing (i.e. not related to rendering), use java.awt.Color instead of pdf.PDFColor Revision ChangesPath 1.3 +15 -15xml-fop/src/java/org/apache/fop/image/AbstractFopImage.java Index: AbstractFopImage.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/image/AbstractFopImage.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- AbstractFopImage.java 22 Aug 2003 17:42:41 - 1.2 +++ AbstractFopImage.java 30 Aug 2003 17:59:53 - 1.3 @@ -3,34 +3,34 @@ * *The Apache Software License, Version 1.1 * - * + * * Copyright (C) 1999-2003 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 *[EMAIL PROTECTED] - * + * * 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 @@ -42,21 +42,21 @@ * (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 [EMAIL PROTECTED]. For more information on the Apache * Software Foundation, please see http://www.apache.org/. - */ + */ package org.apache.fop.image; // Java import java.awt.color.ColorSpace; import java.awt.color.ICC_Profile; import java.io.InputStream; +import java.awt.Color; // FOP -import org.apache.fop.pdf.PDFColor; import org.apache.fop.apps.FOUserAgent; /** @@ -117,9 +117,9 @@ protected boolean isTransparent = false; /** - * Transparent color (org.apache.fop.pdf.PDFColor). + * Transparent color (java.awt.Color). */ -protected PDFColor transparentColor = null; +protected Color transparentColor = null; /** * Constructor. @@ -290,9 +290,9 @@ /** * Return the transparent color. - * @return the transparent color (org.apache.fop.pdf.PDFColor) + * @return the transparent color (java.awt.Color) */ -public PDFColor getTransparentColor() { +public Color getTransparentColor() { return this.transparentColor; } 1.4 +2 -2 xml-fop/src/java/org/apache/fop/image/FopImage.java Index: FopImage.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/image/FopImage.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- FopImage.java 22 Aug 2003 17:42:41 - 1.3 +++ FopImage.java 30 Aug 2003 17:59:53 - 1.4 @@ -53,8 +53,8 @@ import
cvs commit: xml-fop/src/java/org/apache/fop/image FopImage.java
vmote 2003/08/30 11:05:24 Modified:src/java/org/apache/fop/image FopImage.java Log: remove todo item for disconnecting image processing from pdf Revision ChangesPath 1.5 +0 -1 xml-fop/src/java/org/apache/fop/image/FopImage.java Index: FopImage.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/image/FopImage.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- FopImage.java 30 Aug 2003 17:59:53 - 1.4 +++ FopImage.java 30 Aug 2003 18:05:24 - 1.5 @@ -137,7 +137,6 @@ /** * For transparent images. Returns the transparent color. * @return the transparent color - * (todo) Remove the PDF dependency */ Color getTransparentColor(); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/pdf PDFFactory.java
vmote 2003/08/30 11:52:35 Modified:src/java/org/apache/fop/fonts CIDFont.java MultiByteFont.java src/java/org/apache/fop/pdf PDFFactory.java Log: 1. move some data structures related to used glyphs from fonts/MultiByteFont to superclass fonts/CIDFont 2. move getSubsetWidths() from fonts/CIDFont (and subclass) to pdf/PDFFactory Revision ChangesPath 1.5 +16 -8 xml-fop/src/java/org/apache/fop/fonts/CIDFont.java Index: CIDFont.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fonts/CIDFont.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- CIDFont.java 23 Aug 2003 17:38:12 - 1.4 +++ CIDFont.java 30 Aug 2003 18:52:35 - 1.5 @@ -50,13 +50,28 @@ */ package org.apache.fop.fonts; -import org.apache.fop.pdf.PDFWArray; +//Java +import java.util.Map; /** * Abstract base class for CID fonts. */ public abstract class CIDFont extends CustomFont { +/** + * usedGlyphs contains orginal, new glyph index + */ +public Map usedGlyphs = new java.util.HashMap(); + +/** + * usedGlyphsIndex contains new glyph, original index + */ +public Map usedGlyphsIndex = new java.util.HashMap(); +public int usedGlyphsCount = 0; + +//private PDFWArray warray = new PDFWArray(); +public int width[] = null; + // Required /** * Returns the name of the base font. @@ -106,12 +121,5 @@ public boolean isMultiByte() { return true; } - -/** - * Returns a PDFWArray containing all the widths of the subset to be used. - * @return the character widths - * (todo) Try to avoid dependency on PDF library - */ -public abstract PDFWArray getSubsetWidths(); } 1.4 +0 -34 xml-fop/src/java/org/apache/fop/fonts/MultiByteFont.java Index: MultiByteFont.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fonts/MultiByteFont.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- MultiByteFont.java23 Aug 2003 17:38:12 - 1.3 +++ MultiByteFont.java30 Aug 2003 18:52:35 - 1.4 @@ -53,9 +53,6 @@ //Java import java.util.Map; -//FOP -import org.apache.fop.pdf.PDFWArray; - /** * Generic MultiByte (CID) font */ @@ -73,24 +70,10 @@ private CIDFontType cidType = CIDFontType.CIDTYPE2; private String namePrefix = null;// Quasi unique prefix -//private PDFWArray warray = new PDFWArray(); -private int width[] = null; private BFEntry[] bfentries = null; /** - * usedGlyphs contains orginal, new glyph index - */ -private Map usedGlyphs = new java.util.HashMap(); - -/** - * usedGlyphsIndex contains new glyph, original index - */ -private Map usedGlyphsIndex = new java.util.HashMap(); -private int usedGlyphsCount = 0; - - -/** * Default constructor */ public MultiByteFont() { @@ -223,23 +206,6 @@ arr[i] *= size; */ return arr; -} - -/** - * @see org.apache.fop.fonts.CIDFont#getSubsetWidths() - */ -public PDFWArray getSubsetWidths() { -// Create widths for reencoded chars -PDFWArray warray = new PDFWArray(); -int[] tmpWidth = new int[usedGlyphsCount]; - -for (int i = 0; i usedGlyphsCount; i++) { -Integer nw = (Integer)usedGlyphsIndex.get(new Integer(i)); -int nwx = (nw == null) ? 0 : nw.intValue(); -tmpWidth[i] = width[nwx]; -} -warray.addEntry(0, tmpWidth); -return warray; } /** 1.6 +54 -41xml-fop/src/java/org/apache/fop/pdf/PDFFactory.java Index: PDFFactory.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/pdf/PDFFactory.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- PDFFactory.java 14 Aug 2003 14:59:56 - 1.5 +++ PDFFactory.java 30 Aug 2003 18:52:35 - 1.6 @@ -3,34 +3,34 @@ * *The Apache Software License, Version 1.1 * - * + * * Copyright (C) 1999-2003 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
cvs commit: xml-fop/src/java/org/apache/fop/layoutmgr PageLayoutManager.java
vmote 2003/08/29 13:02:11 Modified:src/java/org/apache/fop/layoutmgr PageLayoutManager.java Log: store a collection of StaticContentLayoutManager objects, keyed by flow-name, to be used instead of creating new ones each time one is needed Revision ChangesPath 1.18 +14 -1 xml-fop/src/java/org/apache/fop/layoutmgr/PageLayoutManager.java Index: PageLayoutManager.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/PageLayoutManager.java,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- PageLayoutManager.java28 Aug 2003 19:08:58 - 1.17 +++ PageLayoutManager.java29 Aug 2003 20:02:11 - 1.18 @@ -88,6 +88,7 @@ import java.util.ArrayList; import java.util.List; import java.util.Map; +import java.util.HashMap; import java.awt.Rectangle; import java.util.Iterator; import java.awt.geom.Rectangle2D; @@ -149,6 +150,12 @@ private SimplePageMaster currentSimplePageMaster; /** + * The collection of StaticContentLayoutManager objects that are associated + * with this Page Sequence, keyed by flow-name. + */ +private HashMap staticContentLMs = new HashMap(4); + +/** * This is the top level layout manager. * It is created by the PageSequence FO. * @@ -896,9 +903,15 @@ * @return a StaticContent layout manager */ public StaticContentLayoutManager getStaticContentLayoutManager(StaticContent sc) { -StaticContentLayoutManager lm = new StaticContentLayoutManager(); +StaticContentLayoutManager lm = +(StaticContentLayoutManager)staticContentLMs.get(sc.getFlowName()); +if (lm != null) { +return lm; +} +lm = new StaticContentLayoutManager(); lm.setUserAgent(getUserAgent()); lm.setFObj(sc); +staticContentLMs.put(sc.getFlowName(), lm); return lm; } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/render/xml XMLRenderer.java
vmote 2003/08/28 10:13:22 Modified:src/java/org/apache/fop/apps FOUserAgent.java src/java/org/apache/fop/render AbstractRenderer.java src/java/org/apache/fop/render/pdf PDFRenderer.java src/java/org/apache/fop/render/ps PSRenderer.java src/java/org/apache/fop/render/svg SVGRenderer.java src/java/org/apache/fop/render/xml XMLRenderer.java Log: move setDefaultXMLHandler() and addXMLHandler() from apps/FOUserAgent to render/AbstractRenderer Revision ChangesPath 1.2 +3 -27 xml-fop/src/java/org/apache/fop/apps/FOUserAgent.java Index: FOUserAgent.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/apps/FOUserAgent.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- FOUserAgent.java 22 Aug 2003 17:42:41 - 1.1 +++ FOUserAgent.java 28 Aug 2003 17:13:22 - 1.2 @@ -90,8 +90,8 @@ public class FOUserAgent implements LogEnabled { private Logger log; -private Map defaults = new java.util.HashMap(); -private Map handlers = new java.util.HashMap(); +public Map defaults = new java.util.HashMap(); +public Map handlers = new java.util.HashMap(); private String baseURL; private PDFEncryptionParams pdfEncryptionParams; private float px2mm = 0.3528f; //72dpi (=25.4/dpi) @@ -186,30 +186,6 @@ */ public boolean linkToFootnotes() { return true; -} - -/** - * Set the default xml handler for the given mime type. - * @param mime MIME type - * @param handler XMLHandler to use - */ -public void setDefaultXMLHandler(String mime, XMLHandler handler) { -defaults.put(mime, handler); -} - -/** - * Add an xml handler for the given mime type and xml namespace. - * @param mime MIME type - * @param ns Namespace URI - * @param handler XMLHandler to use - */ -public void addXMLHandler(String mime, String ns, XMLHandler handler) { -Map mh = (Map) handlers.get(mime); -if (mh == null) { -mh = new java.util.HashMap(); -handlers.put(mime, mh); -} -mh.put(ns, handler); } /** 1.9 +26 -0 xml-fop/src/java/org/apache/fop/render/AbstractRenderer.java Index: AbstractRenderer.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/render/AbstractRenderer.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- AbstractRenderer.java 27 Aug 2003 18:14:46 - 1.8 +++ AbstractRenderer.java 28 Aug 2003 17:13:22 - 1.9 @@ -676,5 +676,31 @@ } } +/** + * Set the default xml handler for the given mime type. + * @param mime MIME type + * @param handler XMLHandler to use + */ +public void setDefaultXMLHandler(FOUserAgent foua, String mime, + XMLHandler handler) { +foua.defaults.put(mime, handler); +} + +/** + * Add an xml handler for the given mime type and xml namespace. + * @param mime MIME type + * @param ns Namespace URI + * @param handler XMLHandler to use + */ +public void addXMLHandler(FOUserAgent foua, String mime, String ns, + XMLHandler handler) { +Map mh = (Map) foua.handlers.get(mime); +if (mh == null) { +mh = new java.util.HashMap(); +foua.handlers.put(mime, mh); +} +mh.put(ns, handler); +} + } 1.13 +1 -1 xml-fop/src/java/org/apache/fop/render/pdf/PDFRenderer.java Index: PDFRenderer.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/render/pdf/PDFRenderer.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- PDFRenderer.java 22 Aug 2003 17:42:42 - 1.12 +++ PDFRenderer.java 28 Aug 2003 17:13:22 - 1.13 @@ -260,7 +260,7 @@ PDFXMLHandler xmlHandler = new PDFXMLHandler(); //userAgent.setDefaultXMLHandler(MIME_TYPE, xmlHandler); String svg = http://www.w3.org/2000/svg;; -userAgent.addXMLHandler(MIME_TYPE, svg, xmlHandler); +addXMLHandler(userAgent, MIME_TYPE, svg, xmlHandler); } /** 1.12 +1 -1 xml-fop/src/java/org/apache/fop/render/ps/PSRenderer.java Index: PSRenderer.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/render/ps/PSRenderer.java,v retrieving revision 1.11
cvs commit: xml-fop/src/java/org/apache/fop/render/xml XMLRenderer.java
vmote 2003/08/28 10:27:42 Modified:src/java/org/apache/fop/apps FOUserAgent.java src/java/org/apache/fop/render AbstractRenderer.java src/java/org/apache/fop/render/pdf PDFRenderer.java src/java/org/apache/fop/render/ps PSRenderer.java src/java/org/apache/fop/render/svg SVGRenderer.java src/java/org/apache/fop/render/xml XMLRenderer.java Log: move renderXML() from apps/FOUserAgent to render/AbstractRenderer Revision ChangesPath 1.3 +1 -40 xml-fop/src/java/org/apache/fop/apps/FOUserAgent.java Index: FOUserAgent.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/apps/FOUserAgent.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- FOUserAgent.java 28 Aug 2003 17:13:22 - 1.2 +++ FOUserAgent.java 28 Aug 2003 17:27:42 - 1.3 @@ -55,17 +55,12 @@ import java.io.IOException; import java.io.InputStream; -// XML -import org.w3c.dom.Document; - // Avalon import org.apache.avalon.framework.logger.LogEnabled; import org.apache.avalon.framework.logger.Logger; // FOP import org.apache.fop.pdf.PDFEncryptionParams; -import org.apache.fop.render.XMLHandler; -import org.apache.fop.render.RendererContext; /** * The User Agent for fo. @@ -186,40 +181,6 @@ */ public boolean linkToFootnotes() { return true; -} - -/** - * Render the xml document with the given xml namespace. - * The Render Context is by the handle to render into the current - * rendering target. - * @param ctx rendering context - * @param doc DOM Document containing the source document - * @param namespace Namespace URI of the document - */ -public void renderXML(RendererContext ctx, Document doc, - String namespace) { -String mime = ctx.getMimeType(); -Map mh = (Map) handlers.get(mime); -XMLHandler handler = null; -if (mh != null) { -handler = (XMLHandler) mh.get(namespace); -} -if (handler == null) { -handler = (XMLHandler) defaults.get(mime); -} -if (handler != null) { -try { -handler.handleXML(ctx, doc, namespace); -} catch (Throwable t) { -// could not handle document -getLogger().error(Some XML content will be ignored. -+ Could not render XML, t); -} -} else { -// no handler found for document -getLogger().warn(Some XML content will be ignored. -+ No handler defined for XML: + namespace); -} } } 1.10 +37 -0 xml-fop/src/java/org/apache/fop/render/AbstractRenderer.java Index: AbstractRenderer.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/render/AbstractRenderer.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- AbstractRenderer.java 28 Aug 2003 17:13:22 - 1.9 +++ AbstractRenderer.java 28 Aug 2003 17:27:42 - 1.10 @@ -58,6 +58,9 @@ import java.util.List; import java.util.Iterator; +// XML +import org.w3c.dom.Document; + // FOP import org.apache.fop.apps.FOPException; import org.apache.fop.area.Area; @@ -700,6 +703,40 @@ foua.handlers.put(mime, mh); } mh.put(ns, handler); +} + +/** + * Render the xml document with the given xml namespace. + * The Render Context is by the handle to render into the current + * rendering target. + * @param ctx rendering context + * @param doc DOM Document containing the source document + * @param namespace Namespace URI of the document + */ +public void renderXML(FOUserAgent foua, RendererContext ctx, Document doc, + String namespace) { +String mime = ctx.getMimeType(); +Map mh = (Map) foua.handlers.get(mime); +XMLHandler handler = null; +if (mh != null) { +handler = (XMLHandler) mh.get(namespace); +} +if (handler == null) { +handler = (XMLHandler) foua.defaults.get(mime); +} +if (handler != null) { +try { +handler.handleXML(ctx, doc, namespace); +} catch (Throwable t) { +// could not handle document +getLogger().error(Some XML content will be ignored. ++ Could not render XML, t); +} +} else { +// no handler found for document
cvs commit: xml-fop/src/java/org/apache/fop/layoutmgr PageLayoutManager.java
vmote 2003/08/28 11:03:13 Modified:src/java/org/apache/fop/fo/pagination StaticContent.java src/java/org/apache/fop/layoutmgr PageLayoutManager.java Log: move fo/pagination/StaticContent.getLayoutManager() to layoutmgr/PageLayoutManager.getStaticContentLayoutManager() Revision ChangesPath 1.6 +1 -16 xml-fop/src/java/org/apache/fop/fo/pagination/StaticContent.java Index: StaticContent.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/pagination/StaticContent.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- StaticContent.java27 Aug 2003 18:35:21 - 1.5 +++ StaticContent.java28 Aug 2003 18:03:12 - 1.6 @@ -54,7 +54,6 @@ import org.apache.fop.fo.FONode; import org.apache.fop.fo.FOTreeVisitor; import org.apache.fop.apps.FOPException; -import org.apache.fop.layoutmgr.StaticContentLayoutManager; /** * Class modelling the fo:static-content object. See Sec. 6.4.19 of the XSL-FO @@ -85,20 +84,6 @@ super.setFlowName(name); } -} - -private StaticContentLayoutManager lm; - -/** - * @return this object's layout manager - */ -public StaticContentLayoutManager getLayoutManager() { -if (lm == null) { -lm = new StaticContentLayoutManager(); -lm.setUserAgent(getUserAgent()); -lm.setFObj(this); -} -return lm; } /** 1.16 +11 -1 xml-fop/src/java/org/apache/fop/layoutmgr/PageLayoutManager.java Index: PageLayoutManager.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/PageLayoutManager.java,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- PageLayoutManager.java27 Aug 2003 18:35:21 - 1.15 +++ PageLayoutManager.java28 Aug 2003 18:03:13 - 1.16 @@ -479,7 +479,7 @@ if (reg == null) { getLogger().error(no region viewport: shouldn't happen); } -StaticContentLayoutManager lm = flow.getLayoutManager(); +StaticContentLayoutManager lm = getStaticContentLayoutManager(flow); lm.setUserAgent(getUserAgent()); lm.init(); lm.setRegionReference(reg.getRegion()); @@ -889,6 +889,16 @@ FODimension reldims = new FODimension(0, 0); rr.setCTM(CTM.getCTMandRelDims(r.getPropertyManager().getAbsRefOrient(), r.getPropertyManager().getWritingMode(), absRegVPRect, reldims)); +} + +/** + * @return a StaticContent layout manager + */ +public StaticContentLayoutManager getStaticContentLayoutManager(StaticContent sc) { +StaticContentLayoutManager lm = new StaticContentLayoutManager(); +lm.setUserAgent(getUserAgent()); +lm.setFObj(sc); +return lm; } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/traits MinOptMax.java SpaceVal.java
vmote 2003/08/28 12:08:59 Modified:src/java/org/apache/fop/layoutmgr AddLMVisitor.java BlockContainerLayoutManager.java BlockLayoutManager.java BlockStackingLayoutManager.java BreakPoss.java ContentLayoutManager.java FlowLayoutManager.java InlineStackingLayoutManager.java LayoutContext.java LeafNodeLayoutManager.java LineLayoutManager.java PageLayoutManager.java SpaceSpecifier.java TextLayoutManager.java src/java/org/apache/fop/layoutmgr/list Item.java ListBlockLayoutManager.java ListItemLayoutManager.java src/java/org/apache/fop/layoutmgr/table Body.java Caption.java Cell.java Row.java TableAndCaptionLayoutManager.java TableLayoutManager.java src/java/org/apache/fop/traits SpaceVal.java Added: src/java/org/apache/fop/traits MinOptMax.java Removed: src/java/org/apache/fop/layoutmgr MinOptMax.java Log: move layoutmgr/MinOptMax to traits/MinOptMax Revision ChangesPath 1.14 +2 -1 xml-fop/src/java/org/apache/fop/layoutmgr/AddLMVisitor.java Index: AddLMVisitor.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/AddLMVisitor.java,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- AddLMVisitor.java 26 Aug 2003 19:51:20 - 1.13 +++ AddLMVisitor.java 28 Aug 2003 19:08:58 - 1.14 @@ -125,6 +125,7 @@ import java.awt.geom.Rectangle2D; import org.apache.fop.apps.*; +import org.apache.fop.traits.*; /** * Concrete implementation of FOTreeVisitor for the purpose of adding 1.6 +1 -0 xml-fop/src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java Index: BlockContainerLayoutManager.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- BlockContainerLayoutManager.java 24 Aug 2003 18:04:07 - 1.5 +++ BlockContainerLayoutManager.java 28 Aug 2003 19:08:58 - 1.6 @@ -63,6 +63,7 @@ import org.apache.fop.fo.PropertyList; import org.apache.fop.area.CTM; import org.apache.fop.datatypes.FODimension; +import org.apache.fop.traits.*; /** * LayoutManager for a block FO. 1.5 +1 -0 xml-fop/src/java/org/apache/fop/layoutmgr/BlockLayoutManager.java Index: BlockLayoutManager.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/BlockLayoutManager.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- BlockLayoutManager.java 22 Aug 2003 17:42:41 - 1.4 +++ BlockLayoutManager.java 28 Aug 2003 19:08:58 - 1.5 @@ -65,6 +65,7 @@ import org.apache.fop.fo.properties.CommonBackground; import org.apache.fop.fonts.*; import org.apache.fop.apps.*; +import org.apache.fop.traits.*; /** * LayoutManager for a block FO. 1.2 +1 -0 xml-fop/src/java/org/apache/fop/layoutmgr/BlockStackingLayoutManager.java Index: BlockStackingLayoutManager.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/BlockStackingLayoutManager.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- BlockStackingLayoutManager.java 11 Mar 2003 13:05:24 - 1.1 +++ BlockStackingLayoutManager.java 28 Aug 2003 19:08:58 - 1.2 @@ -53,6 +53,7 @@ import org.apache.fop.area.Area; import org.apache.fop.area.BlockParent; import org.apache.fop.area.Block; +import org.apache.fop.traits.*; /** * Base LayoutManager class for all areas which stack their child 1.2 +1 -0 xml-fop/src/java/org/apache/fop/layoutmgr/BreakPoss.java Index: BreakPoss.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/BreakPoss.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- BreakPoss.java11 Mar 2003 13:05:24 - 1.1 +++ BreakPoss.java28 Aug 2003 19:08:58 - 1.2 @@ -51,6 +51,7 @@ package org.apache.fop.layoutmgr; import org.apache.fop.traits.LayoutProps; +import org.apache.fop.traits.*; /** * Represents a break possibility for the layout manager. 1.3 +1 -0 xml-fop/src/java/org/apache
cvs commit: xml-fop/src/java/org/apache/fop/fo/extensions/svg - New directory
vmote 2003/08/28 12:48:14 xml-fop/src/java/org/apache/fop/fo/extensions/svg - New directory - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/svg SVGElement.java SVGElementMapping.java SVGObj.java SVGUserAgent.java
vmote 2003/08/28 12:49:45 Modified:src/java/org/apache/fop/fo FOTreeBuilder.java FOTreeVisitor.java src/java/org/apache/fop/image/analyser SVGReader.java src/java/org/apache/fop/render/pdf PDFXMLHandler.java src/java/org/apache/fop/render/ps PSXMLHandler.java Added: src/java/org/apache/fop/fo/extensions/svg SVGElement.java SVGElementMapping.java SVGObj.java SVGUserAgent.java Removed: src/java/org/apache/fop/svg SVGElement.java SVGElementMapping.java SVGObj.java SVGUserAgent.java Log: move svg classes related to the FO Tree building from svg to fo/extensions/svg Revision ChangesPath 1.14 +1 -1 xml-fop/src/java/org/apache/fop/fo/FOTreeBuilder.java Index: FOTreeBuilder.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/FOTreeBuilder.java,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- FOTreeBuilder.java26 Aug 2003 17:15:14 - 1.13 +++ FOTreeBuilder.java28 Aug 2003 19:49:44 - 1.14 @@ -162,7 +162,7 @@ */ private void setupDefaultMappings() { addElementMapping(org.apache.fop.fo.FOElementMapping); -addElementMapping(org.apache.fop.svg.SVGElementMapping); +addElementMapping(org.apache.fop.fo.extensions.svg.SVGElementMapping); addElementMapping(org.apache.fop.fo.extensions.ExtensionElementMapping); // add mappings from available services 1.3 +3 -3 xml-fop/src/java/org/apache/fop/fo/FOTreeVisitor.java Index: FOTreeVisitor.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/FOTreeVisitor.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- FOTreeVisitor.java26 Aug 2003 17:15:14 - 1.2 +++ FOTreeVisitor.java28 Aug 2003 19:49:44 - 1.3 @@ -115,8 +115,8 @@ import org.apache.fop.fo.flow.MultiToggle; import org.apache.fop.fo.flow.TableAndCaption; import org.apache.fop.fo.flow.TableCaption; -import org.apache.fop.svg.SVGObj; -import org.apache.fop.svg.SVGElement; +import org.apache.fop.fo.extensions.svg.SVGObj; +import org.apache.fop.fo.extensions.svg.SVGElement; /** * pImplements the GoF Visitor design pattern to allow access to the FOTree 1.1 xml-fop/src/java/org/apache/fop/fo/extensions/svg/SVGElement.java Index: SVGElement.java === /* * $Id: SVGElement.java,v 1.1 2003/08/28 19:49:44 vmote Exp $ * *The Apache Software License, Version 1.1 * * * Copyright (C) 1999-2003 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 *[EMAIL PROTECTED] * * 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 * APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- * DING
cvs commit: xml-fop/src/java/org/apache/fop/layoutmgr PageLayoutManager.java
vmote 2003/08/26 17:01:14 Modified:src/java/org/apache/fop/fo/pagination PageSequence.java src/java/org/apache/fop/layoutmgr PageLayoutManager.java Log: move field that tracks which SimplePageMaster to use (currentSimplePageMaster) from fo/pagination/PageSequence to layoutmgr/PageLayoutManager Revision ChangesPath 1.11 +19 -22xml-fop/src/java/org/apache/fop/fo/pagination/PageSequence.java Index: PageSequence.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/pagination/PageSequence.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- PageSequence.java 26 Aug 2003 20:32:26 - 1.10 +++ PageSequence.java 27 Aug 2003 00:01:14 - 1.11 @@ -135,11 +135,11 @@ /** * The currentSimplePageMaster is either the page master for the * whole page sequence if master-reference refers to a simple-page-master, - * or the simple page master produced by the page sequence mster otherwise. + * or the simple page master produced by the page sequence master otherwise. * The pageSequenceMaster is null if master-reference refers to a * simple-page-master. */ -private SimplePageMaster currentSimplePageMaster; +private SimplePageMaster simplePageMaster; private PageSequenceMaster pageSequenceMaster; /** @@ -210,11 +210,11 @@ String masterName = this.properties.get(master-reference).getString(); -this.currentSimplePageMaster = - this.layoutMasterSet.getSimplePageMaster(masterName); -if (this.currentSimplePageMaster == null) { +this.simplePageMaster = +this.layoutMasterSet.getSimplePageMaster(masterName); +if (this.simplePageMaster == null) { this.pageSequenceMaster = - this.layoutMasterSet.getPageSequenceMaster(masterName); +this.layoutMasterSet.getPageSequenceMaster(masterName); if (this.pageSequenceMaster == null) { throw new FOPException(master-reference ' + masterName + ' for fo:page-sequence matches no @@ -687,20 +687,6 @@ // } /** - * Get the current simple page master - * that is active for the last page created. - * - * @return the current simple page master - */ -public SimplePageMaster getCurrentSimplePageMaster() { -return currentSimplePageMaster; -} - -public void setCurrentSimplePageMaster(SimplePageMaster simplePageMaster) { -this.currentSimplePageMaster = simplePageMaster; -} - -/** * Get the static content FO node from the flow map. * This gets the static content flow for the given flow name. * @@ -745,12 +731,23 @@ } /** - * Public accessor for getting the PageSequenceMaster to which this + * Public accessor for getting the PageSequenceMaster (if any) to which this * PageSequence is attached. - * @return the PageSequenceMaster to which this PageSequence is attached. + * @return the PageSequenceMaster to which this PageSequence is attached, or + * null if there is none. */ public PageSequenceMaster getPageSequenceMaster() { return pageSequenceMaster; +} + +/** + * Public accessor for getting the SimplePageMaster (if any) to which this + * PageSequence is attached. + * @return the SimplePageeMaster to which this PageSequence is attached or + * null if there is none. + */ +public SimplePageMaster getSimplePageMaster() { +return simplePageMaster; } /** 1.6 +25 -14xml-fop/src/java/org/apache/fop/layoutmgr/PageLayoutManager.java Index: PageLayoutManager.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/PageLayoutManager.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- PageLayoutManager.java26 Aug 2003 22:11:17 - 1.5 +++ PageLayoutManager.java27 Aug 2003 00:01:14 - 1.6 @@ -138,6 +138,14 @@ private PageSequence pageSequence; /** + * This is the SimplePageMaster that should be used to create the page. It + * will be equal to the PageSequence's simplePageMaster, if it exists, or + * to the correct member of the PageSequence's pageSequenceMaster, if that + * exists instead. + */ +private SimplePageMaster currentSimplePageMaster; + +/** * This is the top level layout manager. * It is created by the PageSequence FO. * @@ -497,11 +505,14 @@ if (curPage != null
cvs commit: xml-fop/src/java/org/apache/fop/fo/pagination SimplePageMaster.java
vmote 2003/08/26 17:10:39 Modified:src/java/org/apache/fop/fo/pagination SimplePageMaster.java Log: remove unused method Revision ChangesPath 1.9 +0 -9 xml-fop/src/java/org/apache/fop/fo/pagination/SimplePageMaster.java Index: SimplePageMaster.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/pagination/SimplePageMaster.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- SimplePageMaster.java 26 Aug 2003 22:22:37 - 1.8 +++ SimplePageMaster.java 27 Aug 2003 00:10:39 - 1.9 @@ -130,15 +130,6 @@ } /** - * Returns the next page master. For simple-page-master this is always the - * same as the previous. - * @return the page master - */ -public PageMaster getNextPageMaster() { -return this.pageMaster; -} - -/** * Returns the name of the simple-page-master. * @return the page master name */ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/layoutmgr PageLayoutManager.java
vmote 2003/08/26 17:36:14 Modified:src/java/org/apache/fop/layoutmgr PageLayoutManager.java Log: 1. extract method getSimpleMasterPageToUse() 2. clean up signature for createPage() Revision ChangesPath 1.7 +15 -18xml-fop/src/java/org/apache/fop/layoutmgr/PageLayoutManager.java Index: PageLayoutManager.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/PageLayoutManager.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- PageLayoutManager.java27 Aug 2003 00:01:14 - 1.6 +++ PageLayoutManager.java27 Aug 2003 00:36:14 - 1.7 @@ -450,7 +450,7 @@ private PageViewport makeNewPage(boolean bIsBlank, boolean bIsLast) { finishPage(); try { -curPage = createPage(pageSequence, pageCount, bIsBlank, isFirstPage, bIsLast); +curPage = createPage(bIsBlank, bIsLast); isFirstPage = false; } catch (FOPException fopex) { /* */ fopex.printStackTrace(); @@ -710,29 +710,16 @@ } /** - * Called by PageLayoutManager when it needs a new page on which to - * place content. The PageSequence manages the page number (odd/even), - * but the PLM tells it if the page is blank or is the last page. + * Called when a new page is needed. * - * @param pageNumber the page number to create page for * @param bIsBlank If true, use a master for a blank page. - * @param firstPage true if this is the first page * @param bIsLast If true, use the master for the last page in the sequence. * @return the page viewport created for the page number * @throws FOPException if there is an error creating page */ -public PageViewport createPage(PageSequence pageSequence, int pageNumber, - boolean bIsBlank, boolean firstPage, - boolean bIsLast) +public PageViewport createPage(boolean bIsBlank, boolean bIsLast) throws FOPException { -if (pageSequence.getPageSequenceMaster() == null) { -currentSimplePageMaster = pageSequence.getSimplePageMaster(); -} else { -currentSimplePageMaster = pageSequence.getPageSequenceMaster() - .getNextSimplePageMaster(((pageNumber % 2) == 1), - firstPage, - bIsBlank); -} +currentSimplePageMaster = getSimpleMasterPageToUse(bIsBlank); Region body = currentSimplePageMaster.getRegion(Region.BODY); if (!pageSequence.getMainFlow().getFlowName().equals(body.getRegionName())) { throw new FOPException(Flow ' + pageSequence.getMainFlow().getFlowName() @@ -740,7 +727,7 @@ + currentSimplePageMaster.getMasterName() + '); } PageMaster pageMaster = currentSimplePageMaster.getPageMaster(); -if ( pageMaster == null) { +if (pageMaster == null) { createSimplePageMasterAreas(currentSimplePageMaster); } pageMaster = currentSimplePageMaster.getPageMaster(); @@ -756,6 +743,16 @@ // handle the 'force-page-count' //forcePage(areaTree, firstAvailPageNumber); +} + +private SimplePageMaster getSimpleMasterPageToUse(boolean bIsBlank) +throws FOPException { +if (pageSequence.getPageSequenceMaster() == null) { +return pageSequence.getSimplePageMaster(); +} +boolean isOddPage = ((pageCount % 2) == 1); +return pageSequence.getPageSequenceMaster() + .getNextSimplePageMaster(isOddPage, isFirstPage, bIsBlank); } public void createSimplePageMasterAreas(SimplePageMaster node) { - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/layoutmgr PageLayoutManager.java
vmote 2003/08/26 18:13:44 Modified:src/java/org/apache/fop/layoutmgr PageLayoutManager.java Log: instead of storing and cloning page reference-area and viewport objects for each SimplePageMaster, create them on the fly (there will shortly be no convenient place to store the templates, and any performance benefit to cloning would appear to be small) Revision ChangesPath 1.8 +12 -19xml-fop/src/java/org/apache/fop/layoutmgr/PageLayoutManager.java Index: PageLayoutManager.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/PageLayoutManager.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- PageLayoutManager.java27 Aug 2003 00:36:14 - 1.7 +++ PageLayoutManager.java27 Aug 2003 01:13:44 - 1.8 @@ -719,19 +719,14 @@ */ public PageViewport createPage(boolean bIsBlank, boolean bIsLast) throws FOPException { -currentSimplePageMaster = getSimpleMasterPageToUse(bIsBlank); +currentSimplePageMaster = getSimplePageMasterToUse(bIsBlank); Region body = currentSimplePageMaster.getRegion(Region.BODY); if (!pageSequence.getMainFlow().getFlowName().equals(body.getRegionName())) { throw new FOPException(Flow ' + pageSequence.getMainFlow().getFlowName() + ' does not map to the region-body in page-master ' + currentSimplePageMaster.getMasterName() + '); } -PageMaster pageMaster = currentSimplePageMaster.getPageMaster(); -if (pageMaster == null) { -createSimplePageMasterAreas(currentSimplePageMaster); -} -pageMaster = currentSimplePageMaster.getPageMaster(); -PageViewport p = pageMaster.makePage(); +PageViewport p = createPageAreas(currentSimplePageMaster); return p; // The page will have a viewport/reference area pair defined // for each region in the master. @@ -745,7 +740,7 @@ //forcePage(areaTree, firstAvailPageNumber); } -private SimplePageMaster getSimpleMasterPageToUse(boolean bIsBlank) +private SimplePageMaster getSimplePageMasterToUse(boolean bIsBlank) throws FOPException { if (pageSequence.getPageSequenceMaster() == null) { return pageSequence.getSimplePageMaster(); @@ -755,13 +750,13 @@ .getNextSimplePageMaster(isOddPage, isFirstPage, bIsBlank); } -public void createSimplePageMasterAreas(SimplePageMaster node) { +public PageViewport createPageAreas(SimplePageMaster spm) { int pageWidth = -node.properties.get(page-width).getLength().getValue(); +spm.properties.get(page-width).getLength().getValue(); int pageHeight = -node.properties.get(page-height).getLength().getValue(); +spm.properties.get(page-height).getLength().getValue(); // Get absolute margin properties (top, left, bottom, right) -CommonMarginBlock mProps = node.getPropertyManager().getMarginProps(); +CommonMarginBlock mProps = spm.getPropertyManager().getMarginProps(); /* Create the page reference area rectangle (0,0 is at top left * of the page media and y increases @@ -773,20 +768,19 @@ pageWidth - mProps.marginLeft - mProps.marginRight, pageHeight - mProps.marginTop - mProps.marginBottom); - // ??? KL shouldn't this take the viewport too??? Page page = new Page(); // page reference area // Set up the CTM on the page reference area based on writing-mode // and reference-orientation FODimension reldims = new FODimension(0, 0); - CTM pageCTM = CTM.getCTMandRelDims(node.getPropertyManager().getAbsRefOrient(), - node.getPropertyManager().getWritingMode(), pageRefRect, reldims); + CTM pageCTM = CTM.getCTMandRelDims(spm.getPropertyManager().getAbsRefOrient(), + spm.getPropertyManager().getWritingMode(), pageRefRect, reldims); // Create a RegionViewport/ reference area pair for each page region boolean bHasBody = false; - for (Iterator regenum = node.getRegions().values().iterator(); + for (Iterator regenum = spm.getRegions().values().iterator(); regenum.hasNext();) { Region r = (Region)regenum.next(); RegionViewport rvp = r.makeRegionViewport(reldims, pageCTM); @@ -798,11 +792,10 @@ } if (!bHasBody) { - node.getLogger().error(simple-page-master has no region-body); + spm.getLogger().error(simple-page-master has
cvs commit: xml-fop/src/java/org/apache/fop/layoutmgr PageLayoutManager.java
vmote 2003/08/26 18:23:59 Modified:src/java/org/apache/fop/fo/pagination SimplePageMaster.java src/java/org/apache/fop/layoutmgr PageLayoutManager.java Removed: src/java/org/apache/fop/layout PageMaster.java Log: remove remaining references to layout/PageMaster (all unused), and remove the class itself Revision ChangesPath 1.10 +0 -14 xml-fop/src/java/org/apache/fop/fo/pagination/SimplePageMaster.java Index: SimplePageMaster.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/pagination/SimplePageMaster.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- SimplePageMaster.java 27 Aug 2003 00:10:39 - 1.9 +++ SimplePageMaster.java 27 Aug 2003 01:23:59 - 1.10 @@ -62,7 +62,6 @@ import org.apache.fop.fo.FONode; import org.apache.fop.fo.FObj; import org.apache.fop.fo.FOTreeVisitor; -import org.apache.fop.layout.PageMaster; import org.apache.fop.apps.FOPException; /** @@ -76,7 +75,6 @@ */ private Map regions; -private PageMaster pageMaster; private String masterName; /** @@ -115,18 +113,6 @@ */ public boolean generatesReferenceAreas() { return true; -} - -/** - * Returns the page master. - * @return the page master - */ -public PageMaster getPageMaster() { -return this.pageMaster; -} - -public void setPageMaster(PageMaster pageMaster) { -this.pageMaster = pageMaster; } /** 1.9 +0 -2 xml-fop/src/java/org/apache/fop/layoutmgr/PageLayoutManager.java Index: PageLayoutManager.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/PageLayoutManager.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- PageLayoutManager.java27 Aug 2003 01:13:44 - 1.8 +++ PageLayoutManager.java27 Aug 2003 01:23:59 - 1.9 @@ -82,8 +82,6 @@ import org.apache.fop.fo.properties.CommonMarginBlock; import org.apache.fop.fo.properties.Constants; -import org.apache.fop.layout.PageMaster; - import java.util.ArrayList; import java.util.List; import java.util.Map; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/layoutmgr PageLayoutManager.java
vmote 2003/08/26 18:51:06 Modified:src/java/org/apache/fop/fo/pagination Region.java RegionAfter.java RegionBefore.java RegionBody.java RegionEnd.java RegionStart.java src/java/org/apache/fop/layoutmgr PageLayoutManager.java Log: move makeRegionViewport() and setRegionViewportTraits() from fo/pagination/Region to layoutmgr/PageLayoutManager Revision ChangesPath 1.8 +1 -36 xml-fop/src/java/org/apache/fop/fo/pagination/Region.java Index: Region.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/pagination/Region.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- Region.java 26 Aug 2003 22:11:17 - 1.7 +++ Region.java 27 Aug 2003 01:51:06 - 1.8 @@ -59,13 +59,9 @@ import org.apache.fop.fo.FObj; import org.apache.fop.fo.FONode; import org.apache.fop.fo.FOTreeVisitor; -import org.apache.fop.fo.properties.CommonBorderAndPadding; -import org.apache.fop.fo.properties.CommonBackground; import org.apache.fop.apps.FOPException; import org.apache.fop.area.CTM; -import org.apache.fop.area.RegionViewport; import org.apache.fop.area.RegionReference; -import org.apache.fop.layoutmgr.TraitSetter; // SAX import org.xml.sax.Attributes; @@ -133,44 +129,13 @@ + parent.getName()); } this.wm = this.properties.get(writing-mode).getEnum(); -} - -/** - * Creates a RegionViewport Area object for this pagination Region. - * @param reldims relative dimensions - * @param pageCTM page coordinate transformation matrix - * @return the new region viewport - */ -public RegionViewport makeRegionViewport(FODimension reldims, CTM pageCTM) { -Rectangle2D relRegionRect = getViewportRectangle(reldims); -Rectangle2D absRegionRect = pageCTM.transform(relRegionRect); -// Get the region viewport rectangle in absolute coords by -// transforming it using the page CTM -RegionViewport rv = new RegionViewport(absRegionRect); -setRegionViewportTraits(rv); -return rv; -} - -/** - * Set the region viewport traits. - * The viewport has the border, background and - * clipping overflow traits. - * - * @param r the region viewport - */ -protected void setRegionViewportTraits(RegionViewport r) { -// Common Border, Padding, and Background Properties -CommonBorderAndPadding bap = propMgr.getBorderAndPadding(); -CommonBackground bProps = propMgr.getBackgroundProps(); -TraitSetter.addBorders(r, bap); -TraitSetter.addBackground(r, bProps); // this.properties.get(clip); // this.properties.get(display-align); this.overflow = this.properties.get(overflow).getEnum(); } -protected abstract Rectangle getViewportRectangle(FODimension pageRefRect); +public abstract Rectangle getViewportRectangle(FODimension pageRefRect); /** * Create the region reference area for this region master. 1.4 +1 -1 xml-fop/src/java/org/apache/fop/fo/pagination/RegionAfter.java Index: RegionAfter.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/pagination/RegionAfter.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- RegionAfter.java 22 Aug 2003 06:27:34 - 1.3 +++ RegionAfter.java 27 Aug 2003 01:51:06 - 1.4 @@ -75,7 +75,7 @@ /** * @see org.apache.fop.fo.pagination.Region#getViewportRectangle(FODimension) */ -protected Rectangle getViewportRectangle (FODimension reldims) { +public Rectangle getViewportRectangle (FODimension reldims) { // Depends on extent, precedence ans writing mode Rectangle vpRect; if (this.wm == WritingMode.LR_TB || this.wm == WritingMode.RL_TB) { 1.4 +1 -1 xml-fop/src/java/org/apache/fop/fo/pagination/RegionBefore.java Index: RegionBefore.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/pagination/RegionBefore.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- RegionBefore.java 22 Aug 2003 06:27:34 - 1.3 +++ RegionBefore.java 27 Aug 2003 01:51:06 - 1.4 @@ -96,7 +96,7 @@ /** * @see org.apache.fop.fo.pagination.Region#getViewportRectangle(FODimension) */ -protected Rectangle getViewportRectangle (FODimension reldims) { +public Rectangle getViewportRectangle (FODimension reldims) { // Depends on extent
cvs commit: xml-fop/src/java/org/apache/fop/layoutmgr PageLayoutManager.java
vmote 2003/08/27 08:33:59 Modified:src/java/org/apache/fop/fo/pagination Region.java RegionBody.java src/java/org/apache/fop/layoutmgr PageLayoutManager.java Log: 1. move fo/pagination/Region.makeRegionReferenceArea() to layoutmgr/PageLayoutManager.makeRegionReferenceArea() 2. move fo/pagination/RegionBody.makeRegionReferenceArea() layoutmgr/PageLayoutManager.makeRegionBodyReferenceArea() Revision ChangesPath 1.9 +2 -15 xml-fop/src/java/org/apache/fop/fo/pagination/Region.java Index: Region.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/pagination/Region.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- Region.java 27 Aug 2003 01:51:06 - 1.8 +++ Region.java 27 Aug 2003 15:33:59 - 1.9 @@ -88,7 +88,7 @@ private String regionName; /** Holds the overflow attribute */ -protected int overflow; +public int overflow; /** Holds the writing mode */ protected int wm; @@ -138,19 +138,6 @@ public abstract Rectangle getViewportRectangle(FODimension pageRefRect); /** - * Create the region reference area for this region master. - * @param absRegVPRect The region viewport rectangle is absolute coordinates - * where x=distance from left, y=distance from bottom, width=right-left - * height=top-bottom - * @return a new region reference area - */ -public RegionReference makeRegionReferenceArea(Rectangle2D absRegVPRect) { -RegionReference r = new RegionReference(getRegionAreaClass()); -setRegionPosition(r, absRegVPRect); -return r; -} - -/** * Set the region position inside the region viewport. * This sets the trasnform that is used to place the contents of * the region. @@ -158,7 +145,7 @@ * @param r the region reference area * @param absRegVPRect the rectangle to place the region contents */ -protected void setRegionPosition(RegionReference r, Rectangle2D absRegVPRect) { +public void setRegionPosition(RegionReference r, Rectangle2D absRegVPRect) { FODimension reldims = new FODimension(0, 0); r.setCTM(CTM.getCTMandRelDims(propMgr.getAbsRefOrient(), propMgr.getWritingMode(), absRegVPRect, reldims)); 1.6 +0 -26 xml-fop/src/java/org/apache/fop/fo/pagination/RegionBody.java Index: RegionBody.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/pagination/RegionBody.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- RegionBody.java 27 Aug 2003 01:51:06 - 1.5 +++ RegionBody.java 27 Aug 2003 15:33:59 - 1.6 @@ -60,7 +60,6 @@ import org.apache.fop.fo.FOTreeVisitor; import org.apache.fop.fo.PropertyList; import org.apache.fop.fo.Property; -import org.apache.fop.fo.properties.Overflow; import org.apache.fop.fo.properties.WritingMode; import org.apache.fop.datatypes.ColorType; import org.apache.fop.datatypes.FODimension; @@ -144,31 +143,6 @@ */ public int getRegionAreaClass() { return RegionReference.BODY; -} - -/** - * Override the inherited method. - * @see org.apache.fop.fo.pagination.Region#makeRegionReferenceArea(Rectangle2D) - */ -public RegionReference makeRegionReferenceArea(Rectangle2D absRegVPRect) { -// Should set some column stuff here I think, or put it elsewhere -BodyRegion body = new BodyRegion(); -setRegionPosition(body, absRegVPRect); -int columnCount = -this.properties.get(column-count).getNumber().intValue(); -if ((columnCount 1) (overflow == Overflow.SCROLL)) { -// recover by setting 'column-count' to 1. This is allowed but -// not required by the spec. -getLogger().error(Setting 'column-count' to 1 because -+ 'overflow' is set to 'scroll'); -columnCount = 1; -} -body.setColumnCount(columnCount); - -int columnGap = -this.properties.get(column-gap).getLength().getValue(); -body.setColumnGap(columnGap); -return body; } /** 1.11 +46 -2 xml-fop/src/java/org/apache/fop/layoutmgr/PageLayoutManager.java Index: PageLayoutManager.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/PageLayoutManager.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- PageLayoutManager.java27 Aug 2003 01:51:06 -
cvs commit: xml-fop/src/java/org/apache/fop/layoutmgr PageLayoutManager.java
vmote 2003/08/27 08:55:35 Modified:src/java/org/apache/fop/fo/pagination Region.java src/java/org/apache/fop/layoutmgr PageLayoutManager.java Log: move fo/pagination/Region.setRegionPosition() to layoutmgr/PageLayoutManager Revision ChangesPath 1.10 +0 -16 xml-fop/src/java/org/apache/fop/fo/pagination/Region.java Index: Region.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/pagination/Region.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- Region.java 27 Aug 2003 15:33:59 - 1.9 +++ Region.java 27 Aug 2003 15:55:34 - 1.10 @@ -60,8 +60,6 @@ import org.apache.fop.fo.FONode; import org.apache.fop.fo.FOTreeVisitor; import org.apache.fop.apps.FOPException; -import org.apache.fop.area.CTM; -import org.apache.fop.area.RegionReference; // SAX import org.xml.sax.Attributes; @@ -136,20 +134,6 @@ } public abstract Rectangle getViewportRectangle(FODimension pageRefRect); - -/** - * Set the region position inside the region viewport. - * This sets the trasnform that is used to place the contents of - * the region. - * - * @param r the region reference area - * @param absRegVPRect the rectangle to place the region contents - */ -public void setRegionPosition(RegionReference r, Rectangle2D absRegVPRect) { -FODimension reldims = new FODimension(0, 0); -r.setCTM(CTM.getCTMandRelDims(propMgr.getAbsRefOrient(), -propMgr.getWritingMode(), absRegVPRect, reldims)); -} /** * Return the enumerated value designating this type of region in the 1.12 +17 -2 xml-fop/src/java/org/apache/fop/layoutmgr/PageLayoutManager.java Index: PageLayoutManager.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/PageLayoutManager.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- PageLayoutManager.java27 Aug 2003 15:33:59 - 1.11 +++ PageLayoutManager.java27 Aug 2003 15:55:34 - 1.12 @@ -844,7 +844,7 @@ Rectangle2D absRegVPRect) { // Should set some column stuff here I think, or put it elsewhere BodyRegion body = new BodyRegion(); -r.setRegionPosition(body, absRegVPRect); +setRegionPosition(r, body, absRegVPRect); int columnCount = r.properties.get(column-count).getNumber().intValue(); if ((columnCount 1) (r.overflow == Overflow.SCROLL)) { @@ -872,8 +872,23 @@ public RegionReference makeRegionReferenceArea(Region r, Rectangle2D absRegVPRect) { RegionReference rr = new RegionReference(r.getRegionAreaClass()); -r.setRegionPosition(rr, absRegVPRect); +setRegionPosition(r, rr, absRegVPRect); return rr; +} + +/** + * Set the region position inside the region viewport. + * This sets the trasnform that is used to place the contents of + * the region. + * + * @param r the region reference area + * @param absRegVPRect the rectangle to place the region contents + */ +public void setRegionPosition(Region r, RegionReference rr, + Rectangle2D absRegVPRect) { +FODimension reldims = new FODimension(0, 0); +rr.setCTM(CTM.getCTMandRelDims(r.getPropertyManager().getAbsRefOrient(), +r.getPropertyManager().getWritingMode(), absRegVPRect, reldims)); } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/layoutmgr PageLayoutManager.java
vmote 2003/08/27 10:51:16 Modified:src/java/org/apache/fop/fo/pagination Region.java RegionAfter.java RegionBefore.java RegionBody.java RegionEnd.java RegionStart.java src/java/org/apache/fop/layoutmgr PageLayoutManager.java Log: duplicate the area.RegionReference region codes in fo/pagination/Region, and use the codes in Region from within the Region subclasses Revision ChangesPath 1.11 +17 -7 xml-fop/src/java/org/apache/fop/fo/pagination/Region.java Index: Region.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/pagination/Region.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- Region.java 27 Aug 2003 15:55:34 - 1.10 +++ Region.java 27 Aug 2003 17:51:16 - 1.11 @@ -82,6 +82,18 @@ /** Key for body regions */ public static final String BODY = body; +/* The following codes correspond to those found in area/RegionReference */ +/** Integer Code for before regions */ +public static final int BEFORE_CODE = 0; +/** Integer Code for start regions */ +public static final int START_CODE = 1; +/** Integer Code for body regions */ +public static final int BODY_CODE = 2; +/** Integer Code for end regions */ +public static final int END_CODE = 3; +/** Integer Code for after regions */ +public static final int AFTER_CODE = 4; + private SimplePageMaster layoutMaster; private String regionName; @@ -136,13 +148,6 @@ public abstract Rectangle getViewportRectangle(FODimension pageRefRect); /** - * Return the enumerated value designating this type of region in the - * Area tree. - * @return the region area class - */ -public abstract int getRegionAreaClass(); - -/** * Returns the default region name (xsl-region-before, xsl-region-start, * etc.) * @return the default region name @@ -156,6 +161,11 @@ */ public abstract String getRegionClass(); +/** + * Returns the region class code. + * @return the region class code + */ +public abstract int getRegionClassCode(); /** * Returns the name of this region. 1.5 +6 -7 xml-fop/src/java/org/apache/fop/fo/pagination/RegionAfter.java Index: RegionAfter.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/pagination/RegionAfter.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- RegionAfter.java 27 Aug 2003 01:51:06 - 1.4 +++ RegionAfter.java 27 Aug 2003 17:51:16 - 1.5 @@ -58,7 +58,6 @@ import org.apache.fop.fo.FOTreeVisitor; import org.apache.fop.fo.properties.WritingMode; import org.apache.fop.datatypes.FODimension; -import org.apache.fop.area.RegionReference; /** * The fo:region-after element. @@ -97,17 +96,17 @@ } /** - * @see org.apache.fop.fo.pagination.Region#getRegionAreaClass() + * @see org.apache.fop.fo.pagination.Region#getRegionClass() */ -public int getRegionAreaClass() { -return RegionReference.AFTER; +public String getRegionClass() { +return Region.AFTER; } /** - * @see org.apache.fop.fo.pagination.Region#getRegionClass() + * @see org.apache.fop.fo.pagination.Region#getRegionClassCode() */ -public String getRegionClass() { -return Region.AFTER; +public int getRegionClassCode() { +return Region.AFTER_CODE; } /** 1.5 +3 -4 xml-fop/src/java/org/apache/fop/fo/pagination/RegionBefore.java Index: RegionBefore.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/pagination/RegionBefore.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- RegionBefore.java 27 Aug 2003 01:51:06 - 1.4 +++ RegionBefore.java 27 Aug 2003 17:51:16 - 1.5 @@ -55,7 +55,6 @@ import org.apache.fop.fo.properties.WritingMode; import org.apache.fop.fo.FONode; import org.apache.fop.fo.FOTreeVisitor; -import org.apache.fop.area.RegionReference; // Java import java.awt.Rectangle; @@ -87,10 +86,10 @@ } /** - * @see org.apache.fop.fo.pagination.Region#getRegionAreaClass() + * @see org.apache.fop.fo.pagination.Region#getRegionClassCode() */ -public int getRegionAreaClass() { -return RegionReference.BEFORE; +public int getRegionClassCode() { +return Region.BEFORE_CODE; } /** 1.7 +3
cvs commit: xml-fop/src/java/org/apache/fop/tools AreaTreeBuilder.java
vmote 2003/08/27 11:14:46 Modified:src/java/org/apache/fop/area BodyRegion.java Page.java RegionReference.java src/java/org/apache/fop/layoutmgr PageLayoutManager.java src/java/org/apache/fop/render AbstractRenderer.java src/java/org/apache/fop/render/xml XMLRenderer.java src/java/org/apache/fop/tools AreaTreeBuilder.java Log: remove region code from /area/RegionReference in favor of those in fo/pagination/Region Revision ChangesPath 1.2 +14 -12xml-fop/src/java/org/apache/fop/area/BodyRegion.java Index: BodyRegion.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/area/BodyRegion.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- BodyRegion.java 11 Mar 2003 13:05:27 - 1.1 +++ BodyRegion.java 27 Aug 2003 18:14:45 - 1.2 @@ -3,34 +3,34 @@ * *The Apache Software License, Version 1.1 * - * + * * Copyright (C) 1999-2003 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 *[EMAIL PROTECTED] - * + * * 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 @@ -42,14 +42,16 @@ * (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 [EMAIL PROTECTED]. For more information on the Apache * Software Foundation, please see http://www.apache.org/. - */ + */ package org.apache.fop.area; +import org.apache.fop.fo.pagination.Region; + /** * The body region area. * This area contains a main reference area and optionally a @@ -70,7 +72,7 @@ * This sets the region reference area class to BODY. */ public BodyRegion() { -super(BODY); +super(Region.BODY_CODE); } /** @@ -161,7 +163,7 @@ * are assumed to be null and are not cloned. * * @return a shallow copy of this object - */ + */ public Object clone() { BodyRegion br = new BodyRegion(); br.setCTM(getCTM()); 1.2 +22 -20xml-fop/src/java/org/apache/fop/area/Page.java Index: Page.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/area/Page.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- Page.java 11 Mar 2003 13:05:27 - 1.1 +++ Page.java 27 Aug 2003 18:14:45 - 1.2 @@ -3,34 +3,34 @@ * *The Apache Software License, Version 1.1 * - * + * * Copyright (C) 1999-2003
cvs commit: xml-fop/src/java/org/apache/fop/layoutmgr PageLayoutManager.java
vmote 2003/08/27 11:35:21 Modified:src/java/org/apache/fop/fo/pagination StaticContent.java src/java/org/apache/fop/layoutmgr PageLayoutManager.java Log: make some classes more readable by reversing the sense of some conditional logic Revision ChangesPath 1.5 +1 -2 xml-fop/src/java/org/apache/fop/fo/pagination/StaticContent.java Index: StaticContent.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/pagination/StaticContent.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- StaticContent.java22 Aug 2003 17:42:41 - 1.4 +++ StaticContent.java27 Aug 2003 18:35:21 - 1.5 @@ -55,7 +55,6 @@ import org.apache.fop.fo.FOTreeVisitor; import org.apache.fop.apps.FOPException; import org.apache.fop.layoutmgr.StaticContentLayoutManager; -import org.apache.fop.apps.*; /** * Class modelling the fo:static-content object. See Sec. 6.4.19 of the XSL-FO 1.15 +49 -49xml-fop/src/java/org/apache/fop/layoutmgr/PageLayoutManager.java Index: PageLayoutManager.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/PageLayoutManager.java,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- PageLayoutManager.java27 Aug 2003 18:14:46 - 1.14 +++ PageLayoutManager.java27 Aug 2003 18:35:21 - 1.15 @@ -467,61 +467,61 @@ } private void layoutStaticContent(Region region, int regionClass) { -if (region != null) { -StaticContent flow = pageSequence - .getStaticContent(region.getRegionName()); -if (flow != null) { -RegionViewport reg = curPage.getPage() - .getRegion(regionClass); -reg.getRegion().setIPD((int)reg.getViewArea().getWidth()); -if (reg == null) { -getLogger().error(no region viewport: shouldn't happen); -} -StaticContentLayoutManager lm = flow.getLayoutManager(); -lm.setUserAgent(getUserAgent()); -lm.init(); -lm.setRegionReference(reg.getRegion()); -lm.setParent(this); -LayoutContext childLC = new LayoutContext(0); -childLC.setStackLimit(new MinOptMax((int)curPage.getViewArea().getHeight())); -childLC.setRefIPD((int)reg.getViewArea().getWidth()); - -while (!lm.isFinished()) { -BreakPoss bp = lm.getNextBreakPoss(childLC); -if (bp != null) { -List vecBreakPoss = new ArrayList(); -vecBreakPoss.add(bp); -lm.addAreas(new BreakPossPosIter(vecBreakPoss, 0, - vecBreakPoss.size()), null); -} else { - getLogger().error(bp==null cls= + regionClass); -} -} -//lm.flush(); -lm.reset(null); +if (region == null) { +return; +} +StaticContent flow = pageSequence.getStaticContent(region.getRegionName()); +if (flow == null) { +return; +} +RegionViewport reg = curPage.getPage().getRegion(regionClass); +reg.getRegion().setIPD((int)reg.getViewArea().getWidth()); +if (reg == null) { +getLogger().error(no region viewport: shouldn't happen); +} +StaticContentLayoutManager lm = flow.getLayoutManager(); +lm.setUserAgent(getUserAgent()); +lm.init(); +lm.setRegionReference(reg.getRegion()); +lm.setParent(this); +LayoutContext childLC = new LayoutContext(0); +childLC.setStackLimit(new MinOptMax((int)curPage.getViewArea().getHeight())); +childLC.setRefIPD((int)reg.getViewArea().getWidth()); +while (!lm.isFinished()) { +BreakPoss bp = lm.getNextBreakPoss(childLC); +if (bp != null) { +List vecBreakPoss = new ArrayList(); +vecBreakPoss.add(bp); +lm.addAreas(new BreakPossPosIter(vecBreakPoss, 0, + vecBreakPoss.size()), null); +} else { + getLogger().error(bp==null cls= + regionClass); } } +//lm.flush(); +lm.reset(null); } private void finishPage() { -if (curPage != null) { -// Layout static content into the regions -// Need help from pageseq
cvs commit: xml-fop/src/java/org/apache/fop/layoutmgr LayoutManagerLS.java
vmote 2003/08/27 12:00:10 Modified:src/java/org/apache/fop/fo/pagination Title.java src/java/org/apache/fop/layoutmgr LayoutManagerLS.java Log: move fo/pagination/Title.getTitleArea() to layoutmgr/LayoutManagerLS Revision ChangesPath 1.8 +1 -32 xml-fop/src/java/org/apache/fop/fo/pagination/Title.java Index: Title.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/pagination/Title.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- Title.java22 Aug 2003 17:42:41 - 1.7 +++ Title.java27 Aug 2003 19:00:10 - 1.8 @@ -65,10 +65,6 @@ import org.apache.fop.fo.properties.CommonBorderAndPadding; import org.apache.fop.fonts.Font; import org.apache.fop.fo.properties.CommonMarginInline; -import org.apache.fop.layoutmgr.ContentLayoutManager; -import org.apache.fop.layoutmgr.InlineStackingLayoutManager; -import org.apache.fop.layoutmgr.LMiter; -import org.apache.fop.apps.*; /** * Class modelling the fo:title object. See Sec. 6.4.20 in the XSL-FO Standard. @@ -80,33 +76,6 @@ */ public Title(FONode parent) { super(parent); -} - -/** - * TODO: shouldn't this code be in Layout?? - * @return the Title area - */ -public org.apache.fop.area.Title getTitleArea() { -org.apache.fop.area.Title title = - new org.apache.fop.area.Title(); -// use special layout manager to add the inline areas -// to the Title. -InlineStackingLayoutManager lm; -lm = new InlineStackingLayoutManager(); -lm.setUserAgent(getUserAgent()); -lm.setFObj(this); -lm.setLMiter(new LMiter(children.listIterator())); -lm.init(); - -// get breaks then add areas to title - -ContentLayoutManager clm = new ContentLayoutManager(title); -clm.setUserAgent(getUserAgent()); -lm.setParent(clm); - -clm.fillArea(lm); - -return title; } private void setup() { 1.11 +28 -2 xml-fop/src/java/org/apache/fop/layoutmgr/LayoutManagerLS.java Index: LayoutManagerLS.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/LayoutManagerLS.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- LayoutManagerLS.java 26 Aug 2003 19:28:46 - 1.10 +++ LayoutManagerLS.java 27 Aug 2003 19:00:10 - 1.11 @@ -84,7 +84,7 @@ public void format(PageSequence pageSeq, AreaTree areaTree) throws FOPException { Title title = null; if (pageSeq.getTitleFO() != null) { -title = pageSeq.getTitleFO().getTitleArea(); +title = getTitleArea(pageSeq.getTitleFO()); } areaTree.startPageSequence(title); // Make a new PageLayoutManager and a FlowLayoutManager @@ -173,6 +173,32 @@ data.addSubData(createBookmarkData(out)); } return data; +} + +/** + * @return the Title area + */ +public org.apache.fop.area.Title getTitleArea(org.apache.fop.fo.pagination.Title foTitle) { +org.apache.fop.area.Title title = + new org.apache.fop.area.Title(); +// use special layout manager to add the inline areas +// to the Title. +InlineStackingLayoutManager lm; +lm = new InlineStackingLayoutManager(); +lm.setUserAgent(foTitle.getUserAgent()); +lm.setFObj(foTitle); +lm.setLMiter(new LMiter(foTitle.children.listIterator())); +lm.init(); + +// get breaks then add areas to title + +ContentLayoutManager clm = new ContentLayoutManager(title); +clm.setUserAgent(foTitle.getUserAgent()); +lm.setParent(clm); + +clm.fillArea(lm); + +return title; } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/layoutmgr AddLMVisitor.java
vmote 2003/08/26 09:48:28 Modified:src/java/org/apache/fop/fo/flow PageNumberCitation.java src/java/org/apache/fop/layoutmgr AddLMVisitor.java Log: move fo/flow/PageNumberCitation.getInlineArea() to layoutmgr/AddLMVisitor.getPageNumberCitationInlineArea() Revision ChangesPath 1.12 +9 -52 xml-fop/src/java/org/apache/fop/fo/flow/PageNumberCitation.java Index: PageNumberCitation.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/flow/PageNumberCitation.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- PageNumberCitation.java 22 Aug 2003 06:27:34 - 1.11 +++ PageNumberCitation.java 26 Aug 2003 16:48:28 - 1.12 @@ -51,11 +51,6 @@ package org.apache.fop.fo.flow; // FOP -import org.apache.fop.area.PageViewport; -import org.apache.fop.area.Trait; -import org.apache.fop.area.inline.InlineArea; -import org.apache.fop.area.inline.UnresolvedPageNumber; -import org.apache.fop.area.inline.Word; import org.apache.fop.datatypes.ColorType; import org.apache.fop.fo.FOTreeVisitor; import org.apache.fop.fo.FONode; @@ -93,7 +88,6 @@ private String pageNumber; private String refId; private TextState ts; -private InlineArea inline = null; private boolean unresolved = false; /** @@ -111,52 +105,11 @@ fontInfo = foih.getFontInfo(); } -// if id can be resolved then simply return a word, otherwise -// return a resolveable area -public InlineArea getInlineArea(LayoutProcessor parentLM) { -if (refId.equals()) { -getLogger().error(page-number-citation must contain \ref-id\); -return null; -} -PageViewport page = parentLM.resolveRefID(refId); -if (page != null) { -String str = page.getPageNumber(); -// get page string from parent, build area -Word word = new Word(); -inline = word; -int width = getStringWidth(str); -word.setWord(str); -inline.setIPD(width); -inline.setHeight(fontState.getAscender() - - fontState.getDescender()); -inline.setOffset(fontState.getAscender()); - -inline.addTrait(Trait.FONT_NAME, fontState.getFontName()); -inline.addTrait(Trait.FONT_SIZE, -new Integer(fontState.getFontSize())); -unresolved = false; -} else { -unresolved = true; -inline = new UnresolvedPageNumber(refId); -String str = MMM; // reserve three spaces for page number -int width = getStringWidth(str); -inline.setIPD(width); -inline.setHeight(fontState.getAscender() - - fontState.getDescender()); -inline.setOffset(fontState.getAscender()); - -inline.addTrait(Trait.FONT_NAME, fontState.getFontName()); -inline.addTrait(Trait.FONT_SIZE, -new Integer(fontState.getFontSize())); -} -return inline; -} - /** * @param str string to be measured * @return width (in millipoints ??) of the string */ -protected int getStringWidth(String str) { +public int getStringWidth(String str) { int width = 0; for (int count = 0; count str.length(); count++) { width += CharUtilities.getCharWidth(str.charAt(count), @@ -222,16 +175,20 @@ return refId; } -public InlineArea getInline() { -return inline; -} - public boolean getUnresolved() { return unresolved; } +public void setUnresolved(boolean isUnresolved) { +unresolved = isUnresolved; +} + public void acceptVisitor(FOTreeVisitor fotv) { fotv.serveVisitor(this); +} + +public Font getFontState() { +return fontState; } } 1.12 +48 -3 xml-fop/src/java/org/apache/fop/layoutmgr/AddLMVisitor.java Index: AddLMVisitor.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/AddLMVisitor.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- AddLMVisitor.java 26 Aug 2003 15:05:33 - 1.11 +++ AddLMVisitor.java 26 Aug 2003 16:48:28 - 1.12 @@ -60,6 +60,7 @@ import org.apache.fop.area.inline.FilledArea; import org.apache.fop.area.inline.ForeignObject; import org.apache.fop.area.inline.Space; +import org.apache.fop.area.inline.UnresolvedPageNumber; import org.apache.fop.area.inline.Word; import
cvs commit: xml-fop/src/java/org/apache/fop/fo/flow PageNumber.java
vmote 2003/08/26 08:49:22 Modified:src/java/org/apache/fop/fo/flow PageNumber.java Log: remove unused field Revision ChangesPath 1.12 +0 -3 xml-fop/src/java/org/apache/fop/fo/flow/PageNumber.java Index: PageNumber.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/flow/PageNumber.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- PageNumber.java 22 Aug 2003 06:27:34 - 1.11 +++ PageNumber.java 26 Aug 2003 15:49:22 - 1.12 @@ -60,7 +60,6 @@ import org.apache.fop.fonts.Font; import org.apache.fop.fo.properties.CommonMarginInline; import org.apache.fop.fo.properties.CommonRelativePosition; -import org.apache.fop.layout.TextState; import org.apache.fop.datatypes.ColorType; import org.apache.fop.fo.FONode; @@ -81,7 +80,6 @@ private float green; private float blue; private int wrapOption; -private TextState ts; /** * @param parent FONode that is the parent of this object @@ -142,7 +140,6 @@ this.blue = c.getBlue(); this.wrapOption = this.properties.get(wrap-option).getEnum(); -ts = new TextState(); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/fo/flow PageNumberCitation.java
vmote 2003/08/26 09:58:57 Modified:src/java/org/apache/fop/fo/flow PageNumberCitation.java Log: remove unused field Revision ChangesPath 1.13 +0 -3 xml-fop/src/java/org/apache/fop/fo/flow/PageNumberCitation.java Index: PageNumberCitation.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/flow/PageNumberCitation.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- PageNumberCitation.java 26 Aug 2003 16:48:28 - 1.12 +++ PageNumberCitation.java 26 Aug 2003 16:58:57 - 1.13 @@ -64,8 +64,6 @@ import org.apache.fop.fonts.Font; import org.apache.fop.fo.properties.CommonMarginInline; import org.apache.fop.fo.properties.CommonRelativePosition; -import org.apache.fop.layout.TextState; -import org.apache.fop.layoutmgr.LayoutProcessor; import org.apache.fop.util.CharUtilities; /** @@ -87,7 +85,6 @@ private int wrapOption; private String pageNumber; private String refId; -private TextState ts; private boolean unresolved = false; /** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/layoutmgr LayoutManagerLS.java
vmote 2003/08/26 10:15:15 Modified:src/java/org/apache/fop/apps Document.java src/java/org/apache/fop/fo FOTreeBuilder.java FOTreeControl.java FOTreeVisitor.java src/java/org/apache/fop/layoutmgr LayoutManagerLS.java Log: move extensions package to fo.extensions (primarily to show that these classes are only related to the FO Tree itself) Revision ChangesPath 1.3 +2 -2 xml-fop/src/java/org/apache/fop/apps/Document.java Index: Document.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/apps/Document.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- Document.java 20 Aug 2003 19:46:47 - 1.2 +++ Document.java 26 Aug 2003 17:15:14 - 1.3 @@ -58,7 +58,7 @@ import org.apache.fop.area.AreaTree; import org.apache.fop.area.AreaTreeModel; -import org.apache.fop.extensions.Bookmarks; +import org.apache.fop.fo.extensions.Bookmarks; import org.apache.fop.fo.FOTreeControl; import org.apache.fop.fo.FOTreeEvent; import org.apache.fop.fo.FOTreeListener; 1.13 +1 -1 xml-fop/src/java/org/apache/fop/fo/FOTreeBuilder.java Index: FOTreeBuilder.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/FOTreeBuilder.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- FOTreeBuilder.java22 Aug 2003 17:42:41 - 1.12 +++ FOTreeBuilder.java26 Aug 2003 17:15:14 - 1.13 @@ -163,7 +163,7 @@ private void setupDefaultMappings() { addElementMapping(org.apache.fop.fo.FOElementMapping); addElementMapping(org.apache.fop.svg.SVGElementMapping); -addElementMapping(org.apache.fop.extensions.ExtensionElementMapping); +addElementMapping(org.apache.fop.fo.extensions.ExtensionElementMapping); // add mappings from available services Iterator providers = 1.4 +2 -2 xml-fop/src/java/org/apache/fop/fo/FOTreeControl.java Index: FOTreeControl.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/FOTreeControl.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- FOTreeControl.java20 Aug 2003 19:46:47 - 1.3 +++ FOTreeControl.java26 Aug 2003 17:15:14 - 1.4 @@ -55,7 +55,7 @@ import java.util.Map; // FOP -import org.apache.fop.extensions.Bookmarks; +import org.apache.fop.fo.extensions.Bookmarks; import org.apache.fop.fonts.FontMetrics; /** 1.2 +5 -5 xml-fop/src/java/org/apache/fop/fo/FOTreeVisitor.java Index: FOTreeVisitor.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/FOTreeVisitor.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- FOTreeVisitor.java19 Aug 2003 00:53:52 - 1.1 +++ FOTreeVisitor.java26 Aug 2003 17:15:14 - 1.2 @@ -55,10 +55,10 @@ import org.apache.fop.fo.pagination.ColorProfile; import org.apache.fop.fo.pagination.ConditionalPageMasterReference; import org.apache.fop.fo.pagination.Declarations; -import org.apache.fop.extensions.ExtensionObj; -import org.apache.fop.extensions.Bookmarks; -import org.apache.fop.extensions.Label; -import org.apache.fop.extensions.Outline; +import org.apache.fop.fo.extensions.ExtensionObj; +import org.apache.fop.fo.extensions.Bookmarks; +import org.apache.fop.fo.extensions.Label; +import org.apache.fop.fo.extensions.Outline; import org.apache.fop.fo.flow.ExternalGraphic; import org.apache.fop.fo.pagination.Flow; import org.apache.fop.fo.pagination.StaticContent; 1.9 +3 -2 xml-fop/src/java/org/apache/fop/layoutmgr/LayoutManagerLS.java Index: LayoutManagerLS.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/LayoutManagerLS.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- LayoutManagerLS.java 22 Aug 2003 17:42:41 - 1.8 +++ LayoutManagerLS.java 26 Aug 2003 17:15:14 - 1.9 @@ -51,7 +51,7 @@ package org.apache.fop.layoutmgr; import org.apache.fop.area.extensions.BookmarkData; -import org.apache.fop.extensions.Outline; +import org.apache.fop.fo.extensions.Outline; import org.apache.fop.apps.Document; import org.apache.fop.apps.FOPException; import org.apache.fop.layout.LayoutStrategy; @@ -60,6 +60,7 @@ import org.apache.fop.fo.pagination.PageSequence; import org.apache.fop.fo.FOTreeHandler
cvs commit: xml-fop/src/java/org/apache/fop/fo/extensions - New directory
vmote 2003/08/26 10:17:01 xml-fop/src/java/org/apache/fop/fo/extensions - New directory - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/fo/extensions Bookmarks.java ExtensionElementMapping.java ExtensionObj.java Label.java Outline.java
vmote 2003/08/26 10:17:59 Added: src/java/org/apache/fop/fo/extensions Bookmarks.java ExtensionElementMapping.java ExtensionObj.java Label.java Outline.java Removed: src/java/org/apache/fop/extensions Bookmarks.java ExtensionElementMapping.java ExtensionObj.java Label.java Outline.java Log: move extensions package to fo.extensions (primarily to show that these classes are only related to the FO Tree itself) Revision ChangesPath 1.1 xml-fop/src/java/org/apache/fop/fo/extensions/Bookmarks.java Index: Bookmarks.java === /* * $Id: Bookmarks.java,v 1.1 2003/08/26 17:17:59 vmote Exp $ * *The Apache Software License, Version 1.1 * * * Copyright (C) 1999-2003 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 *[EMAIL PROTECTED] * * 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 * APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- * DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON * 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 [EMAIL PROTECTED]. For more information on the Apache * Software Foundation, please see http://www.apache.org/. */ package org.apache.fop.fo.extensions; import org.apache.fop.fo.FONode; import org.apache.fop.fo.FOTreeVisitor; import java.util.ArrayList; import org.apache.fop.extensions.*; /** * Bookmarks data is the top level element of the pdf bookmark extension. * This handles the adding of outlines. When the element is ended it * creates the bookmark data and adds to the area tree. */ public class Bookmarks extends ExtensionObj { private ArrayList outlines = new ArrayList(); /** * Create a new Bookmarks object. * * @param parent the parent fo node */ public Bookmarks(FONode parent) { super(parent); } /** * Add the child to the top level. * This handles all Outline objects added and ignores others. * * @param obj the child to add */ protected void addChild(FONode obj) { if (obj instanceof Outline) { outlines.add(obj); } } /** * When this element is finished then it can create * the bookmark data from the child elements and add * the extension to the area tree. */ public void end() { getFOTreeControl().setBookmarks(this); } public void acceptVisitor
cvs commit: xml-fop/src/java/org/apache/fop/fo/extensions Bookmarks.java ExtensionElementMapping.java
vmote 2003/08/26 11:10:59 Modified:src/java/org/apache/fop/fo/extensions Bookmarks.java ExtensionElementMapping.java Log: remove invalid imports Revision ChangesPath 1.2 +1 -2 xml-fop/src/java/org/apache/fop/fo/extensions/Bookmarks.java Index: Bookmarks.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/extensions/Bookmarks.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- Bookmarks.java26 Aug 2003 17:17:59 - 1.1 +++ Bookmarks.java26 Aug 2003 18:10:59 - 1.2 @@ -54,7 +54,6 @@ import org.apache.fop.fo.FOTreeVisitor; import java.util.ArrayList; -import org.apache.fop.extensions.*; /** * Bookmarks data is the top level element of the pdf bookmark extension. 1.2 +1 -3 xml-fop/src/java/org/apache/fop/fo/extensions/ExtensionElementMapping.java Index: ExtensionElementMapping.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/extensions/ExtensionElementMapping.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- ExtensionElementMapping.java 26 Aug 2003 17:17:59 - 1.1 +++ ExtensionElementMapping.java 26 Aug 2003 18:10:59 - 1.2 @@ -55,8 +55,6 @@ import java.util.HashMap; -import org.apache.fop.extensions.*; - /** * Element mapping for the pdf bookmark extension. * This sets up the mapping for the classes that handle the - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/layoutmgr LayoutManagerLS.java
vmote 2003/08/26 12:28:46 Modified:src/java/org/apache/fop/apps Document.java src/java/org/apache/fop/layoutmgr LayoutManagerLS.java Log: don't try to create bookmarks in output unless there are some in the input (getting NPE) Revision ChangesPath 1.4 +2 -2 xml-fop/src/java/org/apache/fop/apps/Document.java Index: Document.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/apps/Document.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- Document.java 26 Aug 2003 17:15:14 - 1.3 +++ Document.java 26 Aug 2003 19:28:46 - 1.4 @@ -101,7 +101,7 @@ public AreaTree areaTree; public AreaTreeModel atModel; -private Bookmarks bookmarks; +private Bookmarks bookmarks = null; /** * Main constructor 1.10 +4 -1 xml-fop/src/java/org/apache/fop/layoutmgr/LayoutManagerLS.java Index: LayoutManagerLS.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/LayoutManagerLS.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- LayoutManagerLS.java 26 Aug 2003 17:15:14 - 1.9 +++ LayoutManagerLS.java 26 Aug 2003 19:28:46 - 1.10 @@ -139,6 +139,9 @@ * the extension to the area tree. */ public void addBookmarksToAreaTree() { +if (document.getBookmarks() == null) { +return; +} document.getDriver().getLogger().debug(adding bookmarks to area tree); BookmarkData data = new BookmarkData(); for (int count = 0; count document.getBookmarks().getOutlines().size(); count++) { - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/fo/flow ListItemLabel.java
vmote 2003/08/26 12:31:14 Modified:src/java/org/apache/fop/fo/flow ListItemLabel.java Log: remove unused import Revision ChangesPath 1.8 +0 -1 xml-fop/src/java/org/apache/fop/fo/flow/ListItemLabel.java Index: ListItemLabel.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/flow/ListItemLabel.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- ListItemLabel.java26 Aug 2003 14:35:42 - 1.7 +++ ListItemLabel.java26 Aug 2003 19:31:14 - 1.8 @@ -55,7 +55,6 @@ import org.apache.fop.fo.FObj; import org.apache.fop.fo.FOTreeVisitor; import org.apache.fop.fo.properties.CommonAccessibility; -import org.apache.fop.layoutmgr.list.Item; /** * Class modelling the fo:list-item-label object. See Sec. 6.8.5 of the XSL-FO - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/layoutmgr AddLMVisitor.java
vmote 2003/08/26 12:51:20 Modified:src/java/org/apache/fop/fo/flow Table.java TableColumn.java src/java/org/apache/fop/layoutmgr AddLMVisitor.java Log: 1. make fo/flow/Table.columns store fo columns instead of column layout managers 2. move fo/flow/TableColumn.getLayoutManager() to layoutmgr/AddLMVisitor.getTableColumnLayoutManager() 3. have layoutmgr/AddLMVisitor.serveVisitor(Table node) loop through the fo/flow/Table.columns collection and build its layout manager collection from it Revision ChangesPath 1.6 +1 -1 xml-fop/src/java/org/apache/fop/fo/flow/Table.java Index: Table.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/flow/Table.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- Table.java22 Aug 2003 06:27:34 - 1.5 +++ Table.java26 Aug 2003 19:51:20 - 1.6 @@ -115,7 +115,7 @@ if (columns == null) { columns = new ArrayList(); } -columns.add(((TableColumn)child).getLayoutManager()); +columns.add(((TableColumn)child)); } else if (child.getName().equals(fo:table-footer)) { tableFooter = (TableBody)child; } else if (child.getName().equals(fo:table-header)) { 1.7 +1 -12 xml-fop/src/java/org/apache/fop/fo/flow/TableColumn.java Index: TableColumn.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/flow/TableColumn.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- TableColumn.java 22 Aug 2003 17:42:41 - 1.6 +++ TableColumn.java 26 Aug 2003 19:51:20 - 1.7 @@ -60,9 +60,6 @@ import org.apache.fop.fo.properties.CommonBackground; import org.apache.fop.fo.properties.CommonBorderAndPadding; -import org.apache.fop.layoutmgr.LayoutManager; -import org.apache.fop.layoutmgr.table.Column; -import org.apache.fop.apps.*; /** * Class modelling the fo:table-column object. See Sec. 6.7.4 of the XSL-FO @@ -87,14 +84,6 @@ super(parent); } -public LayoutManager getLayoutManager() { -doSetup(); -Column clm = new Column(); -clm.setUserAgent(getUserAgent()); -clm.setFObj(this); -return clm; -} - /** * @return Length object containing column width */ @@ -132,7 +121,7 @@ return numColumnsRepeated; } -private void doSetup() { +public void doSetup() { // Common Border, Padding, and Background Properties // only background apply, border apply if border-collapse 1.13 +17 -2 xml-fop/src/java/org/apache/fop/layoutmgr/AddLMVisitor.java Index: AddLMVisitor.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/AddLMVisitor.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- AddLMVisitor.java 26 Aug 2003 16:48:28 - 1.12 +++ AddLMVisitor.java 26 Aug 2003 19:51:20 - 1.13 @@ -95,6 +95,7 @@ import org.apache.fop.fo.flow.Table; import org.apache.fop.fo.flow.TableBody; import org.apache.fop.fo.flow.TableCell; +import org.apache.fop.fo.flow.TableColumn; import org.apache.fop.fo.flow.TableRow; import org.apache.fop.fo.pagination.Flow; @@ -108,6 +109,7 @@ import org.apache.fop.layoutmgr.LayoutProcessor; import org.apache.fop.layoutmgr.LMiter; import org.apache.fop.layoutmgr.table.Cell; +import org.apache.fop.layoutmgr.table.Column; import org.apache.fop.layoutmgr.table.Body; import org.apache.fop.layoutmgr.table.Row; import org.apache.fop.layoutmgr.table.TableLayoutManager; @@ -782,7 +784,12 @@ TableLayoutManager tlm = new TableLayoutManager(); tlm.setUserAgent(node.getUserAgent()); tlm.setFObj(node); - tlm.setColumns(node.getColumns()); + ArrayList columnLMs = new ArrayList(); + ListIterator iter = node.getColumns().listIterator(); + while (iter.hasNext()) { + columnLMs.add(getTableColumnLayoutManager((TableColumn)iter.next())); + } + tlm.setColumns(columnLMs); if (node.getTableHeader() != null) { tlm.setTableHeader(getTableBodyLayoutManager(node.getTableHeader())); } @@ -790,6 +797,14 @@ tlm.setTableFooter(getTableBodyLayoutManager(node.getTableFooter())); } currentLMList.add(tlm); + } + + public LayoutManager getTableColumnLayoutManager(TableColumn node) { + node.doSetup(); + Column clm = new Column
cvs commit: xml-fop/src/java/org/apache/fop/layoutmgr PageLayoutManager.java
vmote 2003/08/26 13:32:26 Modified:src/java/org/apache/fop/fo/pagination PageSequence.java src/java/org/apache/fop/layoutmgr PageLayoutManager.java Log: move fo/pagination/PageSequence.createPage() to layoutmgr/PageLayoutManager Revision ChangesPath 1.10 +5 -46 xml-fop/src/java/org/apache/fop/fo/pagination/PageSequence.java Index: PageSequence.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/pagination/PageSequence.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- PageSequence.java 20 Aug 2003 17:56:24 - 1.9 +++ PageSequence.java 26 Aug 2003 20:32:26 - 1.10 @@ -54,8 +54,6 @@ import org.apache.fop.fo.FONode; import org.apache.fop.fo.FObj; import org.apache.fop.fo.FOTreeVisitor; -import org.apache.fop.layout.PageMaster; -import org.apache.fop.area.PageViewport; import org.apache.fop.apps.FOPException; // Java @@ -113,8 +111,6 @@ // state attributes used during layout // -private PageViewport currentPage; - // page number and related formatting variables private String ipnValue; private int currentPageNumber = 0; @@ -379,48 +375,6 @@ } /** - * Called by PageLayoutManager when it needs a new page on which to - * place content. The PageSequence manages the page number (odd/even), - * but the PLM tells it if the page is blank or is the last page. - * - * @param pageNumber the page number to create page for - * @param bIsBlank If true, use a master for a blank page. - * @param firstPage true if this is the first page - * @param bIsLast If true, use the master for the last page in the sequence. - * @return the page viewport created for the page number - * @throws FOPException if there is an error creating page - */ -public PageViewport createPage(int pageNumber, boolean bIsBlank, - boolean firstPage, boolean bIsLast) - throws FOPException { -if (this.pageSequenceMaster != null) { -this.currentSimplePageMaster = this.pageSequenceMaster - .getNextSimplePageMaster(((pageNumber % 2) == 1), - firstPage, - bIsBlank); -} -Region body = currentSimplePageMaster.getRegion(Region.BODY); -if (!this.mainFlow.getFlowName().equals(body.getRegionName())) { - throw new FOPException(Flow ' + this.mainFlow.getFlowName() - + ' does not map to the region-body in page-master ' - + currentSimplePageMaster.getMasterName() + '); -} -PageMaster pageMaster = this.currentSimplePageMaster.getPageMaster(); -PageViewport p = pageMaster.makePage(); -return p; -// The page will have a viewport/reference area pair defined -// for each region in the master. -// Set up the page itself -// SKIP ALL THIS FOR NOW!!! -// //this.root.setRunningPageNumberCounter(this.currentPageNumber); - -// this.pageCount++;// used for 'force-page-count' calculations - -// handle the 'force-page-count' -//forcePage(areaTree, firstAvailPageNumber); -} - -/** * Creates a new page area for the given parameters * @param areaTree the area tree the page should be contained in * @param firstAvailPageNumber the page number for this page @@ -742,6 +696,10 @@ return currentSimplePageMaster; } +public void setCurrentSimplePageMaster(SimplePageMaster simplePageMaster) { +this.currentSimplePageMaster = simplePageMaster; +} + /** * Get the static content FO node from the flow map. * This gets the static content flow for the given flow name. @@ -819,4 +777,5 @@ public Root getRoot() { return root; } + } 1.4 +55 -11xml-fop/src/java/org/apache/fop/layoutmgr/PageLayoutManager.java Index: PageLayoutManager.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/PageLayoutManager.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- PageLayoutManager.java22 Aug 2003 17:42:41 - 1.3 +++ PageLayoutManager.java26 Aug 2003 20:32:26 - 1.4 @@ -3,34 +3,34 @@ * *The Apache Software License, Version 1.1
cvs commit: xml-fop/src/java/org/apache/fop/layoutmgr PageLayoutManager.java
vmote 2003/08/26 15:11:18 Modified:src/java/org/apache/fop/fo/pagination Region.java SimplePageMaster.java src/java/org/apache/fop/layoutmgr PageLayoutManager.java Log: move logic from fo/pagination/SimplePageMaster.end() to layoutmgr/PageLayoutManager.createSimplePageMasterAreas() Revision ChangesPath 1.7 +1 -1 xml-fop/src/java/org/apache/fop/fo/pagination/Region.java Index: Region.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/pagination/Region.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- Region.java 24 Aug 2003 18:04:06 - 1.6 +++ Region.java 26 Aug 2003 22:11:17 - 1.7 @@ -204,7 +204,7 @@ * Area tree. * @return the region area class */ -protected abstract int getRegionAreaClass(); +public abstract int getRegionAreaClass(); /** * Returns the default region name (xsl-region-before, xsl-region-start, 1.7 +5 -67 xml-fop/src/java/org/apache/fop/fo/pagination/SimplePageMaster.java Index: SimplePageMaster.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/pagination/SimplePageMaster.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- SimplePageMaster.java 24 Aug 2003 18:04:06 - 1.6 +++ SimplePageMaster.java 26 Aug 2003 22:11:17 - 1.7 @@ -51,7 +51,6 @@ package org.apache.fop.fo.pagination; // Java -import java.awt.Rectangle; import java.util.HashMap; import java.util.Iterator; import java.util.Map; @@ -60,16 +59,12 @@ import org.xml.sax.Attributes; // FOP -import org.apache.fop.area.CTM; -import org.apache.fop.datatypes.FODimension; import org.apache.fop.fo.FONode; import org.apache.fop.fo.FObj; import org.apache.fop.fo.FOTreeVisitor; import org.apache.fop.area.PageViewport; import org.apache.fop.area.Page; -import org.apache.fop.area.RegionViewport; import org.apache.fop.area.RegionReference; -import org.apache.fop.fo.properties.CommonMarginBlock; import org.apache.fop.layout.PageMaster; import org.apache.fop.apps.FOPException; @@ -119,67 +114,6 @@ } /** - * At the end of this element read all the information and create - * the page master. - */ -protected void end() { -int pageWidth = -this.properties.get(page-width).getLength().getValue(); -int pageHeight = -this.properties.get(page-height).getLength().getValue(); -// this.properties.get(reference-orientation); -// this.properties.get(writing-mode); - -// Get absolute margin properties (top, left, bottom, right) -CommonMarginBlock mProps = propMgr.getMarginProps(); - -/* Create the page reference area rectangle (0,0 is at top left -* of the page media and y increases -* when moving towards the bottom of the page. -* The media rectangle itself is (0,0,pageWidth,pageHeight). -*/ -Rectangle pageRefRect = -new Rectangle(mProps.marginLeft, mProps.marginTop, -pageWidth - mProps.marginLeft - mProps.marginRight, -pageHeight - mProps.marginTop - mProps.marginBottom); - -// ??? KL shouldn't this take the viewport too??? -Page page = new Page(); // page reference area - -// Set up the CTM on the page reference area based on writing-mode -// and reference-orientation -FODimension reldims = new FODimension(0, 0); -CTM pageCTM = CTM.getCTMandRelDims(propMgr.getAbsRefOrient(), -propMgr.getWritingMode(), pageRefRect, reldims); - -// Create a RegionViewport/ reference area pair for each page region - -boolean bHasBody = false; - -for (Iterator regenum = regions.values().iterator(); - regenum.hasNext();) { -Region r = (Region)regenum.next(); -RegionViewport rvp = r.makeRegionViewport(reldims, pageCTM); -rvp.setRegion(r.makeRegionReferenceArea(rvp.getViewArea())); -page.setRegion(r.getRegionAreaClass(), rvp); -if (r.getRegionAreaClass() == RegionReference.BODY) { -bHasBody = true; -} -} - -if (!bHasBody) { -getLogger().error(simple-page-master has no region-body); -} - -this.pageMaster = new PageMaster(new PageViewport(page, -new Rectangle(0, 0, pageWidth, pageHeight))); - -// regions = null; // PageSequence access SimplePageMaster -children
cvs commit: xml-fop/src/java/org/apache/fop/fo/pagination SimplePageMaster.java
vmote 2003/08/26 15:22:37 Modified:src/java/org/apache/fop/fo/pagination SimplePageMaster.java Log: remove unused imports Revision ChangesPath 1.8 +0 -3 xml-fop/src/java/org/apache/fop/fo/pagination/SimplePageMaster.java Index: SimplePageMaster.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/pagination/SimplePageMaster.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- SimplePageMaster.java 26 Aug 2003 22:11:17 - 1.7 +++ SimplePageMaster.java 26 Aug 2003 22:22:37 - 1.8 @@ -62,9 +62,6 @@ import org.apache.fop.fo.FONode; import org.apache.fop.fo.FObj; import org.apache.fop.fo.FOTreeVisitor; -import org.apache.fop.area.PageViewport; -import org.apache.fop.area.Page; -import org.apache.fop.area.RegionReference; import org.apache.fop.layout.PageMaster; import org.apache.fop.apps.FOPException; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/fo PropertyManager.java
vmote 2003/08/24 10:46:10 Modified:src/java/org/apache/fop/area CTM.java src/java/org/apache/fop/fo PropertyManager.java Log: move property resolution logic from area/CTM.getCTMandRelDims() back to fo/PropertyManager Revision ChangesPath 1.4 +2 -3 xml-fop/src/java/org/apache/fop/area/CTM.java Index: CTM.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/area/CTM.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- CTM.java 23 Aug 2003 19:26:30 - 1.3 +++ CTM.java 24 Aug 2003 17:46:10 - 1.4 @@ -290,8 +290,7 @@ int width, height; // We will use the absolute reference-orientation to set up the CTM. // The value here is relative to its ancestor reference area. -int absRefOrient = pm.getAbsRefOrient( - pm.getProperties().get(reference-orientation).getNumber().intValue()); +int absRefOrient = pm.getAbsRefOrient(); if (absRefOrient % 180 == 0) { width = (int) absVPrect.getWidth(); height = (int) absVPrect.getHeight(); @@ -327,7 +326,7 @@ } ctm = ctm.rotate(absRefOrient); } -int wm = pm.getProperties().get(writing-mode).getEnum(); +int wm = pm.getWritingMode(); /* Since we've already put adjusted width and height values for the * top and left positions implied by the reference-orientation, we * can set ipd and bpd appropriately based on the writing mode. 1.11 +6 -2 xml-fop/src/java/org/apache/fop/fo/PropertyManager.java Index: PropertyManager.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/PropertyManager.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- PropertyManager.java 23 Aug 2003 19:26:30 - 1.10 +++ PropertyManager.java 24 Aug 2003 17:46:10 - 1.11 @@ -511,8 +511,12 @@ /** * Calculate absolute reference-orientation relative to media orientation. */ -public int getAbsRefOrient(int myRefOrient) { -return myRefOrient; +public int getAbsRefOrient() { +return properties.get(reference-orientation).getNumber().intValue(); +} + +public int getWritingMode() { +return properties.get(writing-mode).getEnum(); } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/layoutmgr AddLMVisitor.java
vmote 2003/08/24 12:22:59 Modified:src/java/org/apache/fop/fo/flow ExternalGraphic.java src/java/org/apache/fop/layoutmgr AddLMVisitor.java Log: move fo/flow/ExternalGraphic.getInlineArea() to layoutmgr/AddLMVisitor.getExternalGraphicInlineArea() Revision ChangesPath 1.7 +16 -34xml-fop/src/java/org/apache/fop/fo/flow/ExternalGraphic.java Index: ExternalGraphic.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/flow/ExternalGraphic.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- ExternalGraphic.java 22 Aug 2003 17:42:41 - 1.6 +++ ExternalGraphic.java 24 Aug 2003 19:22:59 - 1.7 @@ -54,8 +54,6 @@ import org.apache.fop.fo.FONode; import org.apache.fop.fo.FObj; import org.apache.fop.fo.FOTreeVisitor; -import org.apache.fop.fo.properties.CommonBorderAndPadding; -import org.apache.fop.fo.properties.CommonBackground; import org.apache.fop.fo.properties.TextAlign; import org.apache.fop.fo.properties.Overflow; import org.apache.fop.fo.properties.DisplayAlign; @@ -63,9 +61,6 @@ import org.apache.fop.image.ImageFactory; import org.apache.fop.image.FopImage; import org.apache.fop.area.inline.InlineArea; -import org.apache.fop.layoutmgr.TraitSetter; -import org.apache.fop.area.inline.Image; -import org.apache.fop.area.inline.Viewport; import org.apache.fop.datatypes.Length; // Java @@ -101,34 +96,6 @@ } /** - * Get the inline area for this external grpahic. - * This creates the image area and puts it inside a viewport. - * - * @return the viewport containing the image area - */ -public InlineArea getInlineArea() { -setup(); -if (url == null) { -return null; -} -Image imArea = new Image(url); -Viewport vp = new Viewport(imArea); -vp.setWidth(viewWidth); -vp.setHeight(viewHeight); -vp.setClip(clip); -vp.setContentPosition(placement); -vp.setOffset(0); - -// Common Border, Padding, and Background Properties -CommonBorderAndPadding bap = propMgr.getBorderAndPadding(); -CommonBackground bProps = propMgr.getBackgroundProps(); -TraitSetter.addBorders(vp, bap); -TraitSetter.addBackground(vp, bProps); - -return vp; -} - -/** * Setup this image. * This gets the sizes for the image and the dimensions and clipping. */ @@ -286,5 +253,20 @@ fotv.serveVisitor(this); } -} +public String getURL() { +return url; +} + +public int getViewWidth() { +return viewWidth; +} + +public boolean getClip() { +return clip; +} + +public Rectangle2D getPlacement() { +return placement; +} +} 1.5 +34 -2 xml-fop/src/java/org/apache/fop/layoutmgr/AddLMVisitor.java Index: AddLMVisitor.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/AddLMVisitor.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- AddLMVisitor.java 24 Aug 2003 18:52:19 - 1.4 +++ AddLMVisitor.java 24 Aug 2003 19:22:59 - 1.5 @@ -60,6 +60,8 @@ import org.apache.fop.area.inline.FilledArea; import org.apache.fop.area.inline.Space; import org.apache.fop.area.inline.Word; +import org.apache.fop.area.inline.Image; +import org.apache.fop.area.inline.Viewport; import org.apache.fop.fo.FOTreeVisitor; import org.apache.fop.fo.FObj; @@ -89,6 +91,8 @@ import org.apache.fop.fo.pagination.Flow; import org.apache.fop.fo.properties.LeaderPattern; +import org.apache.fop.fo.properties.CommonBorderAndPadding; +import org.apache.fop.fo.properties.CommonBackground; import org.apache.fop.layoutmgr.BidiLayoutManager; import org.apache.fop.layoutmgr.LayoutProcessor; @@ -396,7 +400,7 @@ * created viewport/image area. */ public void serveVisitor(ExternalGraphic node) { - InlineArea area = node.getInlineArea(); + InlineArea area = getExternalGraphicInlineArea(node); if (area != null) { node.setupID(); LeafNodeLayoutManager lm = new LeafNodeLayoutManager(); @@ -407,6 +411,34 @@ lm.setLead(node.getViewHeight()); currentLMList.add(lm); } + } + + /** + * Get the inline area for this external grpahic. + * This creates the image area and puts it inside a viewport. + * + * @return the viewport containing the image area + */ + public InlineArea getExternalGraphicInlineArea