You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by ye...@apache.org on 2008/11/03 20:19:39 UTC

svn commit: r710134 - in /poi/trunk/src/scratchpad: src/org/apache/poi/hslf/model/TableCell.java testcases/org/apache/poi/hslf/model/TestTable.java

Author: yegor
Date: Mon Nov  3 11:19:39 2008
New Revision: 710134

URL: http://svn.apache.org/viewvc?rev=710134&view=rev
Log:
fixed bug #46033: table cells had incorrect text type resulting in corrupted style info

Modified:
    poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/TableCell.java
    poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/model/TestTable.java

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/TableCell.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/TableCell.java?rev=710134&r1=710133&r2=710134&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/TableCell.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/TableCell.java Mon Nov  3 11:19:39 2008
@@ -56,8 +56,8 @@
         super(parent);
 
         setShapeType(ShapeTypes.Rectangle);
-        _txtrun.setRunType(TextHeaderAtom.HALF_BODY_TYPE);
-        _txtrun.getRichTextRuns()[0].setFlag(false, 0, false);
+        //_txtrun.setRunType(TextHeaderAtom.HALF_BODY_TYPE);
+        //_txtrun.getRichTextRuns()[0].setFlag(false, 0, false);
     }
 
     protected EscherContainerRecord createSpContainer(boolean isChild){

Modified: poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/model/TestTable.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/model/TestTable.java?rev=710134&r1=710133&r2=710134&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/model/TestTable.java (original)
+++ poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/model/TestTable.java Mon Nov  3 11:19:39 2008
@@ -24,6 +24,7 @@
 
 import org.apache.poi.hslf.usermodel.SlideShow;
 import org.apache.poi.hslf.HSLFSlideShow;
+import org.apache.poi.hslf.record.TextHeaderAtom;
 
 /**
  * Test <code>Table</code> object.
@@ -43,6 +44,10 @@
         Table tbl = new Table(2, 5);
         slide.addShape(tbl);
 
+        TableCell cell = tbl.getCell(0, 0);
+        //table cells have type=TextHeaderAtom.OTHER_TYPE, see bug #46033
+        assertEquals(TextHeaderAtom.OTHER_TYPE, cell.getTextRun().getRunType());
+
         assertTrue(slide.getShapes()[0] instanceof Table);
         Table tbl2 = (Table)slide.getShapes()[0];
         assertEquals(tbl.getNumberOfColumns(), tbl2.getNumberOfColumns());



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org