Examples of sizeOfCommentArray()


Examples of org.openxmlformats.schemas.spreadsheetml.x2006.main.CTCommentList.sizeOfCommentArray()

        return ct;
    }

    public boolean removeComment(String cellRef) {
        CTCommentList lst = comments.getCommentList();
        if(lst != null) for(int i=0; i < lst.sizeOfCommentArray(); i++) {
            CTComment comment = lst.getCommentArray(i);
            if (cellRef.equals(comment.getRef())) {
                lst.removeComment(i);
                return true;
            }
View Full Code Here

Examples of org.openxmlformats.schemas.spreadsheetml.x2006.main.CTCommentList.sizeOfCommentArray()

        return ct;
    }

    public boolean removeComment(String cellRef) {
        CTCommentList lst = comments.getCommentList();
        if(lst != null) for(int i=0; i < lst.sizeOfCommentArray(); i++) {
            CTComment comment = lst.getCommentArray(i);
            if (cellRef.equals(comment.getRef())) {
                lst.removeComment(i);
               
                if(commentRefs != null) {
View Full Code Here

Examples of org.openxmlformats.schemas.spreadsheetml.x2006.main.CTCommentList.sizeOfCommentArray()

    doc.save(out, POIXMLDocumentPart.DEFAULT_XML_OPTIONS);
    CommentsTable sheetComments = new CommentsTable();
    sheetComments.readFrom(new ByteArrayInputStream(out.toByteArray()));

    CTCommentList commentList = sheetComments.getCTComments().addNewCommentList();
    assertEquals(0, commentList.sizeOfCommentArray());

    XSSFComment comment = sheetComments.addComment();
    comment.setAuthor("test A1 author");
    comment.setRow(0);
    comment.setColumn((short)0);
View Full Code Here

Examples of org.openxmlformats.schemas.spreadsheetml.x2006.main.CTCommentList.sizeOfCommentArray()

    XSSFComment comment = sheetComments.addComment();
    comment.setAuthor("test A1 author");
    comment.setRow(0);
    comment.setColumn((short)0);

    assertEquals(1, commentList.sizeOfCommentArray());
    assertEquals("test A1 author", sheetComments.getAuthor(commentList.getCommentArray(0).getAuthorId()));
    assertEquals("test A1 author", comment.getAuthor());

    // Change the author, check it updates
    comment.setAuthor("Another Author");
View Full Code Here

Examples of org.openxmlformats.schemas.spreadsheetml.x2006.main.CTCommentList.sizeOfCommentArray()

    assertEquals("test A1 author", sheetComments.getAuthor(commentList.getCommentArray(0).getAuthorId()));
    assertEquals("test A1 author", comment.getAuthor());

    // Change the author, check it updates
    comment.setAuthor("Another Author");
    assertEquals(1, commentList.sizeOfCommentArray());
    assertEquals("Another Author", comment.getAuthor());
  }

  public void testDontLoostNewLines() {
    XSSFWorkbook wb = XSSFTestDataSamples.openSampleWorkbook("WithVariousData.xlsx");
View Full Code Here

Examples of org.openxmlformats.schemas.spreadsheetml.x2006.main.CTCommentList.sizeOfCommentArray()

        return ct;
    }

    public boolean removeComment(String cellRef) {
        CTCommentList lst = comments.getCommentList();
        if(lst != null) for(int i=0; i < lst.sizeOfCommentArray(); i++) {
            CTComment comment = lst.getCommentArray(i);
            if (cellRef.equals(comment.getRef())) {
                lst.removeComment(i);
               
                if(commentRefs != null) {
View Full Code Here

Examples of org.openxmlformats.schemas.spreadsheetml.x2006.main.CTCommentList.sizeOfCommentArray()

        return ct;
    }

    public boolean removeComment(String cellRef) {
        CTCommentList lst = comments.getCommentList();
        if(lst != null) for(int i=0; i < lst.sizeOfCommentArray(); i++) {
            CTComment comment = lst.getCommentArray(i);
            if (cellRef.equals(comment.getRef())) {
                lst.removeComment(i);
               
                if(commentRefs != null) {
View Full Code Here

Examples of org.openxmlformats.schemas.spreadsheetml.x2006.main.CTCommentList.sizeOfCommentArray()

 
  public void testAddCellComment() {
    CTComments comments = CTComments.Factory.newInstance();
    CommentsTable sheetComments = new CommentsTable(comments);
    CTCommentList commentList = comments.addNewCommentList();
    assertEquals(0, commentList.sizeOfCommentArray());
   
    XSSFComment comment = sheetComments.addComment();
    comment.setAuthor("test A1 author");
    comment.setRow(0);
    comment.setColumn((short)0);
View Full Code Here

Examples of org.openxmlformats.schemas.spreadsheetml.x2006.main.CTCommentList.sizeOfCommentArray()

    XSSFComment comment = sheetComments.addComment();
    comment.setAuthor("test A1 author");
    comment.setRow(0);
    comment.setColumn((short)0);
   
    assertEquals(1, commentList.sizeOfCommentArray());
    assertEquals("test A1 author", sheetComments.getAuthor(commentList.getCommentArray(0).getAuthorId()));
    assertEquals("test A1 author", comment.getAuthor());
   
    // Change the author, check it updates
    comment.setAuthor("Another Author");
View Full Code Here

Examples of org.openxmlformats.schemas.spreadsheetml.x2006.main.CTCommentList.sizeOfCommentArray()

    assertEquals("test A1 author", sheetComments.getAuthor(commentList.getCommentArray(0).getAuthorId()));
    assertEquals("test A1 author", comment.getAuthor());
   
    // Change the author, check it updates
    comment.setAuthor("Another Author");
    assertEquals(1, commentList.sizeOfCommentArray());
    assertEquals("Another Author", comment.getAuthor());
  }
 
  public void testDontLoostNewLines() throws Exception {
    File xml = new File(
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.