vmote 2003/07/02 09:59:57 Modified: src/java/org/apache/fop/rtf/rtflib/rtfdoc RtfAfterBeforeBase.java RtfBookmark.java RtfBookmarkContainerImpl.java RtfDocumentArea.java RtfElement.java RtfExternalGraphic.java RtfExtraRowSet.java RtfFile.java RtfFontTable.java RtfHeader.java RtfHyperLink.java RtfList.java RtfListItem.java RtfListTable.java RtfPageArea.java RtfPageNumber.java RtfPageNumberCitation.java RtfParagraph.java RtfSection.java RtfTable.java RtfTableCell.java RtfTableRow.java RtfText.java Log: style changes only, mostly javadoc comments and refactoring of names Revision Changes Path 1.7 +6 -6 xml-fop/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfAfterBeforeBase.java Index: RtfAfterBeforeBase.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfAfterBeforeBase.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- RtfAfterBeforeBase.java 2 Jul 2003 14:49:39 -0000 1.6 +++ RtfAfterBeforeBase.java 2 Jul 2003 16:59:53 -0000 1.7 @@ -83,19 +83,19 @@ public RtfParagraph newParagraph() throws IOException { closeAll(); - para = new RtfParagraph(this, m_writer); + para = new RtfParagraph(this, writer); return para; } public RtfParagraph newParagraph(RtfAttributes attrs) throws IOException { closeAll(); - para = new RtfParagraph(this, m_writer, attrs); + para = new RtfParagraph(this, writer, attrs); return para; } public RtfExternalGraphic newImage() throws IOException { closeAll(); - externalGraphic = new RtfExternalGraphic(this, m_writer); + externalGraphic = new RtfExternalGraphic(this, writer); return externalGraphic; } @@ -145,14 +145,14 @@ */ public RtfTable newTable(RtfAttributes attrs, ITableColumnsInfo tc) throws IOException { closeAll(); - table = new RtfTable(this, m_writer, attrs, tc); + table = new RtfTable(this, writer, attrs, tc); return table; } /** close current table if any and start a new one */ public RtfTable newTable(ITableColumnsInfo tc) throws IOException { closeAll(); - table = new RtfTable(this, m_writer, tc); + table = new RtfTable(this, writer, tc); return table; } } 1.8 +2 -2 xml-fop/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfBookmark.java Index: RtfBookmark.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfBookmark.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- RtfBookmark.java 2 Jul 2003 16:13:29 -0000 1.7 +++ RtfBookmark.java 2 Jul 2003 16:59:54 -0000 1.8 @@ -180,7 +180,7 @@ //changed. Now using writeStarControlWord this.writeStarControlWord (tag); - m_writer.write (bookmark); + writer.write (bookmark); this.writeGroupMark (false); } 1.6 +2 -2 xml-fop/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfBookmarkContainerImpl.java Index: RtfBookmarkContainerImpl.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfBookmarkContainerImpl.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- RtfBookmarkContainerImpl.java 2 Jul 2003 16:13:29 -0000 1.5 +++ RtfBookmarkContainerImpl.java 2 Jul 2003 16:59:54 -0000 1.6 @@ -127,7 +127,7 @@ mBookmark.close (); } - mBookmark = new RtfBookmark (this, m_writer, bookmark); + mBookmark = new RtfBookmark (this, writer, bookmark); return mBookmark; } 1.4 +11 -7 xml-fop/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfDocumentArea.java Index: RtfDocumentArea.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfDocumentArea.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- RtfDocumentArea.java 30 Jun 2003 06:10:05 -0000 1.3 +++ RtfDocumentArea.java 2 Jul 2003 16:59:54 -0000 1.4 @@ -67,19 +67,23 @@ public class RtfDocumentArea extends RtfContainer { - private RtfSection m_currentSection; + private RtfSection currentSection; /** Create an RTF element as a child of given container */ RtfDocumentArea(RtfFile f, Writer w) throws IOException { super(f, w); } - /** close current RtfSection if any and create a new one */ + /** + * Close current RtfSection if any and create a new one + * @throws IOException for I/O problems + * @return the new RtfSection + */ public RtfSection newSection() throws IOException { - if (m_currentSection != null) { - m_currentSection.close(); + if (currentSection != null) { + currentSection.close(); } - m_currentSection = new RtfSection(this, m_writer); - return m_currentSection; + currentSection = new RtfSection(this, writer); + return currentSection; } } 1.6 +126 -60 xml-fop/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfElement.java Index: RtfElement.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfElement.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- RtfElement.java 30 Jun 2003 06:10:05 -0000 1.5 +++ RtfElement.java 2 Jul 2003 16:59:54 -0000 1.6 @@ -68,43 +68,51 @@ * @author Andreas Putz [EMAIL PROTECTED] */ public abstract class RtfElement { - protected final Writer m_writer; - protected final RtfContainer m_parent; - protected final RtfAttributes m_attrib; - private boolean m_written; - private boolean m_closed; - private final int m_id; - private static int m_idCounter; + /** Writer to be used */ + protected final Writer writer; + /** parent element */ + protected final RtfContainer parent; + /** attributes of the element */ + protected final RtfAttributes attrib; + private boolean written; + private boolean closed; + private final int id; + private static int idCounter; /** Create an RTF element as a child of given container */ RtfElement(RtfContainer parent, Writer w) throws IOException { this(parent, w, null); } - /** Create an RTF element as a child of given container with given attributes */ RtfElement(RtfContainer parent, Writer w, RtfAttributes attr) throws IOException { - m_id = m_idCounter++; - m_parent = parent; - m_attrib = (attr != null ? attr : new RtfAttributes()); - if (m_parent != null) { - m_parent.addChild(this); + id = idCounter++; + this.parent = parent; + attrib = (attr != null ? attr : new RtfAttributes()); + if (this.parent != null) { + this.parent.addChild(this); } - m_writer = w; - m_written = false; + writer = w; + written = false; } - /** Does nothing, meant to allow elements to write themselves without waiting - * for write(), but not implemented yet */ + /** + * Does nothing, meant to allow elements to write themselves without waiting + * for write(), but not implemented yet + * @throws IOException for I/O problems + */ public final void close() throws IOException { - m_closed = true; + closed = true; } - /** write the RTF code of this element to our Writer */ + /** + * Write the RTF code of this element to our Writer + * @throws IOException for I/O problems + */ public final void writeRtf() throws IOException { - if (!m_written) { - m_written = true; + if (!written) { + written = true; if (okToWriteRtf()) { writeRtfPrefix(); writeRtfContent(); @@ -113,56 +121,88 @@ } } - /** write an RTF control word to our Writer */ + /** + * Write an RTF control word to our Writer + * @param word RTF control word to write + * @throws IOException for I/O problems + */ protected final void writeControlWord(String word) throws IOException { - m_writer.write('\\'); - m_writer.write(word); - m_writer.write(' '); + writer.write('\\'); + writer.write(word); + writer.write(' '); } - /** write an RTF control word to our Writer, preceeded by a star '*' - * meaning "ignore this if you don't know what it means" + /** + * Write an RTF control word to our Writer, preceeded by a star '*' + * meaning "ignore this if you don't know what it means" + * @param word RTF control word to write + * @throws IOException for I/O problems */ protected final void writeStarControlWord(String word) throws IOException { - m_writer.write("\\*\\"); - m_writer.write(word); - m_writer.write(' '); + writer.write("\\*\\"); + writer.write(word); + writer.write(' '); } + /** + * Same as writeStarControlWord(String word), except with no space behind it + * @param word RTF control word to write + * @throws IOException for I/O problems + */ protected final void writeStarControlWordNS(String word) throws IOException { - m_writer.write("\\*\\"); - m_writer.write(word); + writer.write("\\*\\"); + writer.write(word); } - /** write rtf control word without the space behind it */ + /** + * Write rtf control word without the space behind it + * @param word RTF control word to write + * @throws IOException for I/O problems + */ protected final void writeControlWordNS(String word) throws IOException { - m_writer.write('\\'); - m_writer.write(word); + writer.write('\\'); + writer.write(word); } - /** called before writeRtfContent() */ + /** + * Called before writeRtfContent() + * @throws IOException for I/O problems + */ protected void writeRtfPrefix() throws IOException { } - /** must be implemented to write RTF content to m_writer */ + /** + * Must be implemented to write RTF content to m_writer + * @throws IOException for I/O problems + */ protected abstract void writeRtfContent() throws IOException; - /** called after writeRtfContent() */ + /** + * Called after writeRtfContent() + * @throws IOException for I/O problems + */ protected void writeRtfSuffix() throws IOException { } - /** Write a start or end group mark */ + /** + * Write a start or end group mark + * @param isStart set to true if this is a start mark + * @throws IOException for I/O problems + */ protected final void writeGroupMark(boolean isStart) throws IOException { - m_writer.write(isStart ? "{" : "}"); + writer.write(isStart ? "{" : "}"); } - /** write given attribute values to our Writer - * @param nameList if given, only attribute names from this list are considered + /** + * Write given attribute values to our Writer + * @param attr RtfAttributes to be written + * @param nameList if given, only attribute names from this list are considered + * @throws IOException for I/O problems */ protected void writeAttributes(RtfAttributes attr, String [] nameList) throws IOException { @@ -189,7 +229,12 @@ } } - /** write one attribute to our Writer */ + /** + * Write one attribute to our Writer + * @param name name of attribute to write + * @param value value of attribute to be written + * @throws IOException for I/O problems + */ protected void writeOneAttribute(String name, Object value) throws IOException { String cw = name; @@ -201,7 +246,13 @@ } writeControlWord(cw); } - /** write one attribute to our Writer without a space*/ + + /** + * Write one attribute to our Writer without a space + * @param name name of attribute to write + * @param value value of attribute to be written + * @throws IOException for I/O problems + */ protected void writeOneAttributeNS(String name, Object value) throws IOException { String cw = name; @@ -214,7 +265,10 @@ writeControlWordNS(cw); } - /** can be overridden to suppress all RTF output */ + /** + * can be overridden to suppress all RTF output + * @return true if this object can be written into the RTF + */ protected boolean okToWriteRtf() { return true; } @@ -230,22 +284,25 @@ w.flush(); } - /** minimal debugging display */ + /** + * minimal debugging display + * @return String representation of object + */ public String toString() { - return (this == null) ? "null" : (this.getClass().getName() + " #" + m_id); + return (this == null) ? "null" : (this.getClass().getName() + " #" + id); } /** true if close() has been called */ boolean isClosed() { - return m_closed; + return closed; } /** access our RtfFile, which is always the topmost parent */ RtfFile getRtfFile() { // go up the chain of parents until we find the topmost one RtfElement result = this; - while (result.m_parent != null) { - result = result.m_parent; + while (result.parent != null) { + result = result.parent; } // topmost parent must be an RtfFile @@ -259,8 +316,8 @@ RtfElement getParentOfClass(Class c) { RtfElement result = null; RtfElement current = this; - while (current.m_parent != null) { - current = current.m_parent; + while (current.parent != null) { + current = current.parent; if (c.isAssignableFrom(current.getClass())) { result = current; break; @@ -269,10 +326,16 @@ return result; } - /** true if this element would generate no "useful" RTF content */ + /** + * @return true if this element would generate no "useful" RTF content + */ public abstract boolean isEmpty(); - + /** + * Make a visible entry in the RTF for an exception + * @param ie Exception to flag + * @throws IOException for I/O problems + */ protected void writeExceptionInRtf(Exception ie) throws IOException { writeGroupMark(true); @@ -282,18 +345,21 @@ writeControlWord("fs48"); // RtfStringConverter.getInstance().writeRtfString(m_writer, // JForVersionInfo.getShortVersionInfo() + ": "); - RtfStringConverter.getInstance().writeRtfString(m_writer, ie.getClass().getName()); + RtfStringConverter.getInstance().writeRtfString(writer, ie.getClass().getName()); writeControlWord("fs20"); - RtfStringConverter.getInstance().writeRtfString(m_writer, " " + ie.toString()); + RtfStringConverter.getInstance().writeRtfString(writer, " " + ie.toString()); writeControlWord("par"); writeGroupMark(false); } - // Added by Normand Masse - // Used for attribute inheritance + /** + * Added by Normand Masse + * Used for attribute inheritance + * @return RtfAttributes + */ public RtfAttributes getRtfAttributes() { - return m_attrib; + return attrib; } } 1.7 +7 -7 xml-fop/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfExternalGraphic.java Index: RtfExternalGraphic.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfExternalGraphic.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- RtfExternalGraphic.java 30 Jun 2003 06:10:05 -0000 1.6 +++ RtfExternalGraphic.java 2 Jul 2003 16:59:54 -0000 1.7 @@ -213,7 +213,7 @@ */ protected void writeRtfContentWithException() throws IOException { - if (m_writer == null) { + if (writer == null) { return; } @@ -225,11 +225,11 @@ String linkToRoot = System.getProperty("jfor_link_to_root"); if (linkToRoot != null) { - m_writer.write("{\\field {\\* \\fldinst { INCLUDEPICTURE \""); - m_writer.write(linkToRoot); + writer.write("{\\field {\\* \\fldinst { INCLUDEPICTURE \""); + writer.write(linkToRoot); File urlFile = new File(url.getFile()); - m_writer.write(urlFile.getName()); - m_writer.write("\" \\\\* MERGEFORMAT \\\\d }}}"); + writer.write(urlFile.getName()); + writer.write("\" \\\\* MERGEFORMAT \\\\d }}}"); return; } @@ -403,7 +403,7 @@ char[] chars = new char[len]; buf.getChars(0, len, chars, 0); - m_writer.write(chars); + writer.write(chars); // Writes the end of RTF image 1.6 +5 -5 xml-fop/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfExtraRowSet.java Index: RtfExtraRowSet.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfExtraRowSet.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- RtfExtraRowSet.java 30 Jun 2003 06:10:05 -0000 1.5 +++ RtfExtraRowSet.java 2 Jul 2003 16:59:54 -0000 1.6 @@ -187,7 +187,7 @@ RtfTableCell createExtraCell(int rowIndex, int xOffset, int cellWidth, RtfAttributes parentCellAttributes) throws IOException { - final RtfTableCell c = new RtfTableCell(null, m_writer, cellWidth, + final RtfTableCell c = new RtfTableCell(null, writer, cellWidth, parentCellAttributes, DEFAULT_IDNUM); m_cells.add(new PositionedCell(c, rowIndex, xOffset)); return c; @@ -227,7 +227,7 @@ return; } - final RtfTableRow row = new RtfTableRow(null, m_writer, DEFAULT_IDNUM); + final RtfTableRow row = new RtfTableRow(null, writer, DEFAULT_IDNUM); int cellIndex = 0; // Get the context of the table that holds the nested table @@ -255,7 +255,7 @@ xOffset += parentITableColumnsInfo.getColumnWidth(); // Create the empty cell merged vertically row.newTableCellMergedVertically((int)parentITableColumnsInfo.getColumnWidth(), - pc.cell.m_attrib); + pc.cell.attrib); // Select next column in order to have its width parentITableColumnsInfo.selectNextColumn(); } @@ -285,7 +285,7 @@ // => in fact the m_attrib below (last argument) is // empty => should be the attributes of the above cells. row.newTableCellMergedVertically((int)parentITableColumnsInfo.getColumnWidth(), - m_attrib); + attrib); // Select next column in order to have its width parentITableColumnsInfo.selectNextColumn(); } 1.7 +7 -7 xml-fop/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfFile.java Index: RtfFile.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfFile.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- RtfFile.java 30 Jun 2003 06:10:05 -0000 1.6 +++ RtfFile.java 2 Jul 2003 16:59:54 -0000 1.7 @@ -112,8 +112,8 @@ if (m_header != null) { throw new RtfStructureException("startHeader called more than once"); } - m_header = new RtfHeader(this, m_writer); - m_listTableContainer = new RtfContainer(this, m_writer); + m_header = new RtfHeader(this, writer); + m_listTableContainer = new RtfContainer(this, writer); return m_header; } @@ -121,7 +121,7 @@ public RtfListTable startListTable(RtfAttributes attr) throws IOException { listNum++; - m_listTable = new RtfListTable(this, m_writer, new Integer(listNum), attr); + m_listTable = new RtfListTable(this, writer, new Integer(listNum), attr); m_listTableContainer.addChild(m_listTable); return m_listTable; } @@ -140,7 +140,7 @@ startHeader(); } m_header.close(); - m_pageArea = new RtfPageArea(this, m_writer); + m_pageArea = new RtfPageArea(this, writer); addChild(m_pageArea); return m_pageArea; } @@ -167,7 +167,7 @@ startHeader(); } m_header.close(); - m_docArea = new RtfDocumentArea(this, m_writer); + m_docArea = new RtfDocumentArea(this, writer); addChild(m_docArea); return m_docArea; } @@ -197,7 +197,7 @@ /** must be called when done creating the document */ public synchronized void flush() throws IOException { writeRtf(); - m_writer.flush(); + writer.flush(); } /** minimal test and usage example */ 1.5 +2 -2 xml-fop/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfFontTable.java Index: RtfFontTable.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfFontTable.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- RtfFontTable.java 30 Jun 2003 06:10:05 -0000 1.4 +++ RtfFontTable.java 2 Jul 2003 16:59:54 -0000 1.5 @@ -74,7 +74,7 @@ /** write our contents to m_writer. */ protected void writeRtfContent() throws IOException { - RtfFontManager.getInstance ().writeFonts ((RtfHeader)m_parent); + RtfFontManager.getInstance ().writeFonts ((RtfHeader)parent); } /** true if this element would generate no "useful" RTF content */ 1.7 +5 -5 xml-fop/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfHeader.java Index: RtfHeader.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfHeader.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- RtfHeader.java 30 Jun 2003 06:10:05 -0000 1.6 +++ RtfHeader.java 2 Jul 2003 16:59:54 -0000 1.7 @@ -102,13 +102,13 @@ final Map.Entry entry = (Map.Entry)it.next(); writeGroupMark(true); writeControlWord("propname"); - RtfStringConverter.getInstance().writeRtfString(m_writer, + RtfStringConverter.getInstance().writeRtfString(writer, entry.getKey().toString()); writeGroupMark(false); writeControlWord("proptype30"); writeGroupMark(true); writeControlWord("staticval"); - RtfStringConverter.getInstance().writeRtfString(m_writer, + RtfStringConverter.getInstance().writeRtfString(writer, entry.getValue().toString()); writeGroupMark(false); } @@ -121,11 +121,11 @@ * what is written here to render it in writeRtfContent. <-- it is for the color table */ void write(String toWrite) throws IOException { - m_writer.write(toWrite); + writer.write(toWrite); } /** write to our Writer using an RtfStringConverter */ void writeRtfString(String toWrite) throws IOException { - RtfStringConverter.getInstance().writeRtfString(m_writer, toWrite); + RtfStringConverter.getInstance().writeRtfString(writer, toWrite); } } 1.6 +9 -9 xml-fop/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfHyperLink.java Index: RtfHyperLink.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfHyperLink.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- RtfHyperLink.java 30 Jun 2003 20:42:20 -0000 1.5 +++ RtfHyperLink.java 2 Jul 2003 16:59:54 -0000 1.6 @@ -115,16 +115,16 @@ super.writeGroupMark (true); super.writeStarControlWord ("fldinst"); - m_writer.write ("HYPERLINK \"" + url + "\" "); + writer.write ("HYPERLINK \"" + url + "\" "); super.writeGroupMark (false); super.writeGroupMark (true); super.writeControlWord ("fldrslt"); // start a group for this paragraph and write our own attributes if needed - if (m_attrib != null && m_attrib.isSet ("cs")) { + if (attrib != null && attrib.isSet ("cs")) { writeGroupMark (true); - writeAttributes(m_attrib, new String [] {"cs"}); + writeAttributes(attrib, new String [] {"cs"}); } } @@ -134,7 +134,7 @@ * @exception IOException On error */ public void writeRtfSuffix () throws IOException { - if (m_attrib != null && m_attrib.isSet ("cs")) { + if (attrib != null && attrib.isSet ("cs")) { writeGroupMark (false); } super.writeGroupMark (false); @@ -158,22 +158,22 @@ */ public RtfText newText (String str, RtfAttributes attr) throws IOException { closeAll (); - mText = new RtfText (this, m_writer, str, attr); + mText = new RtfText (this, writer, str, attr); return mText; } /** IRtfTextContainer requirement: return a copy of our attributes */ public RtfAttributes getTextContainerAttributes() { - if (m_attrib == null) { + if (attrib == null) { return null; } - return (RtfAttributes) this.m_attrib.clone (); + return (RtfAttributes) this.attrib.clone (); } /** add a line break */ public void newLineBreak () throws IOException { - new RtfLineBreak (this, m_writer); + new RtfLineBreak (this, writer); } 1.4 +7 -7 xml-fop/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfList.java Index: RtfList.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfList.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- RtfList.java 30 Jun 2003 06:10:05 -0000 1.3 +++ RtfList.java 2 Jul 2003 16:59:54 -0000 1.4 @@ -103,8 +103,8 @@ writeControlWord("pard"); } - writeOneAttribute(RtfText.LEFT_INDENT_FIRST, m_attrib.getValue(RtfListTable.LIST_INDENT)); - writeOneAttribute(RtfText.LEFT_INDENT_BODY, m_attrib.getValue(RtfText.LEFT_INDENT_BODY)); + writeOneAttribute(RtfText.LEFT_INDENT_FIRST, attrib.getValue(RtfListTable.LIST_INDENT)); + writeOneAttribute(RtfText.LEFT_INDENT_BODY, attrib.getValue(RtfText.LEFT_INDENT_BODY)); // put the whole list in a group writeGroupMark(true); @@ -123,7 +123,7 @@ writeOneAttribute(RtfListTable.LIST_NUMBER, (m_listTable.getListNumber()).toString()); writeOneAttribute("pnindent", - m_attrib.getValue(RtfListTable.LIST_INDENT)); + attrib.getValue(RtfListTable.LIST_INDENT)); writeControlWord("pnf1"); writeGroupMark(true); writeControlWord("pndec"); @@ -139,9 +139,9 @@ (m_numberingStyle.isBulletedList) ? "2" : "0"); writeControlWord("pndec"); writeOneAttribute("pnstart", - m_attrib.getValue(RtfListTable.LIST_START_AT)); + attrib.getValue(RtfListTable.LIST_START_AT)); writeOneAttribute("pnindent", - m_attrib.getValue(RtfListTable.LIST_INDENT)); + attrib.getValue(RtfListTable.LIST_INDENT)); writeControlWord("pntxta."); } @@ -169,7 +169,7 @@ if (m_item != null) { m_item.close(); } - m_item = new RtfListItem(this, m_writer); + m_item = new RtfListItem(this, writer); return m_item; } 1.5 +2 -2 xml-fop/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfListItem.java Index: RtfListItem.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfListItem.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- RtfListItem.java 30 Jun 2003 06:10:05 -0000 1.4 +++ RtfListItem.java 2 Jul 2003 16:59:54 -0000 1.5 @@ -76,7 +76,7 @@ RtfListItemParagraph(RtfListItem rli, RtfAttributes attrs) throws IOException { - super(rli, rli.m_writer, attrs); + super(rli, rli.writer, attrs); } protected void writeRtfPrefix() throws IOException { 1.7 +20 -20 xml-fop/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfListTable.java Index: RtfListTable.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfListTable.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- RtfListTable.java 30 Jun 2003 06:10:05 -0000 1.6 +++ RtfListTable.java 2 Jul 2003 16:59:54 -0000 1.7 @@ -118,9 +118,9 @@ Date runTime = new Date(); Random listIdGenerator = new Random(runTime.getTime()); listId = new Integer(listIdGenerator.nextInt()); - m_attrib.set(LIST_ID, listId.toString()); + attrib.set(LIST_ID, listId.toString()); listTemplateId = new Integer(listIdGenerator.nextInt()); - m_attrib.set(LIST_NUMBER_TYPE, 0); + attrib.set(LIST_NUMBER_TYPE, 0); } public void setParentList(RtfList parent) { @@ -138,15 +138,15 @@ // bullet definition for bulleted lists // Chris Scott's version was "\\\'01\\u-3913 ?;" // 'b7 is what was used in jfor V0.5.2 - m_attrib.set(LIST_TEXT_FORM, "\\\'01\\'b7 ?;"); - m_attrib.set(LIST_NUM_POSITION); - m_attrib.set(LIST_NUMBER_TYPE, 23); - m_attrib.set(LIST_FONT_TYPE, 2); + attrib.set(LIST_TEXT_FORM, "\\\'01\\'b7 ?;"); + attrib.set(LIST_NUM_POSITION); + attrib.set(LIST_NUMBER_TYPE, 23); + attrib.set(LIST_FONT_TYPE, 2); } else { - m_attrib.set(LIST_TEXT_FORM, "\\\'03\\\'00. ;"); - m_attrib.set(LIST_NUM_POSITION, "\\\'01;"); - m_attrib.set(LIST_NUMBER_TYPE, 0); - m_attrib.set(LIST_FONT_TYPE, 0); + attrib.set(LIST_TEXT_FORM, "\\\'03\\\'00. ;"); + attrib.set(LIST_NUM_POSITION, "\\\'01;"); + attrib.set(LIST_NUMBER_TYPE, 0); + attrib.set(LIST_FONT_TYPE, 0); } } @@ -158,22 +158,22 @@ writeControlWordNS(LIST); writeOneAttributeNS(LIST_TEMPLATE_ID, listTemplateId.toString()); - writeOneAttributeNS(LIST, m_attrib.getValue(LIST)); + writeOneAttributeNS(LIST, attrib.getValue(LIST)); writeGroupMark(true); writeControlWordNS(LIST_LEVEL); - writeOneAttributeNS(LIST_NUMBER_TYPE, m_attrib.getValue(LIST_NUMBER_TYPE)); - writeOneAttributeNS(LIST_JUSTIFICATION, m_attrib.getValue(LIST_JUSTIFICATION)); - writeOneAttributeNS(LIST_FOLLOWING_CHAR, m_attrib.getValue(LIST_FOLLOWING_CHAR)); - writeOneAttributeNS(LIST_START_AT, m_attrib.getValue(LIST_START_AT)); + writeOneAttributeNS(LIST_NUMBER_TYPE, attrib.getValue(LIST_NUMBER_TYPE)); + writeOneAttributeNS(LIST_JUSTIFICATION, attrib.getValue(LIST_JUSTIFICATION)); + writeOneAttributeNS(LIST_FOLLOWING_CHAR, attrib.getValue(LIST_FOLLOWING_CHAR)); + writeOneAttributeNS(LIST_START_AT, attrib.getValue(LIST_START_AT)); writeOneAttributeNS(LIST_SPACE, new Integer(0)); - writeOneAttributeNS(LIST_INDENT, m_attrib.getValue(LIST_INDENT)); + writeOneAttributeNS(LIST_INDENT, attrib.getValue(LIST_INDENT)); writeGroupMark(true); - writeOneAttributeNS(LIST_TEXT_FORM, m_attrib.getValue(LIST_TEXT_FORM)); + writeOneAttributeNS(LIST_TEXT_FORM, attrib.getValue(LIST_TEXT_FORM)); writeGroupMark(false); writeGroupMark(true); - writeOneAttributeNS(LIST_NUM_POSITION, m_attrib.getValue(LIST_NUM_POSITION)); + writeOneAttributeNS(LIST_NUM_POSITION, attrib.getValue(LIST_NUM_POSITION)); writeGroupMark(false); - writeOneAttributeNS(LIST_FONT_TYPE, m_attrib.getValue(LIST_FONT_TYPE)); + writeOneAttributeNS(LIST_FONT_TYPE, attrib.getValue(LIST_FONT_TYPE)); writeGroupMark(false); writeGroupMark(true); writeControlWordNS(LIST_NAME); 1.5 +2 -2 xml-fop/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfPageArea.java Index: RtfPageArea.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfPageArea.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- RtfPageArea.java 30 Jun 2003 06:10:05 -0000 1.4 +++ RtfPageArea.java 2 Jul 2003 16:59:54 -0000 1.5 @@ -79,7 +79,7 @@ if (m_currentPage != null) { m_currentPage.close(); } - m_currentPage = new RtfPage(this, m_writer, attr); + m_currentPage = new RtfPage(this, writer, attr); return m_currentPage; } 1.6 +4 -4 xml-fop/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfPageNumber.java Index: RtfPageNumber.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfPageNumber.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- RtfPageNumber.java 30 Jun 2003 06:10:05 -0000 1.5 +++ RtfPageNumber.java 2 Jul 2003 16:59:54 -0000 1.6 @@ -81,11 +81,11 @@ */ RtfPageNumber(RtfParagraph parent, Writer w) throws IOException { // Adds the attributes of the parent paragraph - super((RtfContainer)parent, w, parent.m_attrib); + super((RtfContainer)parent, w, parent.attrib); // copy parent's text attributes if (parent.getTextAttributes() != null) { - m_attrib.set(parent.getTextAttributes()); + attrib.set(parent.getTextAttributes()); } } @@ -94,7 +94,7 @@ writeGroupMark(true); writeControlWord(RTF_FIELD); writeGroupMark(true); - writeAttributes(m_attrib, RtfText.ATTR_NAMES); // Added by Boris Poudérous + writeAttributes(attrib, RtfText.ATTR_NAMES); // Added by Boris Poudérous writeStarControlWord(RTF_FIELD_PAGE); writeGroupMark(false); writeGroupMark(true); 1.6 +4 -4 xml-fop/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfPageNumberCitation.java Index: RtfPageNumberCitation.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfPageNumberCitation.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- RtfPageNumberCitation.java 30 Jun 2003 06:10:05 -0000 1.5 +++ RtfPageNumberCitation.java 2 Jul 2003 16:59:54 -0000 1.6 @@ -89,9 +89,9 @@ RtfPageNumberCitation (RtfParagraph parent, Writer w, String id) throws IOException { // add the attributes ant text attributes of the parent paragraph - super((RtfContainer)parent, w, parent.m_attrib); + super((RtfContainer)parent, w, parent.attrib); if (parent.getTextAttributes() != null) { - m_attrib.set(parent.getTextAttributes()); + attrib.set(parent.getTextAttributes()); } this.id = id; } @@ -112,7 +112,7 @@ writeGroupMark(true); writeControlWord(RTF_FIELD); writeGroupMark(true); - writeAttributes(m_attrib, RtfText.ATTR_NAMES); // Added by Boris Poudérous + writeAttributes(attrib, RtfText.ATTR_NAMES); // Added by Boris Poudérous writeStarControlWord(pageRef); writeGroupMark(false); writeGroupMark(true); 1.6 +23 -23 xml-fop/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfParagraph.java Index: RtfParagraph.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfParagraph.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- RtfParagraph.java 30 Jun 2003 06:10:05 -0000 1.5 +++ RtfParagraph.java 2 Jul 2003 16:59:54 -0000 1.6 @@ -118,18 +118,18 @@ /** IRtfTextContainer requirement: return a copy of our attributes */ public RtfAttributes getTextContainerAttributes() { - if (m_attrib == null) { + if (attrib == null) { return null; } - return (RtfAttributes)this.m_attrib.clone(); + return (RtfAttributes)this.attrib.clone(); } /** overridden to write our attributes before our content */ protected void writeRtfPrefix() throws IOException { // collapse whitespace before writing out // TODO could be made configurable - if (m_attrib != null && m_attrib.isSet("WhiteSpaceFalse")) { - m_attrib.unset("WhiteSpaceFalse"); + if (attrib != null && attrib.isSet("WhiteSpaceFalse")) { + attrib.unset("WhiteSpaceFalse"); } else { new WhitespaceCollapser(this); } @@ -141,11 +141,11 @@ // do not write text attributes here, they are handled // by RtfText - writeAttributes(m_attrib, PARA_ATTRIBUTES); + writeAttributes(attrib, PARA_ATTRIBUTES); // Added by Normand Masse // Write alignment attributes after \intbl for cells - if (m_attrib.isSet("intbl") && mustWriteAttributes()) { - writeAttributes(m_attrib, RtfText.ALIGNMENT); + if (attrib.isSet("intbl") && mustWriteAttributes()) { + writeAttributes(attrib, RtfText.ALIGNMENT); } //Set keepn if needed (Keep paragraph with the next paragraph) @@ -163,13 +163,13 @@ // writeAttributes(m_attrib, new String [] {"cs"}); // Added by Normand Masse // If \intbl then attributes have already been written (see higher in method) - if (!m_attrib.isSet("intbl")) { - writeAttributes(m_attrib, RtfText.ALIGNMENT); + if (!attrib.isSet("intbl")) { + writeAttributes(attrib, RtfText.ALIGNMENT); } //this line added by Chris Scott, Westinghouse - writeAttributes(m_attrib, RtfText.BORDER); - writeAttributes(m_attrib, RtfText.INDENT); - writeAttributes(m_attrib, RtfText.TABS); + writeAttributes(attrib, RtfText.BORDER); + writeAttributes(attrib, RtfText.INDENT); + writeAttributes(attrib, RtfText.TABS); if (writeForBreak) { writeControlWord("pard\\par"); } @@ -181,8 +181,8 @@ protected void writeRtfSuffix() throws IOException { // sometimes the end of paragraph mark must be suppressed in table cells boolean writeMark = true; - if (m_parent instanceof RtfTableCell) { - writeMark = ((RtfTableCell)m_parent).paragraphNeedsPar(this); + if (parent instanceof RtfTableCell) { + writeMark = ((RtfTableCell)parent).paragraphNeedsPar(this); } if (writeMark) { writeControlWord("par"); @@ -207,23 +207,23 @@ */ public RtfText newText(String str, RtfAttributes attr) throws IOException { closeAll(); - m_text = new RtfText(this, m_writer, str, attr); + m_text = new RtfText(this, writer, str, attr); return m_text; } /** add a page break */ public void newPageBreak() throws IOException { writeForBreak = true; - new RtfPageBreak(this, m_writer); + new RtfPageBreak(this, writer); } /** add a line break */ public void newLineBreak() throws IOException { - new RtfLineBreak(this, m_writer); + new RtfLineBreak(this, writer); } public RtfPageNumber newPageNumber()throws IOException { - m_pageNumber = new RtfPageNumber(this, m_writer); + m_pageNumber = new RtfPageNumber(this, writer); return m_pageNumber; } @@ -231,20 +231,20 @@ * Added by Boris POUDEROUS on 2002/07/09 */ public RtfPageNumberCitation newPageNumberCitation(String id) throws IOException { - m_pageNumberCitation = new RtfPageNumberCitation(this, m_writer, id); + m_pageNumberCitation = new RtfPageNumberCitation(this, writer, id); return m_pageNumberCitation; } /** Creates a new hyperlink. */ public RtfHyperLink newHyperLink(String str, RtfAttributes attr) throws IOException { - m_hyperlink = new RtfHyperLink(this, m_writer, str, attr); + m_hyperlink = new RtfHyperLink(this, writer, str, attr); return m_hyperlink; } /** start a new external graphic after closing all other elements */ public RtfExternalGraphic newImage() throws IOException { closeAll(); - m_externalGraphic = new RtfExternalGraphic(this, m_writer); + m_externalGraphic = new RtfExternalGraphic(this, writer); return m_externalGraphic; } @@ -269,7 +269,7 @@ protected boolean okToWriteRtf() { boolean result = super.okToWriteRtf(); - if (m_parent.getOptions().ignoreEmptyParagraphs() && getChildCount() == 0) { + if (parent.getOptions().ignoreEmptyParagraphs() && getChildCount() == 0) { // TODO should test that this is the last RtfParagraph in the cell instead // of simply testing for last child?? result = false; 1.7 +10 -10 xml-fop/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfSection.java Index: RtfSection.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfSection.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- RtfSection.java 30 Jun 2003 06:10:05 -0000 1.6 +++ RtfSection.java 2 Jul 2003 16:59:54 -0000 1.7 @@ -93,14 +93,14 @@ /** start a new external graphic after closing current paragraph, list and table */ public RtfExternalGraphic newImage() throws IOException { closeAll(); - m_externalGraphic = new RtfExternalGraphic(this, m_writer); + m_externalGraphic = new RtfExternalGraphic(this, writer); return m_externalGraphic; } /** start a new paragraph after closing current paragraph, list and table */ public RtfParagraph newParagraph(RtfAttributes attrs) throws IOException { closeAll(); - m_paragraph = new RtfParagraph(this, m_writer, attrs); + m_paragraph = new RtfParagraph(this, writer, attrs); return m_paragraph; } @@ -111,7 +111,7 @@ /** close current paragraph if any and start a new one */ public RtfParagraphKeepTogether newParagraphKeepTogether() throws IOException { - return new RtfParagraphKeepTogether(this, m_writer); + return new RtfParagraphKeepTogether(this, writer); } /** start a new table after closing current paragraph, list and table @@ -120,7 +120,7 @@ */ public RtfTable newTable(ITableColumnsInfo tc) throws IOException { closeAll(); - m_table = new RtfTable(this, m_writer, tc); + m_table = new RtfTable(this, writer, tc); return m_table; } @@ -130,34 +130,34 @@ */ public RtfTable newTable(RtfAttributes attrs, ITableColumnsInfo tc) throws IOException { closeAll(); - m_table = new RtfTable(this, m_writer, attrs, tc); + m_table = new RtfTable(this, writer, attrs, tc); return m_table; } /** start a new list after closing current paragraph, list and table */ public RtfList newList(RtfAttributes attrs) throws IOException { closeAll(); - m_list = new RtfList(this, m_writer, attrs); + m_list = new RtfList(this, writer, attrs); return m_list; } /** IRtfBeforeContainer */ public RtfBefore newBefore(RtfAttributes attrs) throws IOException { closeAll(); - m_before = new RtfBefore(this, m_writer, attrs); + m_before = new RtfBefore(this, writer, attrs); return m_before; } /** IRtfAfterContainer */ public RtfAfter newAfter(RtfAttributes attrs) throws IOException { closeAll(); - m_after = new RtfAfter(this, m_writer, attrs); + m_after = new RtfAfter(this, writer, attrs); return m_after; } public RtfJforCmd newJforCmd(RtfAttributes attrs) throws IOException { - m_jforCmd = new RtfJforCmd(this, m_writer, attrs); + m_jforCmd = new RtfJforCmd(this, writer, attrs); return m_jforCmd; } 1.7 +5 -5 xml-fop/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfTable.java Index: RtfTable.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfTable.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- RtfTable.java 30 Jun 2003 01:31:15 -0000 1.6 +++ RtfTable.java 2 Jul 2003 16:59:54 -0000 1.7 @@ -99,14 +99,14 @@ } highestRow++; - m_row = new RtfTableRow(this, m_writer, m_attrib, highestRow); + m_row = new RtfTableRow(this, writer, attrib, highestRow); return m_row; } /** close current row if any and start a new one */ public RtfTableRow newTableRow(RtfAttributes attrs) throws IOException { RtfAttributes attr = null; - if (m_attrib != null) { - attr = (RtfAttributes) m_attrib.clone (); + if (attrib != null) { + attr = (RtfAttributes) attrib.clone (); attr.set (attrs); } else { attr = attrs; @@ -116,7 +116,7 @@ } highestRow++; - m_row = new RtfTableRow(this, m_writer, attr, highestRow); + m_row = new RtfTableRow(this, writer, attr, highestRow); return m_row; } 1.7 +15 -15 xml-fop/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfTableCell.java Index: RtfTableCell.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfTableCell.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- RtfTableCell.java 30 Jun 2003 01:31:15 -0000 1.6 +++ RtfTableCell.java 2 Jul 2003 16:59:54 -0000 1.7 @@ -127,10 +127,10 @@ // Get the number of columns spanned int nbMergedCells = ((Integer)attrs.getValue("number-columns-spanned")).intValue(); - if (parent.m_parent instanceof RtfTable) { + if (parent.parent instanceof RtfTable) { // Get the context of the current table in order to get the width of each column ITableColumnsInfo ITableColumnsInfo = - ((RtfTable)parent.m_parent).getITableColumnsInfo(); + ((RtfTable)parent.parent).getITableColumnsInfo(); ITableColumnsInfo.selectFirstColumn(); // Reach the column index in table context corresponding to the current column cell @@ -169,12 +169,12 @@ } attrs.set("intbl"); - m_paragraph = new RtfParagraph(this, m_writer, attrs); + m_paragraph = new RtfParagraph(this, writer, attrs); - if (m_paragraph.m_attrib.isSet("qc")) { + if (m_paragraph.attrib.isSet("qc")) { set_center = true; attrs.set("qc"); - } else if (m_paragraph.m_attrib.isSet("qr")) { + } else if (m_paragraph.attrib.isSet("qr")) { set_right = true; attrs.set("qr"); } else { @@ -190,7 +190,7 @@ /** start a new external graphic after closing current paragraph, list and table */ public RtfExternalGraphic newImage() throws IOException { closeAll(); - m_externalGraphic = new RtfExternalGraphic(this, m_writer); + m_externalGraphic = new RtfExternalGraphic(this, writer); return m_externalGraphic; } @@ -202,14 +202,14 @@ /** start a new list after closing current paragraph, list and table */ public RtfList newList(RtfAttributes attrib) throws IOException { closeAll(); - m_list = new RtfList(this, m_writer, attrib); + m_list = new RtfList(this, writer, attrib); return m_list; } /** start a new nested table after closing current paragraph, list and table */ public RtfTable newTable(ITableColumnsInfo tc) throws IOException { closeAll(); - m_table = new RtfTable(this, m_writer, tc); + m_table = new RtfTable(this, writer, tc); return m_table; } @@ -218,7 +218,7 @@ public RtfTable newTable(RtfAttributes attrs, ITableColumnsInfo tc) throws IOException { closeAll(); - m_table = new RtfTable(this,m_writer, attrs, tc); // Added tc Boris Poudérous 07/22/2002 + m_table = new RtfTable(this,writer, attrs, tc); // Added tc Boris Poudérous 07/22/2002 return m_table; } @@ -247,12 +247,12 @@ * Added by Boris POUDEROUS on 2002/06/26 */ // Cell background color processing : - writeAttributes (m_attrib, ITableAttributes.CELL_COLOR); + writeAttributes (attrib, ITableAttributes.CELL_COLOR); /** - end - */ - writeAttributes (m_attrib, ITableAttributes.ATTRIB_CELL_PADDING); - writeAttributes (m_attrib, ITableAttributes.CELL_BORDER); - writeAttributes (m_attrib, BorderAttributesConverter.BORDERS); + writeAttributes (attrib, ITableAttributes.ATTRIB_CELL_PADDING); + writeAttributes (attrib, ITableAttributes.CELL_BORDER); + writeAttributes (attrib, BorderAttributesConverter.BORDERS); // cell width final int xPos = widthOffset + this.m_cellWidth; @@ -370,7 +370,7 @@ // attributes to the new cells (in order not to have cell without // border for example) extraCell = m_parentRow.getExtraRowSet().createExtraCell(extraRowIndex, - m_widthOffset, this.getCellWidth(), m_attrib); + m_widthOffset, this.getCellWidth(), attrib); extraRowIndex++; } else if (extraCell != null) { 1.5 +26 -26 xml-fop/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfTableRow.java Index: RtfTableRow.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfTableRow.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- RtfTableRow.java 30 Jun 2003 01:31:15 -0000 1.4 +++ RtfTableRow.java 2 Jul 2003 16:59:54 -0000 1.5 @@ -90,14 +90,14 @@ /** close current cell if any and start a new one */ public RtfTableCell newTableCell(int cellWidth) throws IOException { highestCell++; - m_cell = new RtfTableCell(this, m_writer, cellWidth, highestCell); + m_cell = new RtfTableCell(this, writer, cellWidth, highestCell); return m_cell; } /** close current cell if any and start a new one */ public RtfTableCell newTableCell(int cellWidth, RtfAttributes attrs) throws IOException { highestCell++; - m_cell = new RtfTableCell(this, m_writer, cellWidth, attrs, highestCell); + m_cell = new RtfTableCell(this, writer, cellWidth, attrs, highestCell); return m_cell; } @@ -109,7 +109,7 @@ public RtfTableCell newTableCellMergedVertically(int cellWidth, RtfAttributes attrs) throws IOException { highestCell++; - m_cell = new RtfTableCell (this, m_writer, cellWidth, attrs, highestCell); + m_cell = new RtfTableCell (this, writer, cellWidth, attrs, highestCell); m_cell.setVMerge(RtfTableCell.MERGE_WITH_PREVIOUS); return m_cell; } @@ -126,7 +126,7 @@ RtfAttributes wAttributes = (RtfAttributes)attrs.clone(); wAttributes.unset("number-columns-spanned"); - m_cell = new RtfTableCell(this, m_writer, cellWidth, wAttributes, highestCell); + m_cell = new RtfTableCell(this, writer, cellWidth, wAttributes, highestCell); m_cell.setHMerge(RtfTableCell.MERGE_WITH_PREVIOUS); return m_cell; } @@ -140,41 +140,41 @@ // create new extra row set to allow our cells to put nested tables // in rows that will be rendered after this one - m_extraRowSet = new RtfExtraRowSet(m_writer); + m_extraRowSet = new RtfExtraRowSet(writer); // render the row and cells definitions writeControlWord("trowd"); //check for keep-together - if (m_attrib != null && m_attrib.isSet(ITableAttributes.ROW_KEEP_TOGETHER)) { + if (attrib != null && attrib.isSet(ITableAttributes.ROW_KEEP_TOGETHER)) { writeControlWord(ROW_KEEP_TOGETHER); } writePaddingAttributes(); // if we have attributes, manipulate border properties - final RtfTable parentTable = (RtfTable) m_parent; - if (m_attrib != null && parentTable != null) { + final RtfTable parentTable = (RtfTable) parent; + if (attrib != null && parentTable != null) { //if table is only one row long if (isFirstRow() && parentTable.isHighestRow(id)) { - m_attrib.unset(ITableAttributes.ROW_BORDER_HORIZONTAL); + attrib.unset(ITableAttributes.ROW_BORDER_HORIZONTAL); //or if row is the first row } else if (isFirstRow()) { - m_attrib.unset(ITableAttributes.ROW_BORDER_BOTTOM); + attrib.unset(ITableAttributes.ROW_BORDER_BOTTOM); //or if row is the last row } else if (parentTable.isHighestRow(id)) { - m_attrib.unset(ITableAttributes.ROW_BORDER_TOP); + attrib.unset(ITableAttributes.ROW_BORDER_TOP); //else the row is an inside row } else { - m_attrib.unset(ITableAttributes.ROW_BORDER_BOTTOM); - m_attrib.unset(ITableAttributes.ROW_BORDER_TOP); + attrib.unset(ITableAttributes.ROW_BORDER_BOTTOM); + attrib.unset(ITableAttributes.ROW_BORDER_TOP); } } - writeAttributes(m_attrib, ITableAttributes.ROW_BORDER); - writeAttributes(m_attrib, ITableAttributes.CELL_BORDER); - writeAttributes(m_attrib, BorderAttributesConverter.BORDERS); + writeAttributes(attrib, ITableAttributes.ROW_BORDER); + writeAttributes(attrib, ITableAttributes.CELL_BORDER); + writeAttributes(attrib, BorderAttributesConverter.BORDERS); /** * Added by Boris POUDEROUS on 07/02/2002 @@ -256,28 +256,28 @@ if (index == 0) { if (!cell.getRtfAttributes().isSet(ITableAttributes.CELL_BORDER_LEFT)) { cell.getRtfAttributes().set(ITableAttributes.CELL_BORDER_LEFT, - (String)m_attrib.getValue(ITableAttributes.ROW_BORDER_LEFT)); + (String)attrib.getValue(ITableAttributes.ROW_BORDER_LEFT)); } } if (index == this.getChildCount() - 1) { if (!cell.getRtfAttributes().isSet(ITableAttributes.CELL_BORDER_RIGHT)) { cell.getRtfAttributes().set(ITableAttributes.CELL_BORDER_RIGHT, - (String)m_attrib.getValue(ITableAttributes.ROW_BORDER_RIGHT)); + (String)attrib.getValue(ITableAttributes.ROW_BORDER_RIGHT)); } } if (isFirstRow()) { if (!cell.getRtfAttributes().isSet(ITableAttributes.CELL_BORDER_TOP)) { cell.getRtfAttributes().set(ITableAttributes.CELL_BORDER_TOP, - (String)m_attrib.getValue(ITableAttributes.ROW_BORDER_TOP)); + (String)attrib.getValue(ITableAttributes.ROW_BORDER_TOP)); } } if (parentTable.isHighestRow(id)) { if (!cell.getRtfAttributes().isSet(ITableAttributes.CELL_BORDER_BOTTOM)) { cell.getRtfAttributes().set(ITableAttributes.CELL_BORDER_BOTTOM, - (String)m_attrib.getValue(ITableAttributes.ROW_BORDER_BOTTOM)); + (String)attrib.getValue(ITableAttributes.ROW_BORDER_BOTTOM)); } } @@ -309,15 +309,15 @@ // use RTF 1.6 definitions - try to compute a reasonable RTF 1.5 value // out of them if present // how to do vertical padding with RTF 1.5? - if (m_attrib != null && !m_attrib.isSet(ATTR_RTF_15_TRGAPH)) { + if (attrib != null && !attrib.isSet(ATTR_RTF_15_TRGAPH)) { int gaph = -1; try { // set (RTF 1.5) gaph to the average of the (RTF 1.6) left and right padding values - final Integer leftPadStr = (Integer)m_attrib.getValue(ATTR_ROW_PADDING_LEFT); + final Integer leftPadStr = (Integer)attrib.getValue(ATTR_ROW_PADDING_LEFT); if (leftPadStr != null) { gaph = leftPadStr.intValue(); } - final Integer rightPadStr = (Integer)m_attrib.getValue(ATTR_ROW_PADDING_RIGHT); + final Integer rightPadStr = (Integer)attrib.getValue(ATTR_ROW_PADDING_RIGHT); if (rightPadStr != null) { gaph = (gaph + rightPadStr.intValue()) / 2; } @@ -326,12 +326,12 @@ // getRtfFile().getLog().logWarning(msg); } if (gaph >= 0) { - m_attrib.set(ATTR_RTF_15_TRGAPH, gaph); + attrib.set(ATTR_RTF_15_TRGAPH, gaph); } } // write all padding attributes - writeAttributes(m_attrib, ATTRIB_ROW_PADDING); + writeAttributes(attrib, ATTRIB_ROW_PADDING); } public boolean isFirstRow() { 1.5 +4 -4 xml-fop/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfText.java Index: RtfText.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfText.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- RtfText.java 30 Jun 2003 01:31:15 -0000 1.4 +++ RtfText.java 2 Jul 2003 16:59:54 -0000 1.5 @@ -207,7 +207,7 @@ if (m_attr != null && mustWriteAttributes()) { writeAttributes(m_attr, RtfText.ATTR_NAMES); } - RtfStringConverter.getInstance().writeRtfString(m_writer, m_text); + RtfStringConverter.getInstance().writeRtfString(writer, m_text); writeGroupMark(false); } @@ -222,10 +222,10 @@ /** IRtfTextContainer requirement: * @return a copy of our attributes */ public RtfAttributes getTextContainerAttributes() { - if (m_attrib == null) { + if (attrib == null) { return null; } - return (RtfAttributes)this.m_attrib.clone(); + return (RtfAttributes)this.attrib.clone(); } /** direct access to our text */
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]