Package org.apache.poi.hssf.model

Examples of org.apache.poi.hssf.model.CommentShape


          EscherRecord escherTextbox = ( (TextboxShape) shapeModel ).getEscherTextbox();
          shapeToObj.put( escherTextbox, ( (TextboxShape) shapeModel ).getTextObjectRecord() );
          //          escherParent.addChildRecord(escherTextbox);
         
          if ( shapeModel instanceof CommentShape ){
            CommentShape comment = (CommentShape)shapeModel;
            tailRec.add(comment.getNoteRecord());
          }

        }
        escherParent.addChildRecord( shapeModel.getSpContainer() );
      }
View Full Code Here


          EscherRecord escherTextbox = ( (TextboxShape) shapeModel ).getEscherTextbox();
          shapeToObj.put( escherTextbox, ( (TextboxShape) shapeModel ).getTextObjectRecord() );
          //          escherParent.addChildRecord(escherTextbox);

          if ( shapeModel instanceof CommentShape ){
            CommentShape comment = (CommentShape)shapeModel;
            tailRec.add(comment.getNoteRecord());
          }

        }
        escherParent.addChildRecord( shapeModel.getSpContainer() );
      }
View Full Code Here

                    EscherRecord escherTextbox = ( (TextboxShape) shapeModel ).getEscherTextbox();
                    shapeToObj.put( escherTextbox, ( (TextboxShape) shapeModel ).getTextObjectRecord() );
                    //                    escherParent.addChildRecord(escherTextbox);
                   
                    if ( shapeModel instanceof CommentShape ){
                        CommentShape comment = (CommentShape)shapeModel;
                        tailRec.add(comment.getNoteRecord());
                    }

                }
                escherParent.addChildRecord( shapeModel.getSpContainer() );
            }
View Full Code Here

                    EscherRecord escherTextbox = ( (TextboxShape) shapeModel ).getEscherTextbox();
                    shapeToObj.put( escherTextbox, ( (TextboxShape) shapeModel ).getTextObjectRecord() );
                    //                    escherParent.addChildRecord(escherTextbox);
                   
                    if ( shapeModel instanceof CommentShape ){
                        CommentShape comment = (CommentShape)shapeModel;
                        tailRec.add(comment.getNoteRecord());
                    }

                }
                escherParent.addChildRecord( shapeModel.getSpContainer() );
            }
View Full Code Here

                    EscherRecord escherTextbox = ( (TextboxShape) shapeModel ).getEscherTextbox();
                    shapeToObj.put( escherTextbox, ( (TextboxShape) shapeModel ).getTextObjectRecord() );
                    //                    escherParent.addChildRecord(escherTextbox);
                   
                    if ( shapeModel instanceof CommentShape ){
                        CommentShape comment = (CommentShape)shapeModel;
                        tailRec.add(comment.getNoteRecord());
                    }

                }
                escherParent.addChildRecord( shapeModel.getSpContainer() );
            }
View Full Code Here

          EscherRecord escherTextbox = ( (TextboxShape) shapeModel ).getEscherTextbox();
          shapeToObj.put( escherTextbox, ( (TextboxShape) shapeModel ).getTextObjectRecord() );
          //          escherParent.addChildRecord(escherTextbox);

          if ( shapeModel instanceof CommentShape ){
            CommentShape comment = (CommentShape)shapeModel;
            tailRec.add(comment.getNoteRecord());
          }

        }
        escherParent.addChildRecord( shapeModel.getSpContainer() );
      }
View Full Code Here

          EscherRecord escherTextbox = ( (TextboxShape) shapeModel ).getEscherTextbox();
          shapeToObj.put( escherTextbox, ( (TextboxShape) shapeModel ).getTextObjectRecord() );
          //          escherParent.addChildRecord(escherTextbox);

          if ( shapeModel instanceof CommentShape ){
            CommentShape comment = (CommentShape)shapeModel;
            tailRec.add(comment.getNoteRecord());
          }

        }
        escherParent.addChildRecord( shapeModel.getSpContainer() );
      }
View Full Code Here

                    EscherRecord escherTextbox = ( (TextboxShape) shapeModel ).getEscherTextbox();
                    shapeToObj.put( escherTextbox, ( (TextboxShape) shapeModel ).getTextObjectRecord() );
                    //                    escherParent.addChildRecord(escherTextbox);
                   
                    if ( shapeModel instanceof CommentShape ){
                        CommentShape comment = (CommentShape)shapeModel;
                        tailRec.add(comment.getNoteRecord());
                    }

                }
                escherParent.addChildRecord( shapeModel.getSpContainer() );
            }
View Full Code Here

          EscherRecord escherTextbox = ( (TextboxShape) shapeModel ).getEscherTextbox();
          shapeToObj.put( escherTextbox, ( (TextboxShape) shapeModel ).getTextObjectRecord() );
          //          escherParent.addChildRecord(escherTextbox);

          if ( shapeModel instanceof CommentShape ){
            CommentShape comment = (CommentShape)shapeModel;
            tailRec.add(comment.getNoteRecord());
          }

        }
        escherParent.addChildRecord( shapeModel.getSpContainer() );
      }
View Full Code Here

        HSSFComment comment = patriarch.createCellComment(new HSSFClientAnchor());
        HSSFRow row = sh.createRow(0);
        HSSFCell cell = row.createCell(0);
        cell.setCellComment(comment);

        CommentShape commentShape = HSSFTestModelHelper.createCommentShape(1025, comment);

        assertEquals(comment.getEscherContainer().getChildRecords().size(), 5);
        assertEquals(commentShape.getSpContainer().getChildRecords().size(), 5);

        //sp record
        byte[] expected = commentShape.getSpContainer().getChild(0).serialize();
        byte[] actual = comment.getEscherContainer().getChild(0).serialize();

        assertEquals(expected.length, actual.length);
        assertTrue(Arrays.equals(expected, actual));

        expected = commentShape.getSpContainer().getChild(2).serialize();
        actual = comment.getEscherContainer().getChild(2).serialize();

        assertEquals(expected.length, actual.length);
        assertTrue(Arrays.equals(expected, actual));

        expected = commentShape.getSpContainer().getChild(3).serialize();
        actual = comment.getEscherContainer().getChild(3).serialize();

        assertEquals(expected.length, actual.length);
        assertTrue(Arrays.equals(expected, actual));

        expected = commentShape.getSpContainer().getChild(4).serialize();
        actual = comment.getEscherContainer().getChild(4).serialize();

        assertEquals(expected.length, actual.length);
        assertTrue(Arrays.equals(expected, actual));

        ObjRecord obj = comment.getObjRecord();
        ObjRecord objShape = commentShape.getObjRecord();
        /**shapeId = 1025 % 1024**/
        ((CommonObjectDataSubRecord)objShape.getSubRecords().get(0)).setObjectId(1);

        expected = obj.serialize();
        actual = objShape.serialize();

        TextObjectRecord tor = comment.getTextObjectRecord();
        TextObjectRecord torShape = commentShape.getTextObjectRecord();

        expected = tor.serialize();
        actual = torShape.serialize();

        assertEquals(expected.length, actual.length);
        assertTrue(Arrays.equals(expected, actual));

        NoteRecord note = comment.getNoteRecord();
        NoteRecord noteShape = commentShape.getNoteRecord();
        noteShape.setShapeId(1);

        expected = note.serialize();
        actual = noteShape.serialize();

View Full Code Here

TOP

Related Classes of org.apache.poi.hssf.model.CommentShape

Copyright © 2018 www.massapicom. 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.