Package org.docx4j.dml.diagram

Examples of org.docx4j.dml.diagram.CTDiagramDefinitionHeader


    gloxPackage.addTargetPart(target);
   
    // DiagramLayoutHeaderPart
    DiagramLayoutHeaderPart diagramLayoutHeaderPart = new DiagramLayoutHeaderPart();
    ObjectFactory factory = new ObjectFactory();
    CTDiagramDefinitionHeader header = factory.createCTDiagramDefinitionHeader();
    diagramLayoutHeaderPart.setJaxbElement(header);
   
    String uniqueId = target.getJaxbElement().getUniqueId();
    if (uniqueId!=null) {
      header.setUniqueId( uniqueId );
      System.out.println("Creating glox for " + uniqueId);
     
      // Can we make a filename out of this?
      if (uniqueId.indexOf("/")>0
          && uniqueId.lastIndexOf("/")!= uniqueId.length()-1 ) {
        outputfilename = uniqueId.substring(uniqueId.lastIndexOf("/")+1) + ".glox";
      }
    }
   
    if (target.getJaxbElement().getTitle()==null
        || target.getJaxbElement().getTitle().isEmpty()
        || (target.getJaxbElement().getTitle().size()==1
            && target.getJaxbElement().getTitle().get(0).getVal().isEmpty())) {
      CTName title = factory.createCTName();
      title.setVal("some title");
      header.getTitle().add(title);
    } else {
      header.getTitle().addAll(target.getJaxbElement().getTitle() );     
    }

    if (target.getJaxbElement().getDesc()==null
        || target.getJaxbElement().getDesc().isEmpty()
        || (target.getJaxbElement().getDesc().size()==1
            && target.getJaxbElement().getDesc().get(0).getVal().isEmpty())) {
      CTDescription desc = factory.createCTDescription();
      desc.setVal("some desc");
      header.getDesc().add(desc);
    } else {
      header.getDesc().addAll(target.getJaxbElement().getDesc() );     
    }
   
    gloxPackage.addTargetPart(diagramLayoutHeaderPart);
   
View Full Code Here

TOP

Related Classes of org.docx4j.dml.diagram.CTDiagramDefinitionHeader

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.