cvs commit: xml-fop/src/java/org/apache/fop/fonts FontInfo.java
gmazza 2004/04/21 16:08:51 Added: src/java/org/apache/fop/fonts FontInfo.java Log: New FontInfo class (original design was from Layout.FontInfo, and was removed and placed into the Document class last year). This class is to be an encapsulation of the Font information within apps.Document, also to be used in Transcoder and other non-XSL-specific classes and packages instead of an apps.Document object, in those cases where the latter either presents too much information and/or is not relevant for referenced class' task. Currently not used, pending new patch in Bugzilla. Revision ChangesPath 1.1 xml-fop/src/java/org/apache/fop/fonts/FontInfo.java Index: FontInfo.java === /* * Copyright 2004 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an AS IS BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /* $Id: FontInfo.java,v 1.1 2004/04/21 23:08:51 gmazza Exp $ */ package org.apache.fop.fonts; // Java import java.util.Map; /** * The FontInfo for the layout and rendering of a fo document. * This stores the list of available fonts that are setup by * the renderer. The font name can be retrieved for the * family style and weight. * br * Currently font supported font-variant small-caps is not * implemented. */ public class FontInfo { /** Map containing fonts that have been used */ private Map usedFonts; /** look up a font-triplet to find a font-name */ private Map triplets; /** look up a font-name to get a font (that implements FontMetrics at least) */ private Map fonts; /** * Main constructor */ public FontInfo() { this.triplets = new java.util.HashMap(); this.fonts = new java.util.HashMap(); this.usedFonts = new java.util.HashMap(); } /** * Checks if the font setup is valid (At least the ultimate fallback font * must be registered.) * @return True if valid */ public boolean isSetupValid() { return triplets.containsKey(Font.DEFAULT_FONT); } /** * Adds a new font triplet. * @param name internal key * @param family font family name * @param style font style (normal, italic, oblique...) * @param weight font weight */ public void addFontProperties(String name, String family, String style, int weight) { /* * add the given family, style and weight as a lookup for the font * with the given name */ String key = createFontKey(family, style, weight); this.triplets.put(key, name); } /** * Adds font metrics for a specific font. * @param name internal key * @param metrics metrics to register */ public void addMetrics(String name, FontMetrics metrics) { // add the given metrics as a font with the given name this.fonts.put(name, metrics); } /** * Lookup a font. * br * Locate the font name for a given family, style and weight. * The font name can then be used as a key as it is unique for * the associated document. * This also adds the font to the list of used fonts. * @param family font family * @param style font style * @param weight font weight * @return internal key */ public String fontLookup(String family, String style, int weight) { String key; // first try given parameters key = createFontKey(family, style, weight); String f = (String)triplets.get(key); if (f == null) { // then adjust weight, favouring normal or bold f = findAdjustWeight(family, style, weight); // then try any family with orig weight if (f == null) { key = createFontKey(any, style, weight); f = (String)triplets.get(key); } // then try any family with adjusted weight if (f == null) { f = findAdjustWeight(family, style, weight); } // then use default if (f == null) { f = (String
cvs commit: xml-fop/src/java/org/apache/fop/apps CommandLineOptions.java
gmazza 2004/04/18 15:39:02 Modified:.fop.bat fop.sh src/java/org/apache/fop/apps CommandLineOptions.java Log: Remaining changes done with Avalon-Commons Logging conversion. (Bug 28237) Revision ChangesPath 1.19 +16 -1 xml-fop/fop.bat Index: fop.bat === RCS file: /home/cvs/xml-fop/fop.bat,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- fop.bat 31 Mar 2004 10:55:05 - 1.18 +++ fop.bat 18 Apr 2004 22:39:02 - 1.19 @@ -21,6 +21,21 @@ rem and for NT handling to skip to. :doneStart +set LOGCHOICE= +rem The default commons logger for JDK1.4 is JDK1.4Logger. +rem To use a different logger, uncomment the one desired below +rem set LOGCHOICE=-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.NoOpLog +rem set LOGCHOICE=-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog +rem set LOGCHOICE=-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger + +set LOGLEVEL= +rem Logging levels +rem Below option is only if you are using SimpleLog instead of the default JDK1.4 Logger. +rem To set logging levels for JDK 1.4 Logger, edit the %JAVA_HOME%\JRE\LIB\logging.properties +rem file instead. +rem Possible SimpleLog values: trace, debug, info (default), warn, error, or fatal. +rem set LOGLEVEL=-Dorg.apache.commons.logging.simplelog.defaultlog=INFO + set LIBDIR=%LOCAL_FOP_HOME%lib set LOCALCLASSPATH=%LOCAL_FOP_HOME%build\fop.jar set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\xml-apis.jar @@ -34,5 +49,5 @@ set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\jai_core.jar set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\jai_codec.jar -java -cp %LOCALCLASSPATH% org.apache.fop.apps.Fop %FOP_CMD_LINE_ARGS% +java %LOGCHOICE% %LOGLEVEL% -cp %LOCALCLASSPATH% org.apache.fop.apps.Fop %FOP_CMD_LINE_ARGS% 1.6 +16 -1 xml-fop/fop.sh Index: fop.sh === RCS file: /home/cvs/xml-fop/fop.sh,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- fop.sh30 Nov 2002 08:54:25 - 1.5 +++ fop.sh18 Apr 2004 22:39:02 - 1.6 @@ -100,5 +100,20 @@ LOCALCLASSPATH=`cygpath --path --windows $LOCALCLASSPATH` fi -$JAVACMD -classpath $LOCALCLASSPATH $FOP_OPTS org.apache.fop.apps.Fop $@ +LOGCHOICE= +# The default commons logger for JDK1.4 is JDK1.4Logger. +# To use a different logger, uncomment the one desired below +# LOGCHOICE=-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.NoOpLog +# LOGCHOICE=-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog +# LOGCHOICE=-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger + +LOGLEVEL= +# Logging levels +# Below option is only if you are using SimpleLog instead of the default JDK1.4 Logger. +# To set logging levels for JDK 1.4 Logger, edit the %JAVA_HOME%/JRE/LIB/logging.properties +# file instead. +# Possible SimpleLog values: trace, debug, info (default), warn, error, or fatal. +# LOGLEVEL=-Dorg.apache.commons.logging.simplelog.defaultlog=INFO + +$JAVACMD $LOGCHOICE $LOGLEVEL -classpath $LOCALCLASSPATH $FOP_OPTS org.apache.fop.apps.Fop $@ 1.18 +33 -50xml-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.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- CommandLineOptions.java 9 Apr 2004 03:05:40 - 1.17 +++ CommandLineOptions.java 18 Apr 2004 22:39:02 - 1.18 @@ -61,8 +61,6 @@ /* show configuration information */ private Boolean showConfiguration = Boolean.FALSE; -/* suppress any progress information */ -private Boolean quiet = Boolean.FALSE; /* for area tree XML output, only down to block area level */ private Boolean suppressLowLevelAreas = Boolean.FALSE; /* user configuration file */ @@ -132,16 +130,9 @@ */ private boolean parseOptions(String[] args) throws FOPException { for (int i = 0; i args.length; i++) { -if (args[i].equals(-d) || args[i].equals(--full-error-dump)) { -log = new SimpleLog(FOP); -((SimpleLog) log).setLevel(SimpleLog.LOG_LEVEL_DEBUG); -} else if (args[i].equals(-x) +if (args[i].equals(-x) || args[i].equals(--dump-config)) { showConfiguration = Boolean.TRUE; -} else if (args[i].equals(-q) || args[i].equals(--quiet)) { -quiet
cvs commit: xml-fop/examples/fo/pagination basic2.fo franklin_alt.fo franklin_rep.fo franklin_rep_max_repeats.fo
gmazza 2004/04/17 19:01:24 Modified:examples/fo/pagination basic2.fo franklin_alt.fo franklin_rep.fo Removed: examples/fo/pagination franklin_rep_max_repeats.fo Log: More consolidation of pagination examples. Revision ChangesPath 1.4 +1 -1 xml-fop/examples/fo/pagination/basic2.fo Index: basic2.fo === RCS file: /home/cvs/xml-fop/examples/fo/pagination/basic2.fo,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- basic2.fo 9 Mar 2004 22:44:35 - 1.3 +++ basic2.fo 18 Apr 2004 02:01:24 - 1.4 @@ -48,7 +48,7 @@ fo:block text-align=end font-size=10pt font-family=serif -line-height=14pt +line-height=14pt XML Recommendation - p. fo:page-number/ /fo:block /fo:static-content 1.5 +0 -13 xml-fop/examples/fo/pagination/franklin_alt.fo Index: franklin_alt.fo === RCS file: /home/cvs/xml-fop/examples/fo/pagination/franklin_alt.fo,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- franklin_alt.fo 22 Mar 2004 23:24:52 - 1.4 +++ franklin_alt.fo 18 Apr 2004 02:01:24 - 1.5 @@ -30,25 +30,12 @@ fo:region-after extent=2cm/ /fo:simple-page-master - fo:simple-page-master master-name=center -page-height=21.7cm -page-width=16cm -margin-top=1cm -margin-bottom=1cm -margin-left=2.5cm -margin-right=2.5cm - fo:region-body margin-top=2cm margin-bottom=2cm/ - fo:region-before extent=2cm/ - fo:region-after extent=2cm/ -/fo:simple-page-master - fo:page-sequence-master master-name=alternating fo:repeatable-page-master-alternatives maximum-repeats=no-limit fo:conditional-page-master-reference master-reference=right odd-or-even=odd / fo:conditional-page-master-reference master-reference=left odd-or-even=even / - fo:conditional-page-master-reference master-reference=center/ /fo:repeatable-page-master-alternatives /fo:page-sequence-master 1.5 +8 -3 xml-fop/examples/fo/pagination/franklin_rep.fo Index: franklin_rep.fo === RCS file: /home/cvs/xml-fop/examples/fo/pagination/franklin_rep.fo,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- franklin_rep.fo 22 Mar 2004 23:55:54 - 1.4 +++ franklin_rep.fo 18 Apr 2004 02:01:24 - 1.5 @@ -19,9 +19,14 @@ /fo:simple-page-master fo:page-sequence-master master-name=repeating_pm - !-- note for fo:repeatable-page-master-reference, if maximum-repeats -property unspecified, as here, no-limit is the default value -- - fo:repeatable-page-master-reference master-reference=singleSPM/ + !-- note for an fo:repeatable-page-master-reference, no-limit + is the default value for the maximum-repeats property + -- + fo:repeatable-page-master-reference master-reference=singleSPM +maximum-repeats=15/ + !-- this page-master-reference used after maximum-repeats + above exhausted -- + fo:single-page-master-reference master-reference=singleSPM/ /fo:page-sequence-master /fo:layout-master-set !-- end: defines page layout -- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/fo/pagination PageSequence.java
gmazza 2004/04/17 19:50:46 Modified:src/java/org/apache/fop/fo/pagination PageSequence.java Log: Apparent off-by-one error fixed for initial-page-number property: http://www.w3.org/TR/2003/WD-xsl11-20031217/#initial-page-number Revision ChangesPath 1.20 +1 -1 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.19 retrieving revision 1.20 diff -u -r1.19 -r1.20 --- PageSequence.java 31 Mar 2004 10:55:06 - 1.19 +++ PageSequence.java 18 Apr 2004 02:50:46 - 1.20 @@ -169,7 +169,7 @@ pageNumberType = EXPLICIT; try { int pageStart = new Integer(ipnValue).intValue(); -this.explicitFirstNumber = (pageStart 0) ? pageStart - 1 : 0; +this.explicitFirstNumber = (pageStart 0) ? pageStart : 1; } catch (NumberFormatException nfe) { throw new FOPException(\ + ipnValue + \ is not a valid value for initial-page-number); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/examples/embedding/java/embedding ExampleDOM2PDF.java ExampleFO2PDF.java ExampleObj2PDF.java ExampleObj2XML.java ExampleSVG2PDF.java ExampleXML2FO.java ExampleXML2PDF.java
gmazza 2004/04/14 15:57:10 Modified:examples/embedding/java/embedding ExampleDOM2PDF.java ExampleFO2PDF.java ExampleObj2PDF.java ExampleObj2XML.java ExampleSVG2PDF.java ExampleXML2FO.java ExampleXML2PDF.java Log: Used standard Java exception-printing method printStackTrace(PrintStream) instead of Avalon equivalent. Revision ChangesPath 1.6 +3 -5 xml-fop/examples/embedding/java/embedding/ExampleDOM2PDF.java Index: ExampleDOM2PDF.java === RCS file: /home/cvs/xml-fop/examples/embedding/java/embedding/ExampleDOM2PDF.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- ExampleDOM2PDF.java 1 Apr 2004 23:24:57 - 1.5 +++ ExampleDOM2PDF.java 14 Apr 2004 22:57:10 - 1.6 @@ -33,9 +33,6 @@ import org.w3c.dom.Node; import org.w3c.dom.Text; -//Avalon -import org.apache.avalon.framework.ExceptionUtil; - // Commons-Logging import org.apache.commons.logging.impl.SimpleLog; @@ -141,8 +138,9 @@ app.convertDOM2PDF(foDoc, pdffile); System.out.println(Success!); + } catch (Exception e) { -System.err.println(ExceptionUtil.printStackTrace(e)); +e.printStackTrace(System.err); System.exit(-1); } } 1.6 +1 -4 xml-fop/examples/embedding/java/embedding/ExampleFO2PDF.java Index: ExampleFO2PDF.java === RCS file: /home/cvs/xml-fop/examples/embedding/java/embedding/ExampleFO2PDF.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- ExampleFO2PDF.java1 Apr 2004 23:24:57 - 1.5 +++ ExampleFO2PDF.java14 Apr 2004 22:57:10 - 1.6 @@ -27,9 +27,6 @@ //SAX import org.xml.sax.InputSource; -//Avalon -import org.apache.avalon.framework.ExceptionUtil; - // Commons-Logging import org.apache.commons.logging.impl.SimpleLog; @@ -113,7 +110,7 @@ System.out.println(Success!); } catch (Exception e) { -System.err.println(ExceptionUtil.printStackTrace(e)); +e.printStackTrace(System.err); System.exit(-1); } } 1.6 +1 -4 xml-fop/examples/embedding/java/embedding/ExampleObj2PDF.java Index: ExampleObj2PDF.java === RCS file: /home/cvs/xml-fop/examples/embedding/java/embedding/ExampleObj2PDF.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- ExampleObj2PDF.java 1 Apr 2004 23:24:57 - 1.5 +++ ExampleObj2PDF.java 14 Apr 2004 22:57:10 - 1.6 @@ -32,9 +32,6 @@ import javax.xml.transform.stream.StreamSource; import javax.xml.transform.sax.SAXResult; -//Avalon -import org.apache.avalon.framework.ExceptionUtil; - // Commons-Logging import org.apache.commons.logging.impl.SimpleLog; @@ -127,7 +124,7 @@ System.out.println(Success!); } catch (Exception e) { -System.err.println(ExceptionUtil.printStackTrace(e)); +e.printStackTrace(System.err); System.exit(-1); } } 1.4 +1 -4 xml-fop/examples/embedding/java/embedding/ExampleObj2XML.java Index: ExampleObj2XML.java === RCS file: /home/cvs/xml-fop/examples/embedding/java/embedding/ExampleObj2XML.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- ExampleObj2XML.java 27 Feb 2004 17:34:50 - 1.3 +++ ExampleObj2XML.java 14 Apr 2004 22:57:10 - 1.4 @@ -30,9 +30,6 @@ import javax.xml.transform.Result; import javax.xml.transform.stream.StreamResult; -//Avalon -import org.apache.avalon.framework.ExceptionUtil; - import embedding.model.ProjectMember; import embedding.model.ProjectTeam; @@ -118,7 +115,7 @@ System.out.println(Success!); } catch (Exception e) { -System.err.println(ExceptionUtil.printStackTrace(e)); +e.printStackTrace(System.err); System.exit(-1); } } 1.4 +1 -4 xml-fop/examples/embedding/java/embedding/ExampleSVG2PDF.java Index: ExampleSVG2PDF.java === RCS file: /home/cvs/xml-fop/examples/embedding/java/embedding/ExampleSVG2PDF.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- ExampleSVG2PDF.java 27 Feb 2004 17:34:50
cvs commit: xml-fop/src/documentation/content/xdocs embedding.xml
gmazza 2004/04/11 14:53:41 Modified:src/documentation/content/xdocs embedding.xml Log: Returned documentation on how to do Avalon logging; documentation now in two sections. Revision ChangesPath 1.21 +29 -4 xml-fop/src/documentation/content/xdocs/embedding.xml Index: embedding.xml === RCS file: /home/cvs/xml-fop/src/documentation/content/xdocs/embedding.xml,v retrieving revision 1.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- embedding.xml 1 Apr 2004 23:38:44 - 1.20 +++ embedding.xml 11 Apr 2004 21:53:41 - 1.21 @@ -65,12 +65,37 @@ In the example above, args[0] contains the path to an XSL-FO file, while args[1] contains a path for the target PDF file. /p - section id=basic-logging + section id=basic-logging titleLogging/title p You also need to set up logging. Global logging for all FOP processes is managed by MessageHandler. Per-instance logging is handled by Driver. You want to set both using an implementation + of org.apache.avalon.framework.logger.Logger. See + jump href=#loggingbelow/jump for more information. +/p +p + Call codesetLogger(Logger)/code always immediately after + instantiating the Driver object. See here: +/p +source![CDATA[ +import org.apache.avalon.framework.logger.Logger; +import org.apache.avalon.framework.logger.ConsoleLogger; + +/*..*/ + +Driver driver = new Driver(); +Logger logger = new ConsoleLogger(ConsoleLogger.LEVEL_INFO); +MessageHandler.setScreenLogger(logger); +driver.setLogger(logger);]]/source + /section + + section id=basic-logging-new-version +titleLogging (Upcoming FOP 1.0 Version only)/title +p + You also need to set up logging. Global logging for all FOP + processes is managed by MessageHandler. Per-instance logging + is handled by Driver. You want to set both using an implementation of org.apache.commons.logging.Log. See jump href=#loggingbelow/jump for more information. /p @@ -160,7 +185,7 @@ section id=logging titleControlling logging/title p - FOP uses the + Current FOP 0.20.x production uses the fork href=http://avalon.apache.org/framework/api/org/apache/avalon/framework/logger/package-summary.html;Logger package/fork from Apache Avalon Framework to do logging. See the fork href=http://avalon.apache.org/framework/;Apache Avalon Framework/fork - 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 Fop.java
gmazza 2004/04/08 20:05:40 Modified:src/java/org/apache/fop/apps CommandLineOptions.java Fop.java Log: 3/4ths of Simon's patch committed at the moment, with minor changes made. Revision ChangesPath 1.17 +19 -37xml-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.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- CommandLineOptions.java 31 Mar 2004 10:55:05 - 1.16 +++ CommandLineOptions.java 9 Apr 2004 03:05:40 - 1.17 @@ -1,5 +1,4 @@ -/* - * Copyright 1999-2004 The Apache Software Foundation. +/* Copyright 1999-2004 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. @@ -24,6 +23,8 @@ import java.util.Locale; import java.util.Vector; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.impl.SimpleLog; /** @@ -59,7 +60,7 @@ public static final int RTF_OUTPUT = 10; /* show configuration information */ -private Boolean dumpConfiguration = Boolean.FALSE; +private Boolean showConfiguration = Boolean.FALSE; /* suppress any progress information */ private Boolean quiet = Boolean.FALSE; /* for area tree XML output, only down to block area level */ @@ -81,7 +82,7 @@ private java.util.HashMap rendererOptions; -private SimpleLog log; +private Log log; private Vector xsltParams = null; @@ -94,14 +95,16 @@ public CommandLineOptions(String[] args) throws FOPException, FileNotFoundException { -log = new SimpleLog(FOP); -log.setLevel(SimpleLog.LOG_LEVEL_INFO); - +log = LogFactory.getLog(FOP); + boolean optionsParsed = true; rendererOptions = new java.util.HashMap(); try { optionsParsed = parseOptions(args); if (optionsParsed) { +if (showConfiguration == Boolean.TRUE) { +dumpConfiguration(); +} checkSettings(); } } catch (FOPException e) { @@ -117,7 +120,7 @@ * Get the logger. * @return the logger */ -public SimpleLog getLogger() { +public Log getLogger() { return log; } @@ -131,14 +134,14 @@ for (int i = 0; i args.length; i++) { if (args[i].equals(-d) || args[i].equals(--full-error-dump)) { log = new SimpleLog(FOP); -log.setLevel(SimpleLog.LOG_LEVEL_DEBUG); +((SimpleLog) log).setLevel(SimpleLog.LOG_LEVEL_DEBUG); } else if (args[i].equals(-x) || args[i].equals(--dump-config)) { -dumpConfiguration = Boolean.TRUE; +showConfiguration = Boolean.TRUE; } else if (args[i].equals(-q) || args[i].equals(--quiet)) { quiet = Boolean.TRUE; log = new SimpleLog(FOP); -log.setLevel(SimpleLog.LOG_LEVEL_ERROR); +((SimpleLog) log).setLevel(SimpleLog.LOG_LEVEL_ERROR); } else if (args[i].equals(-c)) { i = i + parseConfigurationOption(args, i); } else if (args[i].equals(-l)) { @@ -548,22 +551,6 @@ } /** - * Indicates if FOP should be silent. - * @return true if should be silent - */ -public Boolean isQuiet() { -return quiet; -} - -/** - * Indicates if FOP should dump its configuration during runtime. - * @return true if config dump is enabled - */ -public Boolean dumpConfiguration() { -return dumpConfiguration; -} - -/** * Indicates whether the XML renderer should generate course area XML * @return true if coarse area XML is desired */ @@ -643,7 +630,7 @@ /** * debug mode. outputs all commandline settings */ -private void debug() { +private void dumpConfiguration() { log.debug(Input mode: ); switch (inputmode) { case NOT_SET: @@ -712,25 +699,20 @@ log.debug(unknown input type); } - log.debug(OPTIONS); + if (userConfigFile != null) { log.debug(user configuration file: + userConfigFile.toString()); } else { log.debug(no user configuration file is used [default
cvs commit: xml-fop/src/java/org/apache/fop/fo FOText.java
gmazza 2004/04/06 15:50:44 Modified:src/java/org/apache/fop/fo FOText.java Log: Comments added. Revision ChangesPath 1.19 +10 -1 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.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- FOText.java 4 Apr 2004 06:29:44 - 1.18 +++ FOText.java 6 Apr 2004 22:50:44 - 1.19 @@ -443,6 +443,14 @@ private class TextCharIterator extends AbstractCharIterator { private int curIndex = 0; + +/* Current space removal process: just increment the startIndex + to remove leading spaces from ca, until an unremoved character + is found. Then perform arraycopy's to remove extra spaces + between words. nextCharCalled is used to determine if an + unremoved character has already been found--if its value 2 + than it means that has occurred (it is reset to zero each time we + remove a space via incrementing the startIndex.) */ private int nextCharCalled = 0; public boolean hasNext() { @@ -476,7 +484,8 @@ // System.out.println(removeB: + new String(ca, startIndex, endIndex - startIndex)); } else if (curIndex == endIndex) { // System.out.println(removeC: + new String(ca, startIndex, endIndex - startIndex)); -curIndex = --endIndex; +endIndex--; +curIndex--; } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/render/rtf RTFHandler.java
gmazza 2004/04/03 22:29:44 Modified:src/java/org/apache/fop/fo FOText.java FObjMixed.java src/java/org/apache/fop/layoutmgr AddLMVisitor.java TextLayoutManager.java src/java/org/apache/fop/render/rtf RTFHandler.java Log: Another attempt at fixing the space removal issue. This method combines the long-standing previous method (the one that removed spaces between words correctly, at a cost of a leading extra space for the first FOText instance of an fo:block) with my later patch (which would fix the extra space issue but had problems with spaces between words). It appears to work well, but the fo:inline issues Simon brought up will still need further work. Revision ChangesPath 1.18 +73 -43xml-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.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- FOText.java 12 Mar 2004 00:41:04 - 1.17 +++ FOText.java 4 Apr 2004 06:29:44 - 1.18 @@ -47,11 +47,21 @@ * The starting valid index of the ca array * to be processed. * + * This value is originally equal to 0, but becomes + * incremented during leading whitespace removal by the flow.Block class, + * via the TextCharIterator.remove() method below. + */ +public int startIndex = 0; + +/** + * The ending valid index of the ca array + * to be processed. + * * This value is originally equal to ca.length, but becomes - * incremented during whitespace removal by the flow.Block class, + * decremented during between-word whitespace removal by the flow.Block class, * via the TextCharIterator.remove() method below. */ -public int start = 0; +public int endIndex = 0; /** * The TextInfo object attached to the text @@ -100,9 +110,10 @@ */ public FOText(char[] chars, int start, int end, TextInfo ti, FONode parent) { super(parent); -int length = end - start; -this.ca = new char[length]; -System.arraycopy(chars, start, ca, 0, length); +endIndex = end - start; +this.ca = new char[endIndex]; +System.arraycopy(chars, start, ca, 0, endIndex); +// System.out.println(- + new String(ca) + -); textInfo = ti; createBlockPointers(); textTransform(); @@ -119,11 +130,11 @@ */ public boolean willCreateArea() { if (textInfo.whiteSpaceCollapse == WhiteSpaceCollapse.FALSE - ca.length - start 0) { + endIndex - startIndex 0) { return true; } -for (int i = start; i ca.length; i++) { +for (int i = startIndex; i endIndex; i++) { char ch = ca[i]; if (!((ch == ' ') || (ch == '\n') @@ -142,37 +153,7 @@ return new TextCharIterator(); } -private class TextCharIterator extends AbstractCharIterator { -private int curIndex = 0; - -public boolean hasNext() { -return (curIndex ca.length); -} - -public char nextChar() { -if (curIndex ca.length) { -// Just a char class? Don't actually care about the value! -return ca[curIndex++]; -} else { -throw new NoSuchElementException(); -} -} - -public void remove() { -if (start ca.length) { -start++; -} -} - -public void replaceChar(char c) { -if (curIndex 0 curIndex = ca.length) { -ca[curIndex - 1] = c; -} -} - -} - -/** + /** * This method is run as part of the Constructor, to create xref pointers to * the previous FOText objects within the same Block */ @@ -214,7 +195,7 @@ if (textInfo.textTransform == TextTransform.NONE) { return; } -for (int i = 0; i ca.length; i++) { +for (int i = 0; i endIndex; i++) { ca[i] = charTransform(i); } } @@ -279,7 +260,7 @@ */ private char getRelativeCharInBlock(int i, int offset) { // The easy case is where the desired character is in the same FOText -if (((i + offset) = 0) ((i + offset) = this.ca.length)) { +if (((i + offset) = 0) ((i + offset) = this.endIndex)) { return ca[i + offset]; } // For now, we can't look at following FOText nodes @@ -297,11 +278,11
cvs commit: xml-fop/src/documentation/content/xdocs embedding.xml
gmazza 2004/04/01 15:38:44 Modified:src/documentation/content/xdocs embedding.xml Log: Update to examples: added text about DOM2PDF and PDF Transcoder examples. Revision ChangesPath 1.20 +26 -13xml-fop/src/documentation/content/xdocs/embedding.xml Index: embedding.xml === RCS file: /home/cvs/xml-fop/src/documentation/content/xdocs/embedding.xml,v retrieving revision 1.19 retrieving revision 1.20 diff -u -r1.19 -r1.20 --- embedding.xml 31 Mar 2004 10:55:05 - 1.19 +++ embedding.xml 1 Apr 2004 23:38:44 - 1.20 @@ -453,8 +453,8 @@ titleExampleObj2PDF.java/title p fork href=http://cvs.apache.org/viewcvs.cgi/xml-fop/examples/embedding/java/embedding/ExampleObj2PDF.java?rev=HEAD; -The last example/fork -here combines the previous and the third to demonstrate +This example/fork +combines the previous and the third to demonstrate how you can transform a Java object to a PDF directly in one smooth run by generating SAX events from the Java object that get fed to an XSL transformation. The result of the transformation is then converted to PDF @@ -462,19 +462,32 @@ /p figure src=images/EmbeddingExampleObj2PDF.png alt=Example Java object to PDF (via XML and XSL-FO)/ /section + section id=ExampleDOM2PDF +titleExampleDOM2PDF.java/title +p +fork href=http://cvs.apache.org/viewcvs.cgi/xml-fop/examples/embedding/java/embedding/ExampleDOM2PDF.java?rev=HEAD; +This example/fork +has FOP use a DOMSource instead of a StreamSource in order to +use a DOM tree as input for an XSL transformation. +/p + /section + section id=ExampleSVG2PDF +titleExampleSVG2PDF.java (PDF Transcoder example)/title +p +fork href=http://cvs.apache.org/viewcvs.cgi/xml-fop/examples/embedding/java/embedding/ExampleSVG2PDF.java?rev=HEAD; +This example/fork +shows use of the PDF Transcoder, a sub-application within FOP. +It is used to generate a PDF document from an SVG file. +/p + /section section id=example-notes titleFinal notes/title p These examples should give you an idea of what's possible. It should be easy -to adjust these examples to your needs. For examples, you can use a DOMSource -instead of a StreamSource to feed a DOM tree as input for an XSL -transformation. -/p -p -If you think you have a decent example that should be here, contact us via -one of the mailing lists and we'll see to it that it gets added. Also, if -you can't find the solution to your particular problem drop us a message on -the fop-user mailing list. +to adjust these examples to your needs. Also, if you have other examples that you +think should be added here, please let us know via either the FOP-USER or FOP-DEV +mailing lists. Finally, for more help please send your questions to the FOP-USER +mailing list. /p /section /section - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/test/java/org/apache/fop BasicDriverTestCase.java
gmazza 2004/04/01 17:31:59 Modified:test/java/org/apache/fop BasicDriverTestCase.java Log: Change of file to use Commons-logging. Revision ChangesPath 1.5 +11 -13xml-fop/test/java/org/apache/fop/BasicDriverTestCase.java Index: BasicDriverTestCase.java === RCS file: /home/cvs/xml-fop/test/java/org/apache/fop/BasicDriverTestCase.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- BasicDriverTestCase.java 27 Feb 2004 17:58:44 - 1.4 +++ BasicDriverTestCase.java 2 Apr 2004 01:31:59 - 1.5 @@ -33,9 +33,7 @@ import org.xml.sax.InputSource; -import org.apache.avalon.framework.container.ContainerUtil; -import org.apache.avalon.framework.logger.Logger; -import org.apache.avalon.framework.logger.NullLogger; +import org.apache.commons.logging.impl.NoOpLog; import org.apache.commons.io.output.ByteArrayOutputStream; import org.apache.fop.apps.Driver; import org.apache.fop.apps.InputHandler; @@ -49,7 +47,7 @@ */ public class BasicDriverTestCase extends AbstractFOPTestCase { -private Logger logger = new NullLogger(); +private NoOpLog logger = new NoOpLog(); /** * @see junit.framework.TestCase#TestCase(String) @@ -68,7 +66,7 @@ Driver driver = new Driver( new InputSource(foFile.toURL().toExternalForm()), baout); -//Use deprecated method with purpose to validate backwards-compatibility. + driver.setLogger(this.logger); driver.setRenderer(Driver.RENDER_PDF); driver.run(); @@ -83,7 +81,7 @@ File foFile = new File(getBaseDir(), test/xml/bugtests/block.fo); ByteArrayOutputStream baout = new ByteArrayOutputStream(); Driver driver = new Driver(); -//Use deprecated method with purpose to validate backwards-compatibility. + driver.setLogger(this.logger); driver.setInputSource(new InputSource(foFile.toURL().toExternalForm())); driver.setOutputStream(baout); @@ -110,7 +108,7 @@ File foFile = new File(getBaseDir(), test/xml/bugtests/block.fo); ByteArrayOutputStream baout = new ByteArrayOutputStream(); Driver driver = new Driver(); -//Use deprecated method with purpose to validate backwards-compatibility. + driver.setLogger(this.logger); driver.setOutputStream(baout); driver.setRenderer(Driver.RENDER_PDF); @@ -126,7 +124,7 @@ File foFile = new File(getBaseDir(), test/xml/bugtests/block.fo); ByteArrayOutputStream baout = new ByteArrayOutputStream(); Driver driver = new Driver(); -//Use deprecated method with purpose to validate backwards-compatibility. + driver.setLogger(this.logger); driver.setOutputStream(baout); driver.setRenderer(Driver.RENDER_PDF); @@ -147,7 +145,7 @@ File foFile = new File(getBaseDir(), test/xml/bugtests/block.fo); ByteArrayOutputStream baout = new ByteArrayOutputStream(); Driver driver = new Driver(); -ContainerUtil.enableLogging(driver, this.logger); +driver.setLogger(this.logger); driver.setOutputStream(baout); driver.setRenderer(Driver.RENDER_PDF); @@ -168,7 +166,7 @@ File foFile = new File(getBaseDir(), test/xml/bugtests/block.fo); ByteArrayOutputStream baout = new ByteArrayOutputStream(); Driver driver = new Driver(); -ContainerUtil.enableLogging(driver, this.logger); +driver.setLogger(this.logger); driver.setOutputStream(baout); driver.setRenderer(Driver.RENDER_PS); @@ -189,7 +187,7 @@ File foFile = new File(getBaseDir(), test/xml/bugtests/block.fo); ByteArrayOutputStream baout = new ByteArrayOutputStream(); Driver driver = new Driver(); -ContainerUtil.enableLogging(driver, this.logger); +driver.setLogger(this.logger); driver.setOutputStream(baout); driver.setRenderer(Driver.RENDER_RTF); @@ -211,7 +209,7 @@ File xsltFile = new File(getBaseDir(), test/xsl/doc.xsl); ByteArrayOutputStream baout = new ByteArrayOutputStream(); Driver driver = new Driver(); -ContainerUtil.enableLogging(driver, this.logger); +driver.setLogger(this.logger); driver.setOutputStream(baout); driver.setRenderer(Driver.RENDER_PDF); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/tools/anttasks Fop.java
gmazza 2004/03/31 02:55:07 Modified:.build.xml fop.bat src/documentation/content/xdocs embedding.xml servlets.xml src/java/org/apache/fop/apps CommandLineOptions.java Document.java Driver.java FOUserAgent.java Fop.java src/java/org/apache/fop/area AreaTreeControl.java src/java/org/apache/fop/fo FOInputHandler.java FONode.java FOTreeBuilder.java FOTreeControl.java FOTreeHandler.java src/java/org/apache/fop/fo/pagination PageNumberGenerator.java PageSequence.java src/java/org/apache/fop/fo/properties ToBeImplementedProperty.java src/java/org/apache/fop/fonts/apps PFMReader.java TTFReader.java src/java/org/apache/fop/fonts/truetype TTFFile.java src/java/org/apache/fop/fonts/type1 PFMFile.java src/java/org/apache/fop/image AbstractFopImage.java BmpImage.java FopImage.java GifImage.java ImageFactory.java JimiImage.java JpegImage.java src/java/org/apache/fop/image/analyser SVGReader.java src/java/org/apache/fop/layoutmgr AbstractLayoutManager.java src/java/org/apache/fop/pdf PDFDocument.java PDFEncryptionManager.java PDFFactory.java src/java/org/apache/fop/render AbstractRenderer.java Renderer.java src/java/org/apache/fop/render/pdf PDFRenderer.java src/java/org/apache/fop/render/ps AbstractPSTranscoder.java src/java/org/apache/fop/render/rtf PageAttributesConverter.java RTFHandler.java TableAttributesConverter.java TableContext.java TextAttributesConverter.java src/java/org/apache/fop/servlet FopPrintServlet.java FopServlet.java src/java/org/apache/fop/svg AbstractFOPTranscoder.java PDFDocumentGraphics2D.java PDFImageElementBridge.java PDFTranscoder.java SVGUserAgent.java src/java/org/apache/fop/tools AreaTreeBuilder.java TestConverter.java src/java/org/apache/fop/tools/anttasks Fop.java Log: Conversion of Avalon to Commons-Logger. (Will still need to update the examples, which I will take care of next; Jeremias will be modifying the PDF libraries for more efficient use of the CL loggers.) Revision ChangesPath 1.107 +6 -1 xml-fop/build.xml http://cvs.apache.org/viewcvs/xml-fop/build.xml.diff?r1=1.106r2=1.107 1.18 +1 -0 xml-fop/fop.bat http://cvs.apache.org/viewcvs/xml-fop/fop.bat.diff?r1=1.17r2=1.18 1.19 +7 -7 xml-fop/src/documentation/content/xdocs/embedding.xml http://cvs.apache.org/viewcvs/xml-fop/src/documentation/content/xdocs/embedding.xml.diff?r1=1.18r2=1.19 1.7 +3 -3 xml-fop/src/documentation/content/xdocs/servlets.xml http://cvs.apache.org/viewcvs/xml-fop/src/documentation/content/xdocs/servlets.xml.diff?r1=1.6r2=1.7 1.16 +9 -8 xml-fop/src/java/org/apache/fop/apps/CommandLineOptions.java http://cvs.apache.org/viewcvs/xml-fop/src/java/org/apache/fop/apps/CommandLineOptions.java.diff?r1=1.15r2=1.16 1.12 +3 -4 xml-fop/src/java/org/apache/fop/apps/Document.java http://cvs.apache.org/viewcvs/xml-fop/src/java/org/apache/fop/apps/Document.java.diff?r1=1.11r2=1.12 1.55 +15 -32xml-fop/src/java/org/apache/fop/apps/Driver.java http://cvs.apache.org/viewcvs/xml-fop/src/java/org/apache/fop/apps/Driver.java.diff?r1=1.54r2=1.55 1.6 +6 -10 xml-fop/src/java/org/apache/fop/apps/FOUserAgent.java http://cvs.apache.org/viewcvs/xml-fop/src/java/org/apache/fop/apps/FOUserAgent.java.diff?r1=1.5r2=1.6 1.9 +5 -3 xml-fop/src/java/org/apache/fop/apps/Fop.java http://cvs.apache.org/viewcvs/xml-fop/src/java/org/apache/fop/apps/Fop.java.diff?r1=1.8r2=1.9 1.4 +3 -4 xml-fop/src/java/org/apache/fop/area/AreaTreeControl.java http://cvs.apache.org/viewcvs/xml-fop/src/java/org/apache/fop/area/AreaTreeControl.java.diff?r1=1.3r2=1.4 1.15 +24 -5 xml-fop/src/java/org/apache/fop/fo/FOInputHandler.java http://cvs.apache.org/viewcvs/xml-fop/src/java/org/apache/fop/fo/FOInputHandler.java.diff?r1=1.14r2=1.15 1.16 +2 -3 xml-fop/src/java/org/apache/fop/fo/FONode.java http://cvs.apache.org/viewcvs/xml-fop/src/java/org/apache/fop/fo/FONode.java.diff?r1=1.15r2=1.16 1.24 +2 -2 xml-fop/src/java/org/apache/fop/fo/FOTreeBuilder.java http://cvs.apache.org/viewcvs/xml-fop/src/java/org
cvs commit: xml-fop/examples/fo/pagination franklin_rep_max_repeats_expl.fo
gmazza 2004/03/22 15:30:18 Removed: examples/fo/pagination franklin_rep_max_repeats_expl.fo Log: File identical to franklin_rep_max_repeats.fo so removed. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/layoutmgr/table Body.java Caption.java Cell.java Row.java TableAndCaptionLayoutManager.java TableLayoutManager.java
gmazza 2004/03/21 04:03:08 Modified:src/java/org/apache/fop/layoutmgr AbstractLayoutManager.java AddLMVisitor.java BlockContainerLayoutManager.java BlockLayoutManager.java BlockStackingLayoutManager.java BreakPoss.java BreakPossPosIter.java ContentLayoutManager.java FlowLayoutManager.java InlineStackingLayoutManager.java LMiter.java LayoutManager.java LeafPosition.java LineLayoutManager.java NonLeafPosition.java PageLayoutManager.java Position.java PositionIterator.java RetrieveMarkerLayoutManager.java StaticContentLayoutManager.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 Removed: src/java/org/apache/fop/layoutmgr LayoutProcessor.java Log: Merged LayoutProcessor into LayoutManager interface. Revision ChangesPath 1.9 +8 -8 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.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- AbstractLayoutManager.java18 Mar 2004 00:22:40 - 1.8 +++ AbstractLayoutManager.java21 Mar 2004 12:03:07 - 1.9 @@ -35,16 +35,16 @@ /** * The base class for all LayoutManagers. */ -public abstract class AbstractLayoutManager implements LayoutProcessor, Constants { +public abstract class AbstractLayoutManager implements LayoutManager, Constants { protected FOUserAgent userAgent; -protected LayoutProcessor parentLM = null; +protected LayoutManager parentLM = null; protected FObj fobj; protected String foID = null; protected Map markers = null; /** True if this LayoutManager has handled all of its content. */ private boolean bFinished = false; -protected LayoutProcessor curChildLM = null; +protected LayoutManager curChildLM = null; protected ListIterator childLMiter; protected boolean bInited = false; @@ -97,11 +97,11 @@ return userAgent.getLogger(); } -public void setParent(LayoutProcessor lm) { +public void setParent(LayoutManager lm) { this.parentLM = lm; } -public LayoutProcessor getParent() { +public LayoutManager getParent() { return this.parentLM; } @@ -157,12 +157,12 @@ * Note: child must implement LayoutManager! If it doesn't, skip it * and print a warning. */ -protected LayoutProcessor getChildLM() { +protected LayoutManager getChildLM() { if (curChildLM != null !curChildLM.isFinished()) { return curChildLM; } while (childLMiter.hasNext()) { -curChildLM = (LayoutProcessor) childLMiter.next(); +curChildLM = (LayoutManager) childLMiter.next(); curChildLM.setUserAgent(getUserAgent()); curChildLM.setParent(this); curChildLM.initialize(); @@ -201,7 +201,7 @@ } while (curChildLM != lm childLMiter.hasPrevious()) { curChildLM.resetPosition(null); -curChildLM = (LayoutProcessor) childLMiter.previous(); +curChildLM = (LayoutManager) childLMiter.previous(); } // Otherwise next returns same object childLMiter.next(); 1.35 +5 -5 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.34 retrieving revision 1.35 diff -u -r1.34 -r1.35 --- AddLMVisitor.java 18 Mar 2004 00:22:40 - 1.34 +++ AddLMVisitor.java 21 Mar 2004 12:03:07 - 1.35 @@ -206,9 +206,9 @@ serveFObjMixed((FObjMixed)node); currentLMList = saveLMList; for (int count = childList.size() - 1; count = 0; count--) { -LayoutProcessor lm = (LayoutProcessor) childList.get(count); +LayoutManager lm = (LayoutManager) childList.get(count
cvs commit: xml-fop/src/java/org/apache/fop/svg SVGUserAgent.java
gmazza 2004/03/21 04:38:56 Modified:.build.xml 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 src/java/org/apache/fop/svg SVGUserAgent.java Removed: src/codegen properties.xsl Log: 1.) Removed xsl file for property generation (no longer used, due to Finn's work.) Removed build.xml entry. 2.) Disconnected the FOUserAgent from the SVGUserAgent. This will make the SVGUserAgent more portable although at the cost of a more complex constructor. Revision ChangesPath 1.106 +0 -3 xml-fop/build.xml Index: build.xml === RCS file: /home/cvs/xml-fop/build.xml,v retrieving revision 1.105 retrieving revision 1.106 diff -u -r1.105 -r1.106 --- build.xml 27 Feb 2004 19:36:38 - 1.105 +++ build.xml 21 Mar 2004 12:38:56 - 1.106 @@ -218,10 +218,7 @@ property name=jai value=JAIImage.java/ property name=xslt value=org.apache.xalan.xslt.Process/ -property name=src.properties.xsl value=${src.codegen}/properties.xsl/ -property name=src.propmaker.xsl value=${src.codegen}/propmaker.xsl/ -property name=propinc.xsl value=${src.codegen}/propinc.xsl/ property name=src.charlist.xsl value=${src.codegen}/code-point-mapping.xsl/ property name=encodings.xml value=${src.codegen}/encodings.xml/ property name=charlist.xsl value=${src.codegen}/code-point-mapping.xsl/ 1.6 +8 -4 xml-fop/src/java/org/apache/fop/image/analyser/SVGReader.java Index: SVGReader.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/image/analyser/SVGReader.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- SVGReader.java19 Mar 2004 00:53:37 - 1.5 +++ SVGReader.java21 Mar 2004 12:38:56 - 1.6 @@ -27,6 +27,9 @@ import org.w3c.dom.Element; import org.w3c.dom.svg.SVGDocument; +// Avalon +import org.apache.avalon.framework.logger.Logger; + // Batik import org.apache.batik.dom.svg.SAXSVGDocumentFactory; import org.apache.batik.dom.svg.SVGOMDocument; @@ -87,7 +90,8 @@ if (batik) { try { Loader loader = new Loader(); -return loader.getImage(uri, bis, ua); +return loader.getImage(uri, bis, ua.getLogger(), +ua.getPixelUnitToMillimeter()); } catch (NoClassDefFoundError e) { batik = false; //ua.getLogger().error(Batik not in class path, e); @@ -104,7 +108,7 @@ */ class Loader { private FopImage.ImageInfo getImage(String uri, InputStream fis, -FOUserAgent ua) { +Logger logger, float pixelUnitToMM) { // parse document and get the size attributes of the svg element try { @@ -174,8 +178,8 @@ Element e = doc.getRootElement(); String s; -SVGUserAgent userAg = -new SVGUserAgent(ua, new AffineTransform()); +SVGUserAgent userAg = new SVGUserAgent(logger, pixelUnitToMM, +new AffineTransform()); BridgeContext ctx = new BridgeContext(userAg); UnitProcessor.Context uctx = UnitProcessor.createContext(ctx, e); 1.9 +3 -1 xml-fop/src/java/org/apache/fop/render/pdf/PDFXMLHandler.java Index: PDFXMLHandler.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/render/pdf/PDFXMLHandler.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- PDFXMLHandler.java19 Mar 2004 00:53:37 - 1.8 +++ PDFXMLHandler.java21 Mar 2004 12:38:56 - 1.9 @@ -220,7 +220,9 @@ int yOffset = pdfInfo.currentYPosition; SVGUserAgent ua - = new SVGUserAgent(context.getUserAgent(), new AffineTransform()); + = new SVGUserAgent(context.getUserAgent().getLogger(), +context.getUserAgent().getPixelUnitToMillimeter(), +new AffineTransform()); GVTBuilder builder = new GVTBuilder(); BridgeContext ctx = new BridgeContext(ua); 1.12 +3 -2 xml-fop/src/java/org/apache/fop/render/ps/PSXMLHandler.java Index: PSXMLHandler.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/render/ps
cvs commit: xml-fop/src/java/org/apache/fop/layoutmgr AddLMVisitor.java
gmazza 2004/03/21 09:31:29 Modified:examples/fo/basic leader.fo src/java/org/apache/fop/layoutmgr AddLMVisitor.java Log: Fix to get use-content option of fo:leader working again. leader.fo now runs without error. Revision ChangesPath 1.3 +7 -7 xml-fop/examples/fo/basic/leader.fo Index: leader.fo === RCS file: /home/cvs/xml-fop/examples/fo/basic/leader.fo,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- leader.fo 29 Jan 2003 16:07:20 - 1.2 +++ leader.fo 21 Mar 2004 17:31:29 - 1.3 @@ -725,7 +725,7 @@ fo:block space-before.optimum=8pt font-size=12pt The following examples show Leader with use-content. The inline areas from the context of the leader are -repeated until the lenght of the leader. The +repeated until the length of the leader. The leader-pattern-width can be used to set the width of each repeated pattern element. fo:inline font-style=italic If this width is less than the inline areas then the width @@ -733,17 +733,17 @@ /fo:block fo:block space-before.optimum=5pt text-align=startCharacters: -fo:leader leader-pattern=use-contentabcd/fo:leader +fo:leader leader-pattern=use-contentabcd/fo:leaderEnd /fo:block fo:block space-before.optimum=5pt text-align=startSet width: fo:leader leader-pattern=use-content -leader-pattern-width=50ptabcd/fo:leader +leader-pattern-width=50ptabcd/fo:leaderEnd /fo:block fo:block space-before.optimum=5pt text-align=startSmall Width: fo:leader leader-pattern=use-content - leader-pattern-width=2ptabcd/fo:leader + leader-pattern-width=2ptabcd/fo:leaderEnd /fo:block fo:block space-before.optimum=5pt text-align=startSVG: @@ -754,7 +754,7 @@ rect x=5 y=5 width=5 height=5 style=fill:black/ /svg /fo:instream-foreign-object -/fo:leader +/fo:leaderEnd /fo:block fo:block space-before.optimum=5pt text-align=startMixed: @@ -766,7 +766,7 @@ rect x=5 y=5 width=5 height=5 style=fill:black/ /svg /fo:instream-foreign-object -/fo:leader +/fo:leaderEnd /fo:block fo:block space-before.optimum=5pt text-align=startMixed: @@ -779,7 +779,7 @@ /svg /fo:instream-foreign-object def -/fo:leader +/fo:leaderEnd /fo:block /fo:flow /fo:page-sequence 1.36 +4 -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.35 retrieving revision 1.36 diff -u -r1.35 -r1.36 --- AddLMVisitor.java 21 Mar 2004 12:03:07 - 1.35 +++ AddLMVisitor.java 21 Mar 2004 17:31:29 - 1.36 @@ -294,7 +294,7 @@ public void serveLeader(final Leader node) { LeafNodeLayoutManager lm = new LeafNodeLayoutManager() { public InlineArea get(LayoutContext context) { - return getLeaderInlineArea(node); + return getLeaderInlineArea(node, this); } protected MinOptMax getAllocationIPD(int refIPD) { @@ -322,7 +322,7 @@ return new MinOptMax(min, opt, max); } - private InlineArea getLeaderInlineArea(Leader node) { + private InlineArea getLeaderInlineArea(Leader node, LayoutManager parentLM) { node.setup(); InlineArea leaderArea = null; @@ -375,6 +375,7 @@ FilledArea fa = new FilledArea(); ContentLayoutManager clm = new ContentLayoutManager(fa); + clm.setParent(parentLM); clm.setUserAgent(node.getUserAgent()); lm.setParent(clm); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/tools/anttasks Fop.java
gmazza 2004/03/20 09:50:22 Modified:src/java/org/apache/fop/tools/anttasks Fop.java Log: Comments fixed. Revision ChangesPath 1.12 +2 -2 xml-fop/src/java/org/apache/fop/tools/anttasks/Fop.java Index: Fop.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/tools/anttasks/Fop.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- Fop.java 27 Feb 2004 17:56:04 - 1.11 +++ Fop.java 20 Mar 2004 17:50:22 - 1.12 @@ -126,7 +126,7 @@ } /** - * Set whether to include files (external-grpahics, instream-foreign-object) + * Set whether to include files (external-graphics, instream-foreign-object) * from a path relative to the .fo file (true) or the working directory (false, default) * only useful for filesets * @@ -243,7 +243,7 @@ } /** - * Sets the base directory; currently ignored. + * Sets the base directory for single FO file (non-fileset) usage * @param baseDir File to use as a working directory */ public void setBasedir(File baseDir) { - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/documentation/content/xdocs anttask.xml
gmazza 2004/03/20 10:00:57 Modified:src/documentation/content/xdocs anttask.xml Log: updated anttask documentation Revision ChangesPath 1.10 +21 -6 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.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- anttask.xml 2 Mar 2004 21:15:35 - 1.9 +++ anttask.xml 20 Mar 2004 18:00:57 - 1.10 @@ -94,11 +94,26 @@ /td tdNo, default is codefalse/code/td /tr - !--tr Commented out; attribute is currently unimplemented according to the code + tr tdbasedir/td - tdDirectory to work from/td - tdYes/td - /tr-- + tdBase directory to resolve relative references (e.g., graphics files) within the +FO document. + /td + tdNo, for single FO File entry, default is to use the location +of that FO file. + /td + /tr + tr + tdrelativebase/td + tdFor fileset usage only. A value of codetrue/code specifies using the location +of each .fo file as the base directory for resolving relative file references located +within that .fo file. A value of codefalse/code specifies using the value of +basedir for all files within the fileset, or just the current working directory +if basedir is not specified. + /td + tdNo, default is codefalse/code. + /td + /tr tr tduserconfig/td tdUser configuration file (same as the FOP -c command line option)/td - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/svg SVGUserAgent.java package.html
gmazza 2004/03/18 16:53:38 Modified: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 src/java/org/apache/fop/svg package.html Added: src/java/org/apache/fop/svg SVGUserAgent.java Removed: src/java/org/apache/fop/fo/extensions/svg SVGUserAgent.java Log: Moved SVGUserAgent back to SVG package (not being used by SVG FO extensions.) Revision ChangesPath 1.5 +1 -1 xml-fop/src/java/org/apache/fop/image/analyser/SVGReader.java Index: SVGReader.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/image/analyser/SVGReader.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- SVGReader.java27 Feb 2004 17:47:30 - 1.4 +++ SVGReader.java19 Mar 2004 00:53:37 - 1.5 @@ -38,7 +38,7 @@ import org.apache.fop.image.XMLImage; import org.apache.fop.image.FopImage; import org.apache.fop.apps.FOUserAgent; -import org.apache.fop.fo.extensions.svg.SVGUserAgent; +import org.apache.fop.svg.SVGUserAgent; /** * ImageReader object for SVG document image type. 1.8 +1 -1 xml-fop/src/java/org/apache/fop/render/pdf/PDFXMLHandler.java Index: PDFXMLHandler.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/render/pdf/PDFXMLHandler.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- PDFXMLHandler.java27 Feb 2004 17:52:34 - 1.7 +++ PDFXMLHandler.java19 Mar 2004 00:53:37 - 1.8 @@ -29,7 +29,7 @@ import org.apache.fop.svg.PDFTextElementBridge; import org.apache.fop.svg.PDFAElementBridge; import org.apache.fop.svg.PDFGraphics2D; -import org.apache.fop.fo.extensions.svg.SVGUserAgent; +import org.apache.fop.svg.SVGUserAgent; import org.apache.fop.apps.Document; /* org.w3c.dom.Document is not imported to avoid conflict with 1.11 +1 -1 xml-fop/src/java/org/apache/fop/render/ps/PSXMLHandler.java Index: PSXMLHandler.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/render/ps/PSXMLHandler.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- PSXMLHandler.java 27 Feb 2004 17:53:11 - 1.10 +++ PSXMLHandler.java 19 Mar 2004 00:53:38 - 1.11 @@ -36,7 +36,7 @@ // FOP import org.apache.fop.render.XMLHandler; import org.apache.fop.render.RendererContext; -import org.apache.fop.fo.extensions.svg.SVGUserAgent; +import org.apache.fop.svg.SVGUserAgent; /** * PostScript XML handler. 1.2 +1 -1 xml-fop/src/java/org/apache/fop/svg/package.html Index: package.html === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/svg/package.html,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- package.html 11 Mar 2003 13:05:07 - 1.1 +++ package.html 19 Mar 2004 00:53:38 - 1.2 @@ -16,7 +16,7 @@ from SVG to a single page PDF document. /P P -SVGElement, SVGElementMapping, SVGObj and SVGUserAgent are used by +SVGElement, SVGElementMapping and SVGObj are used by FOP for handling embedded SVG or external SVG graphics. /P P 1.9 +16 -50xml-fop/src/java/org/apache/fop/svg/SVGUserAgent.java - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/layoutmgr/table Row.java
gmazza 2004/03/17 16:22:40 Modified:src/java/org/apache/fop/layoutmgr AbstractLayoutManager.java AddLMVisitor.java ContentLayoutManager.java LayoutManagerLS.java LayoutProcessor.java LineLayoutManager.java PageLayoutManager.java RetrieveMarkerLayoutManager.java src/java/org/apache/fop/layoutmgr/table Row.java Log: Switch from init() to clearer initialize() in Layout classes; removed unneeded logger reference in ContentLayoutManager. Revision ChangesPath 1.8 +4 -4 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.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- AbstractLayoutManager.java12 Mar 2004 00:41:04 - 1.7 +++ AbstractLayoutManager.java18 Mar 2004 00:22:40 - 1.8 @@ -165,7 +165,7 @@ curChildLM = (LayoutProcessor) childLMiter.next(); curChildLM.setUserAgent(getUserAgent()); curChildLM.setParent(this); -curChildLM.init(); +curChildLM.initialize(); return curChildLM; } return null; @@ -222,10 +222,10 @@ /** - * This method provides a hook for a LayoutManager to intialize traits + * This method provides a hook for a LayoutManager to initialize traits * for the areas it will create, based on Properties set on its FO. */ -public void init() { +public void initialize() { if (fobj != null bInited == false) { initProperties(fobj.getPropertyManager()); bInited = true; @@ -233,7 +233,7 @@ } /** - * This method provides a hook for a LayoutManager to intialize traits + * This method provides a hook for a LayoutManager to initialize traits * for the areas it will create, based on Properties set on its FO. */ protected void initProperties(PropertyManager pm) { 1.34 +2 -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.33 retrieving revision 1.34 diff -u -r1.33 -r1.34 --- AddLMVisitor.java 17 Mar 2004 03:54:53 - 1.33 +++ AddLMVisitor.java 18 Mar 2004 00:22:40 - 1.34 @@ -369,7 +369,7 @@ lm.setUserAgent(node.getUserAgent()); lm.setFObj(node); lm.setLMiter(new LMiter(lm, node.getChildren())); - lm.init(); + lm.initialize(); // get breaks then add areas to FilledArea FilledArea fa = new FilledArea(); 1.7 +1 -11 xml-fop/src/java/org/apache/fop/layoutmgr/ContentLayoutManager.java Index: ContentLayoutManager.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/ContentLayoutManager.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- ContentLayoutManager.java 27 Feb 2004 17:49:25 - 1.6 +++ ContentLayoutManager.java 18 Mar 2004 00:22:40 - 1.7 @@ -25,8 +25,6 @@ import org.apache.fop.area.Resolveable; import org.apache.fop.area.PageViewport; -import org.apache.avalon.framework.logger.Logger; - import java.util.List; import java.util.Map; import java.util.ArrayList; @@ -163,14 +161,6 @@ return userAgent; } -/** - * Returns the logger - * @return the logger - */ -protected Logger getLogger() { -return userAgent.getLogger(); -} - /** @see org.apache.fop.layoutmgr.LayoutManager */ public void setParent(LayoutProcessor lm) { parentLM = lm; @@ -208,7 +198,7 @@ public void addAreas(PositionIterator posIter, LayoutContext context) { } /** @see org.apache.fop.layoutmgr.LayoutManager */ -public void init() { +public void initialize() { //to be done } 1.21 +4 -4 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.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- LayoutManagerLS.java 27 Feb 2004 17:49:25 - 1.20 +++ LayoutManagerLS.java 18 Mar 2004 00:22:40 -
cvs commit: xml-fop/src/java/org/apache/fop/apps FOFileHandler.java
gmazza 2004/03/16 14:17:09 Modified:src/java/org/apache/fop/apps FOFileHandler.java Log: Removed obsolete request for namespace-prefixes (supported by all SAX2 parsers by definition, questionable whether needed by FOP anyway.) Revision ChangesPath 1.4 +1 -7 xml-fop/src/java/org/apache/fop/apps/FOFileHandler.java Index: FOFileHandler.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/apps/FOFileHandler.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- FOFileHandler.java16 Mar 2004 05:25:16 - 1.3 +++ FOFileHandler.java16 Mar 2004 22:17:09 - 1.4 @@ -88,13 +88,7 @@ try { SAXParserFactory factory = SAXParserFactory.newInstance(); factory.setNamespaceAware(true); -factory.setFeature( -http://xml.org/sax/features/namespace-prefixes;, true); return factory.newSAXParser().getXMLReader(); -} catch (SAXNotSupportedException se) { -throw new FOPException(Error: You need a parser which allows the - + http://xml.org/sax/features/namespace-prefixes; - + feature to be set to true to support namespaces, se); } catch (SAXException se) { throw new FOPException(Couldn't create XMLReader, se); } catch (ParserConfigurationException pce) { - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/layoutmgr TextLayoutManager.java
gmazza 2004/03/16 19:37:32 Modified:src/java/org/apache/fop/layoutmgr TextLayoutManager.java Log: minor simplifications; removed redundant variables. Revision ChangesPath 1.12 +37 -41xml-fop/src/java/org/apache/fop/layoutmgr/TextLayoutManager.java Index: TextLayoutManager.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/TextLayoutManager.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- TextLayoutManager.java12 Mar 2004 00:41:04 - 1.11 +++ TextLayoutManager.java17 Mar 2004 03:37:32 - 1.12 @@ -21,7 +21,6 @@ import java.util.ArrayList; import org.apache.fop.fo.FOText; -import org.apache.fop.fo.TextInfo; import org.apache.fop.traits.SpaceVal; import org.apache.fop.area.Trait; import org.apache.fop.area.inline.InlineArea; @@ -63,9 +62,8 @@ /** Non-space characters on which we can end a line. */ private static final String BREAK_CHARS = -/ ; +private FOText foText; private char[] textArray; -private int textArrayLength; -private TextInfo textInfo; private static final char NEWLINE = '\n'; private static final char SPACE = '\u0020'; // Normal space @@ -95,25 +93,23 @@ /** * Create a Text layout manager. * - * @param chars character array - * @param length length of the above array to be processed - * @param textInfo the text information for doing layout + * @param node The FOText object to be rendered */ public TextLayoutManager(FOText node) { super(node); -this.textArray = new char[node.ca.length - node.start]; -System.arraycopy(node.ca, node.start, this.textArray, 0, +foText = node; +textArray = new char[node.ca.length - node.start]; +System.arraycopy(node.ca, node.start, textArray, 0, node.ca.length - node.start); -this.textArrayLength = node.ca.length - node.start; -this.textInfo = node.textInfo; -this.vecAreaInfo = new java.util.ArrayList(); + +vecAreaInfo = new java.util.ArrayList(); // With CID fonts, space isn't neccesary currentFontState.width(32) -spaceCharIPD = textInfo.fs.getCharWidth(' '); +spaceCharIPD = foText.textInfo.fs.getCharWidth(' '); // Use hyphenationChar property -hyphIPD = textInfo.fs.getCharWidth('-'); +hyphIPD = foText.textInfo.fs.getCharWidth('-'); // Make half-space: space on either side of a word-space) -SpaceVal ws = textInfo.wordSpacing; +SpaceVal ws = foText.textInfo.wordSpacing; halfWS = new SpaceVal(MinOptMax.multiply(ws.getSpace(), 0.5), ws.isConditional(), ws.isForcing(), ws.getPrecedence()); } @@ -161,7 +157,7 @@ */ public boolean canBreakBefore(LayoutContext context) { char c = textArray[iNextStart]; -return ((c == NEWLINE) || (textInfo.bWrap +return ((c == NEWLINE) || (foText.textInfo.bWrap (CharUtilities.isBreakableSpace(c) || (BREAK_CHARS.indexOf(c) = 0 (iNextStart == 0 || Character.isLetterOrDigit(textArray[iNextStart-1])); @@ -205,15 +201,15 @@ boolean bCanHyphenate = true; int iStopIndex = iNextStart + hc.getNextHyphPoint(); -if (textArrayLength iStopIndex || textInfo.bCanHyphenate == false) { -iStopIndex = textArrayLength; +if (textArray.length iStopIndex || foText.textInfo.bCanHyphenate == false) { +iStopIndex = textArray.length; bCanHyphenate = false; } hc.updateOffset(iStopIndex - iNextStart); for (; iNextStart iStopIndex; iNextStart++) { char c = textArray[iNextStart]; -hyphIPD.opt += textInfo.fs.getCharWidth(c); +hyphIPD.opt += foText.textInfo.fs.getCharWidth(c); // letter-space? } // Need to include hyphen size too, but don't count it in the @@ -261,11 +257,11 @@ * retained. */ if (context.suppressLeadingSpace()) { -for (; iNextStart textArrayLength +for (; iNextStart textArray.length textArray[iNextStart] == SPACE; iNextStart++) { } // If now at end, nothing to compose here! -if (iNextStart = textArrayLength) { +if (iNextStart = textArray.length) { setFinished(true); return null; // Or an empty BreakPoss? } @@ -286,7 +282,7 @@ short iWScount = 0; // Count of word spaces boolean bSawNonSuppressible = false
cvs commit: xml-fop/src/java/org/apache/fop/layoutmgr AddLMVisitor.java
gmazza 2004/03/16 19:54:53 Modified:src/java/org/apache/fop/layoutmgr AddLMVisitor.java Log: Unneeded line of code removed. Revision ChangesPath 1.33 +1 -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.32 retrieving revision 1.33 diff -u -r1.32 -r1.33 --- AddLMVisitor.java 12 Mar 2004 00:41:04 - 1.32 +++ AddLMVisitor.java 17 Mar 2004 03:54:53 - 1.33 @@ -189,7 +189,6 @@ if (node.getChildren() != null) { InlineStackingLayoutManager lm; lm = new InlineStackingLayoutManager(); -Document doc = (Document)node.getFOTreeControl(); lm.setUserAgent(node.getUserAgent()); lm.setFObj(node); lm.setLMiter(new LMiter(lm, node.getChildren())); - 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
gmazza 2004/03/15 21:25:16 Modified:src/java/org/apache/fop/apps Driver.java FOFileHandler.java InputHandler.java XSLTInputHandler.java src/java/org/apache/fop/image ImageFactory.java Log: Code changed to set the Base URL in FOUserAgent, which allows image.ImageFactory to use this value in order to determine locations of images given relative to the input source file. e.g. c:\xml-fopfop examples\fo\basic\images.fo images.pdf will now run correctly. Revision ChangesPath 1.54 +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.53 retrieving revision 1.54 diff -u -r1.53 -r1.54 --- Driver.java 1 Mar 2004 23:50:26 - 1.53 +++ Driver.java 16 Mar 2004 05:25:16 - 1.54 @@ -248,7 +248,6 @@ if (userAgent == null) { userAgent = new FOUserAgent(); userAgent.enableLogging(getLogger()); -userAgent.setBaseURL(); } return userAgent; } @@ -572,6 +571,7 @@ public synchronized void render(InputHandler inputHandler) throws FOPException { XMLReader parser = inputHandler.getParser(); +userAgent.setBaseURL(inputHandler.getBaseURL()); render(parser, inputHandler.getInputSource()); } 1.3 +7 -2 xml-fop/src/java/org/apache/fop/apps/FOFileHandler.java Index: FOFileHandler.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/apps/FOFileHandler.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- FOFileHandler.java27 Feb 2004 17:39:05 - 1.2 +++ FOFileHandler.java16 Mar 2004 05:25:16 - 1.3 @@ -45,6 +45,12 @@ */ public FOFileHandler(File fofile) { this.fofile = fofile; +try { +baseURL = +new File(fofile.getAbsolutePath()).getParentFile().toURL().toExternalForm(); +} catch (Exception e) { +baseURL = ; +} } /** @@ -55,7 +61,6 @@ this.foURL = url; } - /** * @see org.apache.fop.apps.InputHandler#getInputSource() */ 1.10 +10 -0 xml-fop/src/java/org/apache/fop/apps/InputHandler.java Index: InputHandler.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/apps/InputHandler.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- InputHandler.java 27 Feb 2004 17:39:05 - 1.9 +++ InputHandler.java 16 Mar 2004 05:25:16 - 1.10 @@ -39,6 +39,16 @@ */ public abstract InputSource getInputSource(); +protected String baseURL = null; + +/** + * Get the base URL associated with this input source + * @return the input source + */ +public String getBaseURL() { +return baseURL; +} + /** * Get the SAX parser associated with this input handler. * @return the SAX parser 1.13 +15 -4 xml-fop/src/java/org/apache/fop/apps/XSLTInputHandler.java Index: XSLTInputHandler.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/apps/XSLTInputHandler.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- XSLTInputHandler.java 27 Feb 2004 17:39:05 - 1.12 +++ XSLTInputHandler.java 16 Mar 2004 05:25:16 - 1.13 @@ -57,6 +57,12 @@ public XSLTInputHandler(File xmlfile, File xsltfile, Vector params) throws FOPException { this.xmlSource = new StreamSource(xmlfile); this.xsltSource = new StreamSource(xsltfile); +try { +baseURL = +new File(xmlfile.getAbsolutePath()).getParentFile().toURL().toExternalForm(); +} catch (Exception e) { +baseURL = ; +} xsltParams = params; } @@ -70,6 +76,12 @@ public XSLTInputHandler(File xmlfile, File xsltfile) throws FOPException { this.xmlSource = new StreamSource(xmlfile); this.xsltSource = new StreamSource(xsltfile); +try { +baseURL = +new File(xmlfile.getAbsolutePath()).getParentFile().toURL().toExternalForm(); +} catch (Exception e) { +baseURL = ; +} } /** @@ -144,11 +156,10 @@ saxTFactory.newXMLFilter(xsltSource
cvs commit: xml-fop/src/java/org/apache/fop/render/rtf RTFHandler.java
gmazza 2004/03/11 16:41:05 Modified:src/java/org/apache/fop/fo FOText.java FObjMixed.java src/java/org/apache/fop/layoutmgr AbstractLayoutManager.java AddLMVisitor.java TextLayoutManager.java src/java/org/apache/fop/render/rtf RTFHandler.java Log: Simplifications to FOText whitespace removal; fewer arraycopies performed. Revision ChangesPath 1.17 +18 -26xml-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.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- FOText.java 7 Mar 2004 17:52:43 - 1.16 +++ FOText.java 12 Mar 2004 00:41:04 - 1.17 @@ -44,14 +44,14 @@ public char[] ca; /** - * The actual length of the text to be rendered within ca, - * starting from position 0 of the array. + * The starting valid index of the ca array + * to be processed. * - * This value is originally equal to ca.length, but becomes decremented - * during whitespace removal by the flow.Block class, via the - * TextCharIterator.remove() method below. + * This value is originally equal to ca.length, but becomes + * incremented during whitespace removal by the flow.Block class, + * via the TextCharIterator.remove() method below. */ -public int length; +public int start = 0; /** * The TextInfo object attached to the text @@ -100,7 +100,7 @@ */ public FOText(char[] chars, int start, int end, TextInfo ti, FONode parent) { super(parent); -length = end - start; +int length = end - start; this.ca = new char[length]; System.arraycopy(chars, start, ca, 0, length); textInfo = ti; @@ -119,11 +119,11 @@ */ public boolean willCreateArea() { if (textInfo.whiteSpaceCollapse == WhiteSpaceCollapse.FALSE - length 0) { + ca.length - start 0) { return true; } -for (int i = 0; i length; i++) { +for (int i = start; i ca.length; i++) { char ch = ca[i]; if (!((ch == ' ') || (ch == '\n') @@ -146,11 +146,11 @@ private int curIndex = 0; public boolean hasNext() { -return (curIndex length); +return (curIndex ca.length); } public char nextChar() { -if (curIndex length) { +if (curIndex ca.length) { // Just a char class? Don't actually care about the value! return ca[curIndex++]; } else { @@ -159,25 +159,17 @@ } public void remove() { -if (curIndex 0 curIndex length) { -// copy from curIndex to end to curIndex-1 -System.arraycopy(ca, curIndex, ca, curIndex - 1, - length - curIndex); -length--; -curIndex--; -} else if (curIndex == length) { -curIndex = --length; +if (start ca.length) { +start++; } } - public void replaceChar(char c) { -if (curIndex 0 curIndex = length) { +if (curIndex 0 curIndex = ca.length) { ca[curIndex - 1] = c; } } - } /** @@ -239,7 +231,7 @@ * @return True if the character at this location is the start of a new * word. */ -public boolean isStartOfWord (int i) { +private boolean isStartOfWord(int i) { char prevChar = getRelativeCharInBlock(i, -1); /* All we are really concerned about here is of what type prevChar is. If inputChar is not part of a word, then the Java @@ -285,9 +277,9 @@ * @return the character in the offset position within the block; \u if * the offset points to an area outside of the block. */ -public char getRelativeCharInBlock(int i, int offset) { +private char getRelativeCharInBlock(int i, int offset) { // The easy case is where the desired character is in the same FOText -if (((i + offset) = 0) ((i + offset) = this.length)) { +if (((i + offset) = 0) ((i + offset) = this.ca.length)) { return ca[i + offset]; } // For now, we can't look at following FOText nodes @@ -345,7 +337,7 @@ * @param i the index into ca[] * @return char with transformed value */ -public char charTransform(int i) { +private char
cvs commit: xml-fop/examples/fo/pagination basic2.fo basic1.fo
gmazza 2004/03/09 14:44:35 Modified:examples/fo/basic bordershorthand.fo corresprop.fo inhprop.fo normal.fo normalex.fo examples/fo/pagination basic2.fo Removed: examples/fo/pagination basic1.fo Log: Some consolidation of information about page-sequence-master and simple-page-master; removal of basic1.fo (not informative, also duplicated elsewhere.) Revision ChangesPath 1.3 +10 -19xml-fop/examples/fo/basic/bordershorthand.fo Index: bordershorthand.fo === RCS file: /home/cvs/xml-fop/examples/fo/basic/bordershorthand.fo,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- bordershorthand.fo29 Jan 2003 16:07:18 - 1.2 +++ bordershorthand.fo9 Mar 2004 22:44:34 - 1.3 @@ -10,15 +10,6 @@ fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format; fo:layout-master-set - !-- fo:layout-master-set defines in its children the page layout: - the pagination and layout specifications - - page-masters: have the role of describing the intended subdivisions - of a page and the geometry of these subdivisions - - page-sequence-masters: have the role of describing the sequence -of page-masters that will be used to generate -pages during the formatting of an fo:page-sequence - - -- !-- layout for the first page -- fo:simple-page-master master-name=first @@ -46,16 +37,16 @@ fo:region-after extent=1.5cm/ /fo:simple-page-master -fo:page-sequence-master master-name=basicPSM - fo:repeatable-page-master-alternatives -fo:conditional-page-master-reference master-reference=first - page-position=first / -fo:conditional-page-master-reference master-reference=rest - page-position=rest / -!-- recommended fallback procedure -- -fo:conditional-page-master-reference master-reference=rest / - /fo:repeatable-page-master-alternatives -/fo:page-sequence-master +fo:page-sequence-master master-name=basicPSM + fo:repeatable-page-master-alternatives +fo:conditional-page-master-reference master-reference=first + page-position=first / +fo:conditional-page-master-reference master-reference=rest + page-position=rest / +!-- recommended fallback procedure -- +fo:conditional-page-master-reference master-reference=rest / + /fo:repeatable-page-master-alternatives +/fo:page-sequence-master /fo:layout-master-set !-- end: defines page layout -- 1.3 +0 -9 xml-fop/examples/fo/basic/corresprop.fo Index: corresprop.fo === RCS file: /home/cvs/xml-fop/examples/fo/basic/corresprop.fo,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- corresprop.fo 29 Jan 2003 16:07:18 - 1.2 +++ corresprop.fo 9 Mar 2004 22:44:34 - 1.3 @@ -10,15 +10,6 @@ fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format; fo:layout-master-set - !-- fo:layout-master-set defines in its children the page layout: - the pagination and layout specifications - - page-masters: have the role of describing the intended subdivisions - of a page and the geometry of these subdivisions - - page-sequence-masters: have the role of describing the sequence -of page-masters that will be used to generate -pages during the formatting of an fo:page-sequence - - -- !-- layout for the first page -- fo:simple-page-master master-name=first 1.3 +0 -9 xml-fop/examples/fo/basic/inhprop.fo Index: inhprop.fo === RCS file: /home/cvs/xml-fop/examples/fo/basic/inhprop.fo,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- inhprop.fo29 Jan 2003 16:07:20 - 1.2 +++ inhprop.fo9 Mar 2004 22:44:34 - 1.3 @@ -10,15 +10,6 @@ fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format; fo:layout-master-set - !-- fo:layout-master-set defines in its children the page layout: - the pagination and layout specifications - - page-masters: have the role of describing the intended subdivisions - of a page and the geometry of these subdivisions - - page-sequence-masters: have the role of describing the sequence -of page-masters that will be used to generate -pages during the formatting of an fo:page-sequence
cvs commit: xml-fop/src/java/org/apache/fop/fo/flow Block.java
gmazza 2004/03/07 09:52:43 Modified:src/java/org/apache/fop/fo FOText.java src/java/org/apache/fop/fo/flow Block.java Log: Fix of leading-space problem in HEAD. (A single leading space of the first inline child of the block object was being incorrectly retained.) Revision ChangesPath 1.16 +0 -4 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.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- FOText.java 1 Mar 2004 23:50:26 - 1.15 +++ FOText.java 7 Mar 2004 17:52:43 - 1.16 @@ -168,10 +168,6 @@ } else if (curIndex == length) { curIndex = --length; } -// Temporary until leading space problem in 1.0 fixed -// System.out.println(\n\nremove called: ca = \ + -// new String(ca) + \, length/node length: + length -// + , + ca.length); } 1.13 +17 -0 xml-fop/src/java/org/apache/fop/fo/flow/Block.java Index: Block.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/flow/Block.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- Block.java27 Feb 2004 17:44:23 - 1.12 +++ Block.java7 Mar 2004 17:52:43 - 1.13 @@ -246,6 +246,11 @@ if (firstInlineChild != null) { boolean bInWS = false; boolean bPrevWasLF = false; + +/* bSeenNonWSYet is an indicator used for trimming all leading + whitespace for the first inline child of the block +*/ +boolean bSeenNonWSYet = false; RecursiveCharIterator charIter = new RecursiveCharIterator(this, firstInlineChild); LFchecker lfCheck = new LFchecker(charIter); @@ -279,7 +284,13 @@ (bPrevWasLF || lfCheck.nextIsLF( { charIter.remove(); } else { +// this is to retain a single space between words bInWS = true; +// remove the space if no word in block +// encountered yet +if (!bSeenNonWSYet) { +charIter.remove(); +} } } break; @@ -300,6 +311,11 @@ } else { if (bWScollapse) { bInWS = true; +// remove the linefeed if no word in block +// encountered yet +if (!bSeenNonWSYet) { +charIter.remove(); +} } charIter.replaceChar('\u0020'); } @@ -323,6 +339,7 @@ case CharUtilities.NONWHITESPACE: /* Any other character */ bInWS = bPrevWasLF = false; +bSeenNonWSYet = true; lfCheck.reset(); break; } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/documentation/content/xdocs news.xml
gmazza 2004/03/07 15:29:23 Modified:src/documentation/content/xdocs news.xml Log: Add Clay to news page. Revision ChangesPath 1.19 +6 -2 xml-fop/src/documentation/content/xdocs/news.xml Index: news.xml === RCS file: /home/cvs/xml-fop/src/documentation/content/xdocs/news.xml,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- news.xml 2 Mar 2004 21:15:35 - 1.18 +++ news.xml 7 Mar 2004 23:29:23 - 1.19 @@ -25,6 +25,10 @@ /header body section + title7 March 2004 - New Committer/title + pWelcome Web Maestro Clay Leeds!/p +/section +section title10 January 2004 - New Committers/title pWelcome Chris Bowditch and Andreas Delmelle!/p /section - 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 TextLayoutManager.java
gmazza 2004/03/01 15:50:26 Modified:src/java/org/apache/fop/apps Driver.java src/java/org/apache/fop/fo FOText.java FOTreeBuilder.java FObjMixed.java src/java/org/apache/fop/layoutmgr AddLMVisitor.java TextLayoutManager.java Log: 1.) Modified TextLayoutManager to take an additional length parameter, indicating the maximum valid index of the passed-in character array. 2.) Removed from AddLMVisitor (which calls the above class), the re-fitting of the FOText character array to the size of the maximum valid index. 3.) Various small cleanup issues. Revision ChangesPath 1.53 +1 -2 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.52 retrieving revision 1.53 diff -u -r1.52 -r1.53 --- Driver.java 27 Feb 2004 17:39:05 - 1.52 +++ Driver.java 1 Mar 2004 23:50:26 - 1.53 @@ -540,8 +540,7 @@ treeBuilder.setUserAgent(getUserAgent()); treeBuilder.setFOInputHandler(foInputHandler); -treeBuilder.foTreeControl = currentDocument; - +treeBuilder.setFOTreeControl(currentDocument); return new ProxyContentHandler(treeBuilder) { 1.15 +11 -2 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.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- FOText.java 27 Feb 2004 17:57:40 - 1.14 +++ FOText.java 1 Mar 2004 23:50:26 - 1.15 @@ -44,7 +44,12 @@ public char[] ca; /** - * the length of the character array containing the text + * The actual length of the text to be rendered within ca, + * starting from position 0 of the array. + * + * This value is originally equal to ca.length, but becomes decremented + * during whitespace removal by the flow.Block class, via the + * TextCharIterator.remove() method below. */ public int length; @@ -87,7 +92,7 @@ /** * * @param chars array of chars which contains the text in this object (may - * be a superset of the text in this object + * be a superset of the text in this object) * @param start starting index into char[] for the text in this object * @param end ending index into char[] for the text in this object * @param ti TextInfo object for the text in this object @@ -163,6 +168,10 @@ } else if (curIndex == length) { curIndex = --length; } +// Temporary until leading space problem in 1.0 fixed +// System.out.println(\n\nremove called: ca = \ + +// new String(ca) + \, length/node length: + length +// + , + ca.length); } 1.23 +9 -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.22 retrieving revision 1.23 diff -u -r1.22 -r1.23 --- FOTreeBuilder.java27 Feb 2004 17:57:40 - 1.22 +++ FOTreeBuilder.java1 Mar 2004 23:50:26 - 1.23 @@ -77,7 +77,7 @@ private FOUserAgent userAgent; /** The FOTreeControl object managing the FO Tree that is being built */ -public FOTreeControl foTreeControl; +private FOTreeControl foTreeControl; /** The SAX locator object maneging the line and column counters */ private Locator locator; @@ -103,6 +103,14 @@ private FOUserAgent getUserAgent() { return userAgent; +} + +/** + * Sets the FO Tree Control for this object + * @param fotc FOTreeControl instance + */ +public void setFOTreeControl(FOTreeControl fotc) { +this.foTreeControl = fotc; } /** 1.21 +1 -1 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.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- FObjMixed.java27 Feb 2004 17:57:40 - 1.20 +++ FObjMixed.java1 Mar 2004 23:50:26 - 1.21 @@ -55,7 +55,7 @@ ft.setName(text); /* characters() processing empty for FOTreeHandler, not empty for RTF
cvs commit: xml-fop/src/java/org/apache/fop/fo FOText.java FObjMixed.java
gmazza 2004/02/26 19:21:59 Modified:src/java/org/apache/fop/fo FOText.java FObjMixed.java Log: Some simplification of FOText object. Revision ChangesPath 1.13 +7 -9 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.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- FOText.java 17 Jan 2004 19:29:46 - 1.12 +++ FOText.java 27 Feb 2004 03:21:59 - 1.13 @@ -74,7 +74,6 @@ * the character array containing the text */ public char[] ca; -public int start; /** * the length of the character array containing the text @@ -121,17 +120,16 @@ * * @param chars array of chars which contains the text in this object (may * be a superset of the text in this object - * @param s starting index into char[] for the text in this object - * @param e ending index into char[] for the text in this object + * @param start starting index into char[] for the text in this object + * @param end ending index into char[] for the text in this object * @param ti TextInfo object for the text in this object * @param parent FONode that is the parent of this object */ -public FOText(char[] chars, int s, int e, TextInfo ti, FONode parent) { +public FOText(char[] chars, int start, int end, TextInfo ti, FONode parent) { super(parent); -this.start = 0; -this.ca = new char[e - s]; -System.arraycopy(chars, s, ca, 0, e - s); -this.length = e - s; +length = end - start; +this.ca = new char[length]; +System.arraycopy(chars, start, ca, 0, length); textInfo = ti; createBlockPointers(); textTransform(); @@ -152,7 +150,7 @@ return true; } -for (int i = start; i start + length; i++) { +for (int i = 0; i length; i++) { char ch = ca[i]; if (!((ch == ' ') || (ch == '\n') 1.19 +1 -1 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.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- FObjMixed.java26 Dec 2003 22:11:17 - 1.18 +++ FObjMixed.java27 Feb 2004 03:21:59 - 1.19 @@ -87,7 +87,7 @@ ft.setName(text); /* characters() processing empty for FOTreeHandler, not empty for RTF MIFHandlers */ -getFOTreeControl().getFOInputHandler().characters(ft.ca, ft.start, ft.length); +getFOTreeControl().getFOInputHandler().characters(ft.ca, 0, ft.length); addChild(ft); } - 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
gmazza 2004/02/24 19:32:17 Modified:src/java/org/apache/fop/area/inline Character.java InlineArea.java InlineParent.java Leader.java Space.java TextArea.java Viewport.java src/java/org/apache/fop/render AbstractRenderer.java src/java/org/apache/fop/render/xml XMLRenderer.java Removed: src/java/org/apache/fop/area/inline InlineAreaVisitor.java Log: Removal of Visitor patterns from AbstractRenderer, moving of business logic from InlineArea to AbstractRenderer. Revision ChangesPath 1.3 +0 -10 xml-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.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- Character.java10 Sep 2003 18:42:22 - 1.2 +++ Character.java25 Feb 2004 03:32:16 - 1.3 @@ -67,16 +67,6 @@ } /** - * Handle InlineAreaVisitor request by passing this back to it. - * - * @param visitor the InlineAreaVisitor wishing to process this. - * @see org.apache.fop.area.inline.InlineAreaVisitor - */ -public void acceptVisitor(InlineAreaVisitor visitor) { -visitor.serveVisitor(this); -} - -/** * Get the character for this inline character area. * * @return the character 1.3 +0 -13 xml-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.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- InlineArea.java 10 Sep 2003 18:42:22 - 1.2 +++ InlineArea.java 25 Feb 2004 03:32:17 - 1.3 @@ -58,8 +58,6 @@ * Inline Area * This area is for all inline areas that can be placed * in a line area. - * Extensions of this class should render themselves with the - * requested renderer. */ public class InlineArea extends Area { // int width; @@ -73,17 +71,6 @@ * offset position from top of parent area */ protected int verticalPosition = 0; - -/** - * Handle a visitor (usually a renderer) for this inline area. - * Inline areas that extend this class are expected - * to pass themselves back to the visitor so that the visitor can process - * them, usually by rendering them. - * - * @param visitor the InlineAreaVisitor that will process this - */ -public void acceptVisitor(InlineAreaVisitor visitor) { -} /** * Set the width of this inline area. 1.3 +0 -10 xml-fop/src/java/org/apache/fop/area/inline/InlineParent.java Index: InlineParent.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/area/inline/InlineParent.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- InlineParent.java 10 Sep 2003 18:42:22 - 1.2 +++ InlineParent.java 25 Feb 2004 03:32:17 - 1.3 @@ -77,16 +77,6 @@ } /** - * Handle InlineAreaVisitor request by passing this back to it. - * - * @param visitor the InlineAreaVisitor wishing to process this. - * @see org.apache.fop.area.inline.InlineAreaVisitor - */ -public void acceptVisitor(InlineAreaVisitor visitor) { -visitor.serveVisitor(this); -} - -/** * Override generic Area method. * * @param childArea the child area to add 1.4 +0 -10 xml-fop/src/java/org/apache/fop/area/inline/Leader.java Index: Leader.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/area/inline/Leader.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- Leader.java 17 Jan 2004 19:29:45 - 1.3 +++ Leader.java 25 Feb 2004 03:32:17 - 1.4 @@ -108,15 +108,5 @@ return ruleThickness; } -/** - * Handle InlineAreaVisitor request by passing this back to it. - * - * @param visitor the InlineAreaVisitor wishing to process this. - * @see org.apache.fop.area.inline.InlineAreaVisitor - */ -public void acceptVisitor(InlineAreaVisitor visitor) { -visitor.serveVisitor(this); -} - } 1.3 +0 -10 xml-fop/src/java/org/apache/fop/area/inline/Space.java Index: Space.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/area
cvs commit: xml-fop/examples/fo/tables background.fo borders.fo break.fo headfoot.fo keep.fo omit.fo space.fo widowsorphans.fo
gmazza 2004/02/22 05:37:07 Modified:examples/fo/advanced barcode.fo cid-fonts.fo giro.fo examples/fo/basic border.fo fonts.fo images.fo link.fo normal.fo normalex.fo pdfoutline.fo examples/fo/footnotes columns.fo simple.fo examples/fo/keeps_and_breaks columnlevel1.fo pagelevel1.fo pagelevel2.fo pagelevel3.fo pagelevel4.fo examples/fo/markers glossary.xsl hide.fo examples/fo/pagination allregions.fo franklin_2pageseqs.fo franklin_alt.fo franklin_rep.fo franklin_rep_max_repeats.fo franklin_rep_max_repeats_expl.fo franklin_rep_max_repeats_nl.fo examples/fo/region_body simplecol2.fo simplecol3.fo simplecol4.fo examples/fo/svg external.fo examples/fo/tables background.fo borders.fo break.fo headfoot.fo keep.fo omit.fo space.fo widowsorphans.fo Log: Formatting cleanup of fo:layout-master-sets in examples. Revision ChangesPath 1.2 +38 -17xml-fop/examples/fo/advanced/barcode.fo Index: barcode.fo === RCS file: /home/cvs/xml-fop/examples/fo/advanced/barcode.fo,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- barcode.fo29 Jan 2003 16:07:15 - 1.1 +++ barcode.fo22 Feb 2004 13:37:06 - 1.2 @@ -1,22 +1,43 @@ ?xml version=1.0 encoding=ISO-8859-1? fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format; - fo:layout-master-set - fo:simple-page-master page-width=21cm page-height=29.7cm master-name=first margin-top=5mm - fo:region-body margin-bottom=4.5in margin-right=5mm margin-left=5mm margin-top=5mm/ - fo:region-after extent=4in border-top-color=silver border-top-style=dotted border-top-width=0.13mm/ - /fo:simple-page-master - fo:simple-page-master page-width=21cm page-height=29.7cm master-name=rest margin-right=5mm margin-left=5mm margin-top=5mm margin-bottom=5mm - fo:region-body/ - /fo:simple-page-master - fo:page-sequence-master master-name=A4 - fo:repeatable-page-master-alternatives -fo:conditional-page-master-reference master-reference=first page-position=first/ -fo:conditional-page-master-reference master-reference=rest page-position=rest/ -fo:conditional-page-master-reference master-reference=rest/ - /fo:repeatable-page-master-alternatives - /fo:page-sequence-master - /fo:layout-master-set - fo:page-sequence master-reference=A4 + +fo:layout-master-set + fo:simple-page-master master-name=first +page-width=21cm +page-height=29.7cm +margin-top=5mm + fo:region-body +margin-bottom=4.5in +margin-right=5mm +margin-left=5mm +margin-top=5mm/ + fo:region-after +extent=4in +border-top-color=silver +border-top-style=dotted +border-top-width=0.13mm/ + /fo:simple-page-master + + fo:simple-page-master master-name=rest +page-width=21cm +page-height=29.7cm +margin-right=5mm +margin-left=5mm +margin-top=5mm +margin-bottom=5mm + fo:region-body/ + /fo:simple-page-master + + fo:page-sequence-master master-name=A4 + fo:repeatable-page-master-alternatives +fo:conditional-page-master-reference master-reference=first page-position=first/ +fo:conditional-page-master-reference master-reference=rest page-position=rest/ +fo:conditional-page-master-reference master-reference=rest/ + /fo:repeatable-page-master-alternatives + /fo:page-sequence-master +/fo:layout-master-set + +fo:page-sequence master-reference=A4 fo:flow flow-name=xsl-region-body fo:block font-size=14pt font-weight=bold 1.3 +8 -2 xml-fop/examples/fo/advanced/cid-fonts.fo Index: cid-fonts.fo === RCS file: /home/cvs/xml-fop/examples/fo/advanced/cid-fonts.fo,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- cid-fonts.fo 29 Jan 2003 16:07:15 - 1.2 +++ cid-fonts.fo 22 Feb 2004 13:37:06 - 1.3 @@ -5,8 +5,14 @@ fo:root 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 page-width=21cm page-height=29.7cm master-name=A4 - fo:region-body margin-bottom=1.5cm margin-right=2cm margin-left=2cm margin-top=1.5cm/ + fo:simple-page-master master-name=A4 +page
cvs commit: xml-fop fop.bat
gmazza 2004/02/11 14:48:33 Modified:.fop.bat Log: Modification made for collecting parameters to be compatible (hopefully) with Win9x. Work from Apache Ant. Revision ChangesPath 1.17 +19 -3 xml-fop/fop.bat Index: fop.bat === RCS file: /home/cvs/xml-fop/fop.bat,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- fop.bat 10 Feb 2004 23:51:25 - 1.16 +++ fop.bat 11 Feb 2004 22:48:32 - 1.17 @@ -4,6 +4,23 @@ set LOCAL_FOP_HOME= if %OS%==Windows_NT set LOCAL_FOP_HOME=%~dp0 +rem Code from Apache Ant project +rem Slurp the command line arguments. This loop allows for an unlimited number +rem of arguments (up to the command line limit, anyway). +rem Could also do a shift and %* for all params, but apparently doesn't work +rem with Win9x. +set FOP_CMD_LINE_ARGS=%1 +if %1== goto doneStart +shift +:setupArgs +if %1== goto doneStart +set FOP_CMD_LINE_ARGS=%FOP_CMD_LINE_ARGS% %1 +shift +goto setupArgs +rem This label provides a place for the argument list loop to break out +rem and for NT handling to skip to. +:doneStart + set LIBDIR=%LOCAL_FOP_HOME%lib set LOCALCLASSPATH=%LOCAL_FOP_HOME%build\fop.jar set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\xml-apis.jar @@ -15,7 +32,6 @@ set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\jimi-1.0.jar set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\jai_core.jar set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\jai_codec.jar -rem 'shift' removes %0 (i.e., the fop.bat filename) -shift -java -cp %LOCALCLASSPATH% org.apache.fop.apps.Fop %* + +java -cp %LOCALCLASSPATH% org.apache.fop.apps.Fop %FOP_CMD_LINE_ARGS% - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop fop.bat
gmazza 2004/02/10 14:27:42 Modified:.fop.bat Log: Updated fop.bat. Revision ChangesPath 1.15 +1 -1 xml-fop/fop.bat Index: fop.bat === RCS file: /home/cvs/xml-fop/fop.bat,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- fop.bat 14 Jul 2003 07:40:50 - 1.14 +++ fop.bat 10 Feb 2004 22:27:42 - 1.15 @@ -11,7 +11,7 @@ set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\xalan-2.4.1.jar set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\batik.jar set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\avalon-framework-4.1.4.jar -set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\commons-io-dev-20030703.jar +set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\commons-io-dev-20040206.jar set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\jimi-1.0.jar set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\jai_core.jar set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\jai_codec.jar - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/tools TestConverter.java
gmazza 2004/02/10 15:51:26 Modified:.fop.bat src/java/org/apache/fop/apps CommandLineOptions.java XSLTInputHandler.java src/java/org/apache/fop/servlet FopPrintServlet.java src/java/org/apache/fop/tools TestConverter.java Log: 1.) Deprecation of most constructors in XSLTInputHandler in favor of JAXP. 2.) Removal of unused transformer member variable in XSLTInputHandler. 3.) Partial modifications -- code from Xalan project -- in order to be able to handle command line parameters for XSLT stylesheet. (Changes still needed in XSLTInputHandler.getXMLFilter() -- unsure how to set parameters to an XMLFilter. Revision ChangesPath 1.16 +3 -1 xml-fop/fop.bat Index: fop.bat === RCS file: /home/cvs/xml-fop/fop.bat,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- fop.bat 10 Feb 2004 22:27:42 - 1.15 +++ fop.bat 10 Feb 2004 23:51:25 - 1.16 @@ -15,5 +15,7 @@ set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\jimi-1.0.jar set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\jai_core.jar set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\jai_codec.jar -java -cp %LOCALCLASSPATH% org.apache.fop.apps.Fop %1 %2 %3 %4 %5 %6 %7 %8 +rem 'shift' removes %0 (i.e., the fop.bat filename) +shift +java -cp %LOCALCLASSPATH% org.apache.fop.apps.Fop %* 1.14 +18 -1 xml-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.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- CommandLineOptions.java 1 Sep 2003 13:31:24 - 1.13 +++ CommandLineOptions.java 10 Feb 2004 23:51:26 - 1.14 @@ -54,6 +54,7 @@ import java.io.File; import java.io.FileNotFoundException; import java.util.Locale; +import java.util.Vector; // Avalon import org.apache.avalon.framework.logger.ConsoleLogger; @@ -116,6 +117,8 @@ private Logger log; +private Vector xsltParams = null; + /** * Construct a command line option object from command line arguments * @param args command line parameters @@ -208,6 +211,18 @@ i = i + parseUnknownOption(args, i); } else if (args[i].equals(-at)) { i = i + parseAreaTreeOption(args, i); +} else if (args[i].equals(-param)) { + if (i + 2 args.length) { + if (xsltParams == null) { + xsltParams = new Vector(); + } + String name = args[++i]; + xsltParams.addElement(name); + String expression = args[++i]; + xsltParams.addElement(expression); + } else { +throw new FOPException(invalid param usage: use -param name value); + } } else { printUsage(); return false; @@ -493,7 +508,7 @@ case FO_INPUT: return new FOFileHandler(fofile); case XSLT_INPUT: -return new XSLTInputHandler(xmlfile, xsltfile); +return new XSLTInputHandler(xmlfile, xsltfile, xsltParams); default: throw new FOPException(Invalid inputmode setting!); } @@ -621,6 +636,8 @@ + -fo infile xsl:fo input file \n + -xml infile xml input file, must be used together with -xsl \n + -xsl stylesheet xslt stylesheet \n \n +/*+ -param name value value to use for parameter name in xslt stylesheet\n ++ (repeat '-param name value' for each parameter)\n \n */ + [OUTPUT] \n + outfile input will be rendered as pdf file into outfile \n + -pdf outfile input will be rendered as pdf file (outfile req'd) \n 1.11 +34 -17xml-fop/src/java/org/apache/fop/apps/XSLTInputHandler.java Index: XSLTInputHandler.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/apps/XSLTInputHandler.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- XSLTInputHandler.java 7 Oct 2003 20:06:17 - 1.10 +++ XSLTInputHandler.java 10 Feb 2004 23:51:26 - 1.11 @@ -52,6 +52,7 @@ // Imported java.io classes import java.io.File; +import java.util.Vector; // Imported TraX classes import
cvs commit: xml-fop/examples/embedding/xml/xslt projectteam2fo.xsl
gmazza 2004/02/09 14:04:23 Modified:examples/embedding/java/embedding ExampleXML2PDF.java examples/embedding/xml/xslt projectteam2fo.xsl Log: Modification of ExampleXML2PDF to show a Transformer.setParameter() call. Fix to xsl stylesheet to show '1.0' instead of just '1' for the version number (fix from Clay Leeds). Revision ChangesPath 1.4 +35 -48xml-fop/examples/embedding/java/embedding/ExampleXML2PDF.java Index: ExampleXML2PDF.java === RCS file: /home/cvs/xml-fop/examples/embedding/java/embedding/ExampleXML2PDF.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- ExampleXML2PDF.java 3 Jul 2003 19:05:10 - 1.3 +++ ExampleXML2PDF.java 9 Feb 2004 22:04:23 - 1.4 @@ -80,52 +80,6 @@ public class ExampleXML2PDF { /** - * Converts an XML file to a PDF file using JAXP and FOP. - * @param xml the XML file - * @param xslt the stylesheet file - * @param pdf the target PDF file - * @throws IOException In case of an I/O problem - * @throws FOPException In case of a FOP problem - * @throws TransformerException In case of a XSL transformation problem - */ -public void convertXML2PDF(File xml, File xslt, File pdf) -throws IOException, FOPException, TransformerException { -//Construct driver -Driver driver = new Driver(); - -//Setup logger -Logger logger = new ConsoleLogger(ConsoleLogger.LEVEL_INFO); -driver.enableLogging(logger); -driver.initialize(); - -//Setup Renderer (output format) -driver.setRenderer(Driver.RENDER_PDF); - -//Setup output -OutputStream out = new java.io.FileOutputStream(pdf); -out = new java.io.BufferedOutputStream(out); -try { -driver.setOutputStream(out); - -//Setup XSLT -TransformerFactory factory = TransformerFactory.newInstance(); -Transformer transformer = factory.newTransformer(new StreamSource(xslt)); - -//Setup input for XSLT transformation -Source src = new StreamSource(xml); - -//Resulting SAX events (the generated FO) must be piped through to FOP -Result res = new SAXResult(driver.getContentHandler()); - -//Start XSLT transformation and FOP processing -transformer.transform(src, res); -} finally { -out.close(); -} -} - - -/** * Main method. * @param args command-line arguments */ @@ -150,8 +104,41 @@ System.out.println(); System.out.println(Transforming...); -ExampleXML2PDF app = new ExampleXML2PDF(); -app.convertXML2PDF(xmlfile, xsltfile, pdffile); +//Construct driver +Driver driver = new Driver(); + +//Setup logger +Logger logger = new ConsoleLogger(ConsoleLogger.LEVEL_INFO); +driver.enableLogging(logger); +driver.initialize(); + +//Setup Renderer (output format) +driver.setRenderer(Driver.RENDER_PDF); + +//Setup output +OutputStream out = new java.io.FileOutputStream(pdffile); +out = new java.io.BufferedOutputStream(out); +try { +driver.setOutputStream(out); + +//Setup XSLT +TransformerFactory factory = TransformerFactory.newInstance(); +Transformer transformer = factory.newTransformer(new StreamSource(xsltfile)); + +// set the value of a param in the stylesheet +transformer.setParameter(versionParam, 2.0); + +//Setup input for XSLT transformation +Source src = new StreamSource(xmlfile); + +//Resulting SAX events (the generated FO) must be piped through to FOP +Result res = new SAXResult(driver.getContentHandler()); + +//Start XSLT transformation and FOP processing +transformer.transform(src, res); +} finally { +out.close(); +} System.out.println(Success!); } catch (Exception e) { 1.4 +1 -1 xml-fop/examples/embedding/xml/xslt/projectteam2fo.xsl Index: projectteam2fo.xsl === RCS file: /home/cvs/xml-fop/examples/embedding/xml/xslt/projectteam2fo.xsl,v retrieving revision 1.3 retrieving
cvs commit: xml-fop/examples/embedding/xml/xslt projectteam2fo.xsl
gmazza 2004/02/04 16:31:50 Modified:examples/embedding build.xml examples/embedding/xml/xslt projectteam2fo.xsl Log: Added a parameter to the projectteam2fo.xsl example (for subsequent use in showing a setTransform() call in the samples); also added a needed library to the examples' build.xml file. Revision ChangesPath 1.3 +6 -5 xml-fop/examples/embedding/build.xml Index: build.xml === RCS file: /home/cvs/xml-fop/examples/embedding/build.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- build.xml 12 Mar 2003 11:14:53 - 1.2 +++ build.xml 5 Feb 2004 00:31:50 - 1.3 @@ -17,11 +17,12 @@ !-- stuff -- path id=project.class.path fileset dir=${fop.lib.dir} - include name=avalon-framework*.jar/ - include name=batik*.jar/ - include name=xml-apis.jar/ - include name=xerces*.jar/ - include name=xalan*.jar/ +include name=avalon-framework*.jar/ +include name=batik*.jar/ +include name=xml-apis.jar/ +include name=xerces*.jar/ +include name=xalan*.jar/ +include name=commons-io*.jar/ /fileset fileset dir=${fop.lib.dir}/../build include name=fop.jar/ 1.3 +3 -0 xml-fop/examples/embedding/xml/xslt/projectteam2fo.xsl Index: projectteam2fo.xsl === RCS file: /home/cvs/xml-fop/examples/embedding/xml/xslt/projectteam2fo.xsl,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- projectteam2fo.xsl12 Mar 2003 11:14:53 - 1.2 +++ projectteam2fo.xsl5 Feb 2004 00:31:50 - 1.3 @@ -1,6 +1,7 @@ ?xml version=1.0 encoding=UTF-8? xsl:stylesheet version=1.1 xmlns:xsl=http://www.w3.org/1999/XSL/Transform; xmlns:fo=http://www.w3.org/1999/XSL/Format; exclude-result-prefixes=fo xsl:output method=xml version=1.0 omit-xml-declaration=no indent=yes/ + xsl:param name=versionParam select=1.0/ !-- = -- !-- root element: projectteam -- !-- = -- @@ -14,6 +15,8 @@ fo:page-sequence master-reference=simpleA4 fo:flow flow-name=xsl-region-body fo:block font-size=16pt font-weight=bold space-after=5mmProject: xsl:value-of select=projectname/ + /fo:block + fo:block font-size=12pt space-after=5mmVersion xsl:value-of select=$versionParam/ /fo:block fo:block font-size=10pt fo:table table-layout=fixed - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/svg PDFImageElementBridge.java
gmazza 2004/01/25 06:40:14 Modified:src/java/org/apache/fop/fo/flow ExternalGraphic.java src/java/org/apache/fop/image AbstractFopImage.java BmpImage.java FopImage.java GifImage.java JimiImage.java JpegImage.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 src/java/org/apache/fop/svg PDFImageElementBridge.java Log: Switching from passing the FOUserAgent for several of the image functions to its internal Avalon logger instead. (Only object used within FOUserAgent parameter, plus this library is also used for the PDFTranscoder, plus FOUserAgent not always available from everywhere anymore.) Holding off making a complete switch in this package (FOUserAgent still used in a few more places, albeit only its logger is being requested) until others comment. Revision ChangesPath 1.18 +1 -1 xml-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.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- ExternalGraphic.java 17 Jan 2004 19:29:46 - 1.17 +++ ExternalGraphic.java 25 Jan 2004 14:40:14 - 1.18 @@ -158,7 +158,7 @@ return; } // load dimensions -if (!fopimage.load(FopImage.DIMENSIONS, getUserAgent())) { +if (!fopimage.load(FopImage.DIMENSIONS, getUserAgent().getLogger())) { // error url = null; return; 1.4 +8 -8 xml-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.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- AbstractFopImage.java 30 Aug 2003 17:59:53 - 1.3 +++ AbstractFopImage.java 25 Jan 2004 14:40:14 - 1.4 @@ -57,7 +57,7 @@ import java.awt.Color; // FOP -import org.apache.fop.apps.FOUserAgent; +import org.apache.avalon.framework.logger.Logger; /** * Base class to implement the FopImage interface. @@ -157,13 +157,13 @@ * @param ua the user agent for handling logging etc. * @return true if the loading was successful */ -public synchronized boolean load(int type, FOUserAgent ua) { +public synchronized boolean load(int type, Logger logger) { if ((loaded type) != 0) { return true; } boolean success = true; if (((type DIMENSIONS) != 0) ((loaded DIMENSIONS) == 0)) { -success = success loadDimensions(ua); +success = success loadDimensions(logger); if (!success) { return false; @@ -171,13 +171,13 @@ loaded = loaded | DIMENSIONS; } if (((type BITMAP) != 0) ((loaded BITMAP) == 0)) { -success = success loadBitmap(ua); +success = success loadBitmap(logger); if (success) { loaded = loaded | BITMAP; } } if (((type ORIGINAL_DATA) != 0) ((loaded ORIGINAL_DATA) == 0)) { -success = success loadOriginalData(ua); +success = success loadOriginalData(logger); if (success) { loaded = loaded | ORIGINAL_DATA; } @@ -193,7 +193,7 @@ * @param ua the user agent * @return true if the loading was successful */ -protected boolean loadDimensions(FOUserAgent ua) { +protected boolean loadDimensions(Logger logger) { return false; } @@ -205,7 +205,7 @@ * @param ua the user agent * @return true if the loading was successful */ -protected boolean loadBitmap(FOUserAgent ua) { +protected boolean loadBitmap(Logger logger) { return false; } @@ -217,7 +217,7 @@ * @param ua the user agent * @return true if the loading was successful */ -protected boolean loadOriginalData(FOUserAgent ua) { +protected boolean loadOriginalData(Logger logger) { return false; } 1.3 +10 -10xml-fop/src/java/org/apache/fop/image/BmpImage.java Index: BmpImage.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/image/BmpImage.java,v retrieving revision
cvs commit: xml-fop/src/java/org/apache/fop/svg PDFGraphics2D.java PDFImageElementBridge.java
gmazza 2004/01/22 14:40:51 Modified:.build.xml src/java/org/apache/fop/svg PDFGraphics2D.java PDFImageElementBridge.java Log: Applied Thomas DeWeese's latest patch for the PDF transcoder. Revision ChangesPath 1.101 +4 -1 xml-fop/build.xml Index: build.xml === RCS file: /home/cvs/xml-fop/build.xml,v retrieving revision 1.100 retrieving revision 1.101 diff -u -r1.100 -r1.101 --- build.xml 22 Jan 2004 09:06:05 - 1.100 +++ build.xml 22 Jan 2004 22:40:51 - 1.101 @@ -520,7 +520,10 @@ !--include name=org/apache/fop/layout/Font*.class/-- include name=org/apache/fop/image/FopImag*.class/ include name=org/apache/fop/image/Jpeg*/ +include name=org/apache/fop/image/EPS*/ include name=org/apache/fop/image/Abstract*/ +include name=org/apache/fop/image/analyser/*.class/ +include name=org/apache/fop/util/CMYKColorSpace*.class/ include name=org/apache/fop/util/StreamUtilities.class/ include name=org/apache/fop/util/*OutputStream.class/ include name=org/apache/fop/util/Finalizable.class/ @@ -580,7 +583,7 @@ fileset dir=${build.dest} patternset refid=transcoder-classes/ /fileset - fileset dir=${build.dir}/transcoder-dependencies/ + fileset dir=${transcoder-deps}/ manifest attribute name=Implementation-Title value=${fop-transcoder.name}/ attribute name=Implementation-Version value=${fop-transcoder.version}/ 1.13 +13 -3 xml-fop/src/java/org/apache/fop/svg/PDFGraphics2D.java Index: PDFGraphics2D.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/svg/PDFGraphics2D.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- PDFGraphics2D.java12 Dec 2003 22:37:39 - 1.12 +++ PDFGraphics2D.java22 Jan 2004 22:40:51 - 1.13 @@ -152,6 +152,12 @@ protected int baseLevel = 0; /** + * The count of JPEG images added to document so they recieve + * unique keys. + */ +protected int jpegCount = 0; + +/** * The current font information. */ protected Document fontInfo; @@ -340,9 +346,13 @@ * @param width the width to draw the image * @param height the height to draw the image */ -public void addJpegImage(JpegImage jpeg, float x, float y, float width, float height) { -FopPDFImage fopimage = new FopPDFImage(jpeg, ); -int xObjectNum = this.pdfDoc.addImage(resourceContext, fopimage).getXNumber(); +public void addJpegImage(JpegImage jpeg, float x, float y, + float width, float height) { +String key = __AddJPEG_+jpegCount; +jpegCount++; +FopPDFImage fopimage = new FopPDFImage(jpeg, key); +int xObjectNum = this.pdfDoc.addImage(resourceContext, + fopimage).getXNumber(); AffineTransform at = getTransform(); double[] matrix = new double[6]; 1.5 +1 -1 xml-fop/src/java/org/apache/fop/svg/PDFImageElementBridge.java Index: PDFImageElementBridge.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/svg/PDFImageElementBridge.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- PDFImageElementBridge.java3 Jan 2004 03:25:02 - 1.4 +++ PDFImageElementBridge.java22 Jan 2004 22:40:51 - 1.5 @@ -97,6 +97,7 @@ (purl.toString(), purl.openStream(), null); if (ii.mimeType.toLowerCase() == image/jpeg) { JpegImage jpeg = new JpegImage(ii); +jpeg.load(FopImage.ORIGINAL_DATA, null); PDFJpegNode node = new PDFJpegNode(jpeg, origGN); Rectangle2D imgBounds = getImageBounds(ctx, e); @@ -154,7 +155,6 @@ public void primitivePaint(Graphics2D g2d) { if (g2d instanceof PDFGraphics2D) { PDFGraphics2D pdfg = (PDFGraphics2D) g2d; -pdfg.setTransform(getTransform()); float x = 0; float y = 0; try { - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/documentation/content/xdocs team.xml
gmazza 2004/01/19 15:56:50 Modified:src/documentation/content/xdocs team.xml Log: Updated team page--moved Finn, Andreas, Chris and Peter to active status; set Victor and Keiron to inactive status, removed former contributor section in favor of going back to giving credit within source files. Revision ChangesPath 1.25 +22 -31xml-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.24 retrieving revision 1.25 diff -u -r1.24 -r1.25 --- team.xml 1 Jan 2004 18:31:03 - 1.24 +++ team.xml 19 Jan 2004 23:56:50 - 1.25 @@ -12,8 +12,14 @@ section id=commit-active titleActive Committers/title ul +lilink href=mailto:[EMAIL PROTECTED]Finn Bock/link (FB)/li +lilink href=mailto:[EMAIL PROTECTED]Chris Bowditch/link (CB)/li +lilink href=mailto:[EMAIL PROTECTED]Andreas Delmelle/link (AD)/li li id=cglink href=mailto:[EMAIL PROTECTED]Christian Geisert/link (CG)/li -li id=klllink href=mailto:[EMAIL PROTECTED]Keiron Liddle/link (KLL)/li +lilink href=mailto:[EMAIL PROTECTED]Peter Herweg/link (PH) is helping to +integrate the jfor project's RTF support into the upcoming FOP 1.0 version. +Born in 1978, he has been serving as an application developer for a small +industrial company in Germany since 1999./li li id=jmlink href=mailto:[EMAIL PROTECTED]Jeremias M#x00E4;rki/link (JM) is a software engineer from Lucerne, Switzerland. He is currently enjoying a longer period of independence and is having fun working on open source projects like Apache FOP. He's also @@ -21,10 +27,6 @@ /li li id=gmlink href=mailto:[EMAIL PROTECTED]Glen Mazza/link (GM) is an information systems analyst with EDS in Arlington, Virginia, USA./li -li id=wvmlink href=mailto:[EMAIL PROTECTED]Victor Mote/link (WVM) is the founder and -manager of fork href=http://www.outfitr.com;Enterprise Outfitters/fork, a business -software company, and of fork href=http://www.portagepub.com;Portage Publications/fork, -a republisher of old documents. Both are located in Colorado Springs, Colorado, USA./li li id=jplink href=mailto:[EMAIL PROTECTED]J#x00F6;rg Pietschmann/link (JP)/li li id=otlink href=mailto:[EMAIL PROTECTED]Oleg Tkachenko/link (OT)/li li id=pbwlink href=mailto:[EMAIL PROTECTED]Peter B. West/link (PBW)/li @@ -38,13 +40,6 @@ Newfoundland. While developing a taste for good seafood, he still isn't ready for seal flipper (even if it's fresh). He is currently assisting the FOP project on memory and performance issues./li -lilink href=mailto:[EMAIL PROTECTED]Finn Bock/link/li -lilink href=mailto:[EMAIL PROTECTED]Chris Bowditch/link/li -lilink href=mailto:[EMAIL PROTECTED]Andreas Delmelle/link/li -lilink href=mailto:[EMAIL PROTECTED]Peter Herweg/link is helping to -integrate the jfor project's RTF support into the upcoming FOP 1.0 version. -Born in 1978, he has been serving as an application developer for a small -industrial company in Germany since 1999./li lilink href=mailto:[EMAIL PROTECTED]Clay Leeds/link is a web/WAP/Palm developer from Laguna Beach, California, USA. A recent XML/XSL-FO convert, he has been nit-picking FAQs amp; assorted web @@ -72,30 +67,26 @@ 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=klllink href=mailto:[EMAIL PROTECTED]Keiron Liddle/link/li +li id=wvmlink href=mailto:[EMAIL PROTECTED]Victor Mote/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 titleAreas of Expertise/title table tr th/ thCG /th - thKLL/th - thJM /th - thGM /th - thWVM/th - thJP /th - thOT /th + thFB/th
cvs commit: xml-fop/src/java/org/apache/fop/fo/expr PropertyInfo.java
gmazza 2004/01/19 17:14:33 Modified:src/codegen constants.xsl src/java/org/apache/fop/fo Constants.java src/java/org/apache/fop/fo/expr PropertyInfo.java Log: Interfaces now in alphabetical order and detached from generic interfaces in autogenerated fo.properties.*; patch from Finn Bock--unneeded method in PropertyInfo. Revision ChangesPath 1.3 +71 -11xml-fop/src/codegen/constants.xsl Index: constants.xsl === RCS file: /home/cvs/xml-fop/src/codegen/constants.xsl,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- constants.xsl 17 Jan 2004 19:29:45 - 1.2 +++ constants.xsl 20 Jan 2004 01:14:33 - 1.3 @@ -101,14 +101,6 @@ package org.apache.fop.fo; -import org.apache.fop.fo.properties.GenericBoolean; -import org.apache.fop.fo.properties.GenericBorderStyle; -import org.apache.fop.fo.properties.GenericBreak; -import org.apache.fop.fo.properties.GenericCondBorderWidth; -import org.apache.fop.fo.properties.GenericCondPadding; -import org.apache.fop.fo.properties.GenericKeep; -import org.apache.fop.fo.properties.GenericSpace; - public interface Constants {/xsl:text // element constants @@ -141,7 +133,75 @@ /xsl:call-template // Enumeration Interfaces -xsl:apply-templates select=document(propfile)//property[not(@type='generic')]/ + +public interface GenericBooleanInterface { +int TRUE = Constants.TRUE; +int FALSE = Constants.FALSE; +} + +public interface GenericBorderStyleInterface { +int NONE = Constants.NONE; +int HIDDEN = Constants.HIDDEN; +int DOTTED = Constants.DOTTED; +int DASHED = Constants.DASHED; +int SOLID = Constants.SOLID; +int DOUBLE = Constants.DOUBLE; +int GROOVE = Constants.GROOVE; +int RIDGE = Constants.RIDGE; +int INSET = Constants.INSET; +int OUTSET = Constants.OUTSET; +} + +public interface GenericBreakInterface { +int AUTO = Constants.AUTO; +int COLUMN = Constants.COLUMN; +int PAGE = Constants.PAGE; +int EVEN_PAGE = Constants.EVEN_PAGE; +int ODD_PAGE = Constants.ODD_PAGE; +} + +public interface GenericCondBorderWidthInterface { +public interface Conditionality { +int DISCARD = Constants.DISCARD; +int RETAIN = Constants.RETAIN; +} +} + +public interface GenericCondPaddingInterface { +public interface Conditionality { +int DISCARD = Constants.DISCARD; +int RETAIN = Constants.RETAIN; +} +} + +public interface GenericKeepInterface { +public interface WithinPage { +int AUTO = Constants.AUTO; +int ALWAYS = Constants.ALWAYS; +} +public interface WithinLine { +int AUTO = Constants.AUTO; +int ALWAYS = Constants.ALWAYS; +} +public interface WithinColumn { +int AUTO = Constants.AUTO; +int ALWAYS = Constants.ALWAYS; +} +} + +public interface GenericSpaceInterface { +public interface Precedence { +int FORCE = Constants.FORCE; +} +public interface Conditionality { +int DISCARD = Constants.DISCARD; +int RETAIN = Constants.RETAIN; +} +} + +xsl:apply-templates select = document(propfile)//property[not(@type='generic')] + xsl:sort select=name/ +/xsl:apply-templates xsl:text } @@ -177,7 +237,7 @@ xsl:if test=use-generic xsl:text extends /xsl:text xsl:value-of select=use-generic/ -xsl:text.Enums/xsl:text +xsl:textInterface/xsl:text /xsl:if xsl:text {/xsl:text xsl:for-each select=enumeration/value 1.5 +226 -170 xml-fop/src/java/org/apache/fop/fo/Constants.java Index: Constants.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/Constants.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- Constants.java17 Jan 2004 19:29:46 - 1.4 +++ Constants.java20 Jan 2004 01:14:33 - 1.5 @@ -51,14 +51,6 @@ package org.apache.fop.fo; -import org.apache.fop.fo.properties.GenericBoolean; -import org.apache.fop.fo.properties.GenericBorderStyle; -import org.apache.fop.fo.properties.GenericBreak; -import org.apache.fop.fo.properties.GenericCondBorderWidth; -import org.apache.fop.fo.properties.GenericCondPadding; -import org.apache.fop.fo.properties.GenericKeep
cvs commit: xml-fop/src/java/org/apache/fop/fo/pagination RegionBody.java
gmazza 2004/01/19 17:33:58 Modified:.build.xml src/java/org/apache/fop/fo BoxPropShorthandParser.java FObj.java Property.java PropertyList.java src/java/org/apache/fop/fo/expr FopPropValFunction.java FromParentFunction.java InheritedPropFunction.java NearestSpecPropFunction.java src/java/org/apache/fop/fo/flow TableRow.java src/java/org/apache/fop/fo/pagination RegionBody.java Added: src/java/org/apache/fop/fo FOPropertyMapping.java Log: FOPropertyMapping.java no longer autogenerated, moved from fop.fo.properties to fo package in preparation for new property maker implementation. Revision ChangesPath 1.98 +2 -4 xml-fop/build.xml Index: build.xml === RCS file: /home/cvs/xml-fop/build.xml,v retrieving revision 1.97 retrieving revision 1.98 diff -u -r1.97 -r1.98 --- build.xml 17 Jan 2004 19:29:45 - 1.97 +++ build.xml 20 Jan 2004 01:33:57 - 1.98 @@ -355,10 +355,8 @@ write out to (many) files other than the one specified -- style in=${foproperties.xml} style=${properties.xsl} out=${build.gensrc}/${replacestring}/fo/properties/fo_${ignore_this}/ -style in=${foproperties.xml} style=${build.codegen}/fo-property-mapping.xsl - out=${build.gensrc}/${replacestring}/fo/properties/FOPropertyMapping.java/ -!--style in=${foproperties.xml} style=${build.codegen}/prop-val-enum-interfaces.xsl - out=${build.gensrc}/${replacestring}/fo/properties/propertyListing.java/-- +!--style in=${foproperties.xml} style=${build.codegen}/fo-property-mapping.xsl + out=${build.gensrc}/${replacestring}/fo/properties/FOPropertyMapping.java/-- style in=${encodings.xml} style=${charlist.xsl} out=${build.gensrc}/${replacestring}/fonts//CodePointMapping.java/ !-- 1.5 +0 -1 xml-fop/src/java/org/apache/fop/fo/BoxPropShorthandParser.java Index: BoxPropShorthandParser.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/BoxPropShorthandParser.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- BoxPropShorthandParser.java 26 Dec 2003 23:41:47 - 1.4 +++ BoxPropShorthandParser.java 20 Jan 2004 01:33:57 - 1.5 @@ -49,7 +49,6 @@ * Software Foundation, please see http://www.apache.org/. */ package org.apache.fop.fo; -import org.apache.fop.fo.properties.FOPropertyMapping; /** * Shorthand property parser for Box properties 1.32 +0 -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.31 retrieving revision 1.32 diff -u -r1.31 -r1.32 --- FObj.java 14 Jan 2004 00:00:37 - 1.31 +++ FObj.java 20 Jan 2004 01:33:57 - 1.32 @@ -59,7 +59,6 @@ import org.apache.fop.apps.FOPException; import org.apache.fop.fo.flow.Marker; -import org.apache.fop.fo.properties.FOPropertyMapping; import org.xml.sax.Attributes; import org.xml.sax.Locator; 1.16 +0 -1 xml-fop/src/java/org/apache/fop/fo/Property.java Index: Property.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/Property.java,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- Property.java 10 Jan 2004 20:40:07 - 1.15 +++ Property.java 20 Jan 2004 01:33:57 - 1.16 @@ -61,7 +61,6 @@ import org.apache.fop.fo.expr.Numeric; import org.apache.fop.fo.expr.PropertyParser; import org.apache.fop.fo.expr.PropertyInfo; -import org.apache.fop.fo.properties.FOPropertyMapping; import org.apache.fop.apps.FOPException; import java.util.Vector; 1.27 +0 -2 xml-fop/src/java/org/apache/fop/fo/PropertyList.java Index: PropertyList.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/PropertyList.java,v retrieving revision 1.26 retrieving revision 1.27 diff -u -r1.26 -r1.27 --- PropertyList.java 17 Jan 2004 19:29:46 - 1.26 +++ PropertyList.java 20 Jan 2004 01:33:57 - 1.27 @@ -57,8 +57,6 @@ // FOP import org.apache.fop.apps.FOPException; import org.apache.fop.fo.Property.Maker; -import org.apache.fop.fo.properties.FOPropertyMapping; - /** * Class containing the collection of properties for a given FObj. 1.1 xml-fop/src/java/org/apache/fop/fo
cvs commit: xml-fop/src/java/org/apache/fop/render/xml XMLRenderer.java
gmazza 2004/01/19 17:52:51 Modified:src/java/org/apache/fop/render/xml XMLRenderer.java Log: Block height/width elaboration for XML Renderer--Patch by Finn Bock. Revision ChangesPath 1.14 +3 -2 xml-fop/src/java/org/apache/fop/render/xml/XMLRenderer.java Index: XMLRenderer.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/render/xml/XMLRenderer.java,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- XMLRenderer.java 17 Jan 2004 19:29:46 - 1.13 +++ XMLRenderer.java 20 Jan 2004 01:52:51 - 1.14 @@ -366,10 +366,11 @@ * @see org.apache.fop.render.AbstractRenderer#renderBlock(Block) */ protected void renderBlock(Block block) { -String prop = ; +String prop = width=\ + block.getWidth() + + \ height=\ + block.getHeight() + \; Map map = block.getTraits(); if (map != null) { -prop = props=\ + getPropString(map) + \; +prop = prop + props=\ + getPropString(map) + \; } writeStartTag(block + prop + ); super.renderBlock(block); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/codegen prop-val-enum-interfaces.xsl
gmazza 2004/01/17 07:37:27 Modified:src/codegen prop-val-enum-interfaces.xsl Log: (Property Interface consolidation) Removed a redundancy in interface definitions: from here (for several of the interfaces): public interface KeepWithNext { public interface WithinPage extends GenericKeep.Enums.WithinPage { } public interface WithinLine extends GenericKeep.Enums.WithinLine { } public interface WithinColumn extends GenericKeep.Enums.WithinColumn { } } to here: public interface KeepWithNext extends GenericKeep.Enums { } Revision ChangesPath 1.2 +2 -5 xml-fop/src/codegen/prop-val-enum-interfaces.xsl Index: prop-val-enum-interfaces.xsl === RCS file: /home/cvs/xml-fop/src/codegen/prop-val-enum-interfaces.xsl,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- prop-val-enum-interfaces.xsl 22 Dec 2003 21:37:43 - 1.1 +++ prop-val-enum-interfaces.xsl 17 Jan 2004 15:37:27 - 1.2 @@ -92,7 +92,7 @@ xsl:text public interface /xsl:text xsl:value-of select=$classname/ - xsl:if test=use-generic and $bEnum='true' + xsl:if test=use-generic xsl:text extends /xsl:text xsl:value-of select=use-generic/ xsl:text.Enums/xsl:text @@ -106,9 +106,6 @@ xsl:value-of select=@const/ xsl:text;/xsl:text /xsl:for-each - xsl:if test=contains($bSubpropEnum, 'true') -xsl:call-template name=genSubpropEnum/ - /xsl:if xsl:text } /xsl:text /redirect:write - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/codegen prop-val-enum-interfaces.xsl
gmazza 2004/01/17 08:05:40 Modified:src/codegen prop-val-enum-interfaces.xsl Log: Further simplifications to file. Revision ChangesPath 1.3 +1 -94 xml-fop/src/codegen/prop-val-enum-interfaces.xsl Index: prop-val-enum-interfaces.xsl === RCS file: /home/cvs/xml-fop/src/codegen/prop-val-enum-interfaces.xsl,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- prop-val-enum-interfaces.xsl 17 Jan 2004 15:37:27 - 1.2 +++ prop-val-enum-interfaces.xsl 17 Jan 2004 16:05:40 - 1.3 @@ -112,97 +112,4 @@ /xsl:if /xsl:template -xsl:template name=genSubpropEnum - xsl:param name=prop select=./ - xsl:choose -xsl:when test=$prop/compound/subproperty/enumeration - xsl:for-each select=compound/subproperty[enumeration] -xsl:text -public interface /xsl:text -xsl:value-of select=name/ -xsl:text { -/xsl:text -xsl:for-each select=enumeration/value - xsl:text -int /xsl:text - xsl:value-of select=@const/ - xsl:text = Constants./xsl:text - xsl:value-of select=@const/ - xsl:text;/xsl:text -/xsl:for-each -xsl:text -} -/xsl:text - /xsl:for-each -/xsl:when -xsl:when test=$prop/use-generic - xsl:call-template name=inhspenums -xsl:with-param name=prop select=key('genericref', $prop/use-generic)/ - /xsl:call-template -/xsl:when -xsl:when test=$prop/compound/subproperty/use-generic - !-- generate interface subprop extends gensubprop.Enums -- - xsl:for-each select=$prop/compound/subproperty[use-generic] -xsl:variable name=bSpEnum - xsl:call-template name=hasEnum -xsl:with-param name=prop - select=key('genericref', use-generic)/ - /xsl:call-template -/xsl:variable -xsl:if test=$bSpEnum='true' - xsl:text -public interface /xsl:text - xsl:value-of select=name/ - xsl:text extends /xsl:text - xsl:value-of select=use-generic/ - xsl:text.Enums { } -/xsl:text -/xsl:if - /xsl:for-each -/xsl:when -xsl:otherwise - xsl:text -false/xsl:text -/xsl:otherwise - /xsl:choose -/xsl:template - -xsl:template name=inhspenums - xsl:param name=prop/ - xsl:variable name=generic_name -xsl:choose - xsl:when test=$prop/class-name -xsl:value-of select=$prop/class-name/ - /xsl:when - xsl:otherwise -xsl:call-template name=makeClassName - xsl:with-param name=propstr select=$prop/name/ -/xsl:call-template - /xsl:otherwise -/xsl:choose - /xsl:variable - !-- generate interface subprop extends genprop.subprop -- - xsl:for-each select=$prop/compound/subproperty[enumeration] -xsl:variable name=spname - xsl:call-template name=makeClassName -xsl:with-param name=propstr select=name/ - /xsl:call-template -/xsl:variable -xsl:text -public interface /xsl:text -xsl:value-of select=$spname/ -xsl:text extends /xsl:text -xsl:value-of select=$generic_name/ -xsl:text.Enums./xsl:text -xsl:value-of select=$spname/ -xsl:text { }/xsl:text - /xsl:for-each - - xsl:if test=$prop/use-generic -xsl:call-template name=inhspenums - xsl:with-param name=prop select=key('genericref', $prop/use-generic)/ -/xsl:call-template - /xsl:if -/xsl:template - /xsl:stylesheet - 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
gmazza 2004/01/17 11:29:46 Modified:.build.xml src/codegen constants.xsl properties.xsl src/java/org/apache/fop/area CTM.java PageViewport.java src/java/org/apache/fop/area/inline Leader.java src/java/org/apache/fop/fo Constants.java FOText.java PropertyList.java PropertyManager.java TextInfo.java src/java/org/apache/fop/fo/flow ExternalGraphic.java Inline.java InstreamForeignObject.java Leader.java Table.java TableCell.java src/java/org/apache/fop/fo/pagination ConditionalPageMasterReference.java RegionAfter.java RegionBA.java RegionBefore.java RegionBody.java RegionEnd.java RegionSE.java RegionStart.java src/java/org/apache/fop/layoutmgr AbstractLayoutManager.java AddLMVisitor.java BlockContainerLayoutManager.java LeafNodeLayoutManager.java LineLayoutManager.java PageLayoutManager.java 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 src/java/org/apache/fop/render/svg SVGRenderer.java src/java/org/apache/fop/render/xml XMLRenderer.java src/java/org/apache/fop/tools AreaTreeBuilder.java Removed: src/codegen prop-val-enum-interfaces.xsl Log: Moved the interfaces into the Constants class on a trial basis (we may still choose to remove them in favor of strictly using Constants.) Two interfaces (span and position) were removed because of conflicts with other class names. The interface generation was moved into Constants.xsl, which is run manually via the XsltToJava ant task and its output is then checked in. As a result, no more autogeneration of these interfaces at build time will be done. Revision ChangesPath 1.97 +5 -2 xml-fop/build.xml Index: build.xml === RCS file: /home/cvs/xml-fop/build.xml,v retrieving revision 1.96 retrieving revision 1.97 diff -u -r1.96 -r1.97 --- build.xml 22 Dec 2003 23:23:05 - 1.96 +++ build.xml 17 Jan 2004 19:29:45 - 1.97 @@ -350,12 +350,15 @@ targetfilelist dir=${basedir} files=${build.gensrc}/${replacestring}/fo/properties/fo_${ignore_this},${build.gensrc}/${replacestring}/fo/properties/FOPropertyMapping.java,${build.gensrc}/${replacestring}/fo/properties/foenums_${ignore_this}/ /dependset + +!-- ${ignore_this} used for out attribute because XSL stylesheet has commands to +write out to (many) files other than the one specified -- style in=${foproperties.xml} style=${properties.xsl} out=${build.gensrc}/${replacestring}/fo/properties/fo_${ignore_this}/ style in=${foproperties.xml} style=${build.codegen}/fo-property-mapping.xsl out=${build.gensrc}/${replacestring}/fo/properties/FOPropertyMapping.java/ -style in=${foproperties.xml} style=${build.codegen}/prop-val-enum-interfaces.xsl - out=${build.gensrc}/${replacestring}/fo/properties/foenums_${ignore_this}/ +!--style in=${foproperties.xml} style=${build.codegen}/prop-val-enum-interfaces.xsl + out=${build.gensrc}/${replacestring}/fo/properties/propertyListing.java/-- style in=${encodings.xml} style=${charlist.xsl} out=${build.gensrc}/${replacestring}/fonts//CodePointMapping.java/ !-- 1.2 +61 -5 xml-fop/src/codegen/constants.xsl Index: constants.xsl === RCS file: /home/cvs/xml-fop/src/codegen/constants.xsl,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- constants.xsl 15 Dec 2003 01:07:50 - 1.1 +++ constants.xsl 17 Jan 2004 19:29:45 - 1.2 @@ -46,7 +46,7 @@ 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/. --- +-- xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform; @@ -86,7 +86,6 @@ /xsl:for-each /xsl:variable - xsl:variable name=elementlist xsl:for-each select=document(elementfile)//element xsl:sort select=name/ @@ -100,7 +99,15 @@ xsl:text -package org.apache.fop.fo.properties; +package org.apache.fop.fo; + +import org.apache.fop.fo.properties.GenericBoolean; +import
cvs commit: xml-fop/src/java/org/apache/fop/layoutmgr AddLMVisitor.java
gmazza 2004/01/17 14:02:03 Modified:src/java/org/apache/fop/datatypes Keep.java LengthPair.java src/java/org/apache/fop/fo/flow Leader.java src/java/org/apache/fop/layoutmgr AddLMVisitor.java Log: Bug 25873 (from Finn Bock): Minor code cleanup issues. Revision ChangesPath 1.7 +1 -1 xml-fop/src/java/org/apache/fop/datatypes/Keep.java Index: Keep.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/datatypes/Keep.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- Keep.java 7 Jan 2004 21:10:36 - 1.6 +++ Keep.java 17 Jan 2004 22:02:03 - 1.7 @@ -51,7 +51,7 @@ package org.apache.fop.datatypes; import org.apache.fop.fo.Property; -import org.apache.fop.fo.Constants; + /** * XSL FO Keep Property datatype (keep-together, etc) 1.6 +1 -1 xml-fop/src/java/org/apache/fop/datatypes/LengthPair.java Index: LengthPair.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/datatypes/LengthPair.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- LengthPair.java 7 Jan 2004 21:10:37 - 1.5 +++ LengthPair.java 17 Jan 2004 22:02:03 - 1.6 @@ -51,7 +51,7 @@ package org.apache.fop.datatypes; import org.apache.fop.fo.Property; -import org.apache.fop.fo.Constants; + /** * Models a pair of lengths, one specifiying the dimensions for the 1.21 +1 -3 xml-fop/src/java/org/apache/fop/fo/flow/Leader.java Index: Leader.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/flow/Leader.java,v retrieving revision 1.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- Leader.java 17 Jan 2004 19:29:46 - 1.20 +++ Leader.java 17 Jan 2004 22:02:03 - 1.21 @@ -62,7 +62,6 @@ import org.apache.fop.fo.properties.CommonBorderAndPadding; import org.apache.fop.fo.properties.CommonMarginInline; import org.apache.fop.fo.properties.CommonRelativePosition; -import org.apache.fop.fo.properties.FOPropertyMapping; import org.apache.fop.fonts.Font; /** @@ -163,9 +162,8 @@ } -public int getLength(String prop, int dim) { +public int getLength(int propId, int dim) { int length; -int propId = FOPropertyMapping.getPropertyId(prop); Length maxlength = propertyList.get(propId).getLength(); if (maxlength instanceof PercentLength) { length = (int)(((PercentLength)maxlength).value() 1.29 +4 -4 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.28 retrieving revision 1.29 diff -u -r1.28 -r1.29 --- AddLMVisitor.java 17 Jan 2004 19:29:46 - 1.28 +++ AddLMVisitor.java 17 Jan 2004 22:02:03 - 1.29 @@ -356,9 +356,9 @@ public MinOptMax getLeaderAllocIPD(Leader node, int ipd) { // length of the leader - int opt = node.getLength(leader-length.optimum, ipd); - int min = node.getLength(leader-length.minimum, ipd); - int max = node.getLength(leader-length.maximum, ipd); + int opt = node.getLength(Constants.PR_LEADER_LENGTH | Constants.CP_OPTIMUM, ipd); + int min = node.getLength(Constants.PR_LEADER_LENGTH | Constants.CP_MINIMUM, ipd); + int max = node.getLength(Constants.PR_LEADER_LENGTH | Constants.CP_MAXIMUM, ipd); return new MinOptMax(min, opt, max); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/fo PropertyList.java
gmazza 2004/01/13 15:28:31 Modified:src/java/org/apache/fop/fo PropertyList.java Log: static boolean array inheritableProperty[] added, to reduce processing costs of lookups to see if a property is inheritable. Work based on Finn Bock's patch. Revision ChangesPath 1.25 +10 -7 xml-fop/src/java/org/apache/fop/fo/PropertyList.java Index: PropertyList.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/PropertyList.java,v retrieving revision 1.24 retrieving revision 1.25 diff -u -r1.24 -r1.25 --- PropertyList.java 9 Jan 2004 03:05:55 - 1.24 +++ PropertyList.java 13 Jan 2004 23:28:31 - 1.25 @@ -69,6 +69,7 @@ // writing-mode values private byte[] wmtable = null; private int writingMode; +private static boolean[] inheritableProperty; // absolute directions and dimensions /** constant for direction left */ @@ -678,14 +679,16 @@ * @return isInherited value from the requested Property.Maker */ private boolean isInherited(int propId) { -boolean b = true; - -Property.Maker propertyMaker = findMaker(propId); -if (propertyMaker != null) { -b = propertyMaker.isInherited(); +if (inheritableProperty == null) { +inheritableProperty = new boolean[Constants.PROPERTY_COUNT + 1]; +Property.Maker maker = null; +for (int prop = 1; prop = Constants.PROPERTY_COUNT; prop++) { +maker = findMaker(prop); +inheritableProperty[prop] = (maker != null maker.isInherited()); +} } - -return b; + +return inheritableProperty[propId]; } /** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/render/mif MIFHandler.java
gmazza 2004/01/13 16:00:39 Modified:src/java/org/apache/fop/fo FObj.java src/java/org/apache/fop/fo/flow TableRow.java src/java/org/apache/fop/fo/pagination ConditionalPageMasterReference.java Flow.java PageMasterReference.java RegionBody.java RepeatablePageMasterAlternatives.java RepeatablePageMasterReference.java src/java/org/apache/fop/render/mif MIFHandler.java Log: More String-Int conversions (ones I've missed previously.) Appears I've finally converted all of them. From Finn Bock's patch. Revision ChangesPath 1.31 +2 -3 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.30 retrieving revision 1.31 diff -u -r1.30 -r1.31 --- FObj.java 28 Dec 2003 16:13:10 - 1.30 +++ FObj.java 14 Jan 2004 00:00:37 - 1.31 @@ -258,8 +258,7 @@ * @param name - the name of the desired property to obtain * @return the property */ -public Property getProperty(String name) { -int propId = FOPropertyMapping.getPropertyId(name); +public Property getProperty(int propId) { return (propertyList.get(propId)); } @@ -330,7 +329,7 @@ protected void setWritingMode() { FObj p = findNearestAncestorGeneratingRAs(true, true); this.propertyList.setWritingMode( - p.getProperty(writing-mode).getEnum()); + p.getProperty(PR_WRITING_MODE).getEnum()); } /** 1.12 +4 -5 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.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- TableRow.java 31 Dec 2003 01:41:46 - 1.11 +++ TableRow.java 14 Jan 2004 00:00:37 - 1.12 @@ -133,17 +133,16 @@ this.backgroundColor = this.propertyList.get(PR_BACKGROUND_COLOR).getColorType(); -this.keepTogether = getKeepValue(keep-together.within-column); -this.keepWithNext = getKeepValue(keep-with-next.within-column); +this.keepTogether = getKeepValue(PR_KEEP_TOGETHER | CP_WITHIN_COLUMN); +this.keepWithNext = getKeepValue(PR_KEEP_WITH_NEXT | CP_WITHIN_COLUMN); this.keepWithPrevious = -getKeepValue(keep-with-previous.within-column); +getKeepValue(PR_KEEP_WITH_PREVIOUS | CP_WITHIN_COLUMN); this.minHeight = this.propertyList.get(PR_HEIGHT).getLength().getValue(); setup = true; } -private KeepValue getKeepValue(String sPropName) { -int propId = FOPropertyMapping.getPropertyId(sPropName); +private KeepValue getKeepValue(int propId) { Property p = this.propertyList.get(propId); Number n = p.getNumber(); if (n != null) { 1.6 +2 -2 xml-fop/src/java/org/apache/fop/fo/pagination/ConditionalPageMasterReference.java Index: ConditionalPageMasterReference.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/pagination/ConditionalPageMasterReference.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- ConditionalPageMasterReference.java 28 Dec 2003 17:10:17 - 1.5 +++ ConditionalPageMasterReference.java 14 Jan 2004 00:00:37 - 1.6 @@ -92,8 +92,8 @@ */ public void handleAttrs(Attributes attlist) throws FOPException { super.handleAttrs(attlist); -if (getProperty(master-reference) != null) { -setMasterName(getProperty(master-reference).getString()); +if (getProperty(PR_MASTER_REFERENCE) != null) { +setMasterName(getProperty(PR_MASTER_REFERENCE).getString()); } validateParent(parent); 1.7 +2 -2 xml-fop/src/java/org/apache/fop/fo/pagination/Flow.java Index: Flow.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/pagination/Flow.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- Flow.java 16 Sep 2003 05:21:06 - 1.6 +++ Flow.java 14 Jan 2004 00:00:37 - 1.7 @@ -122,7 +122,7 @@ } } */ -setFlowName(getProperty(flow-name).getString()); +setFlowName(getProperty(PR_FLOW_NAME).getString()); // Now done in addChild of page
cvs commit: xml-fop/src/documentation/content/xdocs news.xml
gmazza 2004/01/11 17:26:59 Modified:src/documentation/content/xdocs news.xml Log: News page updates. Revision ChangesPath 1.17 +13 -1 xml-fop/src/documentation/content/xdocs/news.xml Index: news.xml === RCS file: /home/cvs/xml-fop/src/documentation/content/xdocs/news.xml,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- news.xml 12 Nov 2003 15:11:59 - 1.16 +++ news.xml 12 Jan 2004 01:26:58 - 1.17 @@ -9,6 +9,18 @@ /header body section + title10 January 2004 - New Committers/title + pWelcome Chris Bowditch and Andreas Delmelle!/p +/section +section + title4 January 2004 - New Committer/title + pWelcome Finn Bock!/p +/section +section + title29 November 2003 - New Committer/title + pWelcome Peter Herweg!/p +/section +section title18 July 2003 FOP 0.20.5 released/title pChanges since 0.20.4 include:/p ul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/fo Property.java PropertySets.java
gmazza 2004/01/10 12:40:07 Modified:src/codegen properties.xsl src/java/org/apache/fop/datatypes ToBeImplementedProperty.java src/java/org/apache/fop/fo Property.java PropertySets.java Log: switch from Property.getPropName() to Property.getPropId(); comments added to PropertySets.java to clarify makeSparseIndices() method. Revision ChangesPath 1.31 +2 -2 xml-fop/src/codegen/properties.xsl Index: properties.xsl === RCS file: /home/cvs/xml-fop/src/codegen/properties.xsl,v retrieving revision 1.30 retrieving revision 1.31 diff -u -r1.30 -r1.31 --- properties.xsl9 Jan 2004 03:05:55 - 1.30 +++ properties.xsl10 Jan 2004 20:40:07 - 1.31 @@ -883,7 +883,7 @@ xsl:value-of select=key('shorthandref', $shprop)/datatype-parser/ xsl:text(listprop); p = shparser.getValueForProperty( -getPropName(), this, propertyList); +getPropId(), this, propertyList); } }/xsl:text /xsl:for-each 1.5 +1 -1 xml-fop/src/java/org/apache/fop/datatypes/ToBeImplementedProperty.java Index: ToBeImplementedProperty.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/datatypes/ToBeImplementedProperty.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- ToBeImplementedProperty.java 26 Dec 2003 23:41:47 - 1.4 +++ ToBeImplementedProperty.java 10 Jan 2004 20:40:07 - 1.5 @@ -69,7 +69,7 @@ } ToBeImplementedProperty val = -new ToBeImplementedProperty(getPropName()); +new ToBeImplementedProperty(getPropId()); return val; } } 1.15 +1 -1 xml-fop/src/java/org/apache/fop/fo/Property.java Index: Property.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/Property.java,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- Property.java 9 Jan 2004 22:32:27 - 1.14 +++ Property.java 10 Jan 2004 20:40:07 - 1.15 @@ -81,7 +81,7 @@ /** * @return the name of the property for this Maker */ -protected int getPropName() { +protected int getPropId() { return propId; } 1.3 +18 -4 xml-fop/src/java/org/apache/fop/fo/PropertySets.java Index: PropertySets.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/PropertySets.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- PropertySets.java 22 Dec 2003 23:23:05 - 1.2 +++ PropertySets.java 10 Jan 2004 20:40:07 - 1.3 @@ -1267,13 +1267,27 @@ } + /* These arrays, one for each formatting object, define the properties that +* are valid for an FO and its children. The first element, indices[0], +* will be used in PropertyList to define the size of the Property[] array +* for the FObj (= the number of properties valid for the element + 1.) +* Each other element of this array has a value of 0 if not supported by the FO, +* 1-based index otherwise. This array will be used as a pointer to the Property[] +* array in PropertyList holding the valid properties for the FO. +* i.e., fo.propList.values[indices[propId]] will refer to the correct Property +* element if the property is valid for the FO, values[indices[invalPropId]] = +* values[0] = NULL otherwise. +*/ private static short[] makeSparseIndices(BitSet set) { -short[] indices = new short[Constants.PROPERTY_COUNT]; +short[] indices = new short[Constants.PROPERTY_COUNT +1]; + indices[0] = (short) (set.cardinality() + 1); -int j = 1; + +int propIndex = 1; for (int i = set.nextSetBit(0); i = 0; i = set.nextSetBit(i+1)) { -indices[i] = (short) j++; +indices[i] = (short) propIndex++; } + return indices; } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/fo PropertyList.java
gmazza 2004/01/08 19:05:55 Modified:src/codegen properties.xsl src/java/org/apache/fop/fo PropertyList.java Log: Bug 25990 (Patch by Finn Bock) errors in String-int conversions found. Revision ChangesPath 1.30 +10 -2 xml-fop/src/codegen/properties.xsl Index: properties.xsl === RCS file: /home/cvs/xml-fop/src/codegen/properties.xsl,v retrieving revision 1.29 retrieving revision 1.30 diff -u -r1.29 -r1.30 --- properties.xsl7 Jan 2004 22:25:42 - 1.29 +++ properties.xsl9 Jan 2004 03:05:55 - 1.30 @@ -1003,7 +1003,15 @@ xsl:param name=lrtb/ xsl:param name=rltb/ xsl:param name=tbrl/ - xsl:textpropertyList.wmMap(Constants.PR_/xsl:text + xsl:choose +xsl:when test=parwmrel2abs + xsl:textparentFO.propertyList/xsl:text +/xsl:when +xsl:otherwise + xsl:textpropertyList/xsl:text +/xsl:otherwise + /xsl:choose + xsl:text.wmMap(Constants.PR_/xsl:text xsl:apply-templates mode=x xsl:with-param name=dir select='$lrtb'/ /xsl:apply-templates 1.24 +2 -2 xml-fop/src/java/org/apache/fop/fo/PropertyList.java Index: PropertyList.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/PropertyList.java,v retrieving revision 1.23 retrieving revision 1.24 diff -u -r1.23 -r1.24 --- PropertyList.java 7 Jan 2004 22:50:51 - 1.23 +++ PropertyList.java 9 Jan 2004 03:05:55 - 1.24 @@ -385,8 +385,8 @@ public int wmMap(int lrtb, int rltb, int tbrl) { switch (writingMode) { case WritingMode.LR_TB: return lrtb; -case WritingMode.RL_TB: return lrtb; -case WritingMode.TB_RL: return lrtb; +case WritingMode.RL_TB: return rltb; +case WritingMode.TB_RL: return tbrl; } return -1; } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/layoutmgr/table Body.java
gmazza 2004/01/08 19:26:00 Modified:src/java/org/apache/fop/layoutmgr AddLMVisitor.java src/java/org/apache/fop/layoutmgr/table Body.java Log: Bug 25809 (Patch by Finn Bock) NPE for incorrectly created tables fixed. Also changed text of warning message. Revision ChangesPath 1.27 +9 -6 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.26 retrieving revision 1.27 diff -u -r1.26 -r1.27 --- AddLMVisitor.java 29 Dec 2003 23:28:47 - 1.26 +++ AddLMVisitor.java 9 Jan 2004 03:26:00 - 1.27 @@ -842,12 +842,15 @@ TableLayoutManager tlm = new TableLayoutManager(); tlm.setUserAgent(node.getUserAgent()); tlm.setFObj(node); - ArrayList columnLMs = new ArrayList(); - ListIterator iter = node.getColumns().listIterator(); - while (iter.hasNext()) { - columnLMs.add(getTableColumnLayoutManager((TableColumn)iter.next())); + ArrayList columns = node.getColumns(); + if (columns != null) { + ArrayList columnLMs = new ArrayList(); + ListIterator iter = columns.listIterator(); + while (iter.hasNext()) { + columnLMs.add(getTableColumnLayoutManager((TableColumn)iter.next())); + } + tlm.setColumns(columnLMs); } - tlm.setColumns(columnLMs); if (node.getTableHeader() != null) { tlm.setTableHeader(getTableBodyLayoutManager(node.getTableHeader())); } 1.4 +1 -1 xml-fop/src/java/org/apache/fop/layoutmgr/table/Body.java Index: Body.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/table/Body.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- Body.java 28 Aug 2003 19:08:59 - 1.3 +++ Body.java 9 Jan 2004 03:26:00 - 1.4 @@ -128,7 +128,7 @@ if (columns == null) { setFinished(true); -getLogger().warn(ignoring table body with undefined columns); +getLogger().warn(ignoring fo:table-body with undefined fo:table-columns); return null; } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/fo Property.java PropertyList.java
gmazza 2004/01/07 13:10:39 Modified:src/codegen properties.xsl src/java/org/apache/fop/datatypes CompoundDatatype.java CondLength.java Keep.java LengthPair.java src/java/org/apache/fop/fo Property.java PropertyList.java Log: Last of string-int conversions (more structural improvements still can be done in PropertyList from Finn's patch, however). Made Constants values inherent to CompoundDatatype class. Revision ChangesPath 1.28 +2 -3 xml-fop/src/codegen/properties.xsl Index: properties.xsl === RCS file: /home/cvs/xml-fop/src/codegen/properties.xsl,v retrieving revision 1.27 retrieving revision 1.28 diff -u -r1.27 -r1.28 --- properties.xsl6 Jan 2004 00:49:40 - 1.27 +++ properties.xsl7 Jan 2004 21:10:36 - 1.28 @@ -576,8 +576,7 @@ return baseProp; } -public Property getSubpropValue(Property baseProp, String subpropName) { -int subpropId = org.apache.fop.fo.properties.FOPropertyMapping.getSubPropertyId(subpropName); +public Property getSubpropValue(Property baseProp, int subpropId) { /xsl:text xsl:value-of select=datatype/ xsl:text val = baseProp.get/xsl:text 1.3 +2 -1 xml-fop/src/java/org/apache/fop/datatypes/CompoundDatatype.java Index: CompoundDatatype.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/datatypes/CompoundDatatype.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- CompoundDatatype.java 6 Jan 2004 00:49:40 - 1.2 +++ CompoundDatatype.java 7 Jan 2004 21:10:36 - 1.3 @@ -51,11 +51,12 @@ package org.apache.fop.datatypes; import org.apache.fop.fo.Property; +import org.apache.fop.fo.Constants; /** * This interface is used as a base for compound datatypes. */ -public interface CompoundDatatype { +public interface CompoundDatatype extends Constants { /** * Sets a component of the compound datatype. 1.5 +4 -4 xml-fop/src/java/org/apache/fop/datatypes/CondLength.java Index: CondLength.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/datatypes/CondLength.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- CondLength.java 6 Jan 2004 00:49:40 - 1.4 +++ CondLength.java 7 Jan 2004 21:10:36 - 1.5 @@ -67,9 +67,9 @@ */ public void setComponent(int cmpId, Property cmpnValue, boolean bIsDefault) { -if (cmpId == Constants.CP_LENGTH) { +if (cmpId == CP_LENGTH) { length = cmpnValue; -} else if (cmpId == Constants.CP_CONDITIONALITY) { +} else if (cmpId == CP_CONDITIONALITY) { conditionality = cmpnValue; } } @@ -78,9 +78,9 @@ * @see org.apache.fop.datatypes.CompoundDatatype#getComponent(int) */ public Property getComponent(int cmpId) { -if (cmpId == Constants.CP_LENGTH) { +if (cmpId == CP_LENGTH) { return length; -} else if (cmpId == Constants.CP_CONDITIONALITY) { +} else if (cmpId == CP_CONDITIONALITY) { return conditionality; } else { return null; 1.6 +6 -6 xml-fop/src/java/org/apache/fop/datatypes/Keep.java Index: Keep.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/datatypes/Keep.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- Keep.java 6 Jan 2004 00:49:40 - 1.5 +++ Keep.java 7 Jan 2004 21:10:36 - 1.6 @@ -73,11 +73,11 @@ */ public void setComponent(int cmpId, Property cmpnValue, boolean bIsDefault) { -if (cmpId == Constants.CP_WITHIN_LINE) { +if (cmpId == CP_WITHIN_LINE) { setWithinLine(cmpnValue, bIsDefault); -} else if (cmpId == Constants.CP_WITHIN_COLUMN) { +} else if (cmpId == CP_WITHIN_COLUMN) { setWithinColumn(cmpnValue, bIsDefault); -} else if (cmpId == Constants.CP_WITHIN_PAGE) { +} else if (cmpId == CP_WITHIN_PAGE) { setWithinPage(cmpnValue, bIsDefault); } } @@ -86,11 +86,11 @@ * @see org.apache.fop.datatypes.CompoundDatatype#getComponent(int) */ public Property getComponent(int cmpId) { -if (cmpId == Constants.CP_WITHIN_LINE) { +if (cmpId == CP_WITHIN_LINE) { return getWithinLine
cvs commit: xml-fop/src/java/org/apache/fop/datatypes LengthRange.java Space.java
gmazza 2004/01/07 13:28:42 Modified:src/java/org/apache/fop/datatypes LengthRange.java Space.java Log: Constants simplifications in LengthRange and Space.java. Revision ChangesPath 1.6 +6 -7 xml-fop/src/java/org/apache/fop/datatypes/LengthRange.java Index: LengthRange.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/datatypes/LengthRange.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- LengthRange.java 6 Jan 2004 00:49:40 - 1.5 +++ LengthRange.java 7 Jan 2004 21:28:42 - 1.6 @@ -51,7 +51,6 @@ package org.apache.fop.datatypes; import org.apache.fop.fo.Property; -import org.apache.fop.fo.Constants; /** * A progression-dimension quantity. @@ -74,11 +73,11 @@ */ public void setComponent(int cmpId, Property cmpnValue, boolean bIsDefault) { -if (cmpId == Constants.CP_MINIMUM) { +if (cmpId == CP_MINIMUM) { setMinimum(cmpnValue, bIsDefault); -} else if (cmpId == Constants.CP_OPTIMUM) { +} else if (cmpId == CP_OPTIMUM) { setOptimum(cmpnValue, bIsDefault); -} else if (cmpId == Constants.CP_MAXIMUM) { +} else if (cmpId == CP_MAXIMUM) { setMaximum(cmpnValue, bIsDefault); } } @@ -87,11 +86,11 @@ * @see org.apache.fop.datatypes.CompoundDatatype#getComponent(int) */ public Property getComponent(int cmpId) { -if (cmpId == Constants.CP_MINIMUM) { +if (cmpId == CP_MINIMUM) { return getMinimum(); -} else if (cmpId == Constants.CP_OPTIMUM) { +} else if (cmpId == CP_OPTIMUM) { return getOptimum(); -} else if (cmpId == Constants.CP_MAXIMUM) { +} else if (cmpId == CP_MAXIMUM) { return getMaximum(); } else { return null;// SHOULDN'T HAPPEN 1.5 +4 -5 xml-fop/src/java/org/apache/fop/datatypes/Space.java Index: Space.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/datatypes/Space.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- Space.java6 Jan 2004 00:49:40 - 1.4 +++ Space.java7 Jan 2004 21:28:42 - 1.5 @@ -51,7 +51,6 @@ package org.apache.fop.datatypes; import org.apache.fop.fo.Property; -import org.apache.fop.fo.Constants; /** * a space quantity in XSL (space-before, space-after) @@ -66,9 +65,9 @@ */ public void setComponent(int cmpId, Property cmpnValue, boolean bIsDefault) { -if (cmpId == Constants.CP_PRECEDENCE) { +if (cmpId == CP_PRECEDENCE) { setPrecedence(cmpnValue, bIsDefault); -} else if (cmpId == Constants.CP_CONDITIONALITY) { +} else if (cmpId == CP_CONDITIONALITY) { setConditionality(cmpnValue, bIsDefault); } else { super.setComponent(cmpId, cmpnValue, bIsDefault); @@ -79,9 +78,9 @@ * @see org.apache.fop.datatypes.CompoundDatatype#getComponent(int) */ public Property getComponent(int cmpId) { -if (cmpId == Constants.CP_PRECEDENCE) { +if (cmpId == CP_PRECEDENCE) { return getPrecedence(); -} else if (cmpId == Constants.CP_CONDITIONALITY) { +} else if (cmpId == CP_CONDITIONALITY) { return getConditionality(); } else { return super.getComponent(cmpId); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/fo Property.java
gmazza 2004/01/07 14:25:43 Modified:src/codegen properties.xsl src/java/org/apache/fop/fo Property.java Log: More String-int conversions. Revision ChangesPath 1.29 +19 -13xml-fop/src/codegen/properties.xsl Index: properties.xsl === RCS file: /home/cvs/xml-fop/src/codegen/properties.xsl,v retrieving revision 1.28 retrieving revision 1.29 diff -u -r1.28 -r1.29 --- properties.xsl7 Jan 2004 21:10:36 - 1.28 +++ properties.xsl7 Jan 2004 22:25:42 - 1.29 @@ -523,10 +523,12 @@ super(propId);/xsl:text xsl:if test=compound xsl:text -m_shorthandMaker= getSubpropMaker(/xsl:text -xsl:value-of select= -'compound/[EMAIL PROTECTED]true]/name'/ -xsl:text);/xsl:text +m_shorthandMaker= getSubpropMaker(Constants.CP_/xsl:text +xsl:call-template name=makeEnumConstant + xsl:with-param name=propstr select= + 'compound/[EMAIL PROTECTED]true]/name'/ +/xsl:call-template +xsl:text);/xsl:text /xsl:if xsl:text } @@ -544,7 +546,7 @@ return true; } -protected Property.Maker getSubpropMaker(String subprop) {/xsl:text +protected Property.Maker getSubpropMaker(int subpropId) {/xsl:text xsl:for-each select=compound/subproperty xsl:variable name=spname xsl:call-template name=makeClassName @@ -552,15 +554,17 @@ /xsl:call-template /xsl:variable xsl:text -if (subprop.equals(/xsl:text - xsl:value-of select='name'/ - xsl:text)) +if (subpropId == Constants.CP_/xsl:text + xsl:call-template name=makeEnumConstant +xsl:with-param name=propstr select=name/ + /xsl:call-template + xsl:text) return s_/xsl:text xsl:value-of select=$spname/ xsl:textMaker;/xsl:text /xsl:for-each xsl:text -return super.getSubpropMaker(subprop); +return super.getSubpropMaker(subpropId); } protected Property setSubprop(Property baseProp, int subpropId, @@ -624,9 +628,11 @@ // set default for subprop /xsl:text xsl:value-of select=./ xsl:text - subProp = getSubpropMaker(/xsl:text -xsl:value-of select='.'/ -xsl:text).make(pList, getDefaultFor/xsl:text + subProp = getSubpropMaker(Constants.CP_/xsl:text +xsl:call-template name=makeEnumConstant + xsl:with-param name=propstr select=./ +/xsl:call-template +xsl:text).make(pList, getDefaultFor/xsl:text xsl:value-of select='$spname'/ xsl:text(), fo); p.setComponent(Constants.CP_/xsl:text 1.12 +5 -5 xml-fop/src/java/org/apache/fop/fo/Property.java Index: Property.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/Property.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- Property.java 7 Jan 2004 21:10:38 - 1.11 +++ Property.java 7 Jan 2004 22:25:43 - 1.12 @@ -141,12 +141,12 @@ * of compound property types, such as space. * Overridden by property maker subclasses which handle * compound properties. - * @param subprop The name of the component for which a Maker is to - * returned, for example optimum, if the FO attribute is + * @param subprop The Constants ID of the component for which a Maker is to + * returned, for example CP_OPTIMUM, if the FO attribute is * space.optimum='10pt'. * @return the Maker object specified */ -protected Maker getSubpropMaker(String subprop) { +protected Maker getSubpropMaker(int subpropId) { return null; } @@ -188,11 +188,11 @@ if (baseProp == null) { baseProp = makeCompound(propertyList, fo); } -Maker spMaker = getSubpropMaker(partName); +int partId = FOPropertyMapping.getSubPropertyId(partName); +Maker spMaker = getSubpropMaker(partId); if (spMaker != null) { Property p = spMaker.make(propertyList, value, fo); if (p != null) { -int partId = FOPropertyMapping.getSubPropertyId(partName); return setSubprop(baseProp, partId, p); } } else { - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands
cvs commit: xml-fop/src/java/org/apache/fop/fo Property.java PropertyList.java
gmazza 2004/01/07 14:50:51 Modified:src/java/org/apache/fop/fo Property.java PropertyList.java Log: More String-int conversion. Revision ChangesPath 1.13 +7 -5 xml-fop/src/java/org/apache/fop/fo/Property.java Index: Property.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/Property.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- Property.java 7 Jan 2004 22:25:43 - 1.12 +++ Property.java 7 Jan 2004 22:50:51 - 1.13 @@ -174,7 +174,8 @@ * value is already partially initialized, this method will modify it. * @param baseProp The Property object representing the compound property, * for example: SpaceProperty. - * @param partName The name of the component whose value is specified. + * @param subpropId The Constants ID of the subproperty (component) + *whose value is specified. * @param propertyList The propertyList being built. * @param fo The FO whose properties are being set. * @param value the value of the @@ -182,18 +183,19 @@ * the new subproperty added * @throws FOPException for invalid or inconsistent FO input */ -public Property make(Property baseProp, String partName, +public Property make(Property baseProp, int subpropId, PropertyList propertyList, String value, FObj fo) throws FOPException { if (baseProp == null) { baseProp = makeCompound(propertyList, fo); } -int partId = FOPropertyMapping.getSubPropertyId(partName); -Maker spMaker = getSubpropMaker(partId); + +Maker spMaker = getSubpropMaker(subpropId); + if (spMaker != null) { Property p = spMaker.make(propertyList, value, fo); if (p != null) { -return setSubprop(baseProp, partId, p); +return setSubprop(baseProp, subpropId, p); } } else { //getLogger().error(compound property component 1.23 +2 -1 xml-fop/src/java/org/apache/fop/fo/PropertyList.java Index: PropertyList.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/PropertyList.java,v retrieving revision 1.22 retrieving revision 1.23 diff -u -r1.22 -r1.23 --- PropertyList.java 7 Jan 2004 21:10:38 - 1.22 +++ PropertyList.java 7 Jan 2004 22:50:51 - 1.23 @@ -500,7 +500,8 @@ } else { // e.g. leader-length.maximum Property baseProperty = findBaseProperty(attributes, parentFO, basePropertyName, propertyMaker); -prop = propertyMaker.make(baseProperty, subPropertyName, +int subpropId = FOPropertyMapping.getSubPropertyId(subPropertyName); +prop = propertyMaker.make(baseProperty, subpropId, this, attributeValue, parentFO); } if (prop != null) { - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/fo PropertyList.java
gmazza 2004/01/05 14:02:47 Modified:src/java/org/apache/fop/fo PropertyList.java Log: COMPOUND_MASK/PROPERTY_MASK bug fixed in PropertyList.java (patch by Finn Bock). Revision ChangesPath 1.21 +1 -1 xml-fop/src/java/org/apache/fop/fo/PropertyList.java Index: PropertyList.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/PropertyList.java,v retrieving revision 1.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- PropertyList.java 5 Jan 2004 01:31:09 - 1.20 +++ PropertyList.java 5 Jan 2004 22:02:47 - 1.21 @@ -188,7 +188,7 @@ if (p == null) { p = getShorthand(propId Constants.PROPERTY_MASK); } -if (p != null (propId Constants.PROPERTY_MASK) != 0) { +if (p != null (propId Constants.COMPOUND_MASK) != 0) { return getSubpropValue(p, propId); } return p; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/fo Property.java
gmazza 2004/01/05 14:13:19 Modified:src/java/org/apache/fop/fo Property.java Log: Switch from strings-ints in Property.setSubprop() (from Finn Bock). Revision ChangesPath 1.10 +4 -3 xml-fop/src/java/org/apache/fop/fo/Property.java Index: Property.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/Property.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- Property.java 5 Jan 2004 00:44:59 - 1.9 +++ Property.java 5 Jan 2004 22:13:19 - 1.10 @@ -192,7 +192,8 @@ if (spMaker != null) { Property p = spMaker.make(propertyList, value, fo); if (p != null) { -return setSubprop(baseProp, partName, p); +int partId = FOPropertyMapping.getSubPropertyId(partName); +return setSubprop(baseProp, partId, p); } } else { //getLogger().error(compound property component @@ -210,12 +211,12 @@ * compound properties. * @param baseProp The Property object representing the compound property, * such as SpaceProperty. - * @param partName The name of the component whose value is specified. + * @param partId The ID of the component whose value is specified. * @param subProp A Property object holding the specified value of the * component to be set. * @return The modified compound property object. */ -protected Property setSubprop(Property baseProp, String partName, +protected Property setSubprop(Property baseProp, int partId, Property subProp) { return baseProp; } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/datatypes CompoundDatatype.java CondLength.java Keep.java LengthPair.java LengthRange.java Space.java
gmazza 2004/01/05 16:49:40 Modified:src/codegen properties.xsl src/java/org/apache/fop/datatypes CompoundDatatype.java CondLength.java Keep.java LengthPair.java LengthRange.java Space.java Log: More String-Int conversions. Revision ChangesPath 1.27 +14 -10xml-fop/src/codegen/properties.xsl Index: properties.xsl === RCS file: /home/cvs/xml-fop/src/codegen/properties.xsl,v retrieving revision 1.26 retrieving revision 1.27 diff -u -r1.26 -r1.27 --- properties.xsl5 Jan 2004 00:44:59 - 1.26 +++ properties.xsl6 Jan 2004 00:49:40 - 1.27 @@ -566,24 +566,24 @@ protected Property setSubprop(Property baseProp, int subpropId, Property subProp) { /xsl:text -String subpropName = FOPropertyMapping.getPropertyName(subpropId); xsl:value-of select=datatype/ xsl:text val = baseProp.get/xsl:text xsl:value-of select=datatype/ xsl:text(); // Do some type checking??? // Check if one of our subproperties??? -val.setComponent(subpropName, subProp, false); +val.setComponent(subpropId, subProp, false); return baseProp; } public Property getSubpropValue(Property baseProp, String subpropName) { +int subpropId = org.apache.fop.fo.properties.FOPropertyMapping.getSubPropertyId(subpropName); /xsl:text xsl:value-of select=datatype/ xsl:text val = baseProp.get/xsl:text xsl:value-of select=datatype/ xsl:text(); -return val.getComponent(subpropName); +return val.getComponent(subpropId); } /xsl:text xsl:choose @@ -630,9 +630,11 @@ xsl:text).make(pList, getDefaultFor/xsl:text xsl:value-of select='$spname'/ xsl:text(), fo); - p.setComponent(/xsl:text -xsl:value-of select='.'/ -xsl:text, subProp, true);/xsl:text + p.setComponent(Constants.CP_/xsl:text +xsl:call-template name=makeEnumConstant + xsl:with-param name=propstr select=./ +/xsl:call-template +xsl:text, subProp, true);/xsl:text /xsl:for-each xsl:text return new /xsl:text @@ -695,9 +697,11 @@ xsl:text();/xsl:text xsl:for-each select=compound/[EMAIL PROTECTED]'true'] xsl:text -pval.setComponent(/xsl:text -xsl:value-of select='name'/ -xsl:text, p, false);/xsl:text +pval.setComponent(Constants.CP_/xsl:text +xsl:call-template name=makeEnumConstant + xsl:with-param name=propstr select=name/ +/xsl:call-template +xsl:text, p, false);/xsl:text /xsl:for-each xsl:text return prop; 1.2 +4 -4 xml-fop/src/java/org/apache/fop/datatypes/CompoundDatatype.java Index: CompoundDatatype.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/datatypes/CompoundDatatype.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- CompoundDatatype.java 11 Mar 2003 13:05:36 - 1.1 +++ CompoundDatatype.java 6 Jan 2004 00:49:40 - 1.2 @@ -59,16 +59,16 @@ /** * Sets a component of the compound datatype. - * @param sCmpnName name of the component + * @param Constants ID of the component * @param cmpnValue value of the component * @param bIsDefault Indicates if it's the default value */ -void setComponent(String sCmpnName, Property cmpnValue, boolean bIsDefault); +void setComponent(int cmpId, Property cmpnValue, boolean bIsDefault); /** * Returns a component of the compound datatype. - * @param sCmpnName name of the component + * @param Constants ID of the component * @return the value of the component */ -Property getComponent(String sCmpnName); +Property getComponent(int cmpId); } 1.4 +8 -8 xml-fop/src/java/org/apache/fop/datatypes/CondLength.java Index: CondLength.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/datatypes/CondLength.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- CondLength.java 31 Dec 2003 00:40:14 - 1.3 +++ CondLength.java 6 Jan 2004 00:49:40 - 1.4 @@ -63,24 +63,24 @@ private Property conditionality; /** - * @see org.apache.fop.datatypes.CompoundDatatype#setComponent(String, Property, boolean) + * @see
cvs commit: xml-fop/src/java/org/apache/fop/fo PropertyList.java PropertyManager.java
gmazza 2004/01/04 13:14:34 Modified:src/java/org/apache/fop/fo PropertyList.java PropertyManager.java Log: String-Int conversion: removed String version of PropertyList.get() Revision ChangesPath 1.15 +0 -24 xml-fop/src/java/org/apache/fop/fo/PropertyList.java Index: PropertyList.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/PropertyList.java,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- PropertyList.java 2 Jan 2004 22:37:09 - 1.14 +++ PropertyList.java 4 Jan 2004 21:14:34 - 1.15 @@ -274,17 +274,6 @@ return p; } - -/** - * Return the property on the current FlowObject if it is specified, or if a - * corresponding property is specified. If neither is specified, it returns null. - * @param propertyName name of property - * @return the Property corresponding to that name - */ -public Property getSpecified(String propertyName) { -return get(propertyName, false, false); -} - /** * Return the property on the current FlowObject. If it isn't set explicitly, * this will try to compute it based on other properties, or if it is @@ -295,19 +284,6 @@ */ public Property get(int propId) { String propertyName = FOPropertyMapping.getPropertyName(propId); -return get(propertyName, true, true); -} - -/** - * TEMPORARY until conversion to int's complete - * Return the property on the current FlowObject. If it isn't set explicitly, - * this will try to compute it based on other properties, or if it is - * inheritable, to return the inherited value. If all else fails, it returns - * the default value. - * @param propertyName The name of the property whose value is desired. - * @return the Property corresponding to that name - */ -public Property get(String propertyName) { return get(propertyName, true, true); } 1.19 +14 -21xml-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.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- PropertyManager.java 27 Dec 2003 22:00:38 - 1.18 +++ PropertyManager.java 4 Jan 2004 21:14:34 - 1.19 @@ -50,9 +50,6 @@ */ package org.apache.fop.fo; -// Java -import java.text.MessageFormat; - // FOP import org.apache.fop.fonts.Font; import org.apache.fop.fo.properties.CommonBorderAndPadding; @@ -83,16 +80,15 @@ private CommonHyphenation hyphProps = null; private TextInfo textInfo = null; -private static final String[] SA_BEFORE = new String[]{before}; -private static final String[] SA_AFTER = new String[]{after}; -private static final String[] SA_START = new String[]{start}; -private static final String[] SA_END = new String[]{end}; - -private static final MessageFormat MSGFMT_COLOR = new MessageFormat(border-{0}-color); -private static final MessageFormat MSGFMT_STYLE = new MessageFormat(border-{0}-style); -private static final MessageFormat MSGFMT_WIDTH = new MessageFormat(border-{0}-width); -private static final MessageFormat MSGFMT_PADDING = new MessageFormat(padding-{0}); - +private static final int[] SA_BEFORE = new int[] { +PR_BORDER_BEFORE_COLOR, PR_BORDER_BEFORE_STYLE, PR_BORDER_BEFORE_WIDTH, PR_PADDING_BEFORE}; +private static final int[] SA_AFTER = new int[]{ +PR_BORDER_AFTER_COLOR, PR_BORDER_AFTER_STYLE, PR_BORDER_AFTER_WIDTH, PR_PADDING_AFTER}; +private static final int[] SA_START = new int[]{ +PR_BORDER_START_COLOR, PR_BORDER_START_STYLE, PR_BORDER_START_WIDTH, PR_PADDING_START}; +private static final int[] SA_END = new int[]{ +PR_BORDER_END_COLOR, PR_BORDER_END_STYLE, PR_BORDER_END_WIDTH, PR_PADDING_END}; + private static final String NONE = none; /** @@ -189,18 +185,15 @@ return borderAndPadding; } -private void initBorderInfo(int whichSide, String[] saSide) { +private void initBorderInfo(int whichSide, int[] saSide) { borderAndPadding.setPadding(whichSide, -propertyList.get( - MSGFMT_PADDING.format(saSide)).getCondLength()); +propertyList.get(saSide[3]).getCondLength()); // If style = none, force width to 0, don't get Color (spec 7.7.20) -int style = propertyList.get(MSGFMT_STYLE.format(saSide)).getEnum
cvs commit: xml-fop/src/java/org/apache/fop/fo PropertyList.java
gmazza 2004/01/04 14:23:16 Modified:src/java/org/apache/fop/fo PropertyList.java Log: More string--int conversions. Revision ChangesPath 1.17 +21 -19xml-fop/src/java/org/apache/fop/fo/PropertyList.java Index: PropertyList.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/PropertyList.java,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- PropertyList.java 4 Jan 2004 22:04:08 - 1.16 +++ PropertyList.java 4 Jan 2004 22:23:16 - 1.17 @@ -482,7 +482,9 @@ String basePropertyName = findBasePropertyName(attributeName); String subPropertyName = findSubPropertyName(attributeName); -propertyMaker = findMaker(namespace, elementName, basePropertyName); +int propId = FOPropertyMapping.getPropertyId(basePropertyName); + +propertyMaker = findMaker(namespace, elementName, propId); if (propertyMaker == null) { handleInvalidProperty(attributeName); return; @@ -599,13 +601,11 @@ public Property getSubpropValue(String space, String element, Property p, int propId) { -String propertyName = FOPropertyMapping.getPropertyName(propId -Constants.PROPERTY_MASK); - String subpropName = FOPropertyMapping.getPropertyName(propId Constants.COMPOUND_MASK); -Property.Maker maker = findMaker(space, element, propertyName); +Property.Maker maker = findMaker(space, element, propId +Constants.PROPERTY_MASK); if (maker != null) { return maker.getSubpropValue(p, subpropName); } else { @@ -619,10 +619,12 @@ * @param propertyName name of property * @return value from the appropriate Property.Maker */ -public boolean isCorrespondingForced(String space, String element, +private boolean isCorrespondingForced(String space, String element, String propertyName) { +int propId = FOPropertyMapping.getPropertyId(propertyName); + Property.Maker propertyMaker = findMaker(space, element, - propertyName); + propId); if (propertyMaker != null) { return propertyMaker.isCorrespondingForced(this); } else { @@ -639,8 +641,10 @@ */ public Property getShorthand(String space, String element, String propertyName) { +int propId = FOPropertyMapping.getPropertyId(propertyName); + Property.Maker propertyMaker = findMaker(space, element, - propertyName); + propId); if (propertyMaker != null) { return propertyMaker.getShorthand(this); } else { @@ -659,11 +663,10 @@ public Property makeProperty(String space, String element, int propId) throws FOPException { -String propertyName = FOPropertyMapping.getPropertyName(propId); Property p = null; Property.Maker propertyMaker = findMaker(space, element, - propertyName); + propId); if (propertyMaker != null) { p = propertyMaker.make(this); } else { @@ -683,9 +686,10 @@ public Property computeProperty(String space, String element, String propertyName) { +int propId = FOPropertyMapping.getPropertyId(propertyName); Property p = null; Property.Maker propertyMaker = findMaker(space, element, - propertyName); + propId); if (propertyMaker != null) { try { p = propertyMaker.compute(this); @@ -713,8 +717,9 @@ String propertyName) { boolean b; +int propId = FOPropertyMapping.getPropertyId(propertyName); Property.Maker propertyMaker = findMaker(space, element, - propertyName); + propId); if (propertyMaker != null) { b = propertyMaker.isInherited(); } else { @@ -727,19 +732,16 @@ /** * @param space namespace of element * @param elementName name of element - * @param propertyName name of property + * @param propId Id of property
cvs commit: xml-fop/src/java/org/apache/fop/fo PropertyList.java
gmazza 2004/01/04 14:47:36 Modified:src/java/org/apache/fop/fo PropertyList.java Log: More String-Int conversion; also removed member variable passing (namespace, element) within private functions. (Also made more methods private until external use determined.) Revision ChangesPath 1.18 +38 -79xml-fop/src/java/org/apache/fop/fo/PropertyList.java Index: PropertyList.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/PropertyList.java,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- PropertyList.java 4 Jan 2004 22:23:16 - 1.17 +++ PropertyList.java 4 Jan 2004 22:47:36 - 1.18 @@ -197,7 +197,7 @@ p = getShorthand(namespace, elementName, baseName); } if (p != null sepchar -1) { -return getSubpropValue(namespace, elementName, p, propId); +return getSubpropValue(p, propId); } return p; } @@ -217,7 +217,7 @@ String baseName = propertyName.substring(0, sepchar); Property p = getExplicitBaseProp(baseName); if (p != null) { -return getSubpropValue(namespace, elementName, p, propId); +return getSubpropValue(p, propId); } else { return null; } @@ -245,12 +245,12 @@ int propId = FOPropertyMapping.getPropertyId(propertyName); if (parentPropertyList != null - isInherited(namespace, elementName, propertyName)) { + isInherited(propId)) { return parentPropertyList.get(propId); } else { // return the initial value try { -return makeProperty(namespace, elementName, propId); +return makeProperty(propId); } catch (org.apache.fop.apps.FOPException e) { //log.error(Exception in getInherited(): property= // + propertyName + : + e); @@ -284,8 +284,7 @@ bTryInherit); if (p == null bTryDefault) {// default value for this FO! try { -p = makeProperty(namespace, elementName, -propId Constants.PROPERTY_MASK); +p = makeProperty(propId Constants.PROPERTY_MASK); } catch (FOPException e) { // don't know what to do here } @@ -300,8 +299,7 @@ } if ((propId Constants.COMPOUND_MASK) != 0 p != null) { -return getSubpropValue(namespace, elementName, p, -propId); +return getSubpropValue(p, propId); } else { return p; } @@ -313,19 +311,19 @@ * the inheritance priority (I think...) * If the property is an absolute property and it isn't specified, then * we try to compute it from the corresponding relative property: this - * happends in computeProperty. + * happens in computeProperty. */ private Property findProperty(int propId, boolean bTryInherit) { String propertyName = FOPropertyMapping.getPropertyName(propId); Property p = null; -if (isCorrespondingForced(namespace, elementName, propertyName)) { -p = computeProperty(namespace, elementName, propertyName); +if (isCorrespondingForced(propId)) { +p = computeProperty(propId); } else { p = getExplicitBaseProp(propertyName); if (p == null) { -p = this.computeProperty(namespace, elementName, propertyName); +p = this.computeProperty(propId); } if (p == null) {// check for shorthand specification p = getShorthand(namespace, elementName, propertyName); @@ -333,7 +331,7 @@ if (p == null bTryInherit) { // else inherit (if has parent and is inheritable) if (this.parentPropertyList != null - isInherited(namespace, elementName, propertyName)) { + isInherited(propId)) { p = parentPropertyList.findProperty(propId, true); } } @@ -359,7 +357,7 @@ if (p == null) { // If no explicit setting found, return initial (default) value. try { -p = makeProperty(namespace, elementName, propId); +p = makeProperty(propId); } catch (FOPException e) { //log.error(Exception in getNearestSpecified(): property
cvs commit: xml-fop/src/java/org/apache/fop/render/rtf TableAttributesConverter.java
gmazza 2004/01/04 16:44:59 Modified:src/codegen properties.xsl src/java/org/apache/fop/fo Property.java PropertyList.java src/java/org/apache/fop/fo/expr LabelEndFunction.java NearestSpecPropFunction.java src/java/org/apache/fop/render/rtf TableAttributesConverter.java Log: More String--int conversions. Work primarily from Finn Bock's patch. Revision ChangesPath 1.26 +146 -22 xml-fop/src/codegen/properties.xsl Index: properties.xsl === RCS file: /home/cvs/xml-fop/src/codegen/properties.xsl,v retrieving revision 1.25 retrieving revision 1.26 diff -u -r1.25 -r1.26 --- properties.xsl4 Jan 2004 05:42:03 - 1.25 +++ properties.xsl5 Jan 2004 00:44:59 - 1.26 @@ -563,9 +563,10 @@ return super.getSubpropMaker(subprop); } -protected Property setSubprop(Property baseProp, String subpropName, +protected Property setSubprop(Property baseProp, int subpropId, Property subProp) { /xsl:text +String subpropName = FOPropertyMapping.getPropertyName(subpropId); xsl:value-of select=datatype/ xsl:text val = baseProp.get/xsl:text xsl:value-of select=datatype/ @@ -769,14 +770,12 @@ xsl:if test=.//corresponding/@use-if-specified='true' xsl:text public boolean isCorrespondingForced(PropertyList propertyList) { -FObj parentFO = propertyList.getParentFObj(); -StringBuffer sbExpr=new StringBuffer();/xsl:text +FObj parentFO = propertyList.getParentFObj();/xsl:text xsl:for-each select=.//corresponding/propval xsl:text -sbExpr.setLength(0);/xsl:text +if (propertyList.getExplicit(/xsl:text xsl:apply-templates select=./ -xsl:text -if (propertyList.getExplicit(sbExpr.toString()) != null) +xsl:text) != null) return true;/xsl:text /xsl:for-each xsl:text @@ -788,24 +787,26 @@ public Property compute(PropertyList propertyList) throws FOPException { FObj parentFO = propertyList.getParentFObj(); -StringBuffer sbExpr=new StringBuffer(); Property p=null;/xsl:text xsl:choose xsl:when test=corresponding/propexpr - xsl:apply-templates select=corresponding/propval/ xsl:text // Make sure the property is set before calculating it! -if (propertyList.getExplicitOrShorthand(sbExpr.toString()) == null) +if (propertyList.getExplicitOrShorthand(/xsl:text + xsl:apply-templates select=corresponding/propval/ + xsl:text) == null) return p; +StringBuffer sbExpr=new StringBuffer(); sbExpr.setLength(0);/xsl:text xsl:apply-templates select=corresponding/propexpr/ xsl:text p = make(propertyList, sbExpr.toString(), propertyList.getParentFObj());/xsl:text /xsl:when xsl:otherwise - xsl:apply-templates select=corresponding/propval/ xsl:text -p= propertyList.getExplicitOrShorthand(sbExpr.toString());/xsl:text +p= propertyList.getExplicitOrShorthand(/xsl:text + xsl:apply-templates select=corresponding/propval/ + xsl:text);/xsl:text /xsl:otherwise /xsl:choose xsl:text @@ -818,8 +819,6 @@ Property subprop;/xsl:text xsl:for-each select=compound/subproperty/corresponding - xsl:text -sbExpr.setLength(0);/xsl:text xsl:choose xsl:when test=propexpr xsl:apply-templates select=propexpr/ @@ -830,16 +829,19 @@ make(propertyList, sbExpr.toString(), parentFO);/xsl:text /xsl:when xsl:otherwise -xsl:apply-templates select=propval/ xsl:text -subprop = propertyList.getExplicitOrShorthand(sbExpr.toString());/xsl:text +subprop = propertyList.getExplicitOrShorthand(/xsl:text + xsl:apply-templates select=propval/ + xsl:text);/xsl:text /xsl:otherwise /xsl:choose xsl:text if (subprop != null) { -setSubprop(p, /xsl:text -xsl:value-of select='../name'/ -xsl:text, subprop); +setSubprop(p, Constants.CP_/xsl:text +xsl:call-template name=makeEnumConstant + xsl:with-param name=propstr select=../name/ +/xsl:call-template +xsl:text, subprop); }/xsl:text /xsl:for-each /xsl:if @@ -860,9 +862,11 @@ xsl:text if (p == null
cvs commit: xml-fop/src/java/org/apache/fop/fo/pagination RegionBody.java
gmazza 2004/01/04 17:31:09 Modified:src/java/org/apache/fop/datatypes LengthBase.java src/java/org/apache/fop/fo PropertyList.java src/java/org/apache/fop/fo/expr InheritedPropFunction.java src/java/org/apache/fop/fo/pagination RegionBody.java Log: More String-Int Conversions. Revision ChangesPath 1.5 +1 -1 xml-fop/src/java/org/apache/fop/datatypes/LengthBase.java Index: LengthBase.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/datatypes/LengthBase.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- LengthBase.java 29 Dec 2003 23:28:47 - 1.4 +++ LengthBase.java 5 Jan 2004 01:31:09 - 1.5 @@ -142,7 +142,7 @@ case FONTSIZE: return propertyList.get(Constants.PR_FONT_SIZE).getLength().getValue(); case INH_FONTSIZE: -return propertyList.getInherited(font-size).getLength().getValue(); +return propertyList.getInherited(Constants.PR_FONT_SIZE).getLength().getValue(); //case CONTAINING_BOX: // depends on property?? inline-progression vs block-progression //return parentFO.getContentWidth(); 1.20 +20 -34xml-fop/src/java/org/apache/fop/fo/PropertyList.java Index: PropertyList.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/PropertyList.java,v retrieving revision 1.19 retrieving revision 1.20 diff -u -r1.19 -r1.20 --- PropertyList.java 5 Jan 2004 00:44:59 - 1.19 +++ PropertyList.java 5 Jan 2004 01:31:09 - 1.20 @@ -184,20 +184,11 @@ */ public Property getExplicitOrShorthand(int propId) { /* Handle request for one part of a compound property */ -String propertyName = FOPropertyMapping.getPropertyName(propId); - -int sepchar = propertyName.indexOf('.'); -String baseName; -if (sepchar -1) { -baseName = propertyName.substring(0, sepchar); -} else { -baseName = propertyName; -} -Property p = getExplicitBaseProp(baseName); +Property p = getExplicitBaseProp(propId Constants.PROPERTY_MASK); if (p == null) { p = getShorthand(propId Constants.PROPERTY_MASK); } -if (p != null sepchar -1) { +if (p != null (propId Constants.PROPERTY_MASK) != 0) { return getSubpropValue(p, propId); } return p; @@ -213,10 +204,8 @@ String propertyName = FOPropertyMapping.getPropertyName(propId); /* Handle request for one part of a compound property */ -int sepchar = propertyName.indexOf('.'); -if (sepchar -1) { -String baseName = propertyName.substring(0, sepchar); -Property p = getExplicitBaseProp(baseName); +if ((propId Constants.COMPOUND_MASK) != 0) { +Property p = getExplicitBaseProp(propId Constants.PROPERTY_MASK); if (p != null) { return getSubpropValue(p, propId); } else { @@ -231,7 +220,8 @@ * @param propertyName The name of the base property whose value is desired. * @return The value if the property is explicitly set, otherwise null. */ -public Property getExplicitBaseProp(String propertyName) { +public Property getExplicitBaseProp(int propId) { +String propertyName = FOPropertyMapping.getPropertyName(propId); return (Property) super.get(propertyName); } @@ -239,11 +229,10 @@ * Return the value of this property inherited by this FO. * Implements the inherited-property-value function. * The property must be inheritable! - * @param propertyName The name of the property whose value is desired. + * @param propID The ID of the property whose value is desired. * @return The inherited value, otherwise null. */ -public Property getInherited(String propertyName) { -int propId = FOPropertyMapping.getPropertyId(propertyName); +public Property getInherited(int propId) { if (parentPropertyList != null isInherited(propId)) { @@ -315,14 +304,12 @@ * happens in computeProperty. */ private Property findProperty(int propId, boolean bTryInherit) { - -String propertyName = FOPropertyMapping.getPropertyName(propId); - Property p = null; + if (isCorrespondingForced(propId)) { p = computeProperty(propId); } else { -p = getExplicitBaseProp(propertyName); +p = getExplicitBaseProp(propId); if (p == null
cvs commit: xml-fop/src/codegen properties.xsl
gmazza 2004/01/03 21:42:04 Modified:src/codegen properties.xsl Log: Fix to remove unnecessary imports of Constants interface. Revision ChangesPath 1.25 +6 -2 xml-fop/src/codegen/properties.xsl Index: properties.xsl === RCS file: /home/cvs/xml-fop/src/codegen/properties.xsl,v retrieving revision 1.24 retrieving revision 1.25 diff -u -r1.24 -r1.25 --- properties.xsl31 Dec 2003 01:41:46 - 1.24 +++ properties.xsl4 Jan 2004 05:42:03 - 1.25 @@ -311,7 +311,7 @@ redirect:write select=concat($classname, '.java') xsl:textpackage org.apache.fop.fo.properties; -import org.apache.fop.fo.Constants; + /xsl:text xsl:if test=.//keyword-equiv or ./name[.='generic-color'] xsl:text @@ -338,6 +338,10 @@ xsl:text import org.apache.fop.apps.FOPException;/xsl:text /xsl:if + xsl:if test=.//enumeration and @type='generic' +xsl:text +import org.apache.fop.fo.Constants;/xsl:text +/xsl:if xsl:text public class /xsl:text - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/fo PropertyList.java
gmazza 2004/01/02 14:37:09 Modified:src/java/org/apache/fop/fo PropertyList.java Log: Bug 25803 (patch by Simon Pepping): Fix bug occurring when a compound property is specified (e.g. leader-length.maximum) before its base property (e.g. leader-length). Revision ChangesPath 1.14 +23 -9 xml-fop/src/java/org/apache/fop/fo/PropertyList.java Index: PropertyList.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/PropertyList.java,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- PropertyList.java 31 Dec 2003 01:41:46 - 1.13 +++ PropertyList.java 2 Jan 2004 22:37:09 - 1.14 @@ -216,7 +216,7 @@ * @return The value if the property is explicitly set, otherwise null. */ public Property getExplicitBaseProp(String propertyName) { -return (Property)super.get(propertyName); +return (Property) super.get(propertyName); } /** @@ -516,9 +516,18 @@ } try { Property prop = null; -if (subPropertyName == null) { +if (subPropertyName == null) { // base attribute only found +/* Do nothing if the base property has already been created. + * This is e.g. the case when a compound attribute was + * specified before the base attribute; in these cases + * the base attribute was already created in + * findBaseProperty() + */ +if (getExplicitBaseProp(basePropertyName) != null) { +return; +} prop = propertyMaker.make(this, attributeValue, parentFO); -} else { +} else { // e.g. leader-length.maximum Property baseProperty = findBaseProperty(attributes, parentFO, basePropertyName, propertyMaker); prop = propertyMaker.make(baseProperty, subPropertyName, @@ -538,25 +547,30 @@ String basePropName, Maker propertyMaker) throws FOPException { -// If the baseProperty has already been created, return it + +/* If the baseProperty has already been created, return it + * e.g. fo:leader =120pt .maximum=200pt... / + */ Property baseProperty = getExplicitBaseProp(basePropName); if (baseProperty != null) { return baseProperty; } -// If it is specified later in this list of Attributes, create it + +/* Otherwise If it is specified later in this list of Attributes, create it now + * e.g. fo:leader .maximum=200pt =200pt... / + */ String basePropertyValue = attributes.getValue(basePropName); if (basePropertyValue != null) { -int propertyId = FOPropertyMapping.getPropertyId(basePropertyValue); +int propertyId = FOPropertyMapping.getPropertyId(basePropName); if (propertyId != -1) { baseProperty = propertyMaker.make(this, basePropertyValue, parentFO); return baseProperty; } } -// Otherwise it is a compound property ?? -// baseProperty = propertyMaker.makeCompound(propertyList, parentFO); -return baseProperty; + +return null; // could not find base property } private void handleInvalidProperty(String attributeName) { - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/fo/flow Leader.java
gmazza 2004/01/02 15:53:09 Modified:src/codegen fo-property-mapping.xsl src/java/org/apache/fop/fo/flow Leader.java Log: FOPropertyMapping.GetPropertyId() modified to also be able to return (base + compound) ID value for a base.compound string; more String-Int conversions in Leader.java. Revision ChangesPath 1.7 +22 -5 xml-fop/src/codegen/fo-property-mapping.xsl Index: fo-property-mapping.xsl === RCS file: /home/cvs/xml-fop/src/codegen/fo-property-mapping.xsl,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- fo-property-mapping.xsl 24 Dec 2003 00:06:13 - 1.6 +++ fo-property-mapping.xsl 2 Jan 2004 23:53:09 - 1.7 @@ -137,10 +137,27 @@ } public static int getPropertyId(String name) { - Integer i = (Integer) s_htPropNames.get(name); - if (i == null) - return -1; -return i.intValue(); +// check to see if base.compound or just base property +int sepchar = name.indexOf('.'); + +if (sepchar -1) { +Integer baseId = (Integer) s_htPropNames.get(name.substring(0, sepchar)); +if (baseId == null) { +return -1; +} else { +int cmpdId = getSubPropertyId(name.substring(sepchar + 1)); +if (cmpdId == -1) { +return -1; +} else { +return baseId.intValue() + cmpdId; +} +} +} else { +Integer baseId = (Integer) s_htPropNames.get(name); +if (baseId == null) +return -1; +return baseId.intValue(); +} } public static int getSubPropertyId(String name) { 1.19 +3 -4 xml-fop/src/java/org/apache/fop/fo/flow/Leader.java Index: Leader.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/flow/Leader.java,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- Leader.java 31 Dec 2003 01:41:46 - 1.18 +++ Leader.java 2 Jan 2004 23:53:09 - 1.19 @@ -62,7 +62,7 @@ import org.apache.fop.fo.properties.CommonBorderAndPadding; import org.apache.fop.fo.properties.CommonMarginInline; import org.apache.fop.fo.properties.CommonRelativePosition; -//import org.apache.fop.fo.properties.FOPropertyMapping; +import org.apache.fop.fo.properties.FOPropertyMapping; import org.apache.fop.fo.properties.LeaderPattern; import org.apache.fop.fonts.Font; @@ -166,9 +166,8 @@ public int getLength(String prop, int dim) { int length; -// int propId = FOPropertyMapping.getPropertyId(prop); -// System.out.println(prop/propID = + prop + + propId); -Length maxlength = propertyList.get(prop).getLength(); +int propId = FOPropertyMapping.getPropertyId(prop); +Length maxlength = propertyList.get(propId).getLength(); if (maxlength instanceof PercentLength) { length = (int)(((PercentLength)maxlength).value() * dim); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/documentation/content/xdocs team.xml
gmazza 2004/01/01 10:31:03 Modified:src/documentation/content/xdocs team.xml Log: Changed jumps to forks (=open new window on links) on team page. Revision ChangesPath 1.24 +7 -6 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.23 retrieving revision 1.24 diff -u -r1.23 -r1.24 --- team.xml 31 Dec 2003 04:17:34 - 1.23 +++ team.xml 1 Jan 2004 18:31:03 - 1.24 @@ -22,8 +22,8 @@ li id=gmlink href=mailto:[EMAIL PROTECTED]Glen Mazza/link (GM) is an information systems analyst with EDS in Arlington, Virginia, USA./li li id=wvmlink href=mailto:[EMAIL PROTECTED]Victor Mote/link (WVM) is the founder and -manager of jump href=http://www.outfitr.com;Enterprise Outfitters/jump, a business -software company, and of jump href=http://www.portagepub.com;Portage Publications/jump, +manager of fork href=http://www.outfitr.com;Enterprise Outfitters/fork, a business +software company, and of fork href=http://www.portagepub.com;Portage Publications/fork, a republisher of old documents. Both are located in Colorado Springs, Colorado, USA./li li id=jplink href=mailto:[EMAIL PROTECTED]J#x00F6;rg Pietschmann/link (JP)/li li id=otlink href=mailto:[EMAIL PROTECTED]Oleg Tkachenko/link (OT)/li @@ -53,13 +53,14 @@ !-- Simon prefers the mail address with AT, to stop spam, etc. -- lilink href=mailto:spepping AT leverkruid.nlSimon Pepping/link is a TeX/LaTeX and XML expert with Elsevier at its -Amsterdam office. See his jump href=http://www.leverkruid.nl;home -page/jump for some of his private projects./li +Amsterdam office. See his fork href=http://www.leverkruid.nl;home +page/fork for some of his private projects./li /ul /section section id=founder titleFounder/title - pFOP was originally created and donated to the Apache Software Foundation by link href=mailto:[EMAIL PROTECTED]James Tauber/link. Information about him can be found at jump href=http://www.jtauber.com;his website/jump./p + pFOP was originally created and donated to the Apache Software Foundation by link href=mailto:[EMAIL PROTECTED]James Tauber/link. + Information about him can be found at fork href=http://www.jtauber.com;his website/fork./p /section section id=commit-inactive titleInactive Committers/title - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/fo/flow ExternalGraphic.java
gmazza 2004/01/01 10:52:22 Modified:src/java/org/apache/fop/fo/flow ExternalGraphic.java Log: Bug #25806 (Patch by Finn Bock)--NPE fixed in ExternalGraphic.java. Revision ChangesPath 1.15 +4 -2 xml-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.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- ExternalGraphic.java 28 Dec 2003 17:10:16 - 1.14 +++ ExternalGraphic.java 1 Jan 2004 18:52:22 - 1.15 @@ -65,6 +65,7 @@ import org.apache.fop.image.ImageFactory; import org.apache.fop.image.FopImage; import org.apache.fop.datatypes.Length; +import org.apache.fop.datatypes.LengthRange; // Java import java.awt.geom.Rectangle2D; @@ -108,8 +109,9 @@ } url = ImageFactory.getURL(url); -// assume lr-tb for now -Length ipd = propertyList.get(PR_INLINE_PROGRESSION_DIMENSION).getLength(); +// assume lr-tb for now and just use the .optimum value of the range +Length ipd = propertyList.get(PR_INLINE_PROGRESSION_DIMENSION). +getLengthRange().getOptimum().getLength(); if (!ipd.isAuto()) { viewWidth = ipd.getValue(); } else { - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/layoutmgr BlockLayoutManager.java
gmazza 2003/12/30 15:11:00 Modified:src/java/org/apache/fop/layoutmgr BlockLayoutManager.java Log: Bug #25813 (Patch by Finn Bock): Calculation change in setBlockTextInfo(). Revision ChangesPath 1.11 +1 -1 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.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- BlockLayoutManager.java 24 Nov 2003 19:07:35 - 1.10 +++ BlockLayoutManager.java 30 Dec 2003 23:11:00 - 1.11 @@ -170,7 +170,7 @@ public void setBlockTextInfo(TextInfo ti) { lead = ti.fs.getAscender(); -follow = ti.fs.getDescender(); +follow = -ti.fs.getDescender(); lineHeight = ti.lineHeight; } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/datatypes CondLength.java Keep.java LengthPair.java LengthRange.java Space.java
gmazza 2003/12/30 16:40:14 Modified:src/java/org/apache/fop/datatypes CondLength.java Keep.java LengthPair.java LengthRange.java Space.java Log: Bug #25563 (Patch by Finn Bock) toString() implementations added. Revision ChangesPath 1.3 +4 -0 xml-fop/src/java/org/apache/fop/datatypes/CondLength.java Index: CondLength.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/datatypes/CondLength.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- CondLength.java 22 Dec 2003 21:37:43 - 1.2 +++ CondLength.java 31 Dec 2003 00:40:14 - 1.3 @@ -119,5 +119,9 @@ return this.length.getLength().getValue(); } +public String toString() { +return CondLength[ + (isDiscard() ? discard, : ) + +length.getObject().toString() + ]; +} } 1.4 +4 -1 xml-fop/src/java/org/apache/fop/datatypes/Keep.java Index: Keep.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/datatypes/Keep.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- Keep.java 13 Jul 2003 00:59:45 - 1.3 +++ Keep.java 31 Dec 2003 00:40:14 - 1.4 @@ -152,7 +152,10 @@ * @return String representation */ public String toString() { -return Keep; +return Keep[ + +withinLine: + getWithinLine().getObject() + +, withinColumn: + getWithinColumn().getObject() + +, withinPage: + getWithinPage().getObject() + ]; } } 1.3 +6 -0 xml-fop/src/java/org/apache/fop/datatypes/LengthPair.java Index: LengthPair.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/datatypes/LengthPair.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- LengthPair.java 6 Jul 2003 22:38:43 - 1.2 +++ LengthPair.java 31 Dec 2003 00:40:14 - 1.3 @@ -108,5 +108,11 @@ return this.bpd; } +public String toString() { +return LengthPair[ + +ipd: + getIPD().getObject() + +, bpd: + getBPD().getObject() + ]; +} + } 1.4 +7 -0 xml-fop/src/java/org/apache/fop/datatypes/LengthRange.java Index: LengthRange.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/datatypes/LengthRange.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- LengthRange.java 6 Jul 2003 22:38:43 - 1.3 +++ LengthRange.java 31 Dec 2003 00:40:14 - 1.4 @@ -227,5 +227,12 @@ return this.optimum; } +public String toString() { +return LengthRange[ + +min: + getMinimum().getObject() + +, max: + getMaximum().getObject() + +, opt: + getOptimum().getObject() + ]; +} + } 1.3 +9 -0 xml-fop/src/java/org/apache/fop/datatypes/Space.java Index: Space.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/datatypes/Space.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- Space.java6 Jul 2003 22:38:44 - 1.2 +++ Space.java31 Dec 2003 00:40:14 - 1.3 @@ -125,5 +125,14 @@ return this.conditionality; } +public String toString() { +return Space[ + +min: + getMinimum().getObject() + +, max: + getMaximum().getObject() + +, opt: + getOptimum().getObject() + +, precedence: + precedence.getObject() + +, conditionality: + conditionality.getObject() + ]; +} + } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/fo/pagination Region.java
gmazza 2003/12/30 17:41:46 Modified:src/codegen properties.xsl src/java/org/apache/fop/fo Property.java PropertyList.java src/java/org/apache/fop/fo/expr FopPropValFunction.java src/java/org/apache/fop/fo/flow Leader.java TableRow.java src/java/org/apache/fop/fo/pagination Region.java Log: More String-Int conversions, primarily from patch from Finn Bock. Revision ChangesPath 1.24 +6 -4 xml-fop/src/codegen/properties.xsl Index: properties.xsl === RCS file: /home/cvs/xml-fop/src/codegen/properties.xsl,v retrieving revision 1.23 retrieving revision 1.24 diff -u -r1.23 -r1.24 --- properties.xsl22 Dec 2003 21:37:43 - 1.23 +++ properties.xsl31 Dec 2003 01:41:46 - 1.24 @@ -735,9 +735,11 @@ xsl:text public Property compute(PropertyList propertyList) { Property computedProperty = null; -Property correspondingProperty = propertyList.get(/xsl:text -xsl:value-of select=derive/@from/ -xsl:text); +Property correspondingProperty = propertyList.get(Constants.PR_/xsl:text +xsl:call-template name=makeEnumConstant + xsl:with-param name=propstr select=derive/@from/ +/xsl:call-template +xsl:text); if (correspondingProperty != null) { int correspondingValue = correspondingProperty.getEnum();/xsl:text xsl:for-each select=derive/if 1.8 +1 -1 xml-fop/src/java/org/apache/fop/fo/Property.java Index: Property.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/Property.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- Property.java 26 Dec 2003 23:41:47 - 1.7 +++ Property.java 31 Dec 2003 01:41:46 - 1.8 @@ -95,7 +95,7 @@ /** * Construct an instance of a Property.Maker. - * Note: the property name is set to UNKNOWN. + * Note: the property ID is set to zero */ protected Maker() { this.propId = 0; 1.13 +0 -1 xml-fop/src/java/org/apache/fop/fo/PropertyList.java Index: PropertyList.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/PropertyList.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- PropertyList.java 29 Dec 2003 23:28:47 - 1.12 +++ PropertyList.java 31 Dec 2003 01:41:46 - 1.13 @@ -285,7 +285,6 @@ return get(propertyName, false, false); } - /** * Return the property on the current FlowObject. If it isn't set explicitly, * this will try to compute it based on other properties, or if it is 1.4 +4 -2 xml-fop/src/java/org/apache/fop/fo/expr/FopPropValFunction.java Index: FopPropValFunction.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/expr/FopPropValFunction.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- FopPropValFunction.java 16 Jul 2003 01:52:26 - 1.3 +++ FopPropValFunction.java 31 Dec 2003 01:41:46 - 1.4 @@ -51,6 +51,7 @@ package org.apache.fop.fo.expr; import org.apache.fop.fo.Property; +import org.apache.fop.fo.properties.FOPropertyMapping; /** @@ -80,8 +81,9 @@ if (propName == null) { throw new PropertyException(Incorrect parameter to _int-property-value function); } -// System.err.println(Get property-value for + propName); -return pInfo.getPropertyList().get(propName); + +int propId = FOPropertyMapping.getPropertyId(propName); +return pInfo.getPropertyList().get(propId); } } 1.18 +3 -0 xml-fop/src/java/org/apache/fop/fo/flow/Leader.java Index: Leader.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/flow/Leader.java,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- Leader.java 28 Dec 2003 17:10:17 - 1.17 +++ Leader.java 31 Dec 2003 01:41:46 - 1.18 @@ -62,6 +62,7 @@ import org.apache.fop.fo.properties.CommonBorderAndPadding; import org.apache.fop.fo.properties.CommonMarginInline; import org.apache.fop.fo.properties.CommonRelativePosition; +//import org.apache.fop.fo.properties.FOPropertyMapping; import org.apache.fop.fo.properties.LeaderPattern; import org.apache.fop.fonts.Font; @@ -165,6 +166,8 @@ public
cvs commit: xml-fop/src/documentation/content/xdocs team.xml
gmazza 2003/12/30 20:17:34 Modified:src/documentation/content/xdocs team.xml Log: XML bug on team page. Revision ChangesPath 1.23 +1 -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.22 retrieving revision 1.23 diff -u -r1.22 -r1.23 --- team.xml 28 Dec 2003 19:01:52 - 1.22 +++ team.xml 31 Dec 2003 04:17:34 - 1.23 @@ -55,7 +55,6 @@ is a TeX/LaTeX and XML expert with Elsevier at its Amsterdam office. See his jump href=http://www.leverkruid.nl;home page/jump for some of his private projects./li - /li /ul /section section id=founder - 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 BidiLayoutManager.java
gmazza 2003/12/29 12:50:41 Modified:src/java/org/apache/fop/layoutmgr AddLMVisitor.java BidiLayoutManager.java Log: Bug #25804: Fix of ClassCastException error occuring while using (unimplemented) bidi-override. Patch by Finn Bock. Revision ChangesPath 1.25 +2 -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.24 retrieving revision 1.25 diff -u -r1.24 -r1.25 --- AddLMVisitor.java 26 Dec 2003 22:39:14 - 1.24 +++ AddLMVisitor.java 29 Dec 2003 20:50:41 - 1.25 @@ -251,7 +251,7 @@ for (int count = childList.size() - 1; count = 0; count--) { LayoutProcessor lm = (LayoutProcessor) childList.get(count); if (lm.generatesInlineAreas()) { -LayoutProcessor blm = new BidiLayoutManager((LeafNodeLayoutManager) lm); +LayoutProcessor blm = new BidiLayoutManager((InlineStackingLayoutManager) lm); blm.setFObj(node); currentLMList.add(blm); } else { 1.3 +2 -2 xml-fop/src/java/org/apache/fop/layoutmgr/BidiLayoutManager.java Index: BidiLayoutManager.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/BidiLayoutManager.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- BidiLayoutManager.java19 Sep 2003 14:33:15 - 1.2 +++ BidiLayoutManager.java29 Dec 2003 20:50:41 - 1.3 @@ -65,7 +65,7 @@ private List children; -BidiLayoutManager(LeafNodeLayoutManager cLM) { +BidiLayoutManager(InlineStackingLayoutManager cLM) { children = new ArrayList(); /* for (int count = cLM.size() - 1; count = 0; count--) { - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/layoutmgr/table Cell.java
gmazza 2003/12/29 13:19:20 Modified:src/java/org/apache/fop/layoutmgr/table Cell.java Log: Removal of unnecessary local variable, patch by Andreas Delmille. (Bug 25786) Revision ChangesPath 1.4 +1 -2 xml-fop/src/java/org/apache/fop/layoutmgr/table/Cell.java Index: Cell.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/table/Cell.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- Cell.java 28 Aug 2003 19:08:59 - 1.3 +++ Cell.java 29 Dec 2003 21:19:20 - 1.4 @@ -126,13 +126,12 @@ continue; } // Set up a LayoutContext -int ipd = context.getRefIPD(); BreakPoss bp; LayoutContext childLC = new LayoutContext(0); childLC.setStackLimit(MinOptMax.subtract(context.getStackLimit(), stackSize)); -childLC.setRefIPD(ipd); +childLC.setRefIPD(cellIPD); boolean over = false; - 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
gmazza 2003/12/28 08:13:10 Modified:src/java/org/apache/fop/fo FObj.java Log: Minor patch for fixing NPE error when Locator not available--submitted by Finn Bock. Revision ChangesPath 1.30 +5 -3 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.29 retrieving revision 1.30 diff -u -r1.29 -r1.30 --- FObj.java 27 Dec 2003 22:00:38 - 1.29 +++ FObj.java 28 Dec 2003 16:13:10 - 1.30 @@ -132,9 +132,11 @@ } public void setLocation(Locator locator) { -line = locator.getLineNumber(); -column = locator.getColumnNumber(); -systemId = locator.getSystemId(); +if (locator != null) { +line = locator.getLineNumber(); +column = locator.getColumnNumber(); +systemId = locator.getSystemId(); +} } /** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/layoutmgr BlockContainerLayoutManager.java
gmazza 2003/12/28 09:10:17 Modified:src/java/org/apache/fop/area Block.java src/java/org/apache/fop/fo/flow BasicLink.java ExternalGraphic.java InstreamForeignObject.java Leader.java ListBlock.java ListItem.java PageNumber.java PageNumberCitation.java RetrieveMarker.java Table.java TableBody.java TableCell.java TableColumn.java src/java/org/apache/fop/fo/pagination ColorProfile.java ConditionalPageMasterReference.java PageSequence.java Region.java RegionBA.java RegionBASE.java SimplePageMaster.java Title.java src/java/org/apache/fop/layoutmgr BlockContainerLayoutManager.java Log: Conversion of more properties from Strings to ints. Revision ChangesPath 1.2 +13 -1 xml-fop/src/java/org/apache/fop/area/Block.java Index: Block.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/area/Block.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- Block.java11 Mar 2003 13:05:27 - 1.1 +++ Block.java28 Dec 2003 17:10:16 - 1.2 @@ -93,10 +93,22 @@ * @param block the block area to add */ public void addBlock(Block block) { +addBlock(block, true); +} + +/** + * Add the block to this block area. + * + * @param block the block area to add + * @param autoHeight increase the height of the block. + */ +public void addBlock(Block block, boolean autoHeight) { if (children == null) { children = new ArrayList(); } -height += block.getHeight(); +if (autoHeight) { +height += block.getHeight(); +} children.add(block); } 1.8 +2 -2 xml-fop/src/java/org/apache/fop/fo/flow/BasicLink.java Index: BasicLink.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/flow/BasicLink.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- BasicLink.java20 Dec 2003 06:53:22 - 1.7 +++ BasicLink.java28 Dec 2003 17:10:16 - 1.8 @@ -102,10 +102,10 @@ // this.propertyList.get(baseline-shift); // this.propertyList.get(destination-place-offset); // this.propertyList.get(dominant-baseline); -String ext = propertyList.get(external-destination).getString(); +String ext = propertyList.get(PR_EXTERNAL_DESTINATION).getString(); setupID(); // this.propertyList.get(indicate-destination); -String internal = propertyList.get(internal-destination).getString(); +String internal = propertyList.get(PR_INTERNAL_DESTINATION).getString(); if (ext.length() 0) { link = ext; external = true; 1.14 +11 -11xml-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.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- ExternalGraphic.java 27 Dec 2003 20:40:04 - 1.13 +++ ExternalGraphic.java 28 Dec 2003 17:10:16 - 1.14 @@ -102,27 +102,27 @@ * This gets the sizes for the image and the dimensions and clipping. */ public void setup() { -url = this.propertyList.get(src).getString(); +url = this.propertyList.get(PR_SRC).getString(); if (url == null) { return; } url = ImageFactory.getURL(url); // assume lr-tb for now -Length ipd = propertyList.get(inline-progression-dimension.optimum).getLength(); +Length ipd = propertyList.get(PR_INLINE_PROGRESSION_DIMENSION).getLength(); if (!ipd.isAuto()) { viewWidth = ipd.getValue(); } else { -ipd = propertyList.get(width).getLength(); +ipd = propertyList.get(PR_WIDTH).getLength(); if (!ipd.isAuto()) { viewWidth = ipd.getValue(); } } -Length bpd = propertyList.get(block-progression-dimension.optimum).getLength(); +Length bpd = propertyList.get(PR_BLOCK_PROGRESSION_DIMENSION | CP_OPTIMUM).getLength(); if (!bpd.isAuto()) { viewHeight = bpd.getValue(); } else { -bpd = propertyList.get(height).getLength(); +bpd = propertyList.get
cvs commit: xml-fop/src/documentation/content/xdocs team.xml
gmazza 2003/12/28 11:01:52 Modified:src/documentation/content/xdocs team.xml Log: Added Simon Pepping to contributors list. Revision ChangesPath 1.22 +7 -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.21 retrieving revision 1.22 diff -u -r1.21 -r1.22 --- team.xml 19 Dec 2003 01:08:42 - 1.21 +++ team.xml 28 Dec 2003 19:01:52 - 1.22 @@ -50,6 +50,12 @@ recent XML/XSL-FO convert, he has been nit-picking FAQs amp; assorted web pages since his first webmaster position @brain.com in 1996. Most important creation? Jeremy Logan Leeds was born June 18, 2002./li +!-- Simon prefers the mail address with AT, to stop spam, etc. -- + lilink href=mailto:spepping AT leverkruid.nlSimon Pepping/link +is a TeX/LaTeX and XML expert with Elsevier at its +Amsterdam office. See his jump href=http://www.leverkruid.nl;home +page/jump for some of his private projects./li + /li /ul /section section id=founder - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/fo/flow ExternalGraphic.java
gmazza 2003/12/27 12:40:04 Modified:src/java/org/apache/fop/fo/flow ExternalGraphic.java Log: Bug 25758 (patch by Finn Bock) -- Fix of content-height/content-width for images, to satisfy NIST test adp-height1.fo Revision ChangesPath 1.13 +6 -5 xml-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.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- ExternalGraphic.java 20 Dec 2003 06:53:22 - 1.12 +++ ExternalGraphic.java 27 Dec 2003 20:40:04 - 1.13 @@ -167,13 +167,14 @@ url = null; return; } -if (cwidth == -1) { +if (cwidth == -1 cheight == -1) { cwidth = (int)(fopimage.getWidth() * 1000); -} -if (cheight == -1) { cheight = (int)(fopimage.getHeight() * 1000); -} -if (scaling == Scaling.UNIFORM) { +} else if (cwidth == -1) { +cwidth = (int)(fopimage.getWidth() * cheight) / fopimage.getHeight(); +} else if (cheight == -1) { +cheight = (int)(fopimage.getHeight() * cwidth) / fopimage.getWidth(); +} else { // adjust the larger double rat1 = cwidth / (fopimage.getWidth() * 1000f); double rat2 = cheight / (fopimage.getHeight() * 1000f); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/layoutmgr LineLayoutManager.java
gmazza 2003/12/27 13:03:34 Modified:src/java/org/apache/fop/layoutmgr LineLayoutManager.java Log: Bug 25756 (Patch by Simon Pepping): Remove line BPs where line consists only of suppressible content (whitespace). Revision ChangesPath 1.9 +36 -1 xml-fop/src/java/org/apache/fop/layoutmgr/LineLayoutManager.java Index: LineLayoutManager.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/LineLayoutManager.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- LineLayoutManager.java23 Dec 2003 20:41:58 - 1.8 +++ LineLayoutManager.java27 Dec 2003 21:03:34 - 1.9 @@ -325,7 +325,15 @@ return null; } if (prevBP == null) { -prevBP = bp; +BreakPoss prevLineEnd = (iPrevLineEnd == 0) +? null +: (BreakPoss) vecInlineBreaks.get(iPrevLineEnd); +if (allAreSuppressible(prevLineEnd)) { +removeAllBP(prevLineEnd); +return null; +} else { +prevBP = bp; +} } // Choose the best break @@ -419,6 +427,33 @@ if (!couldEndLine || bp == prev) break; } return couldEndLine; +} + +/** Test whether all breakposs in vecInlineBreaks +back to and excluding prev are suppressible */ +private boolean allAreSuppressible(BreakPoss prev) { +ListIterator bpIter = +vecInlineBreaks.listIterator(vecInlineBreaks.size()); +boolean allAreSuppressible = true; +BreakPoss bp; +while (bpIter.hasPrevious() +(bp = (BreakPoss) bpIter.previous()) != prev +(allAreSuppressible = bp.isSuppressible())) { +} +return allAreSuppressible; +} + +/** Remove all BPs from the end back to and excluding prev +from vecInlineBreaks*/ +private void removeAllBP(BreakPoss prev) { +int iPrev; +if (prev == null) { +vecInlineBreaks.clear(); +} else if ((iPrev = vecInlineBreaks.indexOf(prev)) != -1) { +for (int i = vecInlineBreaks.size(); iPrev i; --i) { +vecInlineBreaks.remove(i); +} +} } private HyphContext getHyphenContext(BreakPoss prev, - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/fo/flow Block.java BlockContainer.java Inline.java Marker.java
gmazza 2003/12/27 14:00:38 Modified:src/java/org/apache/fop/fo FObj.java GenericShorthandParser.java PropertyList.java PropertyManager.java src/java/org/apache/fop/fo/expr FromParentFunction.java src/java/org/apache/fop/fo/flow Block.java BlockContainer.java Inline.java Marker.java Log: *Partial* conversion of PropertyList.get(String propName) to new PropertyList.get(int propId) method. This method will remain overloaded until all calls converted to int constants. Work based on Finn Bock's patch. Revision ChangesPath 1.29 +4 -3 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.28 retrieving revision 1.29 diff -u -r1.28 -r1.29 --- FObj.java 26 Dec 2003 22:11:17 - 1.28 +++ FObj.java 27 Dec 2003 22:00:38 - 1.29 @@ -66,7 +66,7 @@ /** * Base class for representation of formatting objects and their processing. */ -public class FObj extends FONode { +public class FObj extends FONode implements Constants { private static final String FO_URI = http://www.w3.org/1999/XSL/Format;; public static Property.Maker[] propertyListTable = null; @@ -257,7 +257,8 @@ * @return the property */ public Property getProperty(String name) { -return (propertyList.get(name)); +int propId = FOPropertyMapping.getPropertyId(name); +return (propertyList.get(propId)); } /** @@ -267,7 +268,7 @@ * fo and sets the id attribute of this object. */ public void setupID() { -Property prop = this.propertyList.get(id); +Property prop = this.propertyList.get(PR_ID); if (prop != null) { String str = prop.getString(); if (str != null !str.equals()) { 1.4 +1 -3 xml-fop/src/java/org/apache/fop/fo/GenericShorthandParser.java Index: GenericShorthandParser.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/GenericShorthandParser.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- GenericShorthandParser.java 26 Dec 2003 23:41:47 - 1.3 +++ GenericShorthandParser.java 27 Dec 2003 22:00:38 - 1.4 @@ -52,7 +52,6 @@ import java.util.Vector; import java.util.Enumeration; -import org.apache.fop.fo.properties.FOPropertyMapping; public class GenericShorthandParser implements ShorthandParser { @@ -96,8 +95,7 @@ if (count() == 1) { String sval = ((Property)list.elementAt(0)).getString(); if (sval != null sval.equals(inherit)) { -String name = FOPropertyMapping.getPropertyName(propId); -return propertyList.getFromParent(name); +return propertyList.getFromParent(propId); } } return convertValueForProperty(propId, maker, propertyList); 1.11 +23 -6 xml-fop/src/java/org/apache/fop/fo/PropertyList.java Index: PropertyList.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/PropertyList.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- PropertyList.java 26 Dec 2003 23:41:47 - 1.10 +++ PropertyList.java 27 Dec 2003 22:00:38 - 1.11 @@ -229,7 +229,8 @@ public Property getInherited(String propertyName) { if (parentPropertyList != null isInherited(namespace, elementName, propertyName)) { -return parentPropertyList.get(propertyName); +int propertyId = FOPropertyMapping.getPropertyId(propertyName); +return parentPropertyList.get(propertyId); } else { // return the initial value try { @@ -290,14 +291,28 @@ * this will try to compute it based on other properties, or if it is * inheritable, to return the inherited value. If all else fails, it returns * the default value. - * @param propertyName property name + * @param propId The Constants ID of the property whose value is desired. * @return the Property corresponding to that name */ -public Property get(String propertyName) { +public Property get(int propId) { +String propertyName = FOPropertyMapping.getPropertyName(propId); return get(propertyName, true, true); } /** + * TEMPORARY until conversion to int's complete + * Return the property on the current FlowObject
cvs commit: xml-fop/src/java/org/apache/fop/fo/extensions Label.java
gmazza 2003/12/26 14:11:17 Modified:src/java/org/apache/fop/fo FONode.java FOTreeBuilder.java FObj.java FObjMixed.java UnknownXMLObj.java XMLObj.java src/java/org/apache/fop/fo/extensions Label.java Log: -- Bug #25646 (Patch by Finn Bock): setting SAX Locator (line and column index of input fo stream) for debugging and better error feedback. Revision ChangesPath 1.14 +12 -1 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.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- FONode.java 16 Sep 2003 05:21:04 - 1.13 +++ FONode.java 26 Dec 2003 22:11:17 - 1.14 @@ -55,6 +55,7 @@ // XML import org.xml.sax.Attributes; +import org.xml.sax.Locator; // Avalon import org.apache.avalon.framework.logger.Logger; @@ -91,6 +92,14 @@ } /** + * Sets the name of the node. + * @param str the name + */ +public void setLocation(Locator locator) { +// do nothing by default +} + +/** * Returns the logger for the node. * @return the logger */ @@ -127,8 +136,10 @@ * @param data text * @param start start position * @param length length of the text + * @param locator location in fo source file. */ -protected void addCharacters(char data[], int start, int length) { +protected void addCharacters(char data[], int start, int length, + Locator locator) { // ignore } 1.20 +14 -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.19 retrieving revision 1.20 diff -u -r1.19 -r1.20 --- FOTreeBuilder.java19 Sep 2003 14:33:15 - 1.19 +++ FOTreeBuilder.java26 Dec 2003 22:11:17 - 1.20 @@ -67,6 +67,7 @@ import org.apache.fop.fo.ElementMapping.Maker; import org.apache.fop.fo.pagination.Root; import org.xml.sax.Attributes; +import org.xml.sax.Locator; import org.xml.sax.SAXException; import org.xml.sax.helpers.DefaultHandler; @@ -110,6 +111,9 @@ /** The FOTreeControl object managing the FO Tree that is being built */ public FOTreeControl foTreeControl; +/** The SAX locator object maneging the line and column counters */ +private Locator locator; + /** * Default constructor */ @@ -205,12 +209,20 @@ } /** + * SAX Handler for locator + * @see org.xml.sax.ContentHandler#setDocumentLocator(Locator) + */ +public void setDocumentLocator(Locator locator) { +this.locator = locator; +} + +/** * SAX Handler for characters * @see org.xml.sax.ContentHandler#characters(char[], int, int) */ public void characters(char data[], int start, int length) { if (currentFObj != null) { -currentFObj.addCharacters(data, start, start + length); +currentFObj.addCharacters(data, start, start + length, locator); } } @@ -264,6 +276,7 @@ try { fobj = fobjMaker.make(currentFObj); fobj.setName(localName); +fobj.setLocation(locator); fobj.handleAttrs(attlist); } catch (FOPException e) { throw new SAXException(e); 1.28 +15 -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.27 retrieving revision 1.28 diff -u -r1.27 -r1.28 --- FObj.java 24 Dec 2003 00:06:13 - 1.27 +++ FObj.java 26 Dec 2003 22:11:17 - 1.28 @@ -61,6 +61,7 @@ import org.apache.fop.fo.flow.Marker; import org.apache.fop.fo.properties.FOPropertyMapping; import org.xml.sax.Attributes; +import org.xml.sax.Locator; /** * Base class for representation of formatting objects and their processing. @@ -130,6 +131,12 @@ name = fo: + str; } +public void setLocation(Locator locator) { +line = locator.getLineNumber(); +column = locator.getColumnNumber(); +systemId = locator.getSystemId(); +} + /** * Handle the attributes for this element. * The attributes must be used
cvs commit: xml-fop/src/java/org/apache/fop/layoutmgr AddLMVisitor.java
gmazza 2003/12/26 14:39:14 Modified:src/java/org/apache/fop/layoutmgr AddLMVisitor.java Log: Bug 25708 (Patch submitted by Simon Pepping) -- implementation of fo:wrapper in 1.0 version. Revision ChangesPath 1.24 +9 -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.23 retrieving revision 1.24 diff -u -r1.23 -r1.24 --- AddLMVisitor.java 20 Dec 2003 06:53:23 - 1.23 +++ AddLMVisitor.java 26 Dec 2003 22:39:14 - 1.24 @@ -983,9 +983,15 @@ * @param node Wrapper object to process */ public void serveWrapper(Wrapper node) { -serveFObjMixed((FObjMixed)node); +ListIterator baseIter; +baseIter = node.getChildren(); +if (baseIter == null) return; +while (baseIter.hasNext()) { +FObj child = (FObj) baseIter.next(); +child.acceptVisitor(this); +} } - + /** * @param node FootnoteBody object to process */ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/fo BoxPropShorthandParser.java GenericShorthandParser.java Property.java PropertyList.java ShorthandParser.java
gmazza 2003/12/26 15:41:47 Modified:src/java/org/apache/fop/datatypes ToBeImplementedProperty.java src/java/org/apache/fop/fo BoxPropShorthandParser.java GenericShorthandParser.java Property.java PropertyList.java ShorthandParser.java Log: Property.getPropertyName() switched from returning strings to integer constants (perh. should be renamed to getPropertyId()?); change propagated to classes calling this function. Revision ChangesPath 1.4 +2 -1 xml-fop/src/java/org/apache/fop/datatypes/ToBeImplementedProperty.java Index: ToBeImplementedProperty.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/datatypes/ToBeImplementedProperty.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- ToBeImplementedProperty.java 22 Dec 2003 03:53:31 - 1.3 +++ ToBeImplementedProperty.java 26 Dec 2003 23:41:47 - 1.4 @@ -67,6 +67,7 @@ if (p instanceof ToBeImplementedProperty) { return p; } + ToBeImplementedProperty val = new ToBeImplementedProperty(getPropName()); return val; @@ -77,7 +78,7 @@ * Constructor * @param propName name of Property */ -public ToBeImplementedProperty(String propName) { +public ToBeImplementedProperty(int propId) { //XXX: ([EMAIL PROTECTED]) This is a bit of a kluge, perhaps an //UnimplementedPropertyException or something similar should 1.4 +7 -5 xml-fop/src/java/org/apache/fop/fo/BoxPropShorthandParser.java Index: BoxPropShorthandParser.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/BoxPropShorthandParser.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- BoxPropShorthandParser.java 17 Jul 2003 17:31:28 - 1.3 +++ BoxPropShorthandParser.java 26 Dec 2003 23:41:47 - 1.4 @@ -49,6 +49,7 @@ * Software Foundation, please see http://www.apache.org/. */ package org.apache.fop.fo; +import org.apache.fop.fo.properties.FOPropertyMapping; /** * Shorthand property parser for Box properties @@ -69,17 +70,18 @@ * @see org.apache.fop.fo.GenericShorthandParser#convertValueForProperty(String, * Property.Maker, PropertyList) */ -protected Property convertValueForProperty(String propName, +protected Property convertValueForProperty(int propId, Property.Maker maker, PropertyList propertyList) { +String name = FOPropertyMapping.getPropertyName(propId); Property p = null; -if (propName.indexOf(-top) = 0) { +if (name.indexOf(-top) = 0) { p = getElement(0); -} else if (propName.indexOf(-right) = 0) { +} else if (name.indexOf(-right) = 0) { p = getElement(count() 1 ? 1 : 0); -} else if (propName.indexOf(-bottom) = 0) { +} else if (name.indexOf(-bottom) = 0) { p = getElement(count() 2 ? 2 : 0); -} else if (propName.indexOf(-left) = 0) { +} else if (name.indexOf(-left) = 0) { p = getElement(count() 3 ? 3 : (count() 1 ? 1 : 0)); } // if p not null, try to convert it to a value of the correct type 1.3 +9 -7 xml-fop/src/java/org/apache/fop/fo/GenericShorthandParser.java Index: GenericShorthandParser.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/GenericShorthandParser.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- GenericShorthandParser.java 1 Sep 2003 18:33:05 - 1.2 +++ GenericShorthandParser.java 26 Dec 2003 23:41:47 - 1.3 @@ -52,6 +52,7 @@ import java.util.Vector; import java.util.Enumeration; +import org.apache.fop.fo.properties.FOPropertyMapping; public class GenericShorthandParser implements ShorthandParser { @@ -72,7 +73,7 @@ */ protected Property getElement(int index) { if (list.size() index) { -return (Property)list.elementAt(index); +return (Property) list.elementAt(index); } else { return null; } @@ -87,7 +88,7 @@ // Stores 1 to 3 values for border width, style, color // Used for: border, border-top, border-right etc -public Property getValueForProperty(String propName, +public Property getValueForProperty(int propId
cvs commit: xml-fop/src/java/org/apache/fop/layoutmgr LineLayoutManager.java
gmazza 2003/12/23 12:41:58 Modified:src/java/org/apache/fop/layoutmgr LineLayoutManager.java Log: Bug #25031 -- patch in calculation of line breakpoints, by Simon Pepping (spepping at leverkruid dot nl) Revision ChangesPath 1.8 +12 -1 xml-fop/src/java/org/apache/fop/layoutmgr/LineLayoutManager.java Index: LineLayoutManager.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/LineLayoutManager.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- LineLayoutManager.java15 Dec 2003 22:39:01 - 1.7 +++ LineLayoutManager.java23 Dec 2003 20:41:58 - 1.8 @@ -242,6 +242,10 @@ // If we are already in a hyphenation loop, then stop. if (inlineLC.tryHyphenate()) { +if (prevBP == null) { +vecInlineBreaks.add(bp); +prevBP = bp; +} break; } // Otherwise, prepare to try hyphenation @@ -254,6 +258,10 @@ inlineLC.setHyphContext( getHyphenContext((prevBP == null) ? prev : prevBP, bp)); if (inlineLC.getHyphContext() == null) { +if (prevBP == null) { +vecInlineBreaks.add(bp); +prevBP = bp; +} break; } inlineLC.setFlags(LayoutContext.TRY_HYPHENATE, @@ -264,6 +272,10 @@ /* If we are not in justified text, we can end the line at * prevBP. */ +if (prevBP == null) { +vecInlineBreaks.add(bp); +prevBP = bp; +} break; } } else { @@ -313,7 +325,6 @@ return null; } if (prevBP == null) { -vecInlineBreaks.add(bp); prevBP = bp; } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/area Trait.java
gmazza 2003/12/23 13:53:46 Modified:src/java/org/apache/fop/area Trait.java Log: Bug 25692 (patch by Finn Bock)--toString() implementation of Trait.Background class. Revision ChangesPath 1.2 +17 -1 xml-fop/src/java/org/apache/fop/area/Trait.java Index: Trait.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/area/Trait.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- Trait.java11 Mar 2003 13:05:27 - 1.1 +++ Trait.java23 Dec 2003 21:53:46 - 1.2 @@ -469,7 +469,23 @@ this.vertical = vertical; } -} + /** + * Return the string for debugging. + * @see java.lang.Object#toString() + */ +public String toString() { +StringBuffer sb = new StringBuffer(); +sb.append(color= + color); +if (url != null) { +sb.append(,url=); +sb.append(url); +} +sb.append(,repeat= + repeat); +sb.append(,horiz= + horiz); +sb.append(,vertical= + vertical); +return sb.toString(); +} +} } - 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 PropertyList.java
gmazza 2003/12/23 16:06:14 Modified:src/codegen fo-property-mapping.xsl src/java/org/apache/fop/fo FObj.java PropertyList.java Log: Removed the elementStringTable HashMap references (never used; was meant to define element-specific makers for a particular property, instead of the default make for the property) from fo.FObj and fo.PropertyList. Revision ChangesPath 1.6 +5 -10 xml-fop/src/codegen/fo-property-mapping.xsl Index: fo-property-mapping.xsl === RCS file: /home/cvs/xml-fop/src/codegen/fo-property-mapping.xsl,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- fo-property-mapping.xsl 22 Dec 2003 21:50:58 - 1.5 +++ fo-property-mapping.xsl 24 Dec 2003 00:06:13 - 1.6 @@ -111,7 +111,10 @@ public class xsl:value-of select=@family/PropertyMapping implements Constants { private static Property.Maker[] s_htGeneric = new Property.Maker[PROPERTY_COUNT+1]; - private static HashMap s_htElementStringLists = new HashMap();// temporary + /* s_htElementLists not currently used; apparently for specifying element-specific + * property makers (instead of the default maker for a particular property); see + * former org.apache.fop.fo.PropertyListBuilder + */ private static HashMap s_htElementLists = new HashMap(); private static HashMap s_htSubPropNames = new HashMap(); private static HashMap s_htPropNames = new HashMap(); @@ -120,14 +123,6 @@ private static HashMap s_htxsl:value-of select=localname[1]/;/xsl:for-each xsl:apply-templates/ - - public static Set getElementStringMappings() { // temporary -return s_htElementStringLists.keySet(); - } - - public static HashMap getElementStringMapping(String elemName) { // temporary -return (HashMap) s_htElementStringLists.get(elemName); - } public static Property.Maker[] getGenericMappings() { return s_htGeneric; 1.27 +0 -13 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.26 retrieving revision 1.27 diff -u -r1.26 -r1.27 --- FObj.java 22 Dec 2003 23:23:05 - 1.26 +++ FObj.java 24 Dec 2003 00:06:13 - 1.27 @@ -67,9 +67,6 @@ */ public class FObj extends FONode { private static final String FO_URI = http://www.w3.org/1999/XSL/Format;; - -public static HashMap elementStringTable = null; // temporary - public static Property.Maker[] propertyListTable = null; /** @@ -105,16 +102,6 @@ */ public FObj(FONode parent) { super(parent); - -if (elementStringTable == null) { -elementStringTable = new HashMap(); -for (Iterator iter = -FOPropertyMapping.getElementStringMappings().iterator(); -iter.hasNext();) { -String elem = (String) iter.next(); -elementStringTable.put(elem, FOPropertyMapping.getElementStringMapping(elem)); -} -} if (propertyListTable == null) { propertyListTable = new Property.Maker[Constants.PROPERTY_COUNT+1]; 1.9 +23 -56xml-fop/src/java/org/apache/fop/fo/PropertyList.java Index: PropertyList.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/PropertyList.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- PropertyList.java 22 Dec 2003 23:23:05 - 1.8 +++ PropertyList.java 24 Dec 2003 00:06:14 - 1.9 @@ -124,7 +124,7 @@ private PropertyList parentPropertyList = null; private String namespace = ; -private String element = ; +private String elementName = ; private FObj fobj = null; /** @@ -132,14 +132,14 @@ * @param parentPropertyList the PropertyList belonging to the new objects * parent * @param space name of namespace - * @param el name of element + * @param elementName name of element */ public PropertyList(FObj fObjToAttach, PropertyList parentPropertyList, String space, String elementName) { this.fobj = fObjToAttach; this.parentPropertyList = parentPropertyList; this.namespace = space; -this.element = elementName; +this.elementName = elementName; } /** @@ -178,10 +178,10 @@ } Property p = getExplicitBaseProp(baseName); if (p == null) { -p = getShorthand(namespace, element, baseName); +p = getShorthand
cvs commit: xml-fop/src/java/org/apache/fop/traits LayoutProps.java SpaceVal.java
gmazza 2003/12/22 13:37:44 Modified:.build.xml src/codegen fo-property-mapping.xsl properties.xsl src/java/org/apache/fop/datatypes CondLength.java src/java/org/apache/fop/fo FObj.java Property.java PropertyList.java PropertyManager.java src/java/org/apache/fop/fo/flow Block.java TableRow.java src/java/org/apache/fop/fo/properties CommonBorderAndPadding.java src/java/org/apache/fop/layoutmgr PageLayoutManager.java src/java/org/apache/fop/render/rtf RTFHandler.java TableAttributesConverter.java TextAttributesConverter.java src/java/org/apache/fop/traits LayoutProps.java SpaceVal.java Added: src/codegen prop-val-enum-interfaces.xsl src/java/org/apache/fop/fo Constants.java Removed: src/codegen enumgen.xsl src/java/org/apache/fop/fo/properties Constants.java Log: 1.) renamed enumgen.xsl to longer but hopefully clearer prop-val-enum-interfaces.xsl 2.) Moved Constants.java from fo.properties to fo package, to reduce the need for layout and renderers to import directly from the properties package. Revision ChangesPath 1.95 +1 -2 xml-fop/build.xml Index: build.xml === RCS file: /home/cvs/xml-fop/build.xml,v retrieving revision 1.94 retrieving revision 1.95 diff -u -r1.94 -r1.95 --- build.xml 20 Dec 2003 17:40:01 - 1.94 +++ build.xml 22 Dec 2003 21:37:43 - 1.95 @@ -209,7 +209,6 @@ property name=colorkw.xml value=${build.codegen}/colorkw.xml/ property name=properties.xsl value=${build.codegen}/properties.xsl/ -property name=enumgen.xsl value=${build.codegen}/enumgen.xsl/ property name=propinc.xsl value=${build.codegen}/propinc.xsl/ property name=src.charlist.xsl value=${src.codegen}/code-point-mapping.xsl/ property name=encodings.xml value=${build.codegen}/encodings.xml/ @@ -355,7 +354,7 @@ out=${build.gensrc}/${replacestring}/fo/properties/fo_${ignore_this}/ style in=${foproperties.xml} style=${build.codegen}/fo-property-mapping.xsl out=${build.gensrc}/${replacestring}/fo/properties/FOPropertyMapping.java/ -style in=${foproperties.xml} style=${enumgen.xsl} +style in=${foproperties.xml} style=${build.codegen}/prop-val-enum-interfaces.xsl out=${build.gensrc}/${replacestring}/fo/properties/foenums_${ignore_this}/ style in=${encodings.xml} style=${charlist.xsl} out=${build.gensrc}/${replacestring}/fonts//CodePointMapping.java/ 1.4 +2 -1 xml-fop/src/codegen/fo-property-mapping.xsl Index: fo-property-mapping.xsl === RCS file: /home/cvs/xml-fop/src/codegen/fo-property-mapping.xsl,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- fo-property-mapping.xsl 22 Dec 2003 03:53:31 - 1.3 +++ fo-property-mapping.xsl 22 Dec 2003 21:37:43 - 1.4 @@ -104,6 +104,7 @@ import java.util.HashMap; import java.util.Set; +import org.apache.fop.fo.Constants; import org.apache.fop.fo.Property; //import org.apache.fop.svg.*; 1.23 +2 -1 xml-fop/src/codegen/properties.xsl Index: properties.xsl === RCS file: /home/cvs/xml-fop/src/codegen/properties.xsl,v retrieving revision 1.22 retrieving revision 1.23 diff -u -r1.22 -r1.23 --- properties.xsl22 Dec 2003 03:53:31 - 1.22 +++ properties.xsl22 Dec 2003 21:37:43 - 1.23 @@ -311,6 +311,7 @@ redirect:write select=concat($classname, '.java') xsl:textpackage org.apache.fop.fo.properties; +import org.apache.fop.fo.Constants; /xsl:text xsl:if test=.//keyword-equiv or ./name[.='generic-color'] xsl:text 1.1 xml-fop/src/codegen/prop-val-enum-interfaces.xsl Index: prop-val-enum-interfaces.xsl === !-- $Id: prop-val-enum-interfaces.xsl,v 1.1 2003/12/22 21:37:43 gmazza 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
cvs commit: xml-fop/src/codegen fo-property-mapping.xsl
gmazza 2003/12/22 13:50:58 Modified:src/codegen fo-property-mapping.xsl Log: Reversed order of code: add string constant first to HashMap, *then* create corresponding maker (latter classes weren't having access to the string constant in their constructors.) Revision ChangesPath 1.5 +2 -2 xml-fop/src/codegen/fo-property-mapping.xsl Index: fo-property-mapping.xsl === RCS file: /home/cvs/xml-fop/src/codegen/fo-property-mapping.xsl,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- fo-property-mapping.xsl 22 Dec 2003 21:37:43 - 1.4 +++ fo-property-mapping.xsl 22 Dec 2003 21:50:58 - 1.5 @@ -79,8 +79,8 @@ xsl:variable name=lcletters select='abcdefghijklmnopqrstuvwxyz-:' / xsl:variable name=ucletters select='ABCDEFGHIJKLMNOPQRSTUVWXYZ__' / xsl:variable name=enum select=translate($prop/name, $lcletters, $ucletters)/ -xsl:text/xsl:textxsl:value-of select=$htname/[PR_xsl:value-of select=$enum/] =xsl:value-of select=$makerclass/.maker(PR_xsl:value-of select=$enum/); xsl:textaddPropertyName(/xsl:textxsl:value-of select=$prop/name/, PR_xsl:value-of select=$enum/); +xsl:text/xsl:textxsl:value-of select=$htname/[PR_xsl:value-of select=$enum/] =xsl:value-of select=$makerclass/.maker(PR_xsl:value-of select=$enum/); /xsl:template - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/fo PropertySets.java FObj.java Property.java PropertyList.java PropertyManager.java
gmazza 2003/12/22 15:23:06 Modified:.build.xml src/java/org/apache/fop/fo FObj.java Property.java PropertyList.java PropertyManager.java Added: src/codegen property-sets.xsl src/java/org/apache/fop/fo PropertySets.java Log: Initial Check-in of PropertySets.java and .xsl. (Similar to Alt-Design's PropertySets, however uses integer arrays to identify those properties relevant for an FO.) Revision ChangesPath 1.96 +2 -0 xml-fop/build.xml Index: build.xml === RCS file: /home/cvs/xml-fop/build.xml,v retrieving revision 1.95 retrieving revision 1.96 diff -u -r1.95 -r1.96 --- build.xml 22 Dec 2003 21:37:43 - 1.95 +++ build.xml 22 Dec 2003 23:23:05 - 1.96 @@ -920,6 +920,8 @@ target name=xsltToJava style in=src\codegen\constants.xml style=src\codegen\constants.xsl out=Constants.java/ +style in=src/codegen/foelements.xml style=src/codegen/property-sets.xsl +out=PropertySets.java/ /target !-- === -- 1.1 xml-fop/src/codegen/property-sets.xsl Index: property-sets.xsl === !-- $Id: property-sets.xsl,v 1.1 2003/12/22 23:23:05 gmazza 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/. -- xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform; xsl:output method=text / xsl:include href=propinc.xsl/ xsl:template match=root xsl:text package org.apache.fop.fo; import java.util.BitSet; public class PropertySets { public static short[][] mapping = null; public static void initialize() { mapping = new short[Constants.ELEMENT_COUNT][]; /xsl:text xsl:apply-templates/ xsl:text boolean loop = true; while (loop) { loop = false; /xsl:text xsl:apply-templates mode=content/ } xsl:apply-templates mode=mapping/ xsl:text } private static short[] makeSparseIndices(BitSet set) { short[] indices = new short
cvs commit: xml-fop/src/java/org/apache/fop/fo FObj.java PropertyList.java
gmazza 2003/12/21 17:03:31 Modified:src/codegen fo-property-mapping.xsl src/java/org/apache/fop/fo FObj.java PropertyList.java Log: Removal of some of the temporary code elements (FO Element lists still pending.) Revision ChangesPath 1.2 +4 -10 xml-fop/src/codegen/fo-property-mapping.xsl Index: fo-property-mapping.xsl === RCS file: /home/cvs/xml-fop/src/codegen/fo-property-mapping.xsl,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- fo-property-mapping.xsl 20 Dec 2003 17:40:01 - 1.1 +++ fo-property-mapping.xsl 22 Dec 2003 01:03:31 - 1.2 @@ -79,7 +79,6 @@ xsl:variable name=lcletters select='abcdefghijklmnopqrstuvwxyz-:' / xsl:variable name=ucletters select='ABCDEFGHIJKLMNOPQRSTUVWXYZ__' / xsl:variable name=enum select=translate($prop/name, $lcletters, $ucletters)/ -xsl:text/xsl:textxsl:value-of select=$htname/String.put(xsl:value-of select=$prop/name/, xsl:value-of select=$makerclass/.maker(xsl:value-of select=$prop/name/)); xsl:text/xsl:textxsl:value-of select=$htname/[PR_xsl:value-of select=$enum/] =xsl:value-of select=$makerclass/.maker(xsl:value-of select=$prop/name/); xsl:textaddPropertyName(/xsl:textxsl:value-of select=$prop/name/, PR_xsl:value-of select=$enum/); /xsl:template @@ -111,7 +110,6 @@ public class xsl:value-of select=@family/PropertyMapping implements Constants { private static Property.Maker[] s_htGeneric = new Property.Maker[PROPERTY_COUNT+1]; - private static HashMap s_htGenericString = new HashMap(); // temporary private static HashMap s_htElementStringLists = new HashMap();// temporary private static HashMap s_htElementLists = new HashMap(); private static HashMap s_htSubPropNames = new HashMap(); @@ -122,16 +120,12 @@ xsl:apply-templates/ - public static HashMap getGenericStringMappings() { -return s_htGenericString; - } - - public static Set getElementStringMappings() { + public static Set getElementStringMappings() { // temporary return s_htElementStringLists.keySet(); } - public static HashMap getElementStringMapping(String elemName) { -return (HashMap)s_htElementStringLists.get(elemName); + public static HashMap getElementStringMapping(String elemName) { // temporary +return (HashMap) s_htElementStringLists.get(elemName); } public static Property.Maker[] getGenericMappings() { 1.24 +1 -7 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.23 retrieving revision 1.24 diff -u -r1.23 -r1.24 --- FObj.java 20 Dec 2003 17:40:01 - 1.23 +++ FObj.java 22 Dec 2003 01:03:31 - 1.24 @@ -69,7 +69,6 @@ public class FObj extends FONode { private static final String FO_URI = http://www.w3.org/1999/XSL/Format;; -public static HashMap propertyListStringTable = null; // temporary public static HashMap elementStringTable = null; // temporary public static Property.Maker[] propertyListTable = null; @@ -107,12 +106,7 @@ */ public FObj(FONode parent) { super(parent); -/* temporary, during conversions to int constants only -if (propertyListStringTable == null) { -propertyListStringTable = new HashMap(); - propertyListStringTable.putAll(FOPropertyMapping.getGenericStringMappings()); -} -*/ + if (elementStringTable == null) { elementStringTable = new HashMap(); for (Iterator iter = 1.6 +60 -45xml-fop/src/java/org/apache/fop/fo/PropertyList.java Index: PropertyList.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/PropertyList.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- PropertyList.java 20 Dec 2003 17:40:01 - 1.5 +++ PropertyList.java 22 Dec 2003 01:03:31 - 1.6 @@ -57,6 +57,7 @@ // FOP import org.apache.fop.apps.FOPException; import org.apache.fop.fo.Property.Maker; +import org.apache.fop.fo.properties.Constants; import org.apache.fop.fo.properties.FOPropertyMapping; import org.apache.fop.fo.properties.WritingMode; @@ -207,7 +208,7 @@ return null; } } -return (Property)super.get(propertyName); +return (Property) super.get(propertyName); } /** @@ -483,6 +484,7 @@ String attributeName, String
cvs commit: xml-fop/src/java/org/apache/fop/fo CharacterProperty.java ColorTypeProperty.java CondLengthProperty.java EnumProperty.java KeepProperty.java LengthPairProperty.java LengthProperty.java LengthRangeProperty.java ListProperty.java NumberProperty.java Property.java SpaceProperty.java StringProperty.java
gmazza 2003/12/21 19:53:31 Modified:src/codegen fo-property-mapping.xsl properties.xsl src/java/org/apache/fop/datatypes ToBeImplementedProperty.java src/java/org/apache/fop/fo CharacterProperty.java ColorTypeProperty.java CondLengthProperty.java EnumProperty.java KeepProperty.java LengthPairProperty.java LengthProperty.java LengthRangeProperty.java ListProperty.java NumberProperty.java Property.java SpaceProperty.java StringProperty.java Log: -- More of conversion of strings to integers: Makers now being created via int constants in fo.properties.Constants class. Temporary string-int conversions currently in Property.java and PropertyList.java, which converts strings from callers into ints for subsequent use. Revision ChangesPath 1.3 +11 -3 xml-fop/src/codegen/fo-property-mapping.xsl Index: fo-property-mapping.xsl === RCS file: /home/cvs/xml-fop/src/codegen/fo-property-mapping.xsl,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- fo-property-mapping.xsl 22 Dec 2003 01:03:31 - 1.2 +++ fo-property-mapping.xsl 22 Dec 2003 03:53:31 - 1.3 @@ -79,7 +79,7 @@ xsl:variable name=lcletters select='abcdefghijklmnopqrstuvwxyz-:' / xsl:variable name=ucletters select='ABCDEFGHIJKLMNOPQRSTUVWXYZ__' / xsl:variable name=enum select=translate($prop/name, $lcletters, $ucletters)/ -xsl:text/xsl:textxsl:value-of select=$htname/[PR_xsl:value-of select=$enum/] =xsl:value-of select=$makerclass/.maker(xsl:value-of select=$prop/name/); +xsl:text/xsl:textxsl:value-of select=$htname/[PR_xsl:value-of select=$enum/] =xsl:value-of select=$makerclass/.maker(PR_xsl:value-of select=$enum/); xsl:textaddPropertyName(/xsl:textxsl:value-of select=$prop/name/, PR_xsl:value-of select=$enum/); /xsl:template @@ -154,8 +154,16 @@ return i.intValue(); } + // returns a property, compound, or property.compound name public static String getPropertyName(int id) { -return (String) s_htPropIds.get(new Integer(id)); +if (((id amp; Constants.COMPOUND_MASK) == 0) +|| ((id amp; Constants.PROPERTY_MASK) == 0)) { +return (String) s_htPropIds.get(new Integer(id)); +} else { +return (String) s_htPropIds.get(new Integer( +id amp; Constants.PROPERTY_MASK)) + . + s_htPropIds.get( +new Integer(id amp; Constants.COMPOUND_MASK)); +} } static { 1.22 +32 -16xml-fop/src/codegen/properties.xsl Index: properties.xsl === RCS file: /home/cvs/xml-fop/src/codegen/properties.xsl,v retrieving revision 1.21 retrieving revision 1.22 diff -u -r1.21 -r1.22 --- properties.xsl20 Dec 2003 06:53:22 - 1.21 +++ properties.xsl22 Dec 2003 03:53:31 - 1.22 @@ -444,7 +444,7 @@ xsl:text { SP_/xsl:text xsl:value-of select=$spname/ - xsl:textMaker(String sPropName) { + xsl:textMaker(int sPropName) { super(sPropName); }/xsl:text xsl:for-each select=enumeration/value @@ -466,11 +466,19 @@ xsl:value-of select=$spname/ xsl:textMaker = new SP_/xsl:textxsl:value-of select=$spname/ - xsl:textMaker(/xsl:text - xsl:value-of select='../../name'/ - xsl:text./xsl:text - xsl:value-of select='name'/ - xsl:text);/xsl:text + xsl:textMaker(/xsl:text + xsl:if test=not(../../@type = 'generic') +xsl:textConstants.PR_/xsl:text +xsl:call-template name=makeEnumConstant + xsl:with-param name=propstr select=../../name/ +/xsl:call-template +xsl:text | /xsl:text + /xsl:if + xsl:textConstants.CP_/xsl:text + xsl:call-template name=makeEnumConstant +xsl:with-param name=propstr select=name/ + /xsl:call-template + xsl:text);/xsl:text /xsl:when xsl:otherwise xsl:text @@ -478,11 +486,19 @@ xsl:value-of select=$spname/ xsl:textMaker = new /xsl:textxsl:value-of select=$sp_superclass/ - xsl:text(/xsl:text - xsl:value-of select='../../name'/ - xsl:text./xsl:text - xsl:value-of select='name
cvs commit: xml-fop/src/java/org/apache/fop/fo FObj.java PropertyList.java
gmazza 2003/12/20 09:40:01 Modified:.build.xml src/java/org/apache/fop/fo FObj.java PropertyList.java Added: src/codegen fo-property-mapping.xsl Removed: src/codegen propmap.xsl Log: Property Makers now being activated via int constants. (Maker classes themselves, as well as code referencing the properties, still need conversion to int's. Also, HashMaps for String and Integer in FOPropertyMapping and FObj temporarily being retained for troubleshooting purposes.) Contribution mainly from Finn Bock (Bug #25480). Revision ChangesPath 1.94 +1 -2 xml-fop/build.xml Index: build.xml === RCS file: /home/cvs/xml-fop/build.xml,v retrieving revision 1.93 retrieving revision 1.94 diff -u -r1.93 -r1.94 --- build.xml 15 Dec 2003 01:07:50 - 1.93 +++ build.xml 20 Dec 2003 17:40:01 - 1.94 @@ -209,7 +209,6 @@ property name=colorkw.xml value=${build.codegen}/colorkw.xml/ property name=properties.xsl value=${build.codegen}/properties.xsl/ -property name=propmap.xsl value=${build.codegen}/propmap.xsl/ property name=enumgen.xsl value=${build.codegen}/enumgen.xsl/ property name=propinc.xsl value=${build.codegen}/propinc.xsl/ property name=src.charlist.xsl value=${src.codegen}/code-point-mapping.xsl/ @@ -354,7 +353,7 @@ style in=${foproperties.xml} style=${properties.xsl} out=${build.gensrc}/${replacestring}/fo/properties/fo_${ignore_this}/ -style in=${foproperties.xml} style=${propmap.xsl} +style in=${foproperties.xml} style=${build.codegen}/fo-property-mapping.xsl out=${build.gensrc}/${replacestring}/fo/properties/FOPropertyMapping.java/ style in=${foproperties.xml} style=${enumgen.xsl} out=${build.gensrc}/${replacestring}/fo/properties/foenums_${ignore_this}/ 1.1 xml-fop/src/codegen/fo-property-mapping.xsl Index: fo-property-mapping.xsl === !-- $Id: fo-property-mapping.xsl,v 1.1 2003/12/20 17:40:01 gmazza 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/. -- xsl:stylesheet version=1.0
cvs commit: xml-fop/src/java/org/apache/fop/render/rtf ListAttributesConverter.java RTFHandler.java TableAttributesConverter.java TextAttributesConverter.java
gmazza 2003/12/19 22:53:23 Modified:src/codegen properties.xsl src/java/org/apache/fop/area AreaTree.java src/java/org/apache/fop/fo FObj.java FObjMixed.java PropertyList.java PropertyManager.java src/java/org/apache/fop/fo/expr BodyStartFunction.java LabelEndFunction.java src/java/org/apache/fop/fo/flow BasicLink.java BidiOverride.java Block.java BlockContainer.java Character.java ExternalGraphic.java Float.java InitialPropertySet.java Inline.java InlineContainer.java InstreamForeignObject.java Leader.java ListBlock.java ListItem.java ListItemBody.java ListItemLabel.java Marker.java MultiCase.java MultiPropertySet.java MultiSwitch.java MultiToggle.java PageNumber.java PageNumberCitation.java RetrieveMarker.java Table.java TableAndCaption.java TableBody.java TableCaption.java TableCell.java TableColumn.java TableRow.java src/java/org/apache/fop/fo/pagination ColorProfile.java ConditionalPageMasterReference.java PageSequence.java PageSequenceMaster.java Region.java RegionBA.java RegionBASE.java RegionBody.java Root.java SimplePageMaster.java Title.java src/java/org/apache/fop/fonts FontSetup.java src/java/org/apache/fop/layoutmgr AddLMVisitor.java BlockContainerLayoutManager.java PageLayoutManager.java src/java/org/apache/fop/render/awt AWTRenderer.java src/java/org/apache/fop/render/ps AbstractPSDocumentGraphics2D.java AbstractPSTranscoder.java src/java/org/apache/fop/render/rtf ListAttributesConverter.java RTFHandler.java TableAttributesConverter.java TextAttributesConverter.java Log: 1. Moved static element and property structures from PropertyList (previously in former PropertyListBuilder) to FObj 2. Renamed FObj properties instance variable to propertyList (reduces confusion on the type of object holding FO property information in the code) 3. Unneeded imports removed (Finn Bock's patch, Bug #25582). Revision ChangesPath 1.21 +2 -2 xml-fop/src/codegen/properties.xsl http://cvs.apache.org/viewcvs/xml-fop/src/codegen/properties.xsl.diff?r1=1.20r2=1.21 1.7 +0 -1 xml-fop/src/java/org/apache/fop/area/AreaTree.java http://cvs.apache.org/viewcvs/xml-fop/src/java/org/apache/fop/area/AreaTree.java.diff?r1=1.6r2=1.7 1.22 +34 -13xml-fop/src/java/org/apache/fop/fo/FObj.java http://cvs.apache.org/viewcvs/xml-fop/src/java/org/apache/fop/fo/FObj.java.diff?r1=1.21r2=1.22 1.17 +1 -1 xml-fop/src/java/org/apache/fop/fo/FObjMixed.java http://cvs.apache.org/viewcvs/xml-fop/src/java/org/apache/fop/fo/FObjMixed.java.diff?r1=1.16r2=1.17 1.4 +4 -25 xml-fop/src/java/org/apache/fop/fo/PropertyList.java http://cvs.apache.org/viewcvs/xml-fop/src/java/org/apache/fop/fo/PropertyList.java.diff?r1=1.3r2=1.4 1.15 +65 -65xml-fop/src/java/org/apache/fop/fo/PropertyManager.java http://cvs.apache.org/viewcvs/xml-fop/src/java/org/apache/fop/fo/PropertyManager.java.diff?r1=1.14r2=1.15 1.3 +1 -1 xml-fop/src/java/org/apache/fop/fo/expr/BodyStartFunction.java http://cvs.apache.org/viewcvs/xml-fop/src/java/org/apache/fop/fo/expr/BodyStartFunction.java.diff?r1=1.2r2=1.3 1.3 +1 -1 xml-fop/src/java/org/apache/fop/fo/expr/LabelEndFunction.java http://cvs.apache.org/viewcvs/xml-fop/src/java/org/apache/fop/fo/expr/LabelEndFunction.java.diff?r1=1.2r2=1.3 1.7 +17 -17xml-fop/src/java/org/apache/fop/fo/flow/BasicLink.java http://cvs.apache.org/viewcvs/xml-fop/src/java/org/apache/fop/fo/flow/BasicLink.java.diff?r1=1.6r2=1.7 1.7 +10 -10xml-fop/src/java/org/apache/fop/fo/flow/BidiOverride.java http://cvs.apache.org/viewcvs/xml-fop/src/java/org/apache/fop/fo/flow/BidiOverride.java.diff?r1=1.6r2=1.7 1.9 +42 -42xml-fop/src/java/org/apache/fop/fo/flow/Block.java http://cvs.apache.org/viewcvs/xml-fop/src/java/org/apache/fop/fo/flow/Block.java.diff?r1=1.8r2=1.9 1.7 +19 -19xml-fop/src/java/org/apache/fop/fo/flow/BlockContainer.java http://cvs.apache.org/viewcvs/xml-fop/src/java/org/apache/fop/fo/flow/BlockContainer.java.diff?r1=1.6r2=1.7 1.9 +22 -22xml-fop/src/java/org
cvs commit: xml-fop/src/java/org/apache/fop/fo/properties Constants.java
gmazza 2003/12/18 15:37:45 Added: src/java/org/apache/fop/fo/properties Constants.java Removed: src/java/org/apache/fop/fo Constants.java Log: Place Constants.java file in wrong location. Revision ChangesPath 1.1 xml-fop/src/java/org/apache/fop/fo/properties/Constants.java Index: Constants.java === /* $Id: Constants.java,v 1.1 2003/12/18 23:37:45 gmazza 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.properties; public interface Constants { // element constants int FO_BASIC_LINK = 1; int FO_BIDI_OVERRIDE = 2; int FO_BLOCK = 3; int FO_BLOCK_CONTAINER = 4; int FO_CHARACTER = 5; int FO_COLOR_PROFILE = 6; int FO_CONDITIONAL_PAGE_MASTER_REFERENCE = 7; int FO_DECLARATION = 8; int FO_EXTERNAL_GRAPHIC = 9; int FO_FLOAT = 10; int FO_FLOW = 11; int FO_FOOTNOTE = 12; int FO_FOOTNOTE_BODY = 13; int FO_INITIAL_PROPERTY_SET = 14; int FO_INLINE = 15; int FO_INLINE_CONTAINER = 16; int FO_INSTREAM_FOREIGN_OBJECT = 17; int FO_LAYOUT_MASTER_SET = 18; int FO_LEADER = 19; int FO_LIST_BLOCK = 20; int FO_LIST_ITEM = 21; int FO_LIST_ITEM_BODY = 22; int FO_LIST_ITEM_LABEL = 23; int FO_MARKER = 24; int FO_MULTI_CASE = 25; int FO_MULTI_PROPERTIES = 26; int FO_MULTI_PROPERTY_SET = 27; int FO_MULTI_SWITCH = 28; int FO_MULTI_TOGGLE = 29; int FO_PAGE_NUMBER = 30; int FO_PAGE_NUMBER_CITATION = 31; int FO_PAGE_SEQUENCE = 32; int FO_PAGE_SEQUENCE_MASTER = 33; int FO_REGION_AFTER = 34; int FO_REGION_BEFORE = 35; int FO_REGION_BODY = 36; int FO_REGION_END = 37; int FO_REGION_START = 38; int FO_REPEATABLE_PAGE_MASTER_ALTERNATIVES = 39; int FO_REPEATABLE_PAGE_MASTER_REFERENCE = 40; int FO_RETRIEVE_MARKER = 41; int FO_ROOT = 42; int FO_SIMPLE_PAGE_MASTER = 43; int FO_SINGLE_PAGE_MASTER_REFERENCE = 44; int FO_STATIC_CONTENT = 45; int FO_TABLE
cvs commit: xml-fop/src/documentation/content/xdocs book.xml team.xml
gmazza 2003/12/18 17:08:42 Modified:src/documentation/content/xdocs book.xml team.xml Log: Updates to team page. Revision ChangesPath 1.28 +2 -2 xml-fop/src/documentation/content/xdocs/book.xml Index: book.xml === RCS file: /home/cvs/xml-fop/src/documentation/content/xdocs/book.xml,v retrieving revision 1.27 retrieving revision 1.28 diff -u -r1.27 -r1.28 --- book.xml 26 Nov 2003 01:12:46 - 1.27 +++ book.xml 19 Dec 2003 01:08:42 - 1.28 @@ -47,11 +47,11 @@ menu label=Project menu-item label=News href=news.html/ - menu-item label=Logo contest href=logocontest.html/ + menu-item label=Who We Are href=team.html/ menu-item label=Status href=status.html/ + menu-item label=Logo contest href=logocontest.html/ menu-item label=Changes href=changes.html/ menu-item label=Todo href=todo.html/ - menu-item label=Team href=team.html/ /menu /book 1.21 +13 -6 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.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- team.xml 16 Nov 2003 19:02:51 - 1.20 +++ team.xml 19 Dec 2003 01:08:42 - 1.21 @@ -19,9 +19,12 @@ independence and is having fun working on open source projects like Apache FOP. He's also the creator of fork href=http://www.krysalis.org/barcode;Krysalis Barcode/fork. /li -li id=gmlink href=mailto:[EMAIL PROTECTED]Glen Mazza/link (GM) is an information systems analyst - with EDS in Arlington, Virginia, USA./li -li id=wvmlink href=mailto:[EMAIL PROTECTED]Victor Mote/link (WVM) is the founder and manager of jump href=http://www.outfitr.com;Enterprise Outfitters/jump, a business software company, and of jump href=http://www.portagepub.com;Portage Publications/jump, a republisher of old documents. Both are located in Colorado Springs, Colorado, USA./li +li id=gmlink href=mailto:[EMAIL PROTECTED]Glen Mazza/link (GM) is an information +systems analyst with EDS in Arlington, Virginia, USA./li +li id=wvmlink href=mailto:[EMAIL PROTECTED]Victor Mote/link (WVM) is the founder and +manager of jump href=http://www.outfitr.com;Enterprise Outfitters/jump, a business +software company, and of jump href=http://www.portagepub.com;Portage Publications/jump, +a republisher of old documents. Both are located in Colorado Springs, Colorado, USA./li li id=jplink href=mailto:[EMAIL PROTECTED]J#x00F6;rg Pietschmann/link (JP)/li li id=otlink href=mailto:[EMAIL PROTECTED]Oleg Tkachenko/link (OT)/li li id=pbwlink href=mailto:[EMAIL PROTECTED]Peter B. West/link (PBW)/li @@ -30,8 +33,12 @@ section id=contribute-active titleActive Contributors/title ul -lilink href=mailto:[EMAIL PROTECTED]Marcelo Jaccoud Amaral/link/li -lilink href=mailto:[EMAIL PROTECTED]Rhett Aultman/link/li +lilink href=mailto:[EMAIL PROTECTED]John Austin/link is an +is an independent software developer currently based in St John's, +Newfoundland. While developing a taste for good seafood, he still isn't ready +for seal flipper (even if it's fresh). He is currently assisting the FOP +project on memory and performance issues./li +lilink href=mailto:[EMAIL PROTECTED]Finn Bock/link/li lilink href=mailto:[EMAIL PROTECTED]Chris Bowditch/link/li lilink href=mailto:[EMAIL PROTECTED]Andreas Delmelle/link/li lilink href=mailto:[EMAIL PROTECTED]Peter Herweg/link is helping to - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/layoutmgr LineLayoutManager.java
gmazza 2003/12/15 14:39:01 Modified:src/java/org/apache/fop/layoutmgr LineLayoutManager.java Log: Hyphenation/Quotation problem fixed (quoted strings not breaking properly.) Patch #25512 by Simon Pepping (spepping at leverkruid dot nl). Revision ChangesPath 1.7 +15 -1 xml-fop/src/java/org/apache/fop/layoutmgr/LineLayoutManager.java Index: LineLayoutManager.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/LineLayoutManager.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- LineLayoutManager.java1 Dec 2003 04:47:00 - 1.6 +++ LineLayoutManager.java15 Dec 2003 22:39:01 - 1.7 @@ -322,7 +322,7 @@ prevBP = getBestBP(vecPossEnd); } // Backup child LM if necessary -if (bp != prevBP !prevBP.couldEndLine()) { +if (bp != prevBP !prevCouldEndLine(prevBP)) { reset(); } @@ -394,6 +394,20 @@ /** Line area is always considered to act as a fence. */ protected boolean hasTrailingFence(boolean bNotLast) { return true; +} + +/** Test whether all breakposs in vecInlineBreaks +back to and including prev could end line */ +private boolean prevCouldEndLine(BreakPoss prev) { +ListIterator bpIter = +vecInlineBreaks.listIterator(vecInlineBreaks.size()); +boolean couldEndLine = true; +while (bpIter.hasPrevious()) { +BreakPoss bp = (BreakPoss) bpIter.previous(); +couldEndLine = bp.couldEndLine(); +if (!couldEndLine || bp == prev) break; +} +return couldEndLine; } private HyphContext getHyphenContext(BreakPoss prev, - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/svg PDFDocumentGraphics2D.java PDFGraphics2D.java
gmazza 2003/12/12 14:37:39 Modified:src/java/org/apache/fop/pdf PDFResources.java src/java/org/apache/fop/render PrintRenderer.java src/java/org/apache/fop/render/mif MIFHandler.java src/java/org/apache/fop/render/pdf PDFRenderer.java src/java/org/apache/fop/render/ps AbstractPSDocumentGraphics2D.java PSDocumentGraphics2D.java PSRenderer.java src/java/org/apache/fop/render/rtf RTFHandler.java src/java/org/apache/fop/render/xml XMLRenderer.java src/java/org/apache/fop/svg PDFDocumentGraphics2D.java PDFGraphics2D.java Added: src/java/org/apache/fop/fonts EmbedFontInfo.java FontSetup.java FontTriplet.java Removed: src/java/org/apache/fop/render/pdf EmbedFontInfo.java FontSetup.java FontTriplet.java Log: Moved FontSetup and two helper classes from render.pdf to fonts package. FontSetup has the PDF fonts as the default, but this class can be extended if/when another renderer needs its own font setups. (Cannot do this, however, for AWT's FontSetup at the moment, because its setup() has a different signature.) Revision ChangesPath 1.1 xml-fop/src/java/org/apache/fop/fonts/EmbedFontInfo.java Index: EmbedFontInfo.java === /* * $Id: EmbedFontInfo.java,v 1.1 2003/12/12 22:37:38 gmazza 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.fonts; import java.util.List; /** * FontInfo contains meta information on fonts (where is the metrics file etc.) */ public class EmbedFontInfo { private String metricsFile, embedFile; private boolean kerning; private List fontTriplets; /** * Main constructor * @param metricsFile Path to the xml file containing font metrics * @param kerning True if kerning should be enabled * @param fontTriplets List of font triplets to associate with this font
cvs commit: xml-fop/src/java/org/apache/fop/layoutmgr LineLayoutManager.java
gmazza 2003/11/30 20:47:00 Modified:src/java/org/apache/fop/layoutmgr LineLayoutManager.java Log: Hyphenation improvements from Simon Pepping (Bugs #25031 and #25059) added. Revision ChangesPath 1.6 +20 -10xml-fop/src/java/org/apache/fop/layoutmgr/LineLayoutManager.java Index: LineLayoutManager.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/LineLayoutManager.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- LineLayoutManager.java16 Oct 2003 23:54:21 - 1.5 +++ LineLayoutManager.java1 Dec 2003 04:47:00 - 1.6 @@ -252,14 +252,14 @@ } inlineLC.setHyphContext( - getHyphenContext(prevBP, bp)); + getHyphenContext((prevBP == null) ? prev : prevBP, bp)); if (inlineLC.getHyphContext() == null) { break; } inlineLC.setFlags(LayoutContext.TRY_HYPHENATE, true); // Reset to previous acceptable break -reset(); +resetBP((prevBP == null) ? prev : prevBP); } else { /* If we are not in justified text, we can end the line at * prevBP. @@ -313,6 +313,7 @@ return null; } if (prevBP == null) { +vecInlineBreaks.add(bp); prevBP = bp; } @@ -335,11 +336,19 @@ return makeLineBreak(iPrevLineEnd, availIPD, talign); } -private void reset() { -while (vecInlineBreaks.get(vecInlineBreaks.size() - 1) != prevBP) { -vecInlineBreaks.remove(vecInlineBreaks.size() - 1); +private void resetBP(BreakPoss resetBP) { +if (resetBP == null) { +reset((Position) null); +} else { +while (vecInlineBreaks.get(vecInlineBreaks.size() - 1) != resetBP) { +vecInlineBreaks.remove(vecInlineBreaks.size() - 1); +} +reset(resetBP.getPosition()); } -reset(prevBP.getPosition()); +} + +private void reset() { +resetBP(prevBP); } protected boolean couldEndLine(BreakPoss bp) { @@ -398,19 +407,20 @@ vecInlineBreaks.listIterator(vecInlineBreaks.size()); while (bpIter.hasPrevious() bpIter.previous() != prev) { } -if (bpIter.next() != prev) { +if (prev != null bpIter.next() != prev) { getLogger().error(findHyphenPoss: problem!); return null; } StringBuffer sbChars = new StringBuffer(30); while (bpIter.hasNext()) { BreakPoss bp = (BreakPoss) bpIter.next(); -if (bp.getLayoutManager() == prev.getLayoutManager()) { +if (prev != null +bp.getLayoutManager() == prev.getLayoutManager()) { bp.getLayoutManager().getWordChars(sbChars, - prev.getPosition(), bp.getPosition()); +prev.getPosition(), bp.getPosition()); } else { bp.getLayoutManager().getWordChars(sbChars, null, - bp.getPosition()); +bp.getPosition()); } prev = bp; } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]