diff options
author | Jeremias Maerki <jeremias@apache.org> | 2008-09-10 09:00:16 +0000 |
---|---|---|
committer | Jeremias Maerki <jeremias@apache.org> | 2008-09-10 09:00:16 +0000 |
commit | 1e0f9c87641260ba4399f477c6a4d5c22f2a3a84 (patch) | |
tree | 0f39f42b7f4e399fb6875d9c7f1f155621f50be3 /src/java/org | |
parent | 5c02a136b812e269d11aa3a5eefd61066458dc14 (diff) | |
download | xmlgraphics-fop-1e0f9c87641260ba4399f477c6a4d5c22f2a3a84.tar.gz xmlgraphics-fop-1e0f9c87641260ba4399f477c6a4d5c22f2a3a84.zip |
Bugzilla #45616:
Fix for table handling in RTF output, so the output works with OpenOffice and AbiWord, too.
Submitted by: Pavel Kysilka <goldenfish.at.linuxsoft.cz>
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@693742 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org')
-rw-r--r-- | src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfTableCell.java | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfTableCell.java b/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfTableCell.java index 740ea36e5..09c39be12 100644 --- a/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfTableCell.java +++ b/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfTableCell.java @@ -26,8 +26,8 @@ package org.apache.fop.render.rtf.rtflib.rtfdoc; * the FOP project. */ -import java.io.Writer; import java.io.IOException; +import java.io.Writer; import java.util.Iterator; /** A cell in an RTF table, container for paragraphs, lists, etc. @@ -237,12 +237,12 @@ public class RtfTableCell // Reach the column index in table context corresponding to the current column cell // id is the index of the current cell (it begins at 1) // getColumnIndex() is the index of the current column in table context (it begins at 0) - // => so we must widthdraw 1 when comparing these two variables. + // => so we must withdraw 1 when comparing these two variables. while ((this.id - 1) != tableColumnsInfo.getColumnIndex()) { tableColumnsInfo.selectNextColumn(); } - // We widthdraw one cell because the first cell is already created + // We withdraw one cell because the first cell is already created // (it's the current cell) ! int i = nbMergedCells - 1; while (i > 0) { @@ -255,21 +255,18 @@ public class RtfTableCell final int xPos = offset + iCurrentWidth; //these lines added by Chris Scott, Westinghouse - //some attributes need to be writting before opening block + //some attributes need to be written before opening block if (setCenter) { - writeControlWord("qc"); + writeControlWord("trqc"); } else if (setRight) { - writeControlWord("qr"); + writeControlWord("trqr"); } else { - writeControlWord("ql"); + writeControlWord("trql"); } writeAttributes (attrib, ITableAttributes.CELL_VERT_ALIGN); writeControlWord("cellx" + xPos); - //TODO Why is this here, right after an alignment command is written (see above)? - writeControlWord("ql"); - return xPos; } |