Examples of HSSFPicture


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

              anchor = toClientAnchor(anchorRecord);
            }else{
              anchor = toChildAnchor(childRecord);
            }

            HSSFPicture picture = new HSSFPicture( parent, anchor );
            picture.setPictureIndex( pictureIndex );

            addToParentOrContainer(picture, container, parent);
          }
          break;
        default:
View Full Code Here

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

      int index = workbook.addPicture(bytes, type);
      HSSFClientAnchor anchor = new HSSFClientAnchor(0, 0, 0, 0, row, column, row, column);

      HSSFPatriarch patriarch = s.createDrawingPatriarch();
      HSSFPicture picture = patriarch.createPicture(anchor, index);

      picture.resize();

      if ((width != 0) && (height != 0)) {
        picture.getImageDimension().setSize(width, height);
      }
    }
  }
View Full Code Here

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

                    x,
                    y,
                    (short) (x2 + 1),
                    y2 + 1);
            anchor.setAnchorType(2);
            HSSFPicture pic = patriarch.createPicture(anchor, idx);
            // pic.resize( );
        } else if (!suppressUnknownImage) {
            cell.setCellValue(new HSSFRichTextString("<<Unsupported Image>>")); //$NON-NLS-1$
        }
    }
View Full Code Here

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

            anchor.setDy1( anchorRecord.getDy1() );
            anchor.setDy2( anchorRecord.getDy2() );
            anchor.setRow1( anchorRecord.getRow1() );
            anchor.setRow2( anchorRecord.getRow2() );

            HSSFPicture picture = new HSSFPicture( null, anchor );
            picture.setPictureIndex( pictureIndex );
            patriarch.getChildren().add( picture );
          }
          break;
        default:
          log.log( POILogger.WARN, "Unhandled shape type: "
View Full Code Here

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

        shape = new TextboxShape(new HSSFTextbox(null, anchor), 1025);
        cmo = (CommonObjectDataSubRecord)shape.getObjRecord().getSubRecords().get(0);
        assertEquals(1, cmo.getObjectId());

        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);
View Full Code Here

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

        List<HSSFPictureData> pictures = workbook.getAllPictures()
        if (pictures.size() != 0) { 
            for (HSSFShape shape : sheet.getDrawingPatriarch().getChildren()) { 
                HSSFClientAnchor anchor = (HSSFClientAnchor) shape.getAnchor()
                if (shape instanceof HSSFPicture) { 
                    HSSFPicture pic = (HSSFPicture) shape; 
                    int pictureIndex = pic.getPictureIndex() - 1
                    HSSFPictureData picData = pictures.get(pictureIndex)
                    String picIndex = String.valueOf(anchor.getRow1()) + "_" 
                            + String.valueOf(anchor.getCol1())
                    sheetIndexPicMap.put(picIndex, picData)
                }
View Full Code Here

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

      int index = workbook.addPicture(bytes, type);
      HSSFClientAnchor anchor = new HSSFClientAnchor(0, 0, 0, 0, row, column, row, column);

      HSSFPatriarch patriarch = s.createDrawingPatriarch();
      HSSFPicture picture = patriarch.createPicture(anchor, index);

      picture.resize();

      if ((width != 0) && (height != 0)) {
        picture.getImageDimension().setSize(width, height);
      }
    }
  }
View Full Code Here

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

      int index = workbook.addPicture(bytes, type);
      HSSFClientAnchor anchor = new HSSFClientAnchor(0, 0, 0, 0, row, column, row, column);

      HSSFPatriarch patriarch = s.createDrawingPatriarch();
      HSSFPicture picture = patriarch.createPicture(anchor, index);

      picture.resize();

      if ((width != 0) && (height != 0)) {
        picture.getImageDimension().setSize(width, height);
      }
    }
  }
View Full Code Here

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

            EscherClientAnchorRecord anchorRecord = (EscherClientAnchorRecord) getEscherChild(
                shapeContainer,
                EscherClientAnchorRecord.RECORD_ID );
                        HSSFClientAnchor anchor = toClientAnchor(anchorRecord);

            HSSFPicture picture = new HSSFPicture( null, anchor );
            picture.setPictureIndex( pictureIndex );
            patriarch.addShape( picture );
          }
          break;
        default:
          log.log( POILogger.WARN, "Unhandled shape type: "
View Full Code Here

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

      int index = workbook.addPicture(bytes, type);
      HSSFClientAnchor anchor = new HSSFClientAnchor(0, 0, 0, 0, row, column, row, column);

      HSSFPatriarch patriarch = s.createDrawingPatriarch();
      HSSFPicture picture = patriarch.createPicture(anchor, index);

      picture.resize();

      if ((width != 0) && (height != 0)) {
        picture.getImageDimension().setSize(width, height);
      }
    }
  }
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.