Package org.docx4j.dml

Examples of org.docx4j.dml.CTNonVisualDrawingProps


  private static List<Object> handleGraphicData(org.docx4j.dml.GraphicData graphicData) {
        // Added by Peter Buil
        List<Object> tmpArtificialList = new ArrayList<Object>();
        if (graphicData.getPic() != null) {
            //GraphicData can have a hyperlink reference, which can be found this way
            CTNonVisualDrawingProps picNonVisual = graphicData.getPic().getNvPicPr().getCNvPr();
            if (picNonVisual != null) {
                handleCTNonVisualDrawingProps(picNonVisual, tmpArtificialList);
            }
        }
        // Its not graphicData.getAny() we're typically interested in
View Full Code Here


    } else if (o instanceof org.docx4j.wml.SdtElement) {
      return ((org.docx4j.wml.SdtElement) o).getSdtContent().getContent();
    } else if (o instanceof org.docx4j.dml.wordprocessingDrawing.Anchor) {
            org.docx4j.dml.wordprocessingDrawing.Anchor anchor = (org.docx4j.dml.wordprocessingDrawing.Anchor) o;
            List<Object> artificialList = new ArrayList<Object>();
            CTNonVisualDrawingProps drawingProps = anchor.getDocPr();
            if (drawingProps != null) {
                handleCTNonVisualDrawingProps(drawingProps, artificialList);
            }
            if (anchor.getGraphic() != null) {
                log.debug("found a:graphic");
                org.docx4j.dml.Graphic graphic = anchor.getGraphic();
                if (graphic.getGraphicData() != null) {
                    artificialList.addAll(handleGraphicData(graphic.getGraphicData()));
                }
            }
            if (!artificialList.isEmpty())
                return artificialList;
        } else if (o instanceof org.docx4j.dml.wordprocessingDrawing.Inline) {
            org.docx4j.dml.wordprocessingDrawing.Inline inline = (org.docx4j.dml.wordprocessingDrawing.Inline) o;
            List<Object> artificialList = new ArrayList<Object>();
            CTNonVisualDrawingProps drawingProps = inline.getDocPr();
            if (drawingProps != null) {
                handleCTNonVisualDrawingProps(drawingProps, artificialList);
            }
            if (inline.getGraphic() != null) {
                log.debug("found a:graphic");
View Full Code Here

                        presetgeometry2d.setPrst(org.docx4j.dml.STShapeType.RECT);
                // Create object for nvPicPr
                CTPictureNonVisual picturenonvisual = dmlspreadsheetdrawingObjectFactory.createCTPictureNonVisual();
                picture.setNvPicPr(picturenonvisual);
                    // Create object for cNvPr
                    CTNonVisualDrawingProps nonvisualdrawingprops = dmlObjectFactory.createCTNonVisualDrawingProps();
                    picturenonvisual.setCNvPr(nonvisualdrawingprops);
                        nonvisualdrawingprops.setDescr( "");
                        nonvisualdrawingprops.setName( "Picture 1");
                        nonvisualdrawingprops.setId( 2 );
                    // Create object for cNvPicPr
                    CTNonVisualPictureProperties nonvisualpictureproperties = dmlObjectFactory.createCTNonVisualPictureProperties();
                    picturenonvisual.setCNvPicPr(nonvisualpictureproperties);
                        // Create object for picLocks
                        CTPictureLocking picturelocking = dmlObjectFactory.createCTPictureLocking();
View Full Code Here

                        presetgeometry2d.setPrst(org.docx4j.dml.STShapeType.RECT);
                // Create object for nvPicPr
                CTPictureNonVisual picturenonvisual = dmlspreadsheetdrawingObjectFactory.createCTPictureNonVisual();
                picture.setNvPicPr(picturenonvisual);
                    // Create object for cNvPr
                    CTNonVisualDrawingProps nonvisualdrawingprops = dmlObjectFactory.createCTNonVisualDrawingProps();
                    picturenonvisual.setCNvPr(nonvisualdrawingprops);
                        nonvisualdrawingprops.setDescr( "");
                        nonvisualdrawingprops.setName( "Picture 1");
                        nonvisualdrawingprops.setId( 2 );
                    // Create object for cNvPicPr
                    CTNonVisualPictureProperties nonvisualpictureproperties = dmlObjectFactory.createCTNonVisualPictureProperties();
                    picturenonvisual.setCNvPicPr(nonvisualpictureproperties);
                        // Create object for picLocks
                        CTPictureLocking picturelocking = dmlObjectFactory.createCTPictureLocking();
View Full Code Here

TOP

Related Classes of org.docx4j.dml.CTNonVisualDrawingProps

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.