Examples of HSSFComment


Examples of org.apache.poi.hssf.usermodel.HSSFComment

              default:
                throw new RuntimeException("Unexpected cell type (" + cell.getCellType() + ")");
            }

            // Output the comment, if requested and exists
            HSSFComment comment = cell.getCellComment();
            if(_includeCellComments && comment != null) {
              // Replace any newlines with spaces, otherwise it
              //  breaks the output
              String commentText = comment.getString().getString().replace('\n', ' ');
              text.append(" Comment by "+comment.getAuthor()+": "+commentText);
            }
          }

          // Output a tab if we're not on the last cell
          if(outputContents && k < (lastCell-1)) {
View Full Code Here

Examples of org.apache.poi.hssf.usermodel.HSSFComment

                    iterator.remove();
                    break;
            }
        }

        HSSFComment comment = (HSSFComment)shape;
        opt.addEscherProperty( new EscherSimpleProperty( EscherProperties.GROUPSHAPE__PRINT, comment.isVisible() ? 0x000A0000 : 0x000A0002) );
        opt.addEscherProperty( new EscherSimpleProperty( EscherProperties.SHADOWSTYLE__SHADOWOBSURED, 0x00030003 ) );
        opt.addEscherProperty( new EscherSimpleProperty( EscherProperties.SHADOWSTYLE__COLOR, 0x00000000 ) );
        opt.sortProperties();
        return opt.getEscherProperties().size();   // # options added
    }
View Full Code Here

Examples of org.apache.poi.hssf.usermodel.HSSFComment

              default:
                throw new RuntimeException("Unexpected cell type (" + cell.getCellType() + ")");
            }
           
            // Output the comment, if requested and exists
            HSSFComment comment = cell.getCellComment();
            if(_includeCellComments && comment != null) {
              // Replace any newlines with spaces, otherwise it
              //  breaks the output
              String commentText = comment.getString().getString().replace('\n', ' ');
              text.append(" Comment by "+comment.getAuthor()+": "+commentText);
            }
          }
         
          // Output a tab if we're not on the last cell
          if(outputContents && k < (lastCell-1)) {
View Full Code Here

Examples of org.apache.poi.hssf.usermodel.HSSFComment

        shape = new PictureShape(new HSSFPicture(null, anchor), 1026);
        cmo = (CommonObjectDataSubRecord)shape.getObjRecord().getSubRecords().get(0);
        assertEquals(2, cmo.getObjectId());

        shape = new CommentShape(new HSSFComment(null, anchor), 1027);
        cmo = (CommonObjectDataSubRecord)shape.getObjRecord().getSubRecords().get(0);
        assertEquals(1027, cmo.getObjectId());
    }
View Full Code Here

Examples of org.apache.poi.hssf.usermodel.HSSFComment

                    iterator.remove();
                    break;
            }
        }

        HSSFComment comment = (HSSFComment)shape;
        opt.addEscherProperty( new EscherSimpleProperty( EscherProperties.GROUPSHAPE__PRINT, comment.isVisible() ? 0x000A0000 : 0x000A0002) );
        opt.addEscherProperty( new EscherSimpleProperty( EscherProperties.SHADOWSTYLE__SHADOWOBSURED, 0x00030003 ) );
        opt.addEscherProperty( new EscherSimpleProperty( EscherProperties.SHADOWSTYLE__COLOR, 0x00000000 ) );
        opt.sortProperties();
        return opt.getEscherProperties().size();   // # options added
    }
View Full Code Here

Examples of org.apache.poi.hssf.usermodel.HSSFComment

              default:
                throw new RuntimeException("Unexpected cell type (" + cell.getCellType() + ")");
            }
           
            // Output the comment, if requested and exists
            HSSFComment comment = cell.getCellComment();
            if(_includeCellComments && comment != null) {
              // Replace any newlines with spaces, otherwise it
              //  breaks the output
              String commentText = comment.getString().getString().replace('\n', ' ');
              text.append(" Comment by "+comment.getAuthor()+": "+commentText);
            }
          }
         
          // Output a tab if we're not on the last cell
          if(outputContents && k < (lastCell-1)) {
View Full Code Here

Examples of org.apache.poi.hssf.usermodel.HSSFComment

              default:
                throw new RuntimeException("Unexpected cell type (" + cell.getCellType() + ")");
            }
           
            // Output the comment, if requested and exists
              HSSFComment comment = cell.getCellComment();
            if(includeCellComments && comment != null) {
                // Replace any newlines with spaces, otherwise it
                //  breaks the output
                String commentText = comment.getString().getString().replace('\n', ' ');
                text.append(" Comment by "+comment.getAuthor()+": "+commentText);
            }
          }
         
          // Output a tab if we're not on the last cell
          if(outputContents && k < (lastCell-1)) {
View Full Code Here

Examples of org.apache.poi.hssf.usermodel.HSSFComment

            default:
              throw new RuntimeException("Unexpected cell type (" + cell.getCellType() + ")");
          }
         
          // Output the comment, if requested and exists
            HSSFComment comment = cell.getCellComment();
          if(includeCellComments && comment != null) {
              // Replace any newlines with spaces, otherwise it
              //  breaks the output
              String commentText = comment.getString().getString().replace('\n', ' ');
              text.append(" Comment by "+comment.getAuthor()+": "+commentText);
          }
         
          // Output a tab if we're not on the last cell
          if(outputContents && k < (lastCell-1)) {
            text.append("\t");
View Full Code Here

Examples of org.apache.poi.hssf.usermodel.HSSFComment

                        case HSSFCell.CELL_TYPE_FORMULA:
                            buff.append(cell.getCellFormula());
                            break;
                    }

                    HSSFComment comment = cell.getCellComment();
                    if (comment != null) {
                        // Filter out row delimiter characters from comment
                        String commentText = comment.getString().getString().replace(ROW_DELIMITER_CHAR, ' ');

                        buff.append(" [");
                        buff.append(commentText);
                        buff.append(" by ");
                        buff.append(comment.getAuthor());
                        buff.append(']');
                    }

                    if (cellNum < lastCellNum - 1) {
                        buff.append(CELL_DELIMITER_CHAR);
View Full Code Here

Examples of org.apache.poi.hssf.usermodel.HSSFComment

              default:
                throw new RuntimeException("Unexpected cell type (" + cell.getCellType() + ")");
            }
           
            // Output the comment, if requested and exists
              HSSFComment comment = cell.getCellComment();
            if(includeCellComments && comment != null) {
                // Replace any newlines with spaces, otherwise it
                //  breaks the output
                String commentText = comment.getString().getString().replace('\n', ' ');
                text.append(" Comment by "+comment.getAuthor()+": "+commentText);
            }
          }
         
          // Output a tab if we're not on the last cell
          if(outputContents && k < (lastCell-1)) {
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.