--- /dev/null
+/*
+ * 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.
+ * 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$ */
+
+
+/*
+ * 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.
+ */
+
+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.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 {
+
+ /**
+ * Create a border control word in attributes, with border properties
+ * as specified in color, style and width.
+ * @param border The CommonBorderPaddingBackground object.
+ * @param side The START, END, BEFORE, AFTER enum from CommonBorderPaddingBackground.
+ * @param attributes The attributes list to set the border control word.
+ * @param controlWord The border control word.
+ */
+ public static void makeBorder(CommonBorderPaddingBackground border, int side,
+ RtfAttributes attributes, String controlWord) {
+ int styleEnum = border.getBorderStyle(side);
+ if (styleEnum != Constants.EN_NONE) {
+ FOPRtfAttributes attrs = new FOPRtfAttributes();
+ attrs.set(IBorderAttributes.BORDER_COLOR, border.getBorderColor(side));
+ attrs.set(convertAttributetoRtf(styleEnum));
+ attrs.set(IBorderAttributes.BORDER_WIDTH, border.getBorderWidth(side, false));
+ attributes.set(controlWord, attrs);
+ }
+ }
+
+ /**
+ *
+ * @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_NONE) {
+ return IBorderAttributes.BORDER_NIL;
+ } else if (iBorderStyle == Constants.EN_SOLID) {
+ return IBorderAttributes.BORDER_SINGLE_THICKNESS;
+/* } else if (iBorderStyle==Constants.EN_THIN) {
+ return IBorderAttributes.BORDER_SINGLE_THICKNESS;
+ } else if (iBorderStyle==Constants.EN_THICK) {
+ return IBorderAttributes.BORDER_DOUBLE_THICKNESS;
+ } else if (iBorderStyle==Constants.EN_ value.equals("shadowed")) {
+ return IBorderAttributes.BORDER_SHADOWED;*/
+ } else if (iBorderStyle == Constants.EN_DOUBLE) {
+ return IBorderAttributes.BORDER_DOUBLE;
+ } else if (iBorderStyle == Constants.EN_DOTTED) {
+ return IBorderAttributes.BORDER_DOTTED;
+ } else if (iBorderStyle == Constants.EN_DASHED) {
+ return IBorderAttributes.BORDER_DASH;
+/* } else if (iBorderStyle==Constants value.equals("hairline")) {
+ return IBorderAttributes.BORDER_HAIRLINE;*/
+/* } else if (iBorderStyle==Constant value.equals("dot-dash")) {
+ return IBorderAttributes.BORDER_DOT_DASH;
+ } else if (iBorderStyle==Constant value.equals("dot-dot-dash")) {
+ return IBorderAttributes.BORDER_DOT_DOT_DASH;
+ } else if (iBorderStyle==Constant value.equals("triple")) {
+ return IBorderAttributes.BORDER_TRIPLE;
+ } else if (iBorderStyle==Constant value.equals("wavy")) {
+ return IBorderAttributes.BORDER_WAVY;
+ } else if (iBorderStyle==Constant value.equals("wavy-double")) {
+ return IBorderAttributes.BORDER_WAVY_DOUBLE;
+ } else if (iBorderStyle==Constant value.equals("striped")) {
+ return IBorderAttributes.BORDER_STRIPED;
+ } else if (iBorderStyle==Constant value.equals("emboss")) {
+ return IBorderAttributes.BORDER_EMBOSS;
+ } else if (iBorderStyle==Constant value.equals("engrave")) {
+ return IBorderAttributes.BORDER_ENGRAVE;*/
+ } else {
+ return null;
+ }
+
+ }
+}
\ No newline at end of file
/*
- * 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.
* for the JFOR project and is now integrated into FOP.
*/
-class BuilderContext {
+public class BuilderContext {
/** stack of RtfContainers */
private final Stack containers = new Stack();
/** Rtf options */
private IRtfOptions options;
- BuilderContext(IRtfOptions rtfOptions) {
+ public BuilderContext(IRtfOptions rtfOptions) {
options = rtfOptions;
}
}
/* 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);
* @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?
}
/** push an RtfContainer on our stack */
- void pushContainer(RtfContainer c) {
+ public void pushContainer(RtfContainer c) {
containers.push(c);
}
* 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);
}
/** 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);
}*/
/** 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();
}
*/
/** 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
+}
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());
/*
- * 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.
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;
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;
- }
- }
-
}
/*
- * 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.
* 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();
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()) {
+++ /dev/null
-/*
- * 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$ */
-
-
-/*
- * 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.
- */
-
-package org.apache.fop.render.rtf.rtflib.rtfdoc;
-
-import org.apache.fop.fo.Constants;
-import org.apache.fop.fo.properties.CommonBorderPaddingBackground;
-import org.apache.fop.render.rtf.FOPRtfAttributes;
-
-/** 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.
- * @param border The CommonBorderPaddingBackground object.
- * @param side The START, END, BEFORE, AFTER enum from CommonBorderPaddingBackground.
- * @param attributes The attributes list to set the border control word.
- * @param controlWord The border control word.
- */
- public static void makeBorder(CommonBorderPaddingBackground border, int side,
- RtfAttributes attributes, String controlWord) {
- int styleEnum = border.getBorderStyle(side);
- if (styleEnum != Constants.EN_NONE) {
- FOPRtfAttributes attrs = new FOPRtfAttributes();
- attrs.set(BORDER_COLOR, border.getBorderColor(side));
- attrs.set(convertAttributetoRtf(styleEnum));
- attrs.set(BORDER_WIDTH, border.getBorderWidth(side, false));
- attributes.set(controlWord, attrs);
- }
- }
-
- /**
- *
- * @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_NONE) {
- return BorderAttributesConverter.BORDER_NIL;
- } else 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;
- }
-
- }
-}
\ No newline at end of file
--- /dev/null
+/*\r
+ * Copyright 1999-2004 The Apache Software Foundation.\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ * \r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ * \r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+/* $Id: BorderAttributesConverter.java 198175 2004-11-24 21:07:31Z gmazza $ */\r
+\r
+\r
+/*\r
+ * This file is part of the RTF library of the FOP project, which was originally\r
+ * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and by other\r
+ * contributors to the jfor project (www.jfor.org), who agreed to donate jfor to\r
+ * the FOP project.\r
+ */\r
+\r
+package org.apache.fop.render.rtf.rtflib.rtfdoc;\r
+\r
+/** Constants for RTF border attribute names. */\r
+\r
+public interface IBorderAttributes {\r
+\r
+ /** Constant for a single-thick border */\r
+ public static final String BORDER_SINGLE_THICKNESS = "brdrs";\r
+ /** Constant for a double-thick border */\r
+ public static final String BORDER_DOUBLE_THICKNESS = "brdrth";\r
+ /** Constant for a shadowed border */\r
+ public static final String BORDER_SHADOWED = "brdrsh";\r
+ /** Constant for a double border */\r
+ public static final String BORDER_DOUBLE = "brdrdb";\r
+ /** Constant for a dotted border */\r
+ public static final String BORDER_DOTTED = "brdrdot";\r
+ /** Constant for a dashed border */\r
+ public static final String BORDER_DASH = "brdrdash";\r
+ /** Constant for a hairline border */\r
+ public static final String BORDER_HAIRLINE = "brdrhair";\r
+ /** Constant for a small-dashed border */\r
+ public static final String BORDER_DASH_SMALL = "brdrdashsm";\r
+ /** Constant for a dot-dashed border */\r
+ public static final String BORDER_DOT_DASH = "brdrdashd";\r
+ /** Constant for a dot-dot-dashed border */\r
+ public static final String BORDER_DOT_DOT_DASH = "brdrdashdd";\r
+ /** Constant for a triple border */\r
+ public static final String BORDER_TRIPLE = "brdrtriple";\r
+ /** Constant for a think-thin-small border */\r
+ public static final String BORDER_THINK_THIN_SMALL = "brdrtnthsg";\r
+ /** Constant for a thin-thick-small border */\r
+ public static final String BORDER_THIN_THICK_SMALL = "brdrthtnsg";\r
+ /** Constant for a thin-thick-thin-small border */\r
+ public static final String BORDER_THIN_THICK_THIN_SMALL = "brdrthtnthsg";\r
+ /** Constant for a think-thin-medium border */\r
+ public static final String BORDER_THINK_THIN_MEDIUM = "brdrtnthmg";\r
+ /** Constant for a thin-thick-medium border */\r
+ public static final String BORDER_THIN_THICK_MEDIUM = "brdrthtnmg";\r
+ /** Constant for a thin-thick-thin-medium border */\r
+ public static final String BORDER_THIN_THICK_THIN_MEDIUM = "brdrthtnthmg";\r
+ /** Constant for a think-thin-large border */\r
+ public static final String BORDER_THINK_THIN_LARGE = "brdrtnthlg";\r
+ /** Constant for a thin-thick-large border */\r
+ public static final String BORDER_THIN_THICK_LARGE = "brdrthtnlg";\r
+ /** Constant for a thin-thick-thin-large border */\r
+ public static final String BORDER_THIN_THICK_THIN_LARGE = "brdrthtnthlg";\r
+ /** Constant for a wavy border */\r
+ public static final String BORDER_WAVY = "brdrwavy";\r
+ /** Constant for a double wavy border */\r
+ public static final String BORDER_WAVY_DOUBLE = "brdrwavydb";\r
+ /** Constant for a striped border */\r
+ public static final String BORDER_STRIPED = "brdrdashdotstr";\r
+ /** Constant for an embossed border */\r
+ public static final String BORDER_EMBOSS = "brdremboss";\r
+ /** Constant for an engraved border */\r
+ public static final String BORDER_ENGRAVE = "brdrengrave";\r
+ /** Constant for an nil border */\r
+ public static final String BORDER_NIL = "brdrnil";\r
+ /** Constant for border color */\r
+ public static final String BORDER_COLOR = "brdrcf";\r
+ /** Constant for border space */\r
+ public static final String BORDER_SPACE = "brsp";\r
+ /** Constant for border width */\r
+ public static final String BORDER_WIDTH = "brdrw";\r
+\r
+ /** String array of border attributes */\r
+ public static final String [] BORDERS = new String[] {\r
+ BORDER_SINGLE_THICKNESS, BORDER_DOUBLE_THICKNESS, BORDER_SHADOWED,\r
+ BORDER_DOUBLE, BORDER_DOTTED, BORDER_DASH,\r
+ BORDER_HAIRLINE, BORDER_DASH_SMALL, BORDER_DOT_DASH,\r
+ BORDER_DOT_DOT_DASH, BORDER_TRIPLE, BORDER_THINK_THIN_SMALL,\r
+ BORDER_THIN_THICK_SMALL, BORDER_THIN_THICK_THIN_SMALL, BORDER_THINK_THIN_MEDIUM,\r
+ BORDER_THIN_THICK_MEDIUM, BORDER_THIN_THICK_THIN_MEDIUM, BORDER_THINK_THIN_LARGE,\r
+ BORDER_THIN_THICK_LARGE, BORDER_THIN_THICK_THIN_LARGE, BORDER_WAVY,\r
+ BORDER_WAVY_DOUBLE, BORDER_STRIPED, BORDER_EMBOSS,\r
+ BORDER_ENGRAVE, BORDER_COLOR, BORDER_SPACE,\r
+ BORDER_WIDTH\r
+ };\r
+}\r
/*
- * 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.
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.
*/
newLine();
writeGroupMark(true);
writeStarControlWord("generator");
- writer.write("Apache FOP ");
- writer.write(Fop.getVersion());
+ writer.write("Apache XML Graphics RTF Library");
writer.write(";");
writeGroupMark(false);
}
/*
- * 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.
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;
/*
- * 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.
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(