xmlgraphics-fop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From spepp...@apache.org
Subject svn commit: r627882 [17/41] - in /xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking: ./ examples/embedding/ examples/embedding/java/embedding/ examples/embedding/java/embedding/intermediate/ examples/embedding/xml/xml/ examples/fo/ examples/...
Date Thu, 14 Feb 2008 21:57:53 GMT
Modified: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/rtf/RTFHandler.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/rtf/RTFHandler.java?rev=627882&r1=627881&r2=627882&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/rtf/RTFHandler.java (original)
+++ xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/rtf/RTFHandler.java Thu Feb 14 13:55:44 2008
@@ -20,26 +20,33 @@
 package org.apache.fop.render.rtf;
 
 // Java
-import java.awt.color.ColorSpace;
 import java.awt.geom.Point2D;
-import java.awt.image.BufferedImage;
-import java.awt.image.ColorModel;
-import java.awt.image.ComponentColorModel;
-import java.awt.image.DataBuffer;
-import java.awt.image.DataBufferByte;
-import java.awt.image.PixelInterleavedSampleModel;
-import java.awt.image.Raster;
-import java.awt.image.SampleModel;
-import java.awt.image.WritableRaster;
 import java.io.IOException;
+import java.io.InputStream;
 import java.io.OutputStream;
 import java.io.OutputStreamWriter;
 import java.util.Iterator;
+import java.util.Map;
 
-import org.apache.batik.dom.svg.SVGDOMImplementation;
-import org.apache.commons.io.output.ByteArrayOutputStream;
+import org.w3c.dom.Document;
+
+import org.xml.sax.SAXException;
+
+import org.apache.commons.io.IOUtils;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+
+import org.apache.xmlgraphics.image.loader.Image;
+import org.apache.xmlgraphics.image.loader.ImageException;
+import org.apache.xmlgraphics.image.loader.ImageFlavor;
+import org.apache.xmlgraphics.image.loader.ImageInfo;
+import org.apache.xmlgraphics.image.loader.ImageManager;
+import org.apache.xmlgraphics.image.loader.ImageSessionContext;
+import org.apache.xmlgraphics.image.loader.ImageSize;
+import org.apache.xmlgraphics.image.loader.impl.ImageRawStream;
+import org.apache.xmlgraphics.image.loader.impl.ImageXMLDOM;
+import org.apache.xmlgraphics.image.loader.util.ImageUtil;
+
 import org.apache.fop.apps.FOPException;
 import org.apache.fop.apps.FOUserAgent;
 import org.apache.fop.datatypes.LengthBase;
@@ -78,10 +85,8 @@
 import org.apache.fop.fo.pagination.SimplePageMaster;
 import org.apache.fop.fo.pagination.StaticContent;
 import org.apache.fop.fo.properties.CommonBorderPaddingBackground;
+import org.apache.fop.fo.properties.FixedLength;
 import org.apache.fop.fonts.FontSetup;
-import org.apache.fop.image.FopImage;
-import org.apache.fop.image.ImageFactory;
-import org.apache.fop.image.XMLImage;
 import org.apache.fop.render.DefaultFontResolver;
 import org.apache.fop.render.rtf.rtflib.rtfdoc.IRtfAfterContainer;
 import org.apache.fop.render.rtf.rtflib.rtfdoc.IRtfBeforeContainer;
@@ -108,10 +113,6 @@
 import org.apache.fop.render.rtf.rtflib.rtfdoc.RtfListItem.RtfListItemLabel;
 import org.apache.fop.render.rtf.rtflib.tools.BuilderContext;
 import org.apache.fop.render.rtf.rtflib.tools.TableContext;
-import org.apache.xmlgraphics.image.writer.ImageWriter;
-import org.apache.xmlgraphics.image.writer.ImageWriterRegistry;
-import org.w3c.dom.Document;
-import org.xml.sax.SAXException;
 
 /**
  * RTF Handler: generates RTF output using the structure events from
@@ -578,7 +579,7 @@
             Integer iWidth
                 = new Integer(tc.getColumnWidth().getValue(context) / 1000);
             
-            String strWidth = iWidth.toString() + "pt";
+            String strWidth = iWidth.toString() + FixedLength.POINT;
             Float width = new Float(
                     FoUnitsConverter.getInstance().convertToTwips(strWidth));
             builderContext.getTableContext().setNextColumnWidth(width);
@@ -1104,24 +1105,18 @@
         }
 
         try {
-            String url = eg.getURL();
+            String uri = eg.getURL();
 
             //set image data
             FOUserAgent userAgent = eg.getUserAgent();
-            ImageFactory fact = userAgent.getFactory().getImageFactory();
-            FopImage fopimage = fact.getImage(url, userAgent);
-            if (fopimage == null) {
-                log.error("Image could not be found: " + url);
+            ImageManager manager = userAgent.getFactory().getImageManager();
+            ImageInfo info = manager.getImageInfo(uri, userAgent.getImageSessionContext());
+            if (info == null) {
+                log.error("Image could not be found: " + uri);
                 return;
             }
-            if ("image/gif".equals(fopimage.getMimeType())) {
-                //GIF is not directly supported by RTF, so it must be converted to PNG
-                fopimage.load(FopImage.BITMAP);
-            } else {
-                fopimage.load(FopImage.ORIGINAL_DATA);
-            }
             
-            putGraphic(eg, fopimage);
+            putGraphic(eg, info);
         } catch (Exception e) {
             log.error("Error while handling an external-graphic: " + e.getMessage(), e);
         }
@@ -1140,85 +1135,83 @@
             Document doc = child.getDOMDocument();
             String ns = child.getNamespaceURI();
             
-            if (SVGDOMImplementation.SVG_NAMESPACE_URI.equals(ns)) {
-                // Build the image info.
-                FopImage.ImageInfo info = new FopImage.ImageInfo();
-                info.mimeType = "image/svg+xml";
-                info.str = SVGDOMImplementation.SVG_NAMESPACE_URI;
-                info.originalURI = "";
-                info.data = doc;
-
-                // Set the resolution to that of the FOUserAgent
-                FOUserAgent ua = ifo.getUserAgent();
-                info.dpiHorizontal = 25.4f / ua.getSourcePixelUnitToMillimeter();
-                info.dpiVertical = info.dpiHorizontal;
-                
-                // Set the image size to the size of the svg.
-                Point2D csize = new Point2D.Float(-1, -1);
-                Point2D intrinsicDimensions = child.getDimension(csize);
-                info.width = (int) intrinsicDimensions.getX();
-                info.height = (int) intrinsicDimensions.getY();
-                
-                FopImage fopImage = new XMLImage(info);
-                fopImage.load(FopImage.ORIGINAL_DATA);
+            ImageInfo info = new ImageInfo(null, null);
+            // Set the resolution to that of the FOUserAgent
+            FOUserAgent ua = ifo.getUserAgent();
+            ImageSize size = new ImageSize();
+            size.setResolution(ua.getSourceResolution());
+            
+            // Set the image size to the size of the svg.
+            Point2D csize = new Point2D.Float(-1, -1);
+            Point2D intrinsicDimensions = child.getDimension(csize);
+            size.setSizeInMillipoints(
+                    (int)Math.round(intrinsicDimensions.getX() * 1000),
+                    (int)Math.round(intrinsicDimensions.getY() * 1000));
+            size.calcPixelsFromSize();
+            info.setSize(size);
 
-                putGraphic(ifo, fopImage);
-            } else {
-                log.warn("The namespace " + ns
-                        + " for instream-foreign-objects is not supported.");
-            }
+            ImageXMLDOM image = new ImageXMLDOM(info, doc, ns);
             
+            FOUserAgent userAgent = ifo.getUserAgent();
+            ImageManager manager = userAgent.getFactory().getImageManager();
+            Image converted = manager.convertImage(image, FLAVORS);
+            putGraphic(ifo, converted);
             
         } catch (Exception e) {
             log.error("Error while handling an instream-foreign-object: " + e.getMessage(), e);
         }
     }
 
-    private BufferedImage createBufferedImageFromBitmaps(FopImage image) {
-        // TODO Hardcoded color and sample models, FIX ME!
-        ColorModel cm = new ComponentColorModel(
-                ColorSpace.getInstance(ColorSpace.CS_sRGB), 
-                new int[] {8, 8, 8},
-                false, false,
-                ColorModel.OPAQUE, DataBuffer.TYPE_BYTE);
-        SampleModel sampleModel = new PixelInterleavedSampleModel(
-                DataBuffer.TYPE_BYTE, image.getWidth(), image.getHeight(), 3, image.getWidth() * 3, 
-                new int[] {0, 1, 2});
-        DataBuffer dbuf = new DataBufferByte(image.getBitmaps(), 
-                image.getWidth() * image.getHeight() * 3);
-
-        WritableRaster raster = Raster.createWritableRaster(sampleModel,
-                dbuf, null);
-
-        // Combine the color model and raster into a buffered image
-        return new BufferedImage(cm, raster, false, null);
+    private static final ImageFlavor[] FLAVORS = new ImageFlavor[] {
+        ImageFlavor.RAW_EMF, ImageFlavor.RAW_PNG, ImageFlavor.RAW_JPEG
+    };
+    
+    /**
+     * Puts a graphic/image into the generated RTF file.
+     * @param abstractGraphic the graphic (external-graphic or instream-foreign-object)
+     * @param info the image info object
+     * @throws IOException In case of an I/O error
+     */
+    private void putGraphic(AbstractGraphics abstractGraphic, ImageInfo info) 
+            throws IOException {
+        try {
+            FOUserAgent userAgent = abstractGraphic.getUserAgent();
+            ImageManager manager = userAgent.getFactory().getImageManager();
+            ImageSessionContext sessionContext = userAgent.getImageSessionContext();
+            Map hints = ImageUtil.getDefaultHints(sessionContext);
+            Image image = manager.getImage(info, FLAVORS, hints, sessionContext);
+
+            putGraphic(abstractGraphic, image);
+        } catch (ImageException ie) {
+            log.error("Error while loading/processing image: " + info.getOriginalURI(), ie);
+        }
     }
     
     /**
      * Puts a graphic/image into the generated RTF file.
      * @param abstractGraphic the graphic (external-graphic or instream-foreign-object)
-     * @param fopImage the image
+     * @param image the image
      * @throws IOException In case of an I/O error
      */
-    private void putGraphic(AbstractGraphics abstractGraphic, FopImage fopImage) 
+    private void putGraphic(AbstractGraphics abstractGraphic, Image image) 
             throws IOException {
-        byte[] rawData;
-        if ("image/svg+xml".equals(fopImage.getMimeType())) {
-            rawData = SVGConverter.convertToJPEG((XMLImage) fopImage);
-        } else if (fopImage.getRessourceBytes() != null) {
-            rawData = fopImage.getRessourceBytes();
-        } else {
-            //TODO Revisit after the image library redesign!!!
-            //Convert the decoded bitmaps to a BufferedImage
-            BufferedImage bufImage = createBufferedImageFromBitmaps(fopImage);
-            ImageWriter writer = ImageWriterRegistry.getInstance().getWriterFor("image/png");
-            ByteArrayOutputStream baout = new ByteArrayOutputStream();
-            writer.writeImage(bufImage, baout);
-            rawData = baout.toByteArray();
+        byte[] rawData = null;
+        
+        ImageInfo info = image.getInfo();
+
+        if (image instanceof ImageRawStream) {
+            ImageRawStream rawImage = (ImageRawStream)image;
+            InputStream in = rawImage.createInputStream();
+            try {
+                rawData = IOUtils.toByteArray(in);
+            } finally {
+                IOUtils.closeQuietly(in);
+            }
         }
+
         if (rawData == null) {
             log.warn(FONode.decorateWithContextInfo("Image could not be embedded: "
-                    + fopImage.getOriginalURI(), abstractGraphic));
+                    + image, abstractGraphic));
             return;
         }
 
@@ -1229,7 +1222,9 @@
         final RtfExternalGraphic rtfGraphic = c.getTextrun().newImage();
    
         //set URL
-        rtfGraphic.setURL(fopImage.getOriginalURI());
+        if (info.getOriginalURI() != null) {
+            rtfGraphic.setURL(info.getOriginalURI());
+        }
         rtfGraphic.setImageData(rawData);
 
         //set scaling
@@ -1240,7 +1235,7 @@
         //get width
         int width = 0;
         if (abstractGraphic.getWidth().getEnum() == Constants.EN_AUTO) {
-            width = fopImage.getIntrinsicWidth();
+            width = info.getSize().getWidthMpt();
         } else {
             width = abstractGraphic.getWidth().getValue();
         }
@@ -1248,7 +1243,7 @@
         //get height
         int height = 0;
         if (abstractGraphic.getWidth().getEnum() == Constants.EN_AUTO) {
-            height = fopImage.getIntrinsicHeight();
+            height = info.getSize().getHeightMpt();
         } else {
             height = abstractGraphic.getHeight().getValue();
         }
@@ -1257,7 +1252,7 @@
         int contentwidth = 0;
         if (abstractGraphic.getContentWidth().getEnum()
                 == Constants.EN_AUTO) {
-            contentwidth = fopImage.getIntrinsicWidth();
+            contentwidth = info.getSize().getWidthMpt();
         } else if (abstractGraphic.getContentWidth().getEnum()
                 == Constants.EN_SCALE_TO_FIT) {
             contentwidth = width;
@@ -1271,7 +1266,7 @@
         if (abstractGraphic.getContentHeight().getEnum()
                 == Constants.EN_AUTO) {
 
-            contentheight = fopImage.getIntrinsicHeight();
+            contentheight = info.getSize().getHeightMpt();
 
         } else if (abstractGraphic.getContentHeight().getEnum()
                 == Constants.EN_SCALE_TO_FIT) {
@@ -1283,11 +1278,11 @@
         }
 
         //set width in rtf
-        //newGraphic.setWidth((long) (contentwidth / 1000f) + "pt");
+        //newGraphic.setWidth((long) (contentwidth / 1000f) + FixedLength.POINT);
         rtfGraphic.setWidth((long) (contentwidth / 50f) + "twips");
 
         //set height in rtf
-        //newGraphic.setHeight((long) (contentheight / 1000f) + "pt");
+        //newGraphic.setHeight((long) (contentheight / 1000f) + FixedLength.POINT);
         rtfGraphic.setHeight((long) (contentheight / 50f) + "twips");
 
         //TODO: make this configurable:

Propchange: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/rtf/RTFHandler.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Feb 14 13:55:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id

Modified: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/rtf/TableAttributesConverter.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/rtf/TableAttributesConverter.java?rev=627882&r1=627881&r2=627882&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/rtf/TableAttributesConverter.java (original)
+++ xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/rtf/TableAttributesConverter.java Thu Feb 14 13:55:44 2008
@@ -29,6 +29,7 @@
 import org.apache.fop.fo.flow.table.TableHeader;
 import org.apache.fop.fo.flow.table.TableRow;
 import org.apache.fop.fo.properties.CommonBorderPaddingBackground;
+import org.apache.fop.fo.properties.FixedLength;
 import org.apache.fop.render.rtf.rtflib.rtfdoc.ITableAttributes;
 import org.apache.fop.render.rtf.rtflib.rtfdoc.RtfAttributes;
 
@@ -343,7 +344,7 @@
             LengthProperty lengthprop = (LengthProperty)p;
 
             Float f = new Float(lengthprop.getLength().getValue() / 1000f);
-            String sValue = f.toString() + "pt";
+            String sValue = f.toString() + FixedLength.POINT;
 
             attrib.set(BorderAttributesConverter.BORDER_WIDTH,
                        (int)FoUnitsConverter.getInstance().convertToTwips(sValue));

Propchange: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/rtf/TableAttributesConverter.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Feb 14 13:55:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id

Propchange: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/rtf/TextAttributesConverter.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Feb 14 13:55:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id

Propchange: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/rtf/rtflib/exceptions/RtfException.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Feb 14 13:55:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id

Propchange: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/rtf/rtflib/exceptions/RtfStructureException.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Feb 14 13:55:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id

Modified: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/IBorderAttributes.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/IBorderAttributes.java?rev=627882&r1=627881&r2=627882&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/IBorderAttributes.java (original)
+++ xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/IBorderAttributes.java Thu Feb 14 13:55:44 2008
@@ -1,117 +1,117 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You 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$ */
-
-package org.apache.fop.render.rtf.rtflib.rtfdoc;
-
-/*
- * This file is part of the RTF library of the FOP project, which was originally
- * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and by other
- * contributors to the jfor project (www.jfor.org), who agreed to donate jfor to
- * the FOP project.
- */
-
-
-
-/** Constants for RTF border attribute names. */
-
-public interface IBorderAttributes {
-
-    /** Constant for border left */
-    String BORDER_LEFT = "brdrl";
-    /** Constant for border right */
-    String BORDER_RIGHT = "brdrr";
-    /** Constant for border top */
-    String BORDER_TOP = "brdrt";
-    /** Constant for border bottom */
-    String BORDER_BOTTOM = "brdrb";
-    /** Constant for character border (border always appears on all sides) */
-    String BORDER_CHARACTER = "chbrdr";
-    /** Constant for a single-thick border */
-    String BORDER_SINGLE_THICKNESS = "brdrs";
-    /** Constant for a double-thick border */
-    String BORDER_DOUBLE_THICKNESS = "brdrth";
-    /** Constant for a shadowed border */
-    String BORDER_SHADOWED = "brdrsh";
-    /** Constant for a double border */
-    String BORDER_DOUBLE = "brdrdb";
-    /** Constant for a dotted border */
-    String BORDER_DOTTED = "brdrdot";
-    /** Constant for a dashed border */
-    String BORDER_DASH = "brdrdash";
-    /** Constant for a hairline border */
-    String BORDER_HAIRLINE = "brdrhair";
-    /** Constant for a small-dashed border */
-    String BORDER_DASH_SMALL = "brdrdashsm";
-    /** Constant for a dot-dashed border */
-    String BORDER_DOT_DASH = "brdrdashd";
-    /** Constant for a dot-dot-dashed border */
-    String BORDER_DOT_DOT_DASH = "brdrdashdd";
-    /** Constant for a triple border */
-    String BORDER_TRIPLE = "brdrtriple";
-    /** Constant for a think-thin-small border */
-    String BORDER_THINK_THIN_SMALL = "brdrtnthsg";
-    /** Constant for a thin-thick-small border */
-    String BORDER_THIN_THICK_SMALL = "brdrthtnsg";
-    /** Constant for a thin-thick-thin-small border */
-    String BORDER_THIN_THICK_THIN_SMALL = "brdrthtnthsg";
-    /** Constant for a think-thin-medium border */
-    String BORDER_THINK_THIN_MEDIUM = "brdrtnthmg";
-    /** Constant for a thin-thick-medium border */
-    String BORDER_THIN_THICK_MEDIUM = "brdrthtnmg";
-    /** Constant for a thin-thick-thin-medium border */
-    String BORDER_THIN_THICK_THIN_MEDIUM = "brdrthtnthmg";
-    /** Constant for a think-thin-large border */
-    String BORDER_THINK_THIN_LARGE = "brdrtnthlg";
-    /** Constant for a thin-thick-large border */
-    String BORDER_THIN_THICK_LARGE = "brdrthtnlg";
-    /** Constant for a thin-thick-thin-large border */
-    String BORDER_THIN_THICK_THIN_LARGE = "brdrthtnthlg";
-    /** Constant for a wavy border */
-    String BORDER_WAVY = "brdrwavy";
-    /** Constant for a double wavy border */
-    String BORDER_WAVY_DOUBLE = "brdrwavydb";
-    /** Constant for a striped border */
-    String BORDER_STRIPED = "brdrdashdotstr";
-    /** Constant for an embossed border */
-    String BORDER_EMBOSS = "brdremboss";
-    /** Constant for an engraved border */
-    String BORDER_ENGRAVE = "brdrengrave";
-    /** Constant for an nil border */
-    String BORDER_NIL = "brdrnil";
-    /** Constant for border color */
-    String BORDER_COLOR = "brdrcf";
-    /** Constant for border space */
-    String BORDER_SPACE = "brsp";
-    /** Constant for border width */
-    String BORDER_WIDTH = "brdrw";
-
-    /** String array of border attributes */
-    String [] BORDERS = new String[] {
-        BORDER_SINGLE_THICKNESS,    BORDER_DOUBLE_THICKNESS,            BORDER_SHADOWED,
-        BORDER_DOUBLE,              BORDER_DOTTED,                      BORDER_DASH,
-        BORDER_HAIRLINE,            BORDER_DASH_SMALL,                  BORDER_DOT_DASH,
-        BORDER_DOT_DOT_DASH,        BORDER_TRIPLE,                      BORDER_THINK_THIN_SMALL,
-        BORDER_THIN_THICK_SMALL,    BORDER_THIN_THICK_THIN_SMALL,       BORDER_THINK_THIN_MEDIUM,
-        BORDER_THIN_THICK_MEDIUM,   BORDER_THIN_THICK_THIN_MEDIUM,      BORDER_THINK_THIN_LARGE,
-        BORDER_THIN_THICK_LARGE,    BORDER_THIN_THICK_THIN_LARGE,       BORDER_WAVY,
-        BORDER_WAVY_DOUBLE,         BORDER_STRIPED,                     BORDER_EMBOSS,
-        BORDER_ENGRAVE,             BORDER_COLOR,                       BORDER_SPACE,
-        BORDER_WIDTH
-    };
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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$ */
+
+package org.apache.fop.render.rtf.rtflib.rtfdoc;
+
+/*
+ * This file is part of the RTF library of the FOP project, which was originally
+ * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and by other
+ * contributors to the jfor project (www.jfor.org), who agreed to donate jfor to
+ * the FOP project.
+ */
+
+
+
+/** Constants for RTF border attribute names. */
+
+public interface IBorderAttributes {
+
+    /** Constant for border left */
+    String BORDER_LEFT = "brdrl";
+    /** Constant for border right */
+    String BORDER_RIGHT = "brdrr";
+    /** Constant for border top */
+    String BORDER_TOP = "brdrt";
+    /** Constant for border bottom */
+    String BORDER_BOTTOM = "brdrb";
+    /** Constant for character border (border always appears on all sides) */
+    String BORDER_CHARACTER = "chbrdr";
+    /** Constant for a single-thick border */
+    String BORDER_SINGLE_THICKNESS = "brdrs";
+    /** Constant for a double-thick border */
+    String BORDER_DOUBLE_THICKNESS = "brdrth";
+    /** Constant for a shadowed border */
+    String BORDER_SHADOWED = "brdrsh";
+    /** Constant for a double border */
+    String BORDER_DOUBLE = "brdrdb";
+    /** Constant for a dotted border */
+    String BORDER_DOTTED = "brdrdot";
+    /** Constant for a dashed border */
+    String BORDER_DASH = "brdrdash";
+    /** Constant for a hairline border */
+    String BORDER_HAIRLINE = "brdrhair";
+    /** Constant for a small-dashed border */
+    String BORDER_DASH_SMALL = "brdrdashsm";
+    /** Constant for a dot-dashed border */
+    String BORDER_DOT_DASH = "brdrdashd";
+    /** Constant for a dot-dot-dashed border */
+    String BORDER_DOT_DOT_DASH = "brdrdashdd";
+    /** Constant for a triple border */
+    String BORDER_TRIPLE = "brdrtriple";
+    /** Constant for a think-thin-small border */
+    String BORDER_THINK_THIN_SMALL = "brdrtnthsg";
+    /** Constant for a thin-thick-small border */
+    String BORDER_THIN_THICK_SMALL = "brdrthtnsg";
+    /** Constant for a thin-thick-thin-small border */
+    String BORDER_THIN_THICK_THIN_SMALL = "brdrthtnthsg";
+    /** Constant for a think-thin-medium border */
+    String BORDER_THINK_THIN_MEDIUM = "brdrtnthmg";
+    /** Constant for a thin-thick-medium border */
+    String BORDER_THIN_THICK_MEDIUM = "brdrthtnmg";
+    /** Constant for a thin-thick-thin-medium border */
+    String BORDER_THIN_THICK_THIN_MEDIUM = "brdrthtnthmg";
+    /** Constant for a think-thin-large border */
+    String BORDER_THINK_THIN_LARGE = "brdrtnthlg";
+    /** Constant for a thin-thick-large border */
+    String BORDER_THIN_THICK_LARGE = "brdrthtnlg";
+    /** Constant for a thin-thick-thin-large border */
+    String BORDER_THIN_THICK_THIN_LARGE = "brdrthtnthlg";
+    /** Constant for a wavy border */
+    String BORDER_WAVY = "brdrwavy";
+    /** Constant for a double wavy border */
+    String BORDER_WAVY_DOUBLE = "brdrwavydb";
+    /** Constant for a striped border */
+    String BORDER_STRIPED = "brdrdashdotstr";
+    /** Constant for an embossed border */
+    String BORDER_EMBOSS = "brdremboss";
+    /** Constant for an engraved border */
+    String BORDER_ENGRAVE = "brdrengrave";
+    /** Constant for an nil border */
+    String BORDER_NIL = "brdrnil";
+    /** Constant for border color */
+    String BORDER_COLOR = "brdrcf";
+    /** Constant for border space */
+    String BORDER_SPACE = "brsp";
+    /** Constant for border width */
+    String BORDER_WIDTH = "brdrw";
+
+    /** String array of border attributes */
+    String [] BORDERS = new String[] {
+        BORDER_SINGLE_THICKNESS,    BORDER_DOUBLE_THICKNESS,            BORDER_SHADOWED,
+        BORDER_DOUBLE,              BORDER_DOTTED,                      BORDER_DASH,
+        BORDER_HAIRLINE,            BORDER_DASH_SMALL,                  BORDER_DOT_DASH,
+        BORDER_DOT_DOT_DASH,        BORDER_TRIPLE,                      BORDER_THINK_THIN_SMALL,
+        BORDER_THIN_THICK_SMALL,    BORDER_THIN_THICK_THIN_SMALL,       BORDER_THINK_THIN_MEDIUM,
+        BORDER_THIN_THICK_MEDIUM,   BORDER_THIN_THICK_THIN_MEDIUM,      BORDER_THINK_THIN_LARGE,
+        BORDER_THIN_THICK_LARGE,    BORDER_THIN_THICK_THIN_LARGE,       BORDER_WAVY,
+        BORDER_WAVY_DOUBLE,         BORDER_STRIPED,                     BORDER_EMBOSS,
+        BORDER_ENGRAVE,             BORDER_COLOR,                       BORDER_SPACE,
+        BORDER_WIDTH
+    };
+}

Propchange: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/IBorderAttributes.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/IRtfAfterContainer.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Feb 14 13:55:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id

Propchange: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/IRtfBeforeContainer.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Feb 14 13:55:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id

Propchange: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/IRtfBookmarkContainer.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Feb 14 13:55:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id

Propchange: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/IRtfExternalGraphicContainer.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Feb 14 13:55:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id

Propchange: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/IRtfHyperLinkContainer.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Feb 14 13:55:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id

Propchange: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/IRtfJforCmdContainer.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Feb 14 13:55:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id

Propchange: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/IRtfListContainer.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Feb 14 13:55:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id

Propchange: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/IRtfOptions.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Feb 14 13:55:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id

Propchange: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/IRtfPageBreakContainer.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Feb 14 13:55:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id

Propchange: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/IRtfPageContainer.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Feb 14 13:55:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id

Propchange: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/IRtfPageNumberCitationContainer.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Feb 14 13:55:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id

Propchange: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/IRtfPageNumberContainer.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Feb 14 13:55:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id

Propchange: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/IRtfParagraphContainer.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Feb 14 13:55:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id

Propchange: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/IRtfParagraphKeepTogetherContainer.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Feb 14 13:55:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id

Propchange: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/IRtfTableContainer.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Feb 14 13:55:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id

Propchange: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/IRtfTextContainer.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Feb 14 13:55:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id

Propchange: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/IRtfTextrunContainer.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Feb 14 13:55:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id

Propchange: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/ITableAttributes.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Feb 14 13:55:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id

Propchange: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/ITableColumnsInfo.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Feb 14 13:55:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id

Propchange: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/IrtfTemplateContainer.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Feb 14 13:55:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id

Propchange: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/ParagraphKeeptogetherContext.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Feb 14 13:55:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id

Propchange: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfAfter.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Feb 14 13:55:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id

Propchange: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfAfterBeforeBase.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Feb 14 13:55:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id

Propchange: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfAttributes.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Feb 14 13:55:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id

Propchange: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfBefore.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Feb 14 13:55:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id

Propchange: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfBookmark.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Feb 14 13:55:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id

Propchange: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfBookmarkContainerImpl.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Feb 14 13:55:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id

Propchange: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfColorTable.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Feb 14 13:55:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id

Propchange: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfContainer.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Feb 14 13:55:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id

Propchange: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfDocumentArea.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Feb 14 13:55:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id

Propchange: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfElement.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Feb 14 13:55:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id

Modified: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfExternalGraphic.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfExternalGraphic.java?rev=627882&r1=627881&r2=627882&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfExternalGraphic.java (original)
+++ xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfExternalGraphic.java Thu Feb 14 13:55:44 2008
@@ -26,19 +26,17 @@
  * the FOP project.
  */
 
-import org.apache.commons.io.IOUtils;
-import org.apache.fop.render.rtf.rtflib.tools.ImageConstants;
-import org.apache.fop.render.rtf.rtflib.tools.ImageUtil;
-//import org.apache.fop.render.rtf.rtflib.tools.jpeg.Encoder;
-//import org.apache.fop.render.rtf.rtflib.tools.jpeg.JPEGException;
-
+import java.io.File;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.Writer;
-
-import java.io.File;
-import java.net.URL;
 import java.net.MalformedURLException;
+import java.net.URL;
+
+import org.apache.commons.io.IOUtils;
+
+import org.apache.fop.render.rtf.rtflib.tools.ImageConstants;
+import org.apache.fop.render.rtf.rtflib.tools.ImageUtil;
 
 /**
  * Creates an RTF image from an external graphic file.
@@ -342,13 +340,13 @@
         }
 
 
-        if (url == null) {
-            throw new ExternalGraphicException("The attribute 'url' of "
-                    + "<fo:external-graphic> is null.");
+        if (url == null && imagedata == null) {
+            throw new ExternalGraphicException(
+                    "No image data is available (neither URL, nor in-memory)");
         }
 
         String linkToRoot = System.getProperty("jfor_link_to_root");
-        if (linkToRoot != null) {
+        if (url != null && linkToRoot != null) {
             writer.write("{\\field {\\* \\fldinst { INCLUDEPICTURE \"");
             writer.write(linkToRoot);
             File urlFile = new File(url.getFile());
@@ -380,7 +378,7 @@
         }
 
         // Determine image file format
-        String file = url.getFile ();
+        String file = (url != null ? url.getFile() : "<unknown>");
         imageformat = FormatBase.determineFormat(imagedata);
         if (imageformat != null) {
             imageformat = imageformat.convert(imageformat, imagedata);

Propchange: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfExternalGraphic.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Feb 14 13:55:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id

Propchange: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfExtraRowSet.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Feb 14 13:55:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id

Propchange: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfFile.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Feb 14 13:55:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id

Propchange: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfFontManager.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Feb 14 13:55:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id

Propchange: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfFontTable.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Feb 14 13:55:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id

Propchange: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfFootnote.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Feb 14 13:55:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id

Propchange: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfGenerator.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Feb 14 13:55:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id

Propchange: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfHeader.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Feb 14 13:55:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id

Propchange: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfHyperLink.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Feb 14 13:55:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id

Propchange: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfJforCmd.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Feb 14 13:55:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id

Propchange: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfLineBreak.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Feb 14 13:55:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id

Propchange: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfList.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Feb 14 13:55:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id

Propchange: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfListItem.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Feb 14 13:55:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id

Propchange: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfListStyle.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Feb 14 13:55:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id

Propchange: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfListStyleBullet.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Feb 14 13:55:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id

Propchange: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfListStyleNumber.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Feb 14 13:55:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id

Propchange: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfListStyleText.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Feb 14 13:55:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id

Propchange: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfListTable.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Feb 14 13:55:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id

Propchange: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfNull.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Feb 14 13:55:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id

Propchange: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfOptions.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Feb 14 13:55:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id

Propchange: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfPage.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Feb 14 13:55:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id

Propchange: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfPageArea.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Feb 14 13:55:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id

Propchange: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfPageBreak.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Feb 14 13:55:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id

Propchange: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfPageNumber.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Feb 14 13:55:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id

Propchange: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfPageNumberCitation.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Feb 14 13:55:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id

Propchange: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfParagraph.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Feb 14 13:55:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id

Propchange: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfParagraphKeepTogether.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Feb 14 13:55:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id

Propchange: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfSection.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Feb 14 13:55:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id

Propchange: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfString.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Feb 14 13:55:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id

Propchange: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfStringConverter.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Feb 14 13:55:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id

Propchange: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfStyleSheetTable.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Feb 14 13:55:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id

Propchange: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfTable.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Feb 14 13:55:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id

Propchange: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfTableCell.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Feb 14 13:55:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id

Propchange: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfTableRow.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Feb 14 13:55:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id

Propchange: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfTemplate.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Feb 14 13:55:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id

Propchange: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfText.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Feb 14 13:55:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id

Propchange: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfTextrun.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Feb 14 13:55:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id

Propchange: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/WhitespaceCollapser.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Feb 14 13:55:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id

Propchange: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/rtf/rtflib/tools/ImageConstants.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Feb 14 13:55:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id

Propchange: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/rtf/rtflib/tools/ImageUtil.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Feb 14 13:55:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id

Modified: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/txt/TXTRenderer.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/txt/TXTRenderer.java?rev=627882&r1=627881&r2=627882&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/txt/TXTRenderer.java (original)
+++ xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/txt/TXTRenderer.java Thu Feb 14 13:55:44 2008
@@ -21,6 +21,7 @@
 
 import java.awt.Color;
 import java.awt.Point;
+import java.awt.geom.AffineTransform;
 import java.awt.geom.Rectangle2D;
 import java.io.IOException;
 import java.io.OutputStream;
@@ -322,6 +323,7 @@
      * {@inheritDoc}
      */
     protected void saveGraphicsState() {
+        currentState.push(new CTM());
     }
 
     /**
@@ -329,6 +331,7 @@
      * {@inheritDoc}
      */
     protected void restoreGraphicsState() {
+        currentState.pop();
     }
 
     /**
@@ -564,4 +567,10 @@
     protected void endVParea() {
         currentState.pop();
     }
+    
+    /** {@inheritDoc} */
+    protected void concatenateTransformationMatrix(AffineTransform at) {
+        currentState.push(new CTM(ptToMpt(at)));
+    }
+    
 }

Modified: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/txt/TXTRendererConfigurator.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/txt/TXTRendererConfigurator.java?rev=627882&r1=627881&r2=627882&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/txt/TXTRendererConfigurator.java (original)
+++ xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/txt/TXTRendererConfigurator.java Thu Feb 14 13:55:44 2008
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-/* $Id: $ */
+/* $Id$ */
 
 package org.apache.fop.render.txt;
 

Propchange: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/txt/TXTRendererConfigurator.java
------------------------------------------------------------------------------
    svn:keywords = Id

Modified: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/txt/TXTRendererMaker.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/txt/TXTRendererMaker.java?rev=627882&r1=627881&r2=627882&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/txt/TXTRendererMaker.java (original)
+++ xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/txt/TXTRendererMaker.java Thu Feb 14 13:55:44 2008
@@ -1,54 +1,54 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You 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$ */
-
-package org.apache.fop.render.txt;
-
-import org.apache.fop.apps.FOUserAgent;
-import org.apache.fop.apps.MimeConstants;
-import org.apache.fop.render.AbstractRendererMaker;
-import org.apache.fop.render.Renderer;
-import org.apache.fop.render.RendererConfigurator;
-
-/**
- * RendererMaker for the Plain Text Renderer.
- */
-public class TXTRendererMaker extends AbstractRendererMaker {
-
-    private static final String[] MIMES = new String[] {MimeConstants.MIME_PLAIN_TEXT};
-    
-    /**{@inheritDoc} */
-    public Renderer makeRenderer(FOUserAgent userAgent) {
-        return new TXTRenderer();
-    }
-
-    /**{@inheritDoc} */
-    public RendererConfigurator getConfigurator(FOUserAgent userAgent) {
-        return new TXTRendererConfigurator(userAgent);
-    }
-
-    /** {@inheritDoc} */
-    public boolean needsOutputStream() {
-        return true;
-    }
-
-    /** {@inheritDoc} */
-    public String[] getSupportedMimeTypes() {
-        return MIMES;
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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$ */
+
+package org.apache.fop.render.txt;
+
+import org.apache.fop.apps.FOUserAgent;
+import org.apache.fop.apps.MimeConstants;
+import org.apache.fop.render.AbstractRendererMaker;
+import org.apache.fop.render.Renderer;
+import org.apache.fop.render.RendererConfigurator;
+
+/**
+ * RendererMaker for the Plain Text Renderer.
+ */
+public class TXTRendererMaker extends AbstractRendererMaker {
+
+    private static final String[] MIMES = new String[] {MimeConstants.MIME_PLAIN_TEXT};
+    
+    /**{@inheritDoc} */
+    public Renderer makeRenderer(FOUserAgent userAgent) {
+        return new TXTRenderer();
+    }
+
+    /**{@inheritDoc} */
+    public RendererConfigurator getConfigurator(FOUserAgent userAgent) {
+        return new TXTRendererConfigurator(userAgent);
+    }
+
+    /** {@inheritDoc} */
+    public boolean needsOutputStream() {
+        return true;
+    }
+
+    /** {@inheritDoc} */
+    public String[] getSupportedMimeTypes() {
+        return MIMES;
+    }
+}

Propchange: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/txt/TXTRendererMaker.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/xml/XMLRenderer.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/xml/XMLRenderer.java?rev=627882&r1=627881&r2=627882&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/xml/XMLRenderer.java (original)
+++ xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/xml/XMLRenderer.java Thu Feb 14 13:55:44 2008
@@ -61,6 +61,7 @@
 import org.apache.fop.area.NormalFlow;
 import org.apache.fop.area.OffDocumentExtensionAttachment;
 import org.apache.fop.area.OffDocumentItem;
+import org.apache.fop.area.PageSequence;
 import org.apache.fop.area.PageViewport;
 import org.apache.fop.area.RegionReference;
 import org.apache.fop.area.RegionViewport;
@@ -585,14 +586,20 @@
         handleExtensionAttachments(page.getExtensionAttachments());
     }
 
-    /**
-     * {@inheritDoc}
-     */
-    public void startPageSequence(LineArea seqTitle) {
+    /** {@inheritDoc} */
+    public void startPageSequence(PageSequence pageSequence) {
         handleDocumentExtensionAttachments();
         endPageSequence();  // move this before handleDocumentExtensionAttachments() ?
         startedSequence = true;
-        startElement("pageSequence");
+        atts.clear();
+        if (pageSequence.getLanguage() != null) {
+            addAttribute("language", pageSequence.getLanguage());
+        }
+        if (pageSequence.getCountry() != null) {
+            addAttribute("country", pageSequence.getCountry());
+        }
+        startElement("pageSequence", atts);
+        LineArea seqTitle = pageSequence.getTitle();
         if (seqTitle != null) {
             startElement("title");
             List children = seqTitle.getInlineAreas();

Modified: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/xml/XMLRendererMaker.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/xml/XMLRendererMaker.java?rev=627882&r1=627881&r2=627882&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/xml/XMLRendererMaker.java (original)
+++ xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/xml/XMLRendererMaker.java Thu Feb 14 13:55:44 2008
@@ -1,56 +1,56 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You 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$ */
-
-package org.apache.fop.render.xml;
-
-import org.apache.fop.apps.FOUserAgent;
-import org.apache.fop.apps.MimeConstants;
-import org.apache.fop.render.AbstractRendererMaker;
-import org.apache.fop.render.PrintRendererConfigurator;
-import org.apache.fop.render.Renderer;
-import org.apache.fop.render.RendererConfigurator;
-
-/**
- * RendererMaker for the Area Tree XML Renderer.
- */
-public class XMLRendererMaker extends AbstractRendererMaker {
-
-    private static final String[] MIMES = new String[] {MimeConstants.MIME_FOP_AREA_TREE};
-    
-    /**{@inheritDoc} */
-    public Renderer makeRenderer(FOUserAgent userAgent) {
-        return new XMLRenderer();
-    }
-
-    /**{@inheritDoc} */
-    public RendererConfigurator getConfigurator(FOUserAgent userAgent) {
-        return new PrintRendererConfigurator(userAgent);
-    }
-
-    /** {@inheritDoc} */
-    public boolean needsOutputStream() {
-        return true;
-    }
-
-    /** {@inheritDoc} */
-    public String[] getSupportedMimeTypes() {
-        return MIMES;
-    }
-
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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$ */
+
+package org.apache.fop.render.xml;
+
+import org.apache.fop.apps.FOUserAgent;
+import org.apache.fop.apps.MimeConstants;
+import org.apache.fop.render.AbstractRendererMaker;
+import org.apache.fop.render.PrintRendererConfigurator;
+import org.apache.fop.render.Renderer;
+import org.apache.fop.render.RendererConfigurator;
+
+/**
+ * RendererMaker for the Area Tree XML Renderer.
+ */
+public class XMLRendererMaker extends AbstractRendererMaker {
+
+    private static final String[] MIMES = new String[] {MimeConstants.MIME_FOP_AREA_TREE};
+    
+    /**{@inheritDoc} */
+    public Renderer makeRenderer(FOUserAgent userAgent) {
+        return new XMLRenderer();
+    }
+
+    /**{@inheritDoc} */
+    public RendererConfigurator getConfigurator(FOUserAgent userAgent) {
+        return new PrintRendererConfigurator(userAgent);
+    }
+
+    /** {@inheritDoc} */
+    public boolean needsOutputStream() {
+        return true;
+    }
+
+    /** {@inheritDoc} */
+    public String[] getSupportedMimeTypes() {
+        return MIMES;
+    }
+
+}

Propchange: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/xml/XMLRendererMaker.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/servlet/ServletContextURIResolver.java
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/svg/ACIUtils.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Feb 14 13:55:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id

Modified: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/svg/PDFBridgeContext.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/svg/PDFBridgeContext.java?rev=627882&r1=627881&r2=627882&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/svg/PDFBridgeContext.java (original)
+++ xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/svg/PDFBridgeContext.java Thu Feb 14 13:55:44 2008
@@ -26,6 +26,10 @@
 import org.apache.batik.bridge.BridgeContext;
 import org.apache.batik.bridge.DocumentLoader;
 import org.apache.batik.bridge.UserAgent;
+
+import org.apache.xmlgraphics.image.loader.ImageManager;
+import org.apache.xmlgraphics.image.loader.ImageSessionContext;
+
 import org.apache.fop.fonts.FontInfo;
 
 /**
@@ -36,6 +40,9 @@
     /** The font list. */
     private final FontInfo fontInfo;
 
+    private final ImageManager imageManager;
+    private final ImageSessionContext imageSessionContext;
+
     private AffineTransform linkTransform;
     
     /**
@@ -50,9 +57,13 @@
     public PDFBridgeContext(UserAgent userAgent,
                             DocumentLoader loader,
                             FontInfo fontInfo,
+                            ImageManager imageManager,
+                            ImageSessionContext imageSessionContext,
                             AffineTransform linkTransform) {
         super(userAgent, loader);
         this.fontInfo = fontInfo;
+        this.imageManager = imageManager;
+        this.imageSessionContext = imageSessionContext;
         this.linkTransform = linkTransform;
     }
 
@@ -66,9 +77,13 @@
      */
     public PDFBridgeContext(UserAgent userAgent, 
                             FontInfo fontInfo, 
+                            ImageManager imageManager,
+                            ImageSessionContext imageSessionContext,
                             AffineTransform linkTransform) {
         super(userAgent);
         this.fontInfo = fontInfo;
+        this.imageManager = imageManager;
+        this.imageSessionContext = imageSessionContext;
         this.linkTransform = linkTransform;
     }
 
@@ -78,10 +93,29 @@
      * @param fontInfo the font list for the text painter, may be null
      *                 in which case text is painted as shapes
      */
-    public PDFBridgeContext(UserAgent userAgent, FontInfo fontInfo) {
-        this(userAgent, fontInfo, null);
+    public PDFBridgeContext(UserAgent userAgent,
+                            FontInfo fontInfo,
+                            ImageManager imageManager,
+                            ImageSessionContext imageSessionContext) {
+        this(userAgent, fontInfo, imageManager, imageSessionContext, null);
     }
 
+    /**
+     * Returns the ImageManager to be used by the ImageElementBridge.
+     * @return the image manager
+     */
+    public ImageManager getImageManager() {
+        return this.imageManager;
+    }
+
+    /**
+     * Returns the ImageSessionContext to be used by the ImageElementBridge.
+     * @return the image session context
+     */
+    public ImageSessionContext getImageSessionContext() {
+        return this.imageSessionContext;
+    }
+    
     private void putPDFElementBridgeConditional(String className, String testFor) {
         try {
             Class.forName(testFor);
@@ -136,7 +170,10 @@
     //TODO There's no matching method in the super-class here
     public BridgeContext createBridgeContext() {
         return new PDFBridgeContext(getUserAgent(), getDocumentLoader(),
-                                    fontInfo, linkTransform);
+                                    fontInfo,
+                                    getImageManager(),
+                                    getImageSessionContext(),
+                                    linkTransform);
     }
-    
+
 }

Propchange: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/svg/PDFDocumentGraphics2DConfigurator.java
------------------------------------------------------------------------------
    svn:keywords = Id



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org


Mime
View raw message