diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSimpleShape.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSimpleShape.java index 44fc91bbf..7ce8c4e0d 100644 --- a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSimpleShape.java +++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSimpleShape.java @@ -25,28 +25,7 @@ import org.apache.poi.hssf.util.HSSFColor; import org.apache.poi.ss.usermodel.VerticalAlignment; import org.apache.poi.util.Internal; import org.apache.poi.util.Units; -import org.openxmlformats.schemas.drawingml.x2006.main.CTNonVisualDrawingProps; -import org.openxmlformats.schemas.drawingml.x2006.main.CTPoint2D; -import org.openxmlformats.schemas.drawingml.x2006.main.CTPositiveSize2D; -import org.openxmlformats.schemas.drawingml.x2006.main.CTPresetGeometry2D; -import org.openxmlformats.schemas.drawingml.x2006.main.CTRegularTextRun; -import org.openxmlformats.schemas.drawingml.x2006.main.CTSRgbColor; -import org.openxmlformats.schemas.drawingml.x2006.main.CTShapeProperties; -import org.openxmlformats.schemas.drawingml.x2006.main.CTSolidColorFillProperties; -import org.openxmlformats.schemas.drawingml.x2006.main.CTTextBody; -import org.openxmlformats.schemas.drawingml.x2006.main.CTTextBodyProperties; -import org.openxmlformats.schemas.drawingml.x2006.main.CTTextCharacterProperties; -import org.openxmlformats.schemas.drawingml.x2006.main.CTTextFont; -import org.openxmlformats.schemas.drawingml.x2006.main.CTTextParagraph; -import org.openxmlformats.schemas.drawingml.x2006.main.CTTransform2D; -import org.openxmlformats.schemas.drawingml.x2006.main.STShapeType; -import org.openxmlformats.schemas.drawingml.x2006.main.STTextAlignType; -import org.openxmlformats.schemas.drawingml.x2006.main.STTextAnchoringType; -import org.openxmlformats.schemas.drawingml.x2006.main.STTextHorzOverflowType; -import org.openxmlformats.schemas.drawingml.x2006.main.STTextUnderlineType; -import org.openxmlformats.schemas.drawingml.x2006.main.STTextVertOverflowType; -import org.openxmlformats.schemas.drawingml.x2006.main.STTextVerticalType; -import org.openxmlformats.schemas.drawingml.x2006.main.STTextWrappingType; +import org.openxmlformats.schemas.drawingml.x2006.main.*; import org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.CTShape; import org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.CTShapeNonVisual; import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTRElt; @@ -81,8 +60,10 @@ public class XSSFSimpleShape extends XSSFShape implements Iterable shapes = drawing.getShapes(); + assertEquals(4, shapes.size()); + + wb = XSSFTestDataSamples.writeOutAndReadBack(wb); + + shapes = drawing.getShapes(); + assertEquals(4, shapes.size()); + +/* OutputStream stream = new FileOutputStream(new File("C:\\temp\\56514.xlsx")); + try { + wb.write(stream); + } finally { + stream.close(); + }*/ + } } diff --git a/test-data/spreadsheet/56514.xlsx b/test-data/spreadsheet/56514.xlsx new file mode 100644 index 000000000..29163a5fe Binary files /dev/null and b/test-data/spreadsheet/56514.xlsx differ