From 366fdff9d9e46b30e078cfe7cd9cc8731391022d Mon Sep 17 00:00:00 2001 From: William Victor Mote Date: Tue, 24 Jun 2003 17:47:14 +0000 Subject: [PATCH] Convert ASCII files containing non-ASCII characters to UTF-8. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@196522 13f79535-47bb-0310-9956-ffa450edef68 --- .../rtf/rtflib/rtfdoc/IRtfTableContainer.java | 2 +- .../rtf/rtflib/rtfdoc/RtfAfterBeforeBase.java | 30 +++---- .../fop/rtf/rtflib/rtfdoc/RtfContainer.java | 4 +- .../fop/rtf/rtflib/rtfdoc/RtfExtraRowSet.java | 12 +-- .../fop/rtf/rtflib/rtfdoc/RtfPageNumber.java | 12 +-- .../rtflib/rtfdoc/RtfPageNumberCitation.java | 8 +- .../fop/rtf/rtflib/rtfdoc/RtfParagraph.java | 84 +++++++++---------- .../fop/rtf/rtflib/rtfdoc/RtfSection.java | 6 +- .../fop/rtf/rtflib/rtfdoc/RtfTable.java | 10 +-- .../fop/rtf/rtflib/rtfdoc/RtfTableCell.java | 16 ++-- 10 files changed, 92 insertions(+), 92 deletions(-) diff --git a/src/java/org/apache/fop/rtf/rtflib/rtfdoc/IRtfTableContainer.java b/src/java/org/apache/fop/rtf/rtflib/rtfdoc/IRtfTableContainer.java index d39047498..8c2ae9222 100755 --- a/src/java/org/apache/fop/rtf/rtflib/rtfdoc/IRtfTableContainer.java +++ b/src/java/org/apache/fop/rtf/rtflib/rtfdoc/IRtfTableContainer.java @@ -65,7 +65,7 @@ public interface IRtfTableContainer public RtfTable newTable(ITableColumnsInfo tc) throws IOException; /** close current table if any and start a new one - * @param tc added by Boris Poudérous on july 2002 in order to process number-columns-spanned attribute + * @param tc added by Boris Poudérous on july 2002 in order to process number-columns-spanned attribute **/ public RtfTable newTable(RtfAttributes attrs, ITableColumnsInfo tc) throws IOException; } diff --git a/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfAfterBeforeBase.java b/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfAfterBeforeBase.java index 64cd01033..fa0925ac5 100644 --- a/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfAfterBeforeBase.java +++ b/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfAfterBeforeBase.java @@ -71,73 +71,73 @@ implements IRtfParagraphContainer, IRtfExternalGraphicContainer,IRtfTableContain private RtfParagraph m_para; private RtfExternalGraphic m_externalGraphic; private RtfTable m_table; - + RtfAfterBeforeBase(RtfSection parent, Writer w, RtfAttributes attrs) throws IOException { super((RtfContainer)parent,w,attrs); m_attrib = attrs; } - + public RtfParagraph newParagraph() throws IOException { closeAll(); m_para = new RtfParagraph(this,m_writer); return m_para; } - + public RtfParagraph newParagraph(RtfAttributes attrs) throws IOException { closeAll(); m_para = new RtfParagraph(this,m_writer,attrs); return m_para; } - + public RtfExternalGraphic newImage() throws IOException { closeAll(); m_externalGraphic = new RtfExternalGraphic(this,m_writer); return m_externalGraphic; } - + private void closeCurrentParagraph() throws IOException { if(m_para!=null) m_para.close(); } - + private void closeCurrentExternalGraphic() throws IOException { if(m_externalGraphic!=null) m_externalGraphic.close(); } - + private void closeCurrentTable() throws IOException { if(m_table != null) m_table.close(); } - + protected void writeRtfPrefix() throws IOException { writeGroupMark(true); writeMyAttributes(); } - + /** must be implemented to write the header or footer attributes */ abstract protected void writeMyAttributes() throws IOException; - + protected void writeRtfSuffix() throws IOException { writeGroupMark(false); } - + public RtfAttributes getAttributes(){ return m_attrib; } - + public void closeAll() throws IOException { closeCurrentParagraph(); closeCurrentExternalGraphic(); closeCurrentTable(); } - + /** close current table if any and start a new one - * @param tc added by Boris Poudérous on july 2002 in order to process number-columns-spanned attribute + * @param tc added by Boris Poudérous on july 2002 in order to process number-columns-spanned attribute */ public RtfTable newTable(RtfAttributes attrs, ITableColumnsInfo tc) throws IOException { closeAll(); m_table = new RtfTable(this,m_writer,attrs,tc); return m_table; } - + /** close current table if any and start a new one */ public RtfTable newTable(ITableColumnsInfo tc) throws IOException { closeAll(); diff --git a/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfContainer.java b/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfContainer.java index 2b4db5870..55d393f9f 100755 --- a/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfContainer.java +++ b/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfContainer.java @@ -62,7 +62,7 @@ import org.apache.fop.rtf.rtflib.exceptions.RtfStructureException; */ public class RtfContainer extends RtfElement { - private LinkedList m_children; // 'final' removed by Boris Poudérous on 07/22/2002 + private LinkedList m_children; // 'final' removed by Boris Poudérous on 07/22/2002 private RtfOptions m_options = new RtfOptions(); private RtfElement m_lastChild; @@ -123,7 +123,7 @@ public class RtfContainer extends RtfElement { } /** - * Add by Boris Poudérous on 07/22/2002 + * Add by Boris Poudérous on 07/22/2002 * Set the children list */ public boolean setChildren (List children) diff --git a/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfExtraRowSet.java b/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfExtraRowSet.java index a7bdbdb05..596af8a71 100755 --- a/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfExtraRowSet.java +++ b/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfExtraRowSet.java @@ -74,7 +74,7 @@ public class RtfExtraRowSet extends RtfContainer { final int DEFAULT_IDNUM = 0; /** Parent table context - * (added by Boris Poudérous on july 2002 in order to process nested tables) + * (added by Boris Poudérous on july 2002 in order to process nested tables) */ private ITableColumnsInfo parentITableColumnsInfo = null; @@ -170,7 +170,7 @@ public class RtfExtraRowSet extends RtfContainer { } /** create an extra cell to hold content that comes after a nested table in a cell - * Modified by Boris Poudérous in order to permit the extra cell to have the attributes of its parent cell + * Modified by Boris Poudérous in order to permit the extra cell to have the attributes of its parent cell */ RtfTableCell createExtraCell(int rowIndex,int xOffset,int cellWidth,RtfAttributes parentCellAttributes) throws IOException { @@ -225,7 +225,7 @@ public class RtfExtraRowSet extends RtfContainer { // TODO should be merged with the cell that is above it if(cellIndex==0 && pc.xOffset > 0) { /** - * Added by Boris Poudérous + * Added by Boris Poudérous */ // Add empty cells merged vertically with the cells above and with the same widths // (BEFORE the cell that contains the nested table) @@ -240,13 +240,13 @@ public class RtfExtraRowSet extends RtfContainer { } row.addChild(pc.cell); - // Line added by Boris Poudérous + // Line added by Boris Poudérous xOffsetOfLastPositionedCell = pc.xOffset + pc.cell.getCellWidth(); cellIndex++; } /** - * Added by Boris Poudérous + * Added by Boris Poudérous */ // Add empty cells merged vertically with the cells above AFTER the cell that contains the nested table // The cells added have the same widths than the cells above. @@ -293,7 +293,7 @@ public class RtfExtraRowSet extends RtfContainer { /** * @return The table context of the parent table - * Added by Boris Poudérous on july 2002 in order to process nested tables + * Added by Boris Poudérous on july 2002 in order to process nested tables */ public ITableColumnsInfo getParentITableColumnsInfo() { diff --git a/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfPageNumber.java b/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfPageNumber.java index ca70b1869..5a4deedae 100644 --- a/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfPageNumber.java +++ b/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfPageNumber.java @@ -65,13 +65,13 @@ public class RtfPageNumber extends RtfContainer public static String RTF_FIELD = "field"; public static String RTF_FIELD_PAGE = "fldinst { PAGE }"; public static String RTF_FIELD_RESULT = "fldrslt"; - + /** Create an RTF paragraph as a child of given container with default attributes */ RtfPageNumber(IRtfPageNumberContainer parent, Writer w) throws IOException { super((RtfContainer)parent,w); } - + /** Create an RTF page number as a child of given paragraph, * copying the paragraph attributes */ @@ -85,14 +85,14 @@ public class RtfPageNumber extends RtfContainer m_attrib.set(parent.getTextAttributes()); } } - + /** write our attributes and content */ protected void writeRtfContent() throws IOException { writeGroupMark(true); writeControlWord(RTF_FIELD); writeGroupMark(true); - writeAttributes(m_attrib,RtfText.ATTR_NAMES); // Added by Boris Poudérous + writeAttributes(m_attrib,RtfText.ATTR_NAMES); // Added by Boris Poudérous writeStarControlWord(RTF_FIELD_PAGE); writeGroupMark(false); writeGroupMark(true); @@ -100,12 +100,12 @@ public class RtfPageNumber extends RtfContainer writeGroupMark(false); writeGroupMark(false); } - + /** true if this element would generate no "useful" RTF content */ public boolean isEmpty() { return false; } } - + \ No newline at end of file diff --git a/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfPageNumberCitation.java b/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfPageNumberCitation.java index b1550e03d..2c345347b 100644 --- a/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfPageNumberCitation.java +++ b/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfPageNumberCitation.java @@ -79,7 +79,7 @@ public class RtfPageNumberCitation extends RtfContainer this.id = id; } - /** Create an RTF page number citation as a child of given + /** Create an RTF page number citation as a child of given * paragraph, copying its attributes */ RtfPageNumberCitation (RtfParagraph parent, Writer w, String id) throws IOException @@ -99,8 +99,8 @@ public class RtfPageNumberCitation extends RtfContainer // Build page reference field String pageRef = RTF_FIELD_PAGEREF_MODEL; final int insertionIndex = pageRef.indexOf("}"); - pageRef = - pageRef.substring(0,insertionIndex) + "\"" + id + "\"" + " " + pageRef = + pageRef.substring(0,insertionIndex) + "\"" + id + "\"" + " " + pageRef.substring(insertionIndex, pageRef.length()) ; id = null; @@ -109,7 +109,7 @@ public class RtfPageNumberCitation extends RtfContainer writeGroupMark(true); writeControlWord(RTF_FIELD); writeGroupMark(true); - writeAttributes(m_attrib,RtfText.ATTR_NAMES); // Added by Boris Poudérous + writeAttributes(m_attrib,RtfText.ATTR_NAMES); // Added by Boris Poudérous writeStarControlWord(pageRef); writeGroupMark(false); writeGroupMark(true); diff --git a/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfParagraph.java b/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfParagraph.java index e38ea3e4c..409714573 100755 --- a/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfParagraph.java +++ b/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfParagraph.java @@ -59,7 +59,7 @@ import java.util.List; /** Model of an RTF paragraph, which can contain RTF text elements. * @author Bertrand Delacretaz bdelacretaz@codeconsult.ch * @author Andreas Putz a.putz@skynamics.com - * @author Boris Poudérous, boris.pouderous@free.fr + * @author Boris Poudérous, boris.pouderous@free.fr */ public class RtfParagraph extends RtfBookmarkContainerImpl @@ -72,7 +72,7 @@ IRtfPageNumberContainer,IRtfPageNumberCitationContainer { private RtfPageNumberCitation m_pageNumberCitation; // Line added by Boris POUDEROUS on 2002/07/09 private boolean m_keepn=false; private boolean m_resetProperties=false; - + /* needed for importing Rtf into FrameMaker FrameMaker is not as forgiving as word in rtf thus /pard/par must be written in a page break directly @@ -80,40 +80,40 @@ IRtfPageNumberContainer,IRtfPageNumberCitationContainer { also, this is just a hack to make FrameMaker import Jfor rtf correctly */ private boolean writeForBreak = false; - + /** Set of attributes that must be copied at the start of a paragraph */ private static final String [] PARA_ATTRIBUTES = { "intbl" }; - + /** Create an RTF paragraph as a child of given container with default attributes */ RtfParagraph(IRtfParagraphContainer parent, Writer w) throws IOException { super((RtfContainer)parent,w); } - + /** Create an RTF paragraph as a child of given container with given attributes */ RtfParagraph(IRtfParagraphContainer parent, Writer w,RtfAttributes attr) throws IOException { super((RtfContainer)parent,w,attr); } - + public String getText(){ return(m_text.getText()); } - + /** Set the keepn attribute for this paragraph */ public void setKeepn() { - this.m_keepn=true; + this.m_keepn=true; } - + /** Force reset properties */ public void setResetProperties() { - this.m_resetProperties=true; + this.m_resetProperties=true; } - + /** IRtfTextContainer requirement: return a copy of our attributes */ public RtfAttributes getTextContainerAttributes() { if(m_attrib == null) return null; return (RtfAttributes)this.m_attrib.clone(); } - + /** overridden to write our attributes before our content */ protected void writeRtfPrefix() throws IOException { // collapse whitespace before writing out @@ -123,12 +123,12 @@ IRtfPageNumberContainer,IRtfPageNumberCitationContainer { } else { new WhitespaceCollapser(this); } - + //Reset paragraph properties if needed if(m_resetProperties) { writeControlWord("pard"); } - + // do not write text attributes here, they are handled // by RtfText writeAttributes(m_attrib,PARA_ATTRIBUTES); @@ -137,14 +137,14 @@ IRtfPageNumberContainer,IRtfPageNumberCitationContainer { if ( m_attrib.isSet( "intbl" ) && mustWriteAttributes() ) { writeAttributes(m_attrib, RtfText.ALIGNMENT); } - + //Set keepn if needed (Keep paragraph with the next paragraph) - if(m_keepn) writeControlWord("keepn"); - + if(m_keepn) writeControlWord("keepn"); + // start a group for this paragraph and write our own attributes if needed if(mustWriteGroupMark()) writeGroupMark(true); - - + + if(mustWriteAttributes()) { // writeAttributes(m_attrib, new String [] {"cs"}); // Added by Normand Masse @@ -160,9 +160,9 @@ IRtfPageNumberContainer,IRtfPageNumberCitationContainer { writeControlWord("pard\\par"); } } - + } - + /** overridden to close paragraph */ protected void writeRtfSuffix() throws IOException { // sometimes the end of paragraph mark must be suppressed in table cells @@ -171,21 +171,21 @@ IRtfPageNumberContainer,IRtfPageNumberCitationContainer { writeMark = ((RtfTableCell)m_parent).paragraphNeedsPar(this); } if(writeMark) { - writeControlWord("par"); + writeControlWord("par"); } - + if(mustWriteGroupMark()) writeGroupMark(false); - - + + } - + /** close current text run if any and start a new one with default attributes * @param str if not null, added to the RtfText created */ public RtfText newText(String str) throws IOException { return newText(str,null); } - + /** close current text run if any and start a new one * @param str if not null, added to the RtfText created */ @@ -194,23 +194,23 @@ IRtfPageNumberContainer,IRtfPageNumberCitationContainer { m_text = new RtfText(this,m_writer,str,attr); return m_text; } - + /** add a page break */ public void newPageBreak() throws IOException { writeForBreak = true; new RtfPageBreak(this,m_writer); } - + /** add a line break */ public void newLineBreak() throws IOException { new RtfLineBreak(this,m_writer); } - + public RtfPageNumber newPageNumber()throws IOException { m_pageNumber = new RtfPageNumber(this,m_writer); return m_pageNumber; } - + /** * Added by Boris POUDEROUS on 2002/07/09 */ @@ -219,46 +219,46 @@ IRtfPageNumberContainer,IRtfPageNumberCitationContainer { m_pageNumberCitation = new RtfPageNumberCitation(this,m_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); 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); return m_externalGraphic; } - + private void closeCurrentText() throws IOException { if(m_text != null) m_text.close(); } - + private void closeCurrentHyperLink() throws IOException { if(m_hyperlink != null) m_hyperlink.close(); } - + private void closeAll() throws IOException { closeCurrentText(); closeCurrentHyperLink(); } - + /** depending on RtfOptions, do not emit any RTF for empty paragraphs */ protected boolean okToWriteRtf() { boolean result = super.okToWriteRtf(); - + if(m_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; } - + return result; } - + /** true if we must write our own (non-text) attributes in the RTF */ private boolean mustWriteAttributes() { boolean writeAttributes = false; @@ -284,14 +284,14 @@ IRtfPageNumberContainer,IRtfPageNumberCitationContainer { } return writeAttributes; } - + /** true if we must write a group mark around this paragraph * TODO is this correct, study interaction with mustWriteAttributes() <-- On implementation i have noticed if the groupmark set, the format attributes are only for this content, i think this implementation is ok */ private boolean mustWriteGroupMark() { return getChildCount() > 0; } - + /** get the attributes of our text */ public RtfAttributes getTextAttributes(){ if(m_text == null) return null; diff --git a/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfSection.java b/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfSection.java index d013cb7fb..22d962f49 100755 --- a/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfSection.java +++ b/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfSection.java @@ -112,7 +112,7 @@ implements } /** start a new table after closing current paragraph, list and table - * @param tc Table context used for number-columns-spanned attribute (added by Boris Poudérous on july 2002) + * @param tc Table context used for number-columns-spanned attribute (added by Boris Poudérous on july 2002) */ public RtfTable newTable(ITableColumnsInfo tc) throws IOException { closeAll(); @@ -121,7 +121,7 @@ implements } /** start a new table after closing current paragraph, list and table - * @param tc Table context used for number-columns-spanned attribute (added by Boris Poudérous on july 2002) + * @param tc Table context used for number-columns-spanned attribute (added by Boris Poudérous on july 2002) */ public RtfTable newTable(RtfAttributes attrs, ITableColumnsInfo tc) throws IOException { @@ -143,7 +143,7 @@ implements m_before = new RtfBefore(this,m_writer,attrs); return m_before; } - + /** IRtfAfterContainer */ public RtfAfter newAfter(RtfAttributes attrs) throws IOException { closeAll(); diff --git a/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfTable.java b/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfTable.java index 24eb35c4a..fad93ad35 100755 --- a/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfTable.java +++ b/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfTable.java @@ -66,24 +66,24 @@ public class RtfTable extends RtfContainer private RtfTableRow m_row; private int highestRow=0; - /** Added by Boris Poudérous on 07/22/2002 in order to process number-columns-spanned attribute */ + /** Added by Boris Poudérous on 07/22/2002 in order to process number-columns-spanned attribute */ private ITableColumnsInfo m_table_context; /** Create an RTF element as a child of given container */ RtfTable(IRtfTableContainer parent, Writer w, ITableColumnsInfo tc) throws IOException { super((RtfContainer)parent,w); - // Line added by Boris Poudérous on 07/22/2002 + // Line added by Boris Poudérous on 07/22/2002 m_table_context = tc; } /** Create an RTF element as a child of given container - * Modified by Boris Poudérous in order to process 'number-columns-spanned' attribute + * Modified by Boris Poudérous in order to process 'number-columns-spanned' attribute */ RtfTable(IRtfTableContainer parent, Writer w, RtfAttributes attrs, ITableColumnsInfo tc) throws IOException { super((RtfContainer)parent,w,attrs); - // Line added by Boris Poudérous on 07/22/2002 + // Line added by Boris Poudérous on 07/22/2002 m_table_context = tc; } @@ -133,7 +133,7 @@ public class RtfTable extends RtfContainer return (highestRow == id) ? true : false; } - /** Added by Boris Poudérous on 07/22/2002 */ + /** Added by Boris Poudérous on 07/22/2002 */ public ITableColumnsInfo getITableColumnsInfo() { return this.m_table_context; diff --git a/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfTableCell.java b/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfTableCell.java index 62a24981d..27e4c2db6 100755 --- a/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfTableCell.java +++ b/src/java/org/apache/fop/rtf/rtflib/rtfdoc/RtfTableCell.java @@ -67,7 +67,7 @@ implements IRtfParagraphContainer,IRtfListContainer,IRtfTableContainer,IRtfExter private RtfList m_list; private RtfTable m_table; private RtfExternalGraphic m_externalGraphic; - private final RtfTableRow m_parentRow; + private final RtfTableRow m_parentRow; private boolean set_center; private boolean set_right; private int id; @@ -108,7 +108,7 @@ implements IRtfParagraphContainer,IRtfListContainer,IRtfTableContainer,IRtfExter m_parentRow = parent; m_cellWidth = cellWidth; - /** Added by Boris Poudérous on 07/22/2002 in order to process number-columns-spanned attribute */ + /** Added by Boris Poudérous on 07/22/2002 in order to process number-columns-spanned attribute */ // If the cell is spanned horizontally if (attrs.getValue("number-columns-spanned") != null) { @@ -157,7 +157,7 @@ implements IRtfParagraphContainer,IRtfListContainer,IRtfTableContainer,IRtfExter attrs.set("intbl"); m_paragraph = new RtfParagraph(this,m_writer,attrs); - + if(m_paragraph.m_attrib.isSet("qc")) { set_center=true; @@ -205,11 +205,11 @@ implements IRtfParagraphContainer,IRtfListContainer,IRtfTableContainer,IRtfExter return m_table; } - /** start a new nested table after closing current paragraph, list and table */ // Modified by Boris Poudérous on 07/22/2002 + /** start a new nested table after closing current paragraph, list and table */ // Modified by Boris Poudérous on 07/22/2002 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,m_writer, attrs, tc); // Added tc Boris Poudérous 07/22/2002 return m_table; } @@ -276,7 +276,7 @@ implements IRtfParagraphContainer,IRtfListContainer,IRtfTableContainer,IRtfExter // word97 hangs if cell does not contain at least one "par" control word // TODO this is what causes the extra spaces in nested table of test 004-spacing-in-tables.fo, // but if is not here we generate invalid RTF for word97 - + if(set_center) { writeControlWord("qc"); @@ -357,10 +357,10 @@ implements IRtfParagraphContainer,IRtfListContainer,IRtfTableContainer,IRtfExter if(e instanceof RtfTable) { // nested table - render its cells in supplementary rows after current row, // and put the remaining content of this cell in a new cell after nested table - // Line added by Boris Poudérous + // Line added by Boris Poudérous m_parentRow.getExtraRowSet().setParentITableColumnsInfo(((RtfTable)this.getParentOfClass(e.getClass())).getITableColumnsInfo()); extraRowIndex = m_parentRow.getExtraRowSet().addTable((RtfTable)e,extraRowIndex,m_widthOffset); - // Boris Poudérous added the passing of the current cell attributes to the new cells (in order not to have cell without border for example) + // Boris Poudérous added the passing of the current cell 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); extraRowIndex++; -- 2.39.5