Package org.docx4j.openpackaging.parts

Examples of org.docx4j.openpackaging.parts.VMLPart


    } else if (contentType.equals(ContentTypes.IMAGE_EMF) || contentType.equals(ContentTypes.IMAGE_EMF2)) {
      return new MetafileEmfPart(new PartName(partName));
    } else if (contentType.equals(ContentTypes.IMAGE_WMF)) {
      return new MetafileWmfPart(new PartName(partName));
    } else if (contentType.equals(ContentTypes.VML_DRAWING)) {
      return new VMLPart(new PartName(partName));
//      return new VMLBinaryPart(new PartName(partName));       
    } else if (contentType.equals(ContentTypes.DRAWINGML_DIAGRAM_DRAWING)) {
      return new org.docx4j.openpackaging.parts.DrawingML.DiagramDrawingPart(new PartName(partName));
    } else if (contentType.startsWith("application/vnd.openxmlformats-officedocument.drawing")) {
      try {
View Full Code Here


          CommentsPart cp = new CommentsPart();
          cp.setContents(createComment("A1"));
          sheet.addTargetPart(cp);

          // Add <legacyDrawing r:id="rId1"/>
          VMLPart vmlPart = new VMLPart();
          vmlPart.setContents(getVml(0,0))// corresponds to A1
            // you'll need extra VML for each comment
          Relationship rel = sheet.addTargetPart(vmlPart);
          CTLegacyDrawing legacyDrawing = Context.getsmlObjectFactory().createCTLegacyDrawing();
          legacyDrawing.setId(rel.getId());
          sheet.getContents().setLegacyDrawing(legacyDrawing);
View Full Code Here

      CommentsPart cp = new CommentsPart();
      cp.setContents(createComment("A1"));
      sheet.addTargetPart(cp);
 
      // Add <legacyDrawing r:id="rId1"/>
      VMLPart vmlPart = new VMLPart();
      vmlPart.setContents(getVml(0,0))// corresponds to A1
        // you'll need extra VML for each comment
      Relationship rel = sheet.addTargetPart(vmlPart);
      CTLegacyDrawing legacyDrawing = Context.getsmlObjectFactory().createCTLegacyDrawing();
      legacyDrawing.setId(rel.getId());
      sheet.getContents().setLegacyDrawing(legacyDrawing);
View Full Code Here

TOP

Related Classes of org.docx4j.openpackaging.parts.VMLPart

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.