You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by je...@apache.org on 2005/08/03 21:31:08 UTC

svn commit: r227252 - in /xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf: ./ rtflib/rtfdoc/

Author: jeremias
Date: Wed Aug  3 12:30:55 2005
New Revision: 227252

URL: http://svn.apache.org/viewcvs?rev=227252&view=rev
Log:
Removing dependencies of RTF library on the rest of FOP so it can be used stand-alone.
Submitted by: Guillaume Déflache <guillaume.at.anyware-tech.com> 

Added:
    xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/BorderAttributesConverter.java
      - copied, changed from r227246, xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/BorderAttributesConverter.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/IBorderAttributes.java
Removed:
    xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/BorderAttributesConverter.java
Modified:
    xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/BuilderContext.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/RTFHandler.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/TableAttributesConverter.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/TableContext.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfGenerator.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfTableCell.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfTableRow.java

Copied: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/BorderAttributesConverter.java (from r227246, xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/BorderAttributesConverter.java)
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/BorderAttributesConverter.java?p2=xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/BorderAttributesConverter.java&p1=xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/BorderAttributesConverter.java&r1=227246&r2=227252&rev=227252&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/BorderAttributesConverter.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/BorderAttributesConverter.java Wed Aug  3 12:30:55 2005
@@ -1,5 +1,5 @@
 /*
- * Copyright 1999-2004 The Apache Software Foundation.
+ * Copyright 1999-2005 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,90 +24,18 @@
  * the FOP project.
  */
 
-package org.apache.fop.render.rtf.rtflib.rtfdoc;
+package org.apache.fop.render.rtf;
 
 import org.apache.fop.fo.Constants;
 import org.apache.fop.fo.properties.CommonBorderPaddingBackground;
-import org.apache.fop.render.rtf.FOPRtfAttributes;
+import org.apache.fop.render.rtf.rtflib.rtfdoc.IBorderAttributes;
+import org.apache.fop.render.rtf.rtflib.rtfdoc.RtfAttributes;
 
 /** Constants for RTF border attribute names, and a static method for converting
  *  fo attribute strings. */
 
 public class BorderAttributesConverter {
 
-    /** Constant for a single-thick border */
-    public static final String BORDER_SINGLE_THICKNESS = "brdrs";
-    /** Constant for a double-thick border */
-    public static final String BORDER_DOUBLE_THICKNESS = "brdrth";
-    /** Constant for a shadowed border */
-    public static final String BORDER_SHADOWED = "brdrsh";
-    /** Constant for a double border */
-    public static final String BORDER_DOUBLE = "brdrdb";
-    /** Constant for a dotted border */
-    public static final String BORDER_DOTTED = "brdrdot";
-    /** Constant for a dashed border */
-    public static final String BORDER_DASH = "brdrdash";
-    /** Constant for a hairline border */
-    public static final String BORDER_HAIRLINE = "brdrhair";
-    /** Constant for a small-dashed border */
-    public static final String BORDER_DASH_SMALL = "brdrdashsm";
-    /** Constant for a dot-dashed border */
-    public static final String BORDER_DOT_DASH = "brdrdashd";
-    /** Constant for a dot-dot-dashed border */
-    public static final String BORDER_DOT_DOT_DASH = "brdrdashdd";
-    /** Constant for a triple border */
-    public static final String BORDER_TRIPLE = "brdrtriple";
-    /** Constant for a think-thin-small border */
-    public static final String BORDER_THINK_THIN_SMALL = "brdrtnthsg";
-    /** Constant for a thin-thick-small border */
-    public static final String BORDER_THIN_THICK_SMALL = "brdrthtnsg";
-    /** Constant for a thin-thick-thin-small border */
-    public static final String BORDER_THIN_THICK_THIN_SMALL = "brdrthtnthsg";
-    /** Constant for a think-thin-medium border */
-    public static final String BORDER_THINK_THIN_MEDIUM = "brdrtnthmg";
-    /** Constant for a thin-thick-medium border */
-    public static final String BORDER_THIN_THICK_MEDIUM = "brdrthtnmg";
-    /** Constant for a thin-thick-thin-medium border */
-    public static final String BORDER_THIN_THICK_THIN_MEDIUM = "brdrthtnthmg";
-    /** Constant for a think-thin-large border */
-    public static final String BORDER_THINK_THIN_LARGE = "brdrtnthlg";
-    /** Constant for a thin-thick-large border */
-    public static final String BORDER_THIN_THICK_LARGE = "brdrthtnlg";
-    /** Constant for a thin-thick-thin-large border */
-    public static final String BORDER_THIN_THICK_THIN_LARGE = "brdrthtnthlg";
-    /** Constant for a wavy border */
-    public static final String BORDER_WAVY = "brdrwavy";
-    /** Constant for a double wavy border */
-    public static final String BORDER_WAVY_DOUBLE = "brdrwavydb";
-    /** Constant for a striped border */
-    public static final String BORDER_STRIPED = "brdrdashdotstr";
-    /** Constant for an embossed border */
-    public static final String BORDER_EMBOSS = "brdremboss";
-    /** Constant for an engraved border */
-    public static final String BORDER_ENGRAVE = "brdrengrave";
-    /** Constant for an nil border */
-    public static final String BORDER_NIL = "brdrnil";
-    /** Constant for border color */
-    public static final String BORDER_COLOR = "brdrcf";
-    /** Constant for border space */
-    public static final String BORDER_SPACE = "brsp";
-    /** Constant for border width */
-    public static final String BORDER_WIDTH = "brdrw";
-
-    /** String array of border attributes */
-    public static final 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
-    };
-
     /**
      * Create a border control word in attributes, with border properties 
      * as specified in color, style and width.
@@ -121,9 +49,9 @@
         int styleEnum = border.getBorderStyle(side);
         if (styleEnum != Constants.EN_NONE) {
             FOPRtfAttributes attrs = new FOPRtfAttributes();
-            attrs.set(BORDER_COLOR, border.getBorderColor(side));
+            attrs.set(IBorderAttributes.BORDER_COLOR, border.getBorderColor(side));
             attrs.set(convertAttributetoRtf(styleEnum));
-            attrs.set(BORDER_WIDTH, border.getBorderWidth(side, false));
+            attrs.set(IBorderAttributes.BORDER_WIDTH, border.getBorderWidth(side, false));
             attributes.set(controlWord, attrs);
         }
     }
@@ -137,39 +65,39 @@
        // Added by Normand Masse
        // "solid" is interpreted like "thin"
        if (iBorderStyle == Constants.EN_NONE) {
-           return BorderAttributesConverter.BORDER_NIL;
+           return IBorderAttributes.BORDER_NIL;
        } else if (iBorderStyle == Constants.EN_SOLID) {
-           return BorderAttributesConverter.BORDER_SINGLE_THICKNESS;
+           return IBorderAttributes.BORDER_SINGLE_THICKNESS;
 /*        } else if (iBorderStyle==Constants.EN_THIN) {
-                       return BorderAttributesConverter.BORDER_SINGLE_THICKNESS;
+                       return IBorderAttributes.BORDER_SINGLE_THICKNESS;
        } else if (iBorderStyle==Constants.EN_THICK) {
-           return BorderAttributesConverter.BORDER_DOUBLE_THICKNESS;
+           return IBorderAttributes.BORDER_DOUBLE_THICKNESS;
        } else if (iBorderStyle==Constants.EN_ value.equals("shadowed")) {
-           return BorderAttributesConverter.BORDER_SHADOWED;*/
+           return IBorderAttributes.BORDER_SHADOWED;*/
        } else if (iBorderStyle == Constants.EN_DOUBLE) {
-           return BorderAttributesConverter.BORDER_DOUBLE;
+           return IBorderAttributes.BORDER_DOUBLE;
        } else if (iBorderStyle == Constants.EN_DOTTED) {
-           return BorderAttributesConverter.BORDER_DOTTED;
+           return IBorderAttributes.BORDER_DOTTED;
        } else if (iBorderStyle == Constants.EN_DASHED) {
-           return BorderAttributesConverter.BORDER_DASH;
+           return IBorderAttributes.BORDER_DASH;
 /*        } else if (iBorderStyle==Constants value.equals("hairline")) {
-           return BorderAttributesConverter.BORDER_HAIRLINE;*/
+           return IBorderAttributes.BORDER_HAIRLINE;*/
 /*        } else if (iBorderStyle==Constant value.equals("dot-dash")) {
-           return BorderAttributesConverter.BORDER_DOT_DASH;
+           return IBorderAttributes.BORDER_DOT_DASH;
        } else if (iBorderStyle==Constant value.equals("dot-dot-dash")) {
-           return BorderAttributesConverter.BORDER_DOT_DOT_DASH;
+           return IBorderAttributes.BORDER_DOT_DOT_DASH;
        } else if (iBorderStyle==Constant value.equals("triple")) {
-           return BorderAttributesConverter.BORDER_TRIPLE;
+           return IBorderAttributes.BORDER_TRIPLE;
        } else if (iBorderStyle==Constant value.equals("wavy")) {
-           return BorderAttributesConverter.BORDER_WAVY;
+           return IBorderAttributes.BORDER_WAVY;
        } else if (iBorderStyle==Constant value.equals("wavy-double")) {
-           return BorderAttributesConverter.BORDER_WAVY_DOUBLE;
+           return IBorderAttributes.BORDER_WAVY_DOUBLE;
        } else if (iBorderStyle==Constant value.equals("striped")) {
-           return BorderAttributesConverter.BORDER_STRIPED;
+           return IBorderAttributes.BORDER_STRIPED;
        } else if (iBorderStyle==Constant value.equals("emboss")) {
-           return BorderAttributesConverter.BORDER_EMBOSS;
+           return IBorderAttributes.BORDER_EMBOSS;
        } else if (iBorderStyle==Constant value.equals("engrave")) {
-           return BorderAttributesConverter.BORDER_ENGRAVE;*/
+           return IBorderAttributes.BORDER_ENGRAVE;*/
        } else {
            return null;
        }

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/BuilderContext.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/BuilderContext.java?rev=227252&r1=227251&r2=227252&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/BuilderContext.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/BuilderContext.java Wed Aug  3 12:30:55 2005
@@ -1,5 +1,5 @@
 /*
- * Copyright 1999-2004 The Apache Software Foundation.
+ * Copyright 1999-2005 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.
@@ -33,7 +33,7 @@
  *  for the JFOR project and is now integrated into FOP.
  */
 
-class BuilderContext {
+public class BuilderContext {
     /** stack of RtfContainers */
     private final Stack containers = new Stack();
 
@@ -46,7 +46,7 @@
     /** Rtf options */
     private IRtfOptions options;
 
-    BuilderContext(IRtfOptions rtfOptions) {
+    public BuilderContext(IRtfOptions rtfOptions) {
         options = rtfOptions;
     }
 
@@ -67,7 +67,7 @@
     }
 
     /* find the "nearest" IBuilder of given class /
-    Object getBuilder(Class builderClass,boolean required)
+    public Object getBuilder(Class builderClass,boolean required)
     throws Exception
     {
         final IBuilder result = (IBuilder)getObjectFromStack(builders,builderClass);
@@ -83,7 +83,7 @@
      *  @param required if true, ConverterException is thrown if no container found
      *  @param forWhichBuilder used in error message if container not found
      */
-    RtfContainer getContainer(Class containerClass, boolean required,
+    public RtfContainer getContainer(Class containerClass, boolean required,
                               Object /*IBuilder*/ forWhichBuilder) throws Exception {
         // TODO what to do if the desired container is not at the top of the stack?
         // close top-of-stack container?
@@ -101,7 +101,7 @@
     }
 
     /** push an RtfContainer on our stack */
-    void pushContainer(RtfContainer c) {
+    public void pushContainer(RtfContainer c) {
         containers.push(c);
     }
 
@@ -113,7 +113,7 @@
      * TODO: what happens to elements that are "more on top" than oldC on the
      * stack? shouldn't they be closed or something?
      */
-    void replaceContainer(RtfContainer oldC, RtfContainer newC)
+    public void replaceContainer(RtfContainer oldC, RtfContainer newC)
     throws Exception {
         // treating the Stack as a Vector allows such manipulations (yes, I hear you screaming ;-)
         final int index = containers.indexOf(oldC);
@@ -124,12 +124,12 @@
     }
 
     /** pop the topmost RtfContainer from our stack */
-    void popContainer() {
+    public void popContainer() {
         containers.pop();
     }
 
     /* push an IBuilder to our stack /
-    void pushBuilder(IBuilder b)
+    public void pushBuilder(IBuilder b)
     {
         builders.push(b);
     }*/
@@ -137,7 +137,7 @@
     /** pop the topmost IBuilder from our stack and return previous builder on stack
      *  @return null if builders stack is empty
 
-    IBuilder popBuilderAndGetPreviousOne()
+    public IBuilder popBuilderAndGetPreviousOne()
     {
         IBuilder result = null;
         builders.pop();
@@ -148,18 +148,18 @@
     }
     */
     /** return the current TableContext */
-    TableContext getTableContext() {
+    public TableContext getTableContext() {
         return (TableContext)tableContexts.peek();
     }
 
     /** push a TableContext to our stack */
-    void pushTableContext(TableContext tc) {
+    public void pushTableContext(TableContext tc) {
         tableContexts.push(tc);
     }
 
     /** pop a TableContext from our stack */
-    void popTableContext() {
+    public void popTableContext() {
         tableContexts.pop();
     }
 
-}
\ No newline at end of file
+}

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/RTFHandler.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/RTFHandler.java?rev=227252&r1=227251&r2=227252&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/RTFHandler.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/RTFHandler.java Wed Aug  3 12:30:55 2005
@@ -505,7 +505,9 @@
 
         try {
             Integer iWidth = new Integer(tc.getColumnWidth().getValue() / 1000);
-            builderContext.getTableContext().setNextColumnWidth(iWidth.toString() + "pt");
+            String strWidth = iWidth.toString() + "pt";
+            Float width = new Float(FoUnitsConverter.getInstance().convertToTwips(strWidth));
+            builderContext.getTableContext().setNextColumnWidth(width);
             builderContext.getTableContext().setNextColumnRowSpanning(new Integer(0), null);
         } catch (Exception e) {
             log.error("startColumn: " + e.getMessage());

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/TableAttributesConverter.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/TableAttributesConverter.java?rev=227252&r1=227251&r2=227252&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/TableAttributesConverter.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/TableAttributesConverter.java Wed Aug  3 12:30:55 2005
@@ -1,5 +1,5 @@
 /*
- * Copyright 1999-2004 The Apache Software Foundation.
+ * Copyright 1999-2005 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.
@@ -29,7 +29,7 @@
 import org.apache.fop.fo.flow.TableRow;
 import org.apache.fop.fo.properties.CommonBorderPaddingBackground;
 import org.apache.fop.fo.properties.Property;
-import org.apache.fop.render.rtf.rtflib.rtfdoc.BorderAttributesConverter;
+import org.apache.fop.render.rtf.BorderAttributesConverter;
 import org.apache.fop.render.rtf.rtflib.rtfdoc.ITableAttributes;
 import org.apache.fop.render.rtf.rtflib.rtfdoc.RtfAttributes;
 import org.apache.fop.render.rtf.rtflib.rtfdoc.RtfColorTable;
@@ -318,52 +318,6 @@
         }
 */
         return attrib;
-    }
-
-
-    /**
-     *
-     * @param iBorderStyle the border style to be converted
-     * @return String with the converted border style
-     */
-    public static String convertAttributetoRtf(int iBorderStyle) {
-        // Added by Normand Masse
-        // "solid" is interpreted like "thin"
-        if (iBorderStyle == Constants.EN_SOLID) {
-            return BorderAttributesConverter.BORDER_SINGLE_THICKNESS;
-/*        } else if (iBorderStyle==Constants.EN_THIN) {
-                        return BorderAttributesConverter.BORDER_SINGLE_THICKNESS;
-        } else if (iBorderStyle==Constants.EN_THICK) {
-            return BorderAttributesConverter.BORDER_DOUBLE_THICKNESS;
-        } else if (iBorderStyle==Constants.EN_ value.equals("shadowed")) {
-            return BorderAttributesConverter.BORDER_SHADOWED;*/
-        } else if (iBorderStyle == Constants.EN_DOUBLE) {
-            return BorderAttributesConverter.BORDER_DOUBLE;
-        } else if (iBorderStyle == Constants.EN_DOTTED) {
-            return BorderAttributesConverter.BORDER_DOTTED;
-        } else if (iBorderStyle == Constants.EN_DASHED) {
-            return BorderAttributesConverter.BORDER_DASH;
-/*        } else if (iBorderStyle==Constants value.equals("hairline")) {
-            return BorderAttributesConverter.BORDER_HAIRLINE;*/
-/*        } else if (iBorderStyle==Constant value.equals("dot-dash")) {
-            return BorderAttributesConverter.BORDER_DOT_DASH;
-        } else if (iBorderStyle==Constant value.equals("dot-dot-dash")) {
-            return BorderAttributesConverter.BORDER_DOT_DOT_DASH;
-        } else if (iBorderStyle==Constant value.equals("triple")) {
-            return BorderAttributesConverter.BORDER_TRIPLE;
-        } else if (iBorderStyle==Constant value.equals("wavy")) {
-            return BorderAttributesConverter.BORDER_WAVY;
-        } else if (iBorderStyle==Constant value.equals("wavy-double")) {
-            return BorderAttributesConverter.BORDER_WAVY_DOUBLE;
-        } else if (iBorderStyle==Constant value.equals("striped")) {
-            return BorderAttributesConverter.BORDER_STRIPED;
-        } else if (iBorderStyle==Constant value.equals("emboss")) {
-            return BorderAttributesConverter.BORDER_EMBOSS;
-        } else if (iBorderStyle==Constant value.equals("engrave")) {
-            return BorderAttributesConverter.BORDER_ENGRAVE;*/
-        } else {
-            return null;
-        }
     }
 
 }

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/TableContext.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/TableContext.java?rev=227252&r1=227251&r2=227252&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/TableContext.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/TableContext.java Wed Aug  3 12:30:55 2005
@@ -1,5 +1,5 @@
 /*
- * Copyright 1999-2004 The Apache Software Foundation.
+ * Copyright 1999-2005 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.
@@ -38,7 +38,7 @@
  *  is now integrated into FOP.
  */
 
-class TableContext implements ITableColumnsInfo {
+public class TableContext implements ITableColumnsInfo {
     private final Log log = new SimpleLog("FOP/RTF");
     private final BuilderContext context;
     private final List colWidths = new java.util.ArrayList();
@@ -72,27 +72,27 @@
         return bNextRowBelongsToHeader;
     }
 
-    TableContext(BuilderContext ctx) {
+    public TableContext(BuilderContext ctx) {
         context = ctx;
     }
 
-    void setNextColumnWidth(String strWidth)
+    public void setNextColumnWidth(Float width)
             throws Exception {
-        colWidths.add(new Float(FoUnitsConverter.getInstance().convertToTwips(strWidth)));
+        colWidths.add(width);
     }
 
     //Added by Peter Herweg on 2002-06-29
-    RtfAttributes getColumnRowSpanningAttrs() {
+    public RtfAttributes getColumnRowSpanningAttrs() {
         return (RtfAttributes)colRowSpanningAttrs.get(colIndex);
     }
 
     //Added by Peter Herweg on 2002-06-29
-    Integer getColumnRowSpanningNumber() {
+    public Integer getColumnRowSpanningNumber() {
         return (Integer)colRowSpanningNumber.get(colIndex);
     }
 
     //Added by Peter Herweg on 2002-06-29
-    void setCurrentColumnRowSpanning(Integer iRowSpanning,  RtfAttributes attrs)
+    public void setCurrentColumnRowSpanning(Integer iRowSpanning,  RtfAttributes attrs)
             throws Exception {
 
         if (colIndex < colRowSpanningNumber.size()) {

Added: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/IBorderAttributes.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/IBorderAttributes.java?rev=227252&view=auto
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/IBorderAttributes.java (added)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/IBorderAttributes.java Wed Aug  3 12:30:55 2005
@@ -0,0 +1,105 @@
+/*
+ * 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.
+ * 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: BorderAttributesConverter.java 198175 2004-11-24 21:07:31Z gmazza $ */
+
+
+/*
+ * This file is part of the RTF library of the FOP project, which was originally
+ * created by Bertrand Delacretaz <bd...@codeconsult.ch> and by other
+ * contributors to the jfor project (www.jfor.org), who agreed to donate jfor to
+ * the FOP project.
+ */
+
+package org.apache.fop.render.rtf.rtflib.rtfdoc;
+
+/** Constants for RTF border attribute names. */
+
+public interface IBorderAttributes {
+
+    /** Constant for a single-thick border */
+    public static final String BORDER_SINGLE_THICKNESS = "brdrs";
+    /** Constant for a double-thick border */
+    public static final String BORDER_DOUBLE_THICKNESS = "brdrth";
+    /** Constant for a shadowed border */
+    public static final String BORDER_SHADOWED = "brdrsh";
+    /** Constant for a double border */
+    public static final String BORDER_DOUBLE = "brdrdb";
+    /** Constant for a dotted border */
+    public static final String BORDER_DOTTED = "brdrdot";
+    /** Constant for a dashed border */
+    public static final String BORDER_DASH = "brdrdash";
+    /** Constant for a hairline border */
+    public static final String BORDER_HAIRLINE = "brdrhair";
+    /** Constant for a small-dashed border */
+    public static final String BORDER_DASH_SMALL = "brdrdashsm";
+    /** Constant for a dot-dashed border */
+    public static final String BORDER_DOT_DASH = "brdrdashd";
+    /** Constant for a dot-dot-dashed border */
+    public static final String BORDER_DOT_DOT_DASH = "brdrdashdd";
+    /** Constant for a triple border */
+    public static final String BORDER_TRIPLE = "brdrtriple";
+    /** Constant for a think-thin-small border */
+    public static final String BORDER_THINK_THIN_SMALL = "brdrtnthsg";
+    /** Constant for a thin-thick-small border */
+    public static final String BORDER_THIN_THICK_SMALL = "brdrthtnsg";
+    /** Constant for a thin-thick-thin-small border */
+    public static final String BORDER_THIN_THICK_THIN_SMALL = "brdrthtnthsg";
+    /** Constant for a think-thin-medium border */
+    public static final String BORDER_THINK_THIN_MEDIUM = "brdrtnthmg";
+    /** Constant for a thin-thick-medium border */
+    public static final String BORDER_THIN_THICK_MEDIUM = "brdrthtnmg";
+    /** Constant for a thin-thick-thin-medium border */
+    public static final String BORDER_THIN_THICK_THIN_MEDIUM = "brdrthtnthmg";
+    /** Constant for a think-thin-large border */
+    public static final String BORDER_THINK_THIN_LARGE = "brdrtnthlg";
+    /** Constant for a thin-thick-large border */
+    public static final String BORDER_THIN_THICK_LARGE = "brdrthtnlg";
+    /** Constant for a thin-thick-thin-large border */
+    public static final String BORDER_THIN_THICK_THIN_LARGE = "brdrthtnthlg";
+    /** Constant for a wavy border */
+    public static final String BORDER_WAVY = "brdrwavy";
+    /** Constant for a double wavy border */
+    public static final String BORDER_WAVY_DOUBLE = "brdrwavydb";
+    /** Constant for a striped border */
+    public static final String BORDER_STRIPED = "brdrdashdotstr";
+    /** Constant for an embossed border */
+    public static final String BORDER_EMBOSS = "brdremboss";
+    /** Constant for an engraved border */
+    public static final String BORDER_ENGRAVE = "brdrengrave";
+    /** Constant for an nil border */
+    public static final String BORDER_NIL = "brdrnil";
+    /** Constant for border color */
+    public static final String BORDER_COLOR = "brdrcf";
+    /** Constant for border space */
+    public static final String BORDER_SPACE = "brsp";
+    /** Constant for border width */
+    public static final String BORDER_WIDTH = "brdrw";
+
+    /** String array of border attributes */
+    public static final 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
+    };
+}

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfGenerator.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfGenerator.java?rev=227252&r1=227251&r2=227252&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfGenerator.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfGenerator.java Wed Aug  3 12:30:55 2005
@@ -1,5 +1,5 @@
 /*
- * Copyright 2004 The Apache Software Foundation.
+ * Copyright 2004-2005 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.
@@ -21,8 +21,6 @@
 import java.io.IOException;
 import java.io.Writer;
 
-import org.apache.fop.apps.Fop;
-
 /**
  * Represents a generator element which says who generated the RTF document.
  */
@@ -40,8 +38,7 @@
         newLine();
         writeGroupMark(true);
         writeStarControlWord("generator");
-        writer.write("Apache FOP ");
-        writer.write(Fop.getVersion());
+        writer.write("Apache XML Graphics RTF Library");
         writer.write(";");
         writeGroupMark(false);
     }

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfTableCell.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfTableCell.java?rev=227252&r1=227251&r2=227252&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfTableCell.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfTableCell.java Wed Aug  3 12:30:55 2005
@@ -1,5 +1,5 @@
 /*
- * Copyright 1999-2004 The Apache Software Foundation.
+ * Copyright 1999-2005 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.
@@ -252,7 +252,7 @@
 
         writeAttributes (attrib, ITableAttributes.ATTRIB_CELL_PADDING);
         writeAttributes (attrib, ITableAttributes.CELL_BORDER);
-        writeAttributes (attrib, BorderAttributesConverter.BORDERS);
+        writeAttributes (attrib, IBorderAttributes.BORDERS);
 
         // cell width
         final int xPos = widthOffset + this.cellWidth;

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfTableRow.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfTableRow.java?rev=227252&r1=227251&r2=227252&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfTableRow.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfTableRow.java Wed Aug  3 12:30:55 2005
@@ -1,5 +1,5 @@
 /*
- * Copyright 1999-2004 The Apache Software Foundation.
+ * Copyright 1999-2005 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.
@@ -152,7 +152,7 @@
         writeAttributes(attrib, new String[]{ITableAttributes.ATTR_HEADER});
         writeAttributes(attrib, ITableAttributes.ROW_BORDER);
         writeAttributes(attrib, ITableAttributes.CELL_BORDER);
-        writeAttributes(attrib, BorderAttributesConverter.BORDERS);
+        writeAttributes(attrib, IBorderAttributes.BORDERS);
 
         if (attrib.isSet(ITableAttributes.ROW_HEIGHT)) {
             writeOneAttribute(



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