import org.openxmlformats.schemas.drawingml.x2006.main.CTPositiveSize2D;\r
import org.openxmlformats.schemas.drawingml.x2006.main.CTRegularTextRun;\r
import org.openxmlformats.schemas.drawingml.x2006.main.CTSchemeColor;\r
+import org.openxmlformats.schemas.drawingml.x2006.main.CTShapeProperties;\r
import org.openxmlformats.schemas.drawingml.x2006.main.CTSolidColorFillProperties;\r
import org.openxmlformats.schemas.drawingml.x2006.main.CTTable;\r
import org.openxmlformats.schemas.drawingml.x2006.main.CTTableCell;\r
return new XSLFCellTextParagraph(p, this);\r
}\r
\r
+ /**\r
+ * Return fake shape properties as a fallback for not overridden\r
+ * methods of XSLFSimpleShape\r
+ * \r
+ * @return fake shape properties\r
+ * \r
+ * @since POI 3.15-beta2\r
+ */\r
+ @Override\r
+ protected CTShapeProperties getSpPr() {\r
+ return CTShapeProperties.Factory.newInstance();\r
+ }\r
+ \r
/**\r
* @since POI 3.15-beta2\r
*/\r
import static org.junit.Assert.assertTrue;\r
\r
import java.awt.Color;\r
+import java.awt.geom.Rectangle2D;\r
import java.io.IOException;\r
import java.util.List;\r
\r
\r
ss2.close();\r
}\r
+\r
+ @Test\r
+ public void checkTextHeight() throws IOException {\r
+ // from bug 59686\r
+ XMLSlideShow ppt = new XMLSlideShow();\r
+ XSLFSlide sl = ppt.createSlide();\r
+ XSLFTable tab = sl.createTable();\r
+ tab.setAnchor(new Rectangle2D.Double(50,50,300,50));\r
+ XSLFTableRow tr = tab.addRow();\r
+ XSLFTableCell tc0 = tr.addCell();\r
+ tc0.setText("bla bla bla bla");\r
+ tab.setColumnWidth(0, 50);\r
+ \r
+ assertEquals(88, tc0.getTextHeight(), 0);\r
+ assertEquals(0, tc0.getLineWidth(), 0);\r
+ \r
+ ppt.close();\r
+ }\r
}
\ No newline at end of file