<changes>
<release version="3.8-beta6" date="2012-??-??">
+ <action dev="poi-developers" type="fix">52599 - avoid duplicate text when rendering slides in HSLF</action>
<action dev="poi-developers" type="fix">52598 - respect slide background when rendering slides in HSLF</action>
<action dev="poi-developers" type="fix">51731 - fixed painting shape outlines in HSLF</action>
<action dev="poi-developers" type="fix">52701 - fixed seting vertical alignment for XSLFTableCell</action>
private SlideShow slideShow;
private Sheet _sheet;
private int shapeId;
- private int slwtIndex; //position in the owning SlideListWithText
+ private int slwtIndex = -1; //position in the owning SlideListWithText
/**
* all text run records that follow TextHeaderAtom.
* (there can be misc InteractiveInfo, TxInteractiveInfo and other records)
assertNotNull(shape.getEscherTextboxWrapper());
assertEquals("", shape.getText());
assertSame(run, shape.createTextRun());
-
+ assertEquals(-1, run.getIndex());
}
public void testCreateTextBox(){
assertEquals(0.05, tx.getMarginTop()*Shape.EMU_PER_POINT/Shape.EMU_PER_INCH, 0.01);
assertEquals(0.05, tx.getMarginBottom()*Shape.EMU_PER_POINT/Shape.EMU_PER_INCH, 0.01);
}
+
+ public void test52599() throws IOException {
+ SlideShow ppt = new SlideShow(_slTests.openResourceAsStream("52599.ppt"));
+
+ Slide slide = ppt.getSlides()[0];
+ Shape[] sh = slide.getShapes();
+ assertEquals(3, sh.length);
+
+ TextShape sh0 = (TextShape)sh[0];
+ assertEquals(null, sh0.getText());
+ assertEquals(null, sh0.getTextRun());
+
+ TextShape sh1 = (TextShape)sh[1];
+ assertEquals(null, sh1.getText());
+ assertEquals(null, sh1.getTextRun());
+
+ TextShape sh2 = (TextShape)sh[2];
+ assertEquals("this box should be shown just once", sh2.getText());
+ assertEquals(-1, sh2.getTextRun().getIndex());
+ }
}