Search in sources :

Example 11 with CTShape

use of com.microsoft.schemas.vml.CTShape in project poi by apache.

the class TestXSSFVMLDrawing method testRemoveCommentShape.

@Test
public void testRemoveCommentShape() throws IOException, XmlException {
    XSSFVMLDrawing vml = new XSSFVMLDrawing();
    InputStream stream = POIDataSamples.getSpreadSheetInstance().openResourceAsStream("vmlDrawing1.vml");
    try {
        vml.read(stream);
    } finally {
        stream.close();
    }
    CTShape sh_a1 = vml.findCommentShape(0, 0);
    assertNotNull(sh_a1);
    assertTrue(vml.removeCommentShape(0, 0));
    assertNull(vml.findCommentShape(0, 0));
}
Also used : ByteArrayInputStream(java.io.ByteArrayInputStream) InputStream(java.io.InputStream) CTShape(com.microsoft.schemas.vml.CTShape) Test(org.junit.Test)

Aggregations

CTShape (com.microsoft.schemas.vml.CTShape)11 Test (org.junit.Test)7 CommentsTable (org.apache.poi.xssf.model.CommentsTable)4 CTClientData (com.microsoft.schemas.office.excel.CTClientData)3 CTShapetype (com.microsoft.schemas.vml.CTShapetype)3 ByteArrayInputStream (java.io.ByteArrayInputStream)3 XmlObject (org.apache.xmlbeans.XmlObject)3 CTComment (org.openxmlformats.schemas.spreadsheetml.x2006.main.CTComment)3 CTShadow (com.microsoft.schemas.vml.CTShadow)2 InputStream (java.io.InputStream)2 BigInteger (java.math.BigInteger)2 CellReference (org.apache.poi.ss.util.CellReference)2 STTrueFalseBlank (com.microsoft.schemas.office.excel.STTrueFalseBlank)1 CTLock (com.microsoft.schemas.office.office.CTLock)1 CTShapeLayout (com.microsoft.schemas.office.office.CTShapeLayout)1 CTFormulas (com.microsoft.schemas.vml.CTFormulas)1 CTGroup (com.microsoft.schemas.vml.CTGroup)1 CTH (com.microsoft.schemas.vml.CTH)1 CTHandles (com.microsoft.schemas.vml.CTHandles)1 CTPath (com.microsoft.schemas.vml.CTPath)1