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. * * 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. * * 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 == nu
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
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/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 @@ +line-height="14pt"> XML Recommendation - p. 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 @@ - - - - - - - 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 @@ - - + + + + - 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
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. - + Logging 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 + below for more information. + + + Call setLogger(Logger) always immediately after + instantiating the Driver object. See here: + + + + + +Logging (Upcoming FOP 1.0 Version only) + + 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 below for more information. @@ -160,7 +185,7 @@ Controlling logging - FOP uses the + Current FOP 0.20.x production uses the http://avalon.apache.org/framework/api/org/apache/avalon/framework/logger/package-summary.html";>Logger package from Apache Avalon Framework to do logging. See the http://avalon.apache.org/framework/";>Apache Avalon Framework - 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.debu
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) &
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/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 @@ ExampleObj2PDF.java http://cvs.apache.org/viewcvs.cgi/xml-fop/examples/embedding/java/embedding/ExampleObj2PDF.java?rev=HEAD";> -The last example -here combines the previous and the third to demonstrate +This example +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 @@ + +ExampleDOM2PDF.java + +http://cvs.apache.org/viewcvs.cgi/xml-fop/examples/embedding/java/embedding/ExampleDOM2PDF.java?rev=HEAD";> +This example +has FOP use a DOMSource instead of a StreamSource in order to +use a DOM tree as input for an XSL transformation. + + + +ExampleSVG2PDF.java (PDF Transcoder example) + +http://cvs.apache.org/viewcvs.cgi/xml-fop/examples/embedding/java/embedding/ExampleSVG2PDF.java?rev=HEAD";> +This example +shows use of the PDF Transcoder, a sub-application within FOP. +It is used to generate a PDF document from an SVG file. + + Final notes 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. - - -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. - 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 ExampleXML2PDF.java
gmazza 2004/04/01 15:24:57 Modified:examples/embedding build.xml examples/embedding/java/embedding ExampleDOM2PDF.java ExampleFO2PDF.java ExampleObj2PDF.java ExampleXML2PDF.java Log: Updated examples to use Commons-Logging. Revision ChangesPath 1.5 +19 -0 xml-fop/examples/embedding/build.xml Index: build.xml === RCS file: /home/cvs/xml-fop/examples/embedding/build.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- build.xml 27 Feb 2004 19:35:43 - 1.4 +++ build.xml 1 Apr 2004 23:24:57 - 1.5 @@ -39,6 +39,7 @@ + @@ -113,6 +114,24 @@ + + + + + + + + + + + + + + + + + + 1.5 +12 -10xml-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.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- ExampleDOM2PDF.java 27 Feb 2004 17:34:50 - 1.4 +++ ExampleDOM2PDF.java 1 Apr 2004 23:24:57 - 1.5 @@ -33,10 +33,11 @@ import org.w3c.dom.Node; import org.w3c.dom.Text; -// Avalon +//Avalon import org.apache.avalon.framework.ExceptionUtil; -import org.apache.avalon.framework.logger.ConsoleLogger; -import org.apache.avalon.framework.logger.Logger; + +// Commons-Logging +import org.apache.commons.logging.impl.SimpleLog; //FOP import org.apache.fop.apps.Driver; @@ -60,18 +61,19 @@ */ public void convertDOM2PDF(Document xslfoDoc, File pdf) throws IOException, FOPException { -//Construct driver +// Construct driver Driver driver = new Driver(); -//Setup logger -Logger logger = new ConsoleLogger(ConsoleLogger.LEVEL_INFO); -driver.enableLogging(logger); +// Setup logger +SimpleLog logger = new SimpleLog("log"); +logger.setLevel(SimpleLog.LOG_LEVEL_INFO); +driver.setLogger(logger); driver.initialize(); -//Setup Renderer (output format) +// Setup Renderer (output format) driver.setRenderer(Driver.RENDER_PDF); -//Setup output +// Setup output OutputStream out = new java.io.FileOutputStream(pdf); out = new java.io.BufferedOutputStream(out); 1.5 +10 -8 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.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- ExampleFO2PDF.java27 Feb 2004 17:34:50 - 1.4 +++ ExampleFO2PDF.java1 Apr 2004 23:24:57 - 1.5 @@ -29,8 +29,9 @@ //Avalon import org.apache.avalon.framework.ExceptionUtil; -import org.apache.avalon.framework.logger.Logger; -import org.apache.avalon.framework.logger.ConsoleLogger; + +// Commons-Logging +import org.apache.commons.logging.impl.SimpleLog; //FOP import org.apache.fop.apps.Driver; @@ -50,18 +51,19 @@ */ public void convertFO2PDF(File fo, File pdf) throws IOException, FOPException { -//Construct driver +// Construct driver Driver driver = new Driver(); -//Setup logger -Logger logger = new ConsoleLogger(ConsoleLogger.LEVEL_INFO); -driver.enableLogging(logger); +// Setup logger +SimpleLog logger = new SimpleLog("log"); +logger.setLevel(SimpleLog.LOG_LEVEL_INFO); +driver.setLogger(logger); driver.initialize(); -//Setup Renderer (output format) +// Setup Renderer (output format) driver.setRenderer(Driver.RENDER_PDF); -//Setup output +// Setup output OutputStream out = new java.io.FileOutputStream(pdf); out = new java.io.BufferedOutputStream(out); try { 1.5 +16 -14xml-fop/examples/embedding/java/embedding/ExampleObj
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.106&r2=1.107 1.18 +1 -0 xml-fop/fop.bat http://cvs.apache.org/viewcvs/xml-fop/fop.bat.diff?r1=1.17&r2=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.18&r2=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.6&r2=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.15&r2=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.11&r2=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.54&r2=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.5&r2=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.8&r2=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.3&r2=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.14&r2=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.15&r2=1.16 1.24 +2 -2 xml-fop/src/java/org/apache/fop/fo/FOTreeBuilder.java
cvs commit: xml-fop/lib commons-logging-1.0.3.jar commons-logging.LICENSE.txt
gmazza 2004/03/30 02:20:09 Added: lib commons-logging-1.0.3.jar commons-logging.LICENSE.txt Log: Import of commons-logging library. Revision ChangesPath 1.1 xml-fop/lib/commons-logging-1.0.3.jar <> 1.1 xml-fop/lib/commons-logging.LICENSE.txt Index: commons-logging.LICENSE.txt === /* * $Header: /home/cvs/xml-fop/lib/commons-logging.LICENSE.txt,v 1.1 2004/03/30 10:20:09 gmazza Exp $ * $Revision: 1.1 $ * $Date: 2004/03/30 10:20:09 $ * * * * 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 * modification, 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 acknowlegement: * "This product includes software developed by the *Apache Software Foundation (http://www.apache.org/)." *Alternately, this acknowlegement may appear in the software itself, *if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Commons", 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 names without prior written *permission of the Apache Group. * * 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 (INCLUDING, 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. For more * information on the Apache Software Foundation, please see * <http://www.apache.org/>. * */ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/examples/fo/pagination franklin_rep.fo franklin_rep_max_repeats_nl.fo
gmazza 2004/03/22 15:55:54 Modified:examples/fo/pagination franklin_rep.fo Removed: examples/fo/pagination franklin_rep_max_repeats_nl.fo Log: Combined franklin_rep.fo and franklin_rep_max_repeats_nl.fo (they were essentially equivalent). Revision ChangesPath 1.4 +45 -43xml-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.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- franklin_rep.fo 22 Feb 2004 13:37:06 - 1.3 +++ franklin_rep.fo 22 Mar 2004 23:55:54 - 1.4 @@ -6,20 +6,22 @@ - - - - + + + - + + @@ -73,7 +75,7 @@ @@ -98,7 +100,7 @@ @@ -142,7 +144,7 @@ @@ -173,7 +175,7 @@ @@ -190,7 +192,7 @@ @@ -222,7 +224,7 @@ @@ -241,7 +243,7 @@ @@ -257,7 +259,7 @@ @@ -286,7 +288,7 @@ @@ -302,7 +304,7 @@ @@ -319,7 +321,7 @@ @@ -341,7 +343,7 @@ @@ -357,7 +359,7 @@ @@ -370,7 +372,7 @@ @@ -396,7 +398,7 @@ @@ -419,7 +421,7 @@ @@ -452,7 +454,7 @@ @@ -468,7 +470,7 @@ @@ -490,7 +492,7 @@ @@ -517,7 +519,7 @@ @@ -546,7 +548,7 @@ @@ -576,7 +578,7 @@ @@ -605,7 +607,7 @@ @@ -625,7 +627,7 @@ @@ -680,7 +682,7 @@ @@ -698,7 +700,7 @@ @@ -734,7 +736,7 @@ @@ -791,7 +793,7 @@ @@ -848,7 +850,7 @@ @@ -861,7 +863,7 @@ @@ -882,7 +884,7 @@ @@ -925,7 +927,7 @@ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
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/examples/fo/pagination franklin_2pageseqs.fo franklin_alt.fo franklin_rep_max_repeats.fo franklin_rep_max_repeats_expl.fo franklin_rep_max_repeats_nl.fo
gmazza 2004/03/22 15:24:52 Modified:examples/fo/pagination franklin_2pageseqs.fo franklin_alt.fo franklin_rep_max_repeats.fo franklin_rep_max_repeats_expl.fo franklin_rep_max_repeats_nl.fo Log: Minor formatting and naming issues fixed. Revision ChangesPath 1.4 +8 -8 xml-fop/examples/fo/pagination/franklin_2pageseqs.fo Index: franklin_2pageseqs.fo === RCS file: /home/cvs/xml-fop/examples/fo/pagination/franklin_2pageseqs.fo,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- franklin_2pageseqs.fo 22 Feb 2004 13:37:06 - 1.3 +++ franklin_2pageseqs.fo 22 Mar 2004 23:24:52 - 1.4 @@ -6,14 +6,14 @@ - - + + - - - - + + + + - - - - + + + - - + 1.4 +3 -3 xml-fop/examples/fo/pagination/franklin_rep_max_repeats_expl.fo Index: franklin_rep_max_repeats_expl.fo === RCS file: /home/cvs/xml-fop/examples/fo/pagination/franklin_rep_max_repeats_expl.fo,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- franklin_rep_max_repeats_expl.fo 22 Feb 2004 13:37:06 - 1.3 +++ franklin_rep_max_repeats_expl.fo 22 Mar 2004 23:24:52 - 1.4 @@ -6,7 +6,7 @@ - - - + 1.4 +6 -6 xml-fop/examples/fo/pagination/franklin_rep_max_repeats_nl.fo Index: franklin_rep_max_repeats_nl.fo === RCS file: /home/cvs/xml-fop/examples/fo/pagination/franklin_rep_max_repeats_nl.fo,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- franklin_rep_max_repeats_nl.fo22 Feb 2004 13:37:06 - 1.3 +++ franklin_rep_max_repeats_nl.fo22 Mar 2004 23:24:52 - 1.4 @@ -6,22 +6,22 @@ - - - - + + + - - + - 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
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 @@ 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. If this width is less than the inline areas then the width @@ -733,17 +733,17 @@ Characters: -abcd +abcdEnd Set width: abcd +leader-pattern-width="50pt">abcdEnd Small Width: abcd + leader-pattern-width="2pt">abcdEnd SVG: @@ -754,7 +754,7 @@ - +End Mixed: @@ -766,7 +766,7 @@ - +End Mixed: @@ -779,7 +779,7 @@ def - +End 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/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 @@ - - - 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/PSXMLHandler.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- PSXMLHandler.java 19 Mar 2004 00:53:38 - 1.11 +++ PSXMLHandler.java 21 Mar 2004 12:38:56 - 1.12 @@ -257,8 +257,9 @@ PSGenerator gen = psInfo.psGenerator; SVGUserAgent ua - = new SVGUserAgent(context.getUserAgent(), new AffineTransform()); - + = new SVGUserAgent(context.getUserAg
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/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 @@ No, default is false - + Base directory to resolve relative references (e.g., graphics files) within the +FO document. + + No, for single FO File entry, default is to use the location +of that FO file. + + + + relativebase + For fileset usage only. A value of true 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 false specifies using the value of +basedir for all files within the fileset, or just the current working directory +if basedir is not specified. + + No, default is false. + + userconfig User configuration file (same as the FOP "-c" command line option) - 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/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. -SVGElement, SVGElementMapping, SVGObj and SVGUserAgent are used by +SVGElement, SVGElementMapping and SVGObj are used by FOP for handling embedded SVG or external SVG graphics. 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
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/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: 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" Break
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/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-fop>fop 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 @@
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
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 @@ http://www.w3.org/1999/XSL/Format";> - - - - - - - - - + + + + + + + + 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 @@ http://www.w3.org/1999/XSL/Format";> - http://www.w3.org/1999/XSL/Format";> - http://www.w3.org/1999/XSL/Format";> - http://www.w3.org/1999/XSL/Format";> - + http://www.w3.org/1999/XSL/Format";> - - - + + - - + + - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/fo/pagination PageSequenceMaster.java
gmazza 2004/03/09 13:50:43 Modified:src/java/org/apache/fop/fo/pagination PageSequenceMaster.java Log: Fixed bug, masterName variable wasn't being set. Revision ChangesPath 1.7 +4 -4 xml-fop/src/java/org/apache/fop/fo/pagination/PageSequenceMaster.java Index: PageSequenceMaster.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/pagination/PageSequenceMaster.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- PageSequenceMaster.java 27 Feb 2004 17:45:13 - 1.6 +++ PageSequenceMaster.java 9 Mar 2004 21:50:43 - 1.7 @@ -68,12 +68,12 @@ if (parent.getName().equals("fo:layout-master-set")) { this.layoutMasterSet = (LayoutMasterSet)parent; -String pm = this.propertyList.get(Constants.PR_MASTER_NAME).getString(); -if (pm == null) { +masterName = this.propertyList.get(Constants.PR_MASTER_NAME).getString(); +if (masterName == null) { getLogger().warn("page-sequence-master does not have " + "a master-name and so is being ignored"); } else { -this.layoutMasterSet.addPageSequenceMaster(pm, this); +this.layoutMasterSet.addPageSequenceMaster(masterName, this); } } else { throw new FOPException("fo:page-sequence-master must be child " @@ -147,7 +147,7 @@ } getLogger().warn("subsequences exhausted in page-sequence-master '" + masterName - + "', use previous subsequence"); + + "', using previous subsequence"); currentSubSequence.reset(); canRecover = false; } else { - 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 @@ + 7 March 2004 - New Committer + Welcome Web Maestro Clay Leeds! + + 10 January 2004 - New Committers Welcome Chris Bowditch and Andreas Delmelle! - 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
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/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"); /* ch
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/25 03:52:32 Modified:src/java/org/apache/fop/render AbstractRenderer.java Renderer.java src/java/org/apache/fop/render/xml XMLRenderer.java Log: Changed internal renderInlineXXX() functions from public to protected access. Removed need for renderers to specifically implement them in Renderer interface. Revision ChangesPath 1.23 +6 -6 xml-fop/src/java/org/apache/fop/render/AbstractRenderer.java Index: AbstractRenderer.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/render/AbstractRenderer.java,v retrieving revision 1.22 retrieving revision 1.23 diff -u -r1.22 -r1.23 --- AbstractRenderer.java 25 Feb 2004 03:32:17 - 1.22 +++ AbstractRenderer.java 25 Feb 2004 11:52:32 - 1.23 @@ -639,12 +639,12 @@ /** @see org.apache.fop.render.Renderer */ -public void renderCharacter(Character ch) { +protected void renderCharacter(Character ch) { currentBlockIPPosition += ch.getWidth(); } /** @see org.apache.fop.render.Renderer */ -public void renderInlineSpace(Space space) { +protected void renderInlineSpace(Space space) { // an inline space moves the inline progression position // for the current block by the width or height of the space // it may also have styling (only on this object) that needs @@ -653,17 +653,17 @@ } /** @see org.apache.fop.render.Renderer */ -public void renderLeader(Leader area) { +protected void renderLeader(Leader area) { currentBlockIPPosition += area.getWidth(); } /** @see org.apache.fop.render.Renderer */ -public void renderText(TextArea text) { +protected void renderText(TextArea text) { currentBlockIPPosition += text.getWidth(); } /** @see org.apache.fop.render.Renderer */ -public void renderInlineParent(InlineParent ip) { +protected void renderInlineParent(InlineParent ip) { int saveIP = currentBlockIPPosition; Iterator iter = ip.getChildAreas().iterator(); while (iter.hasNext()) { @@ -673,7 +673,7 @@ } /** @see org.apache.fop.render.Renderer */ -public void renderViewport(Viewport viewport) { +protected void renderViewport(Viewport viewport) { Area content = viewport.getContent(); int saveBP = currentBPPosition; currentBPPosition += viewport.getOffset(); 1.7 +0 -44 xml-fop/src/java/org/apache/fop/render/Renderer.java Index: Renderer.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/render/Renderer.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- Renderer.java 28 Oct 2003 04:22:14 - 1.6 +++ Renderer.java 25 Feb 2004 11:52:32 - 1.7 @@ -212,55 +212,11 @@ throws IOException, FOPException; /** - * Tells the renderer to render an inline viewport. It sets up clipping as - * necessary. - * - * @param viewport The viewport area - */ -void renderViewport(Viewport viewport); - -/** * Tells the renderer to render an inline container. * * @param cont The inline container area */ void renderContainer(Container cont); - -/** - * Tells the renderer to render an inline text area - * - * @param area The text area - */ -void renderText(TextArea area); - -/** - * Tells the renderer to render an inline parent area. - * - * @param ip The inline parent area - */ -void renderInlineParent(InlineParent ip); - -/** - * Tells the renderer to render an inline character. - * - * @param ch The inline character - */ -void renderCharacter( -org.apache.fop.area.inline.Character ch); - -/** - * Tells the renderer to render an inline space. - * - * @param space The inline space - */ -void renderInlineSpace(Space space); - -/** - * Tells the renderer to render an inline leader area. - * - * @param area The inline leader area. - */ -void renderLeader(Leader area); } 1.17 +6 -6 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.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- XMLRenderer.java 25 Feb 2004 03:32:17 - 1.16 +++ XMLRenderer.java 25 Feb 2004 11:52:32
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 @@ http://www.w3.org/1999/XSL/Format";> - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + 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 @@ http://www.w3.org/1999/XSL/Format"; xmlns:fox="http://xml.apache.org/fop/extensions";> - - + + 1.3 +13 -2 xml-fop/examples/fo/advanced/giro.fo Index: giro.fo === RCS file: /home/cvs/xml-fop/examples/fo/advanced/giro.fo,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- giro.fo 29 Jan 2003 16:07:16 - 1.2 +++ giro.fo 22 Feb 2004 13:37:06 - 1.3 @@ -1,11 +1,21 @@ http://www.w3.org/1999/XSL/Format";> + - + - + @@ -16,6 +26,7 @@ + 1.3 +26 -16xml-fop/examples/fo/basic/border.fo Index: border.fo === RCS file: /home/cvs/xml-fop/examples/fo/basic/border.fo,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- border.fo 29 Jan 2003 16:07:18 - 1.2 +++ border.fo 22 Feb 2004 13:37:06 - 1.3 @@ -1,27 +1,37 @@ http://www.w3.org/1999/XSL/Format";> - + - + + - - - - - - - - + + + + + + + + + 1.3 +9 -9 xml-fop/examples/fo/basic/fonts.fo Index: fonts.fo === RCS file: /home/cvs/xml-fop/examples/fo/basic/fonts.fo,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- fonts.fo 29 Jan 2003 16:07:19 - 1.2 +++ fonts.fo 22 Feb 2004 13:37:06 - 1.3 @@ -5,15 +5,15 @@ - - - +page-height="29.7cm" +page-width="21cm" +margin-top="1cm" +margin-bottom="2cm" +margin-left="2.5cm" +margin-right="2.5cm"> + + +
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/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 "); + } } 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 to use for parameter 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
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/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 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
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 @@ - - - - - + + + + + + 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 @@ http://www.w3.org/1999/XSL/Transform"; xmlns:fo="http://www.w3.org/1999/XSL/Format"; exclude-result-prefixes="fo"> + @@ -14,6 +15,8 @@ Project: + + Version - 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 ===
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 @@ + + + @@ -580,7 +583,7 @@ - + 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/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(""); super.renderBlock(block); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
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 --> - - +
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 { // element constants @@ -141,7 +133,75 @@ // Enumeration Interfaces - + +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; +} +} + + + + } @@ -177,7 +237,7 @@ extends -.Enums +Interface { 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; -import org.apache.fop.fo.properties.GenericSpace; - public interface Constants { // element constants @@ -121,7 +113,6 @@ int FO_WRAPPER = 56; int ELEMENT_COUNT = 56; - // Masks int COMPOUND_SHIFT = 9; int PROPERTY_MASK = (1 << COMPOUND_SHIFT)-1; @@ -378,7 +369,6 @@ int PR_XML_LANG = 246; int PR_Z_INDEX
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 @@ Active Committers +mailto:[EMAIL PROTECTED]">Finn Bock (FB) +mailto:[EMAIL PROTECTED]">Chris Bowditch (CB) +mailto:[EMAIL PROTECTED]">Andreas Delmelle (AD) mailto:[EMAIL PROTECTED]">Christian Geisert (CG) -mailto:[EMAIL PROTECTED]">Keiron Liddle (KLL) +mailto:[EMAIL PROTECTED]">Peter Herweg (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. mailto:[EMAIL PROTECTED]">Jeremias Märki (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 @@ mailto:[EMAIL PROTECTED]">Glen Mazza (GM) is an information systems analyst with EDS in Arlington, Virginia, USA. -mailto:[EMAIL PROTECTED]">Victor Mote (WVM) is the founder and -manager of http://www.outfitr.com";>Enterprise Outfitters, a business -software company, and of http://www.portagepub.com";>Portage Publications, -a republisher of old documents. Both are located in Colorado Springs, Colorado, USA. mailto:[EMAIL PROTECTED]">Jörg Pietschmann (JP) mailto:[EMAIL PROTECTED]">Oleg Tkachenko (OT) mailto:[EMAIL PROTECTED]">Peter B. West (PBW) @@ -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. -mailto:[EMAIL PROTECTED]">Finn Bock -mailto:[EMAIL PROTECTED]">Chris Bowditch -mailto:[EMAIL PROTECTED]">Andreas Delmelle -mailto:[EMAIL PROTECTED]">Peter Herweg 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. mailto:[EMAIL PROTECTED]">Clay Leeds is a web/WAP/Palm developer from Laguna Beach, California, USA. A recent XML/XSL-FO convert, he has been nit-picking FAQs & assorted web @@ -72,30 +67,26 @@ mailto:[EMAIL PROTECTED]">Stanislav Gorkhover mailto:[EMAIL PROTECTED]">Fotis Jannidis mailto:[EMAIL PROTECTED]">Karen Lease +mailto:[EMAIL PROTECTED]">Keiron Liddle +mailto:[EMAIL PROTECTED]">Victor Mote mailto:[EMAIL PROTECTED]">Jordan Naftolin mailto:[EMAIL PROTECTED]">Arved Sandstrom mailto:[EMAIL PROTECTED]">Eric Schaeffer mailto:[EMAIL PROTECTED]">Art Welch - - Former Contributors - -mailto:[EMAIL PROTECTED]">Mark Lillywhite - - Areas of Expertise CG - KLL - JM - GM - WVM - JP - OT + FB + JM + GM + PH + JP + OT PBW @@ -105,9 +96,9 @@ X + X - X Release manager @@ -134,7 +125,7 @@ Layout - X + @@ -156,7 +147,7 @@ SVG - X
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/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 @@ + + - + +--> http://www.w3.org/1999/XSL/Transform";> @@ -86,7 +86,6 @@ - @@ -100,7 +99,15 @@ -package org.apache.fop.fo.properties; +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 { @@ -114,7 +121,8 @@ int COMPOUND_SHIFT = 9; int PROPERTY_MASK = (1 << COMPOUND_SHIFT)-1; int COMPOUND_MASK = ~PROPERTY_MASK; - +int COMPOUND_COUNT = 11; + // property constants @@ -132,9 +140,57 @@ + // Enumeration Interfaces + + } + + + + + + + + + + + + + + + + + + + + + + + + + + +public interface + + + extends + +.Enums + + { + + +int + + = Constants. + +; + + } + + 1.32 +3 -3 xml-fop/src/codegen/properties.xsl Index: properties.xsl === RCS file: /home/cvs/xml-fop/src/codegen/properties.xsl,v retrieving revision 1.31 retrieving revision 1.32 diff -u -r1.31 -r1.32 --- properties.xsl10 Jan 2004 20:40:07 - 1.31 +++ properties.xsl17 Jan 2004 19:29:45 - 1.32 @@ -306,7 +306,7 @@ - implements + implements Constants @@ -758,7 +758,7 @@ int correspondingValue = correspondingProperty.getEnum(); -if (correspondingValue == +if (correspondingValue == Constants. ) computedProperty = new EnumPropert
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 @@ - - - - - - -public interface - - { - - - -int - - = Constants. - - ; - - -} - - - - - - - - - - - - - - - - - - -public interface - - extends - - .Enums { } - - - - - - -false - - - - - - - - - - - - - - - - - - - - - - - - - - -public interface - - extends - -.Enums. - - { } - - - - - - - - - - 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 @@ public interface - + extends .Enums @@ -106,9 +106,6 @@ ; - - - } - 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());
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/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 @@ + 10 January 2004 - New Committers + Welcome Chris Bowditch and Andreas Delmelle! + + + 4 January 2004 - New Committer + Welcome Finn Bock! + + + 29 November 2003 - New Committer + Welcome Peter Herweg! + + 18 July 2003 FOP 0.20.5 released Changes since 0.20.4 include: - 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 @@ (listprop); p = shparser.getValueForProperty( -getPropName(), this, propertyList); +getPropId(), this, propertyList); } } 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 Property.java
gmazza 2004/01/09 14:32:27 Modified:src/java/org/apache/fop/fo Property.java Log: Bug 25810 (Patch by Finn Bock) -- Support for inherit attribute value. Revision ChangesPath 1.14 +12 -8 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.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- Property.java 7 Jan 2004 22:50:51 - 1.13 +++ Property.java 9 Jan 2004 22:32:27 - 1.14 @@ -234,26 +234,30 @@ public Property make(PropertyList propertyList, String value, FObj fo) throws FOPException { try { -Property pret = null; +Property newProp = null; String pvalue = value; -pret = checkEnumValues(value); -if (pret == null) { +if ("inherit".equals(value)) { +newProp = propertyList.getFromParent(this.propId); +} else { +newProp = checkEnumValues(value); +} +if (newProp == null) { /* Check for keyword shorthand values to be substituted. */ pvalue = checkValueKeywords(value); // Override parsePropertyValue in each subclass of Property.Maker Property p = PropertyParser.parse(pvalue, new PropertyInfo(this, propertyList, fo)); -pret = convertProperty(p, propertyList, fo); +newProp = convertProperty(p, propertyList, fo); } else if (isCompoundMaker()) { -pret = convertProperty(pret, propertyList, fo); +newProp = convertProperty(newProp, propertyList, fo); } -if (pret == null) { +if (newProp == null) { throw new org.apache.fop.fo.expr.PropertyException("No conversion defined"); } else if (inheritsSpecified()) { -pret.setSpecifiedValue(pvalue); +newProp.setSpecifiedValue(pvalue); } -return pret; +return newProp; } catch (org.apache.fop.fo.expr.PropertyException propEx) { String propName = FOPropertyMapping.getPropertyName(this.propId); throw new FOPException("Error in " + propName - 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 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 @@ - propertyList.wmMap(Constants.PR_ + + + parentFO.propertyList + + + propertyList + + + .wmMap(Constants.PR_ 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/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 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); -m_shorthandMaker= getSubpropMaker(" - -"); +m_shorthandMaker= getSubpropMaker(Constants.CP_ + + + +); } @@ -544,7 +546,7 @@ return true; } -protected Property.Maker getSubpropMaker(String subprop) { +protected Property.Maker getSubpropMaker(int subpropId) { @@ -552,15 +554,17 @@ -if (subprop.equals(" - - ")) +if (subpropId == Constants.CP_ + + + + ) return s_ Maker; -return super.getSubpropMaker(subprop); +return super.getSubpropMaker(subpropId); } protected Property setSubprop(Property baseProp, int subpropId, @@ -624,9 +628,11 @@ // set default for subprop - subProp = getSubpropMaker(" - -").make(pList, getDefaultFor + subProp = getSubpropMaker(Constants.CP_ + + + +).make(pList, getDefaultFor (), fo); p.setComponent(Constants.CP_ 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, e-mail: [EMAIL PROTECTED]
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 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) { val = baseProp.get 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(); -} else if (cmpId == Constants.CP_WITHI
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) { -String subpropName = FOPropertyMapping.getPropertyName(subpropId); val = baseProp.get (); // 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); val = baseProp.get (); -return val.getComponent(subpropName); +return val.getComponent(subpropId); } @@ -630,9 +630,11 @@ ").make(pList, getDefaultFor (), fo); - p.setComponent(" - -", subProp, true); + p.setComponent(Constants.CP_ + + + +, subProp, true); return new @@ -695,9 +697,11 @@ (); -pval.setComponent(" - -", p, false); +pval.setComponent(Constants.CP_ + + + +, p, false); 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 org.apache.fop.datatypes.CompoundDatatype#setComponent(int, Property, boolean) */ -public void setComponent(String sCmpnName, Property cmpnValue, +public void setComponent(int cmpId, Property cmpnValue, boolean bIsDefault) { -if (sCmpnName.equals("length")) { +if (cmpId == Constants.CP_LENGTH) { length = cmpnValue; -} else if (sCmpnName.equals("conditionality")) { +} else if (cmpId == Constants.CP_CONDITIONALITY) { conditionality = cmpnValue; } } /** - * @see org.apache.fop.datatypes.CompoundDatatype#getComponent(String) + * @see org.a
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/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/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 { -
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) { +String subpropName = FOPropertyMapping.getPropertyName(subpropId); val = baseProp.get @@ -769,14 +770,12 @@ public boolean isCorrespondingForced(PropertyList propertyList) { -FObj parentFO = propertyList.getParentFObj(); -StringBuffer sbExpr=new StringBuffer(); +FObj parentFO = propertyList.getParentFObj(); -sbExpr.setLength(0); +if (propertyList.getExplicit( - -if (propertyList.getExplicit(sbExpr.toString()) != null) +) != null) return true; @@ -788,24 +787,26 @@ public Property compute(PropertyList propertyList) throws FOPException { FObj parentFO = propertyList.getParentFObj(); -StringBuffer sbExpr=new StringBuffer(); Property p=null; - // Make sure the property is set before calculating it! -if (propertyList.getExplicitOrShorthand(sbExpr.toString()) == null) +if (propertyList.getExplicitOrShorthand( + + ) == null) return p; +StringBuffer sbExpr=new StringBuffer(); sbExpr.setLength(0); p = make(propertyList, sbExpr.toString(), propertyList.getParentFObj()); - -p= propertyList.getExplicitOrShorthand(sbExpr.toString()); +p= propertyList.getExplicitOrShorthand( + + ); @@ -818,8 +819,6 @@ Property subprop; - -sbExpr.setLength(0); @@ -830,16 +829,19 @@ make(propertyList, sbExpr.toString(), parentFO); - -subprop = propertyList.getExplicitOrShorthand(sbExpr.toString()); +subprop = propertyList.getExplicitOrShorthand( + + ); if (subprop != null) { -setSubprop(p, " - -", subprop); +setSubprop(p, Constants.CP_ + + + +, subprop); } @@ -860,9 +862,11 @@ if (p == null) { listprop = -(ListProperty)propertyList.getExplicit(" - -"); +(ListProperty)propertyList.getExplicit(Constants.PR_ + + + +); if (listprop != null) { // Get a parser for the shorthand to set the individual properties ShorthandParser shparser = @@ -899,6 +903,83 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +UNKNOWN + + + @@ -909,6 +990,34 @@ + + +
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 = makeProp
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 + * @par
cvs commit: xml-fop/src/java/org/apache/fop/fo PropertyList.java
gmazza 2004/01/04 14:04:08 Modified:src/java/org/apache/fop/fo PropertyList.java Log: more String->int conversions. Revision ChangesPath 1.16 +78 -72xml-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.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- PropertyList.java 4 Jan 2004 21:14:34 - 1.15 +++ PropertyList.java 4 Jan 2004 22:04:08 - 1.16 @@ -161,6 +161,20 @@ } /** + * @return the namespace of this element + */ +public String getNameSpace() { +return namespace; +} + +/** + * @return element name for this + */ +public String getElement() { +return elementName; +} + +/** * Return the value explicitly specified on this FO. * @param propertyName The name of the property whose value is desired. * It may be a compound name, such as space-before.optimum. @@ -169,6 +183,8 @@ */ public Property getExplicitOrShorthand(String propertyName) { /* Handle request for one part of a compound property */ +int propId = FOPropertyMapping.getPropertyId(propertyName); + int sepchar = propertyName.indexOf('.'); String baseName; if (sepchar > -1) { @@ -181,9 +197,7 @@ p = getShorthand(namespace, elementName, baseName); } if (p != null && sepchar > -1) { -return getSubpropValue(namespace, elementName, baseName, p, - propertyName.substring(sepchar - + 1)); +return getSubpropValue(namespace, elementName, p, propId); } return p; } @@ -195,14 +209,15 @@ * @return The value if the property is explicitly set, otherwise null. */ public Property getExplicit(String propertyName) { +int propId = FOPropertyMapping.getPropertyId(propertyName); + /* 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 (p != null) { -return getSubpropValue(namespace, elementName, baseName, p, -propertyName.substring(sepchar + 1)); +return getSubpropValue(namespace, elementName, p, propId); } else { return null; } @@ -227,14 +242,15 @@ * @return The inherited value, otherwise null. */ public Property getInherited(String propertyName) { +int propId = FOPropertyMapping.getPropertyId(propertyName); + if (parentPropertyList != null && isInherited(namespace, elementName, propertyName)) { -int propertyId = FOPropertyMapping.getPropertyId(propertyName); -return parentPropertyList.get(propertyId); +return parentPropertyList.get(propId); } else { // return the "initial" value try { -return makeProperty(namespace, elementName, propertyName); +return makeProperty(namespace, elementName, propId); } catch (org.apache.fop.apps.FOPException e) { //log.error("Exception in getInherited(): property=" // + propertyName + " : " + e); @@ -243,37 +259,6 @@ return null;// Exception in makeProperty! } -/* - * If the property is a relative property with a corresponding absolute - * value specified, the absolute value is used. This is also true of - * 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. - */ -private Property findProperty(String propertyName, boolean bTryInherit) { -Property p = null; -if (isCorrespondingForced(namespace, elementName, propertyName)) { -p = computeProperty(namespace, elementName, propertyName); -} else { -p = getExplicitBaseProp(propertyName); -if (p == null) { -p = this.computeProperty(namespace, elementName, propertyName); -} -if (p == null) {// check for shorthand specification -p = getS
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,
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 @@ package org.apache.fop.fo.properties; -import org.apache.fop.fo.Constants; + @@ -338,6 +338,10 @@ import org.apache.fop.apps.FOPException; + + +import org.apache.fop.fo.Constants; + public class - 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/java/org/apache/fop/layoutmgr LineLayoutManager.java
gmazza 2004/01/02 14:51:31 Modified:src/java/org/apache/fop/layoutmgr LineLayoutManager.java Log: Bug 25808 (Patch by Finn Bock) -- NPE Fix to LineLayoutManager. Revision ChangesPath 1.10 +1 -0 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.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- LineLayoutManager.java27 Dec 2003 21:03:34 - 1.9 +++ LineLayoutManager.java2 Jan 2004 22:51:31 - 1.10 @@ -703,6 +703,7 @@ lc.setSpaceAdjust(lbp.dAdjust); lc.setIPDAdjust(lbp.ipdAdjust); lc.setLeadingSpace(new SpaceSpecifier(true)); +lc.setTrailingSpace(new SpaceSpecifier(false)); lc.setFlags(LayoutContext.RESOLVE_LEADING_SPACE, true); setChildContext(lc); while ((childLM = inlinePosIter.getNextChildLM()) != 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/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. + */ 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. + */ 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 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/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 @@ mailto:[EMAIL PROTECTED]">Glen Mazza (GM) is an information systems analyst with EDS in Arlington, Virginia, USA. mailto:[EMAIL PROTECTED]">Victor Mote (WVM) is the founder and -manager of http://www.outfitr.com";>Enterprise Outfitters, a business -software company, and of http://www.portagepub.com";>Portage Publications, +manager of http://www.outfitr.com";>Enterprise Outfitters, a business +software company, and of http://www.portagepub.com";>Portage Publications, a republisher of old documents. Both are located in Colorado Springs, Colorado, USA. mailto:[EMAIL PROTECTED]">Jörg Pietschmann (JP) mailto:[EMAIL PROTECTED]">Oleg Tkachenko (OT) @@ -53,13 +53,14 @@ mailto:spepping AT leverkruid.nl">Simon Pepping is a TeX/LaTeX and XML expert with Elsevier at its -Amsterdam office. See his http://www.leverkruid.nl";>home -page for some of his private projects. +Amsterdam office. See his http://www.leverkruid.nl";>home +page for some of his private projects. Founder - FOP was originally created and donated to the Apache Software Foundation by mailto:[EMAIL PROTECTED]">James Tauber. Information about him can be found at http://www.jtauber.com";>his website. + FOP was originally created and donated to the Apache Software Foundation by mailto:[EMAIL PROTECTED]">James Tauber. + Information about him can be found at http://www.jtauber.com";>his website. Inactive Committers - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
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 http://www.leverkruid.nl";>home page for some of his private projects. - - 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 @@ public Property compute(PropertyList propertyList) { Property computedProperty = null; -Property correspondingProperty = propertyList.get(" - -"); +Property correspondingProperty = propertyList.get(Constants.PR_ + + + +); if (correspondingProperty != null) { int correspondingValue = correspondingProperty.getEnum(); 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 int getLength(String prop, int dim) { int length; +// int propId = FOPropertyMapping.getPropertyId(prop); +// System.ou
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/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/render/rtf ListAttributesConverter.java PageAttributesConverter.java RTFHandler.java TableAttributesConverter.java TextAttributesConverter.java
gmazza 2003/12/29 15:28:47 Modified:src/java/org/apache/fop/datatypes LengthBase.java src/java/org/apache/fop/fo PropertyList.java src/java/org/apache/fop/fo/expr BodyStartFunction.java LabelEndFunction.java PropertyInfo.java src/java/org/apache/fop/fo/flow Marker.java TableRow.java src/java/org/apache/fop/fo/pagination PageSequenceMaster.java src/java/org/apache/fop/layoutmgr AbstractLayoutManager.java AddLMVisitor.java BlockContainerLayoutManager.java PageLayoutManager.java src/java/org/apache/fop/render/rtf ListAttributesConverter.java PageAttributesConverter.java RTFHandler.java TableAttributesConverter.java TextAttributesConverter.java Log: More String->int conversions, annoyingly incremental but I'm getting there... Revision ChangesPath 1.4 +2 -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.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- LengthBase.java 16 Jul 2003 01:52:26 - 1.3 +++ LengthBase.java 29 Dec 2003 23:28:47 - 1.4 @@ -51,6 +51,7 @@ package org.apache.fop.datatypes; import org.apache.fop.fo.FObj; +import org.apache.fop.fo.Constants; import org.apache.fop.fo.PropertyList; /** @@ -139,7 +140,7 @@ public int getBaseLength() { switch (iBaseType) { case FONTSIZE: -return propertyList.get("font-size").getLength().getValue(); +return propertyList.get(Constants.PR_FONT_SIZE).getLength().getValue(); case INH_FONTSIZE: return propertyList.getInherited("font-size").getLength().getValue(); //case CONTAINING_BOX: 1.12 +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.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- PropertyList.java 27 Dec 2003 22:00:38 - 1.11 +++ PropertyList.java 29 Dec 2003 23:28:47 - 1.12 @@ -310,7 +310,7 @@ */ public Property get(String propertyName) { return get(propertyName, true, true); -} +} /** * Return the property on the current FlowObject. Depending on the passed flags, 1.4 +3 -2 xml-fop/src/java/org/apache/fop/fo/expr/BodyStartFunction.java Index: BodyStartFunction.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/expr/BodyStartFunction.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- BodyStartFunction.java20 Dec 2003 06:53:22 - 1.3 +++ BodyStartFunction.java29 Dec 2003 23:28:47 - 1.4 @@ -50,6 +50,7 @@ */ package org.apache.fop.fo.expr; +import org.apache.fop.fo.Constants; import org.apache.fop.fo.Property; import org.apache.fop.fo.FONode; import org.apache.fop.fo.flow.ListItem; @@ -77,7 +78,7 @@ public Property eval(Property[] args, PropertyInfo pInfo) throws PropertyException { Numeric distance = - pInfo.getPropertyList().get("provisional-distance-between-starts").getNumeric(); + pInfo.getPropertyList().get(Constants.PR_PROVISIONAL_DISTANCE_BETWEEN_STARTS).getNumeric(); FONode item = pInfo.getFO(); while (item != null && !(item instanceof ListItem)) { @@ -88,7 +89,7 @@ } Numeric startIndent = -((ListItem)item).propertyList.get("start-indent").getNumeric(); + ((ListItem)item).propertyList.get(Constants.PR_START_INDENT).getNumeric(); return new NumericProperty(distance.add(startIndent)); } 1.4 +3 -2 xml-fop/src/java/org/apache/fop/fo/expr/LabelEndFunction.java Index: LabelEndFunction.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/expr/LabelEndFunction.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- LabelEndFunction.java 20 Dec 2003 06:53:22 - 1.3 +++ LabelEndFunction.java 29 Dec 2003 23:28:47 - 1.4 @@ -54,6 +54,7 @@ import org.apache.fop.datatypes.LengthBase;
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/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/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 & assorted web pages since his first webmaster position @brain.com in 1996. Most important creation? Jeremy Logan Leeds was born June 18, 2002. + + mailto:spepping AT leverkruid.nl">Simon Pepping +is a TeX/LaTeX and XML expert with Elsevier at its +Amsterdam office. See his http://www.leverkruid.nl";>home +page for some of his private projects. + - 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()) { vie
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/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); } /** + * TE
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 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/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
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/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 mu
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 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_ht; - - 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(namespace, elementName, baseName); }
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/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/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 @@ + 1.1 xml-fop/src/codegen/property-sets.xsl Index: property-sets.xsl === http://www.w3.org/1999/XSL/Transform";> 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][]; boolean loop = true; while (loop) { loop = false; } } private static short[] makeSparseIndices(BitSet set) { short[] indices = new short[Constants.PROPERTY_COUNT]; indices[0] = (short) (set.cardinality() + 1); int j = 1; for (int i = set.nextSetBit(0); i >= 0; i = set.nextSetBit(i+1)) { indices[i] = (short) j++; } return indices; } private static boolean mergeContent(BitSet node, BitSet content, boolean loop) { int c = node.cardinality(); node.or(content); if (c == node.cardinality()) return loop; return true; } public static short[] getPropertySet(int elementId) { if (mapping == null) initialize(); return mapping[elementId]; } } BitSet = new BitSet(); .set(Constants.PR_ ); fo_ BitSet = new BitSet(); fo_ fo_ loop = mergeContent(, fo_block, loop); loop = mergeContent(, fo_block_container, loop); loop = mergeContent(, fo_table_and_caption, loop); loop = mergeContent(, fo_table, loop); loop = mergeContent(, fo_list_block, loop); loop = mergeContent(, fo_bidi_override, loop); loop = mergeContent(, fo_character, loop); loop = mergeContent(, fo_external_graphic, loop); loop = mergeContent(, fo_instream_foreign_object, loop); loop = mergeContent(, fo_inline, loop); loop = mergeContent(, fo_inline_container, loop); loop = mergeContent(, fo_leader, loop); loop = mergeContent(, fo_page_number, loop); loop = mergeContent(, fo_page_number_citation, loop); loop = mergeContent(, fo_basic_link, loop); loop = mergeContent(, fo_multi_toggle, loop); loop = mergeContent(, , loop); fo_ mapping[Constants. ] = makeSparseIndices(); .or(); .set(Constants.PR_ ); 1.26 +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.25 retrieving revision 1.26 diff -u -r1.25 -r1.26 --- FObj.java 22 Dec 2003 21:37:43 - 1.25 +++ FObj.java 22 Dec 2003 23:23:05 - 1.26 @@ -59,7 +59,6 @@ import org.apache.fop.apps.FOPException; import org.apache.fop.fo.flow.Marker; -import org.apache.fop.fo.Constants; import org.apache.fop.fo.properties.FOPropertyMapping; import org.xml.sax.Attributes; 1.6 +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.jav
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 @@ -[PR_] =.maker(PR_); addPropertyName("", PR_); +[PR_] =.maker(PR_); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]