Author: jeremias
Date: Wed Sep 10 02:00:16 2008
New Revision: 693742
URL: http://svn.apache.org/viewvc?rev=693742&view=rev
Log:
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>
Modified:
xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfTableCell.java
xmlgraphics/fop/trunk/status.xml
Modified:
xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfTableCell.java
URL:
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfTableCell.java?rev=693742&r1=693741&r2=693742&view=diff
==============================================================================
---
xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfTableCell.java
(original)
+++
xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfTableCell.java
Wed Sep 10 02:00:16 2008
@@ -26,8 +26,8 @@
* 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 @@
// 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 @@
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;
}
Modified: xmlgraphics/fop/trunk/status.xml
URL:
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/status.xml?rev=693742&r1=693741&r2=693742&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/status.xml (original)
+++ xmlgraphics/fop/trunk/status.xml Wed Sep 10 02:00:16 2008
@@ -53,6 +53,9 @@
<changes>
<release version="FOP Trunk" date="TBD">
+ <action context="Renderers" dev="JM" type="fix" fixes-bug="45616"
due-to="Pavel Kysilka">
+ Fix for table handling in RTF output, so the output works with
OpenOffice and AbiWord, too.
+ </action>
<action context="Code" dev="AD" type="fix" fixes-bug="45667">
Quick-fix to avoid a possible NullPointerException when using
empty inlines and hyphenation.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]