mirror of
https://github.com/apache/poi.git
synced 2025-02-09 11:34:46 +00:00
fixed bug #46033: table cells had incorrect text type resulting in corrupted style info
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@710134 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
d99149477c
commit
60a692dc97
@ -56,8 +56,8 @@ public class TableCell extends TextBox {
|
|||||||
super(parent);
|
super(parent);
|
||||||
|
|
||||||
setShapeType(ShapeTypes.Rectangle);
|
setShapeType(ShapeTypes.Rectangle);
|
||||||
_txtrun.setRunType(TextHeaderAtom.HALF_BODY_TYPE);
|
//_txtrun.setRunType(TextHeaderAtom.HALF_BODY_TYPE);
|
||||||
_txtrun.getRichTextRuns()[0].setFlag(false, 0, false);
|
//_txtrun.getRichTextRuns()[0].setFlag(false, 0, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected EscherContainerRecord createSpContainer(boolean isChild){
|
protected EscherContainerRecord createSpContainer(boolean isChild){
|
||||||
|
@ -24,6 +24,7 @@ import java.awt.geom.Rectangle2D;
|
|||||||
|
|
||||||
import org.apache.poi.hslf.usermodel.SlideShow;
|
import org.apache.poi.hslf.usermodel.SlideShow;
|
||||||
import org.apache.poi.hslf.HSLFSlideShow;
|
import org.apache.poi.hslf.HSLFSlideShow;
|
||||||
|
import org.apache.poi.hslf.record.TextHeaderAtom;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test <code>Table</code> object.
|
* Test <code>Table</code> object.
|
||||||
@ -43,6 +44,10 @@ public class TestTable extends TestCase {
|
|||||||
Table tbl = new Table(2, 5);
|
Table tbl = new Table(2, 5);
|
||||||
slide.addShape(tbl);
|
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);
|
assertTrue(slide.getShapes()[0] instanceof Table);
|
||||||
Table tbl2 = (Table)slide.getShapes()[0];
|
Table tbl2 = (Table)slide.getShapes()[0];
|
||||||
assertEquals(tbl.getNumberOfColumns(), tbl2.getNumberOfColumns());
|
assertEquals(tbl.getNumberOfColumns(), tbl2.getNumberOfColumns());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user