Examples of CTTextParagraphProperties


Examples of org.openxmlformats.schemas.drawingml.x2006.main.CTTextParagraphProperties

     * attributes are additive with respect to the text position.
     *
     * @param value the left margin of the paragraph
     */
    public void setLeftMargin(double value){
        CTTextParagraphProperties pr = _p.isSetPPr() ? _p.getPPr() : _p.addNewPPr();
        pr.setMarL(Units.toEMU(value));
    }
View Full Code Here

Examples of org.openxmlformats.schemas.drawingml.x2006.main.CTTextParagraphProperties

     * </code></pre>
     *
     * @param linespacing the vertical line spacing
     */
    public void setLineSpacing(double linespacing){
        CTTextParagraphProperties pr = _p.isSetPPr() ? _p.getPPr() : _p.addNewPPr();
        CTTextSpacing spc = CTTextSpacing.Factory.newInstance();
        if(linespacing >= 0) spc.addNewSpcPct().setVal((int)(linespacing*1000));
        else spc.addNewSpcPts().setVal((int)(-linespacing*100));
        pr.setLnSpc(spc);
    }
View Full Code Here

Examples of org.openxmlformats.schemas.drawingml.x2006.main.CTTextParagraphProperties

     * </code></pre>
     *
     * @param spaceBefore the vertical white space before the paragraph.
     */
    public void setSpaceBefore(double spaceBefore){
        CTTextParagraphProperties pr = _p.isSetPPr() ? _p.getPPr() : _p.addNewPPr();
        CTTextSpacing spc = CTTextSpacing.Factory.newInstance();
        if(spaceBefore >= 0) spc.addNewSpcPct().setVal((int)(spaceBefore*1000));
        else spc.addNewSpcPts().setVal((int)(-spaceBefore*100));
        pr.setSpcBef(spc);
    }
View Full Code Here

Examples of org.openxmlformats.schemas.drawingml.x2006.main.CTTextParagraphProperties

     * </code></pre>
     *
     * @param spaceAfter the vertical white space after the paragraph.
     */
    public void setSpaceAfter(double spaceAfter){
        CTTextParagraphProperties pr = _p.isSetPPr() ? _p.getPPr() : _p.addNewPPr();
        CTTextSpacing spc = CTTextSpacing.Factory.newInstance();
        if(spaceAfter >= 0) spc.addNewSpcPct().setVal((int)(spaceAfter*1000));
        else spc.addNewSpcPts().setVal((int)(-spaceAfter*100));
        pr.setSpcAft(spc);
    }
View Full Code Here

Examples of org.openxmlformats.schemas.drawingml.x2006.main.CTTextParagraphProperties

     * paragraph properties defined in the SlideMaster.
     *
     * @param level the level (0 ... 4)
     */
    public void setLevel(int level){
        CTTextParagraphProperties pr = _p.isSetPPr() ? _p.getPPr() : _p.addNewPPr();

        pr.setLvl(level);
    }
View Full Code Here

Examples of org.openxmlformats.schemas.drawingml.x2006.main.CTTextParagraphProperties

    /**
     *
     * @return the text level of this paragraph (0-based). Default is 0.
     */
    public int getLevel(){
        CTTextParagraphProperties pr = _p.getPPr();
        if(pr == null) return 0;

        return pr.getLvl();

    }
View Full Code Here

Examples of org.openxmlformats.schemas.drawingml.x2006.main.CTTextParagraphProperties

     * @param flag whether text in this paragraph has bullets
     */
    public void setBullet(boolean flag) {
        if(isBullet() == flag) return;

        CTTextParagraphProperties pr = _p.isSetPPr() ? _p.getPPr() : _p.addNewPPr();
        if(!flag) {
            pr.addNewBuNone();
        } else {
            pr.addNewBuFont().setTypeface("Arial");
            pr.addNewBuChar().setChar("\u2022");
        }
    }
View Full Code Here

Examples of org.openxmlformats.schemas.drawingml.x2006.main.CTTextParagraphProperties

            if(!ok){
                CTPlaceholder ph = shape.getCTPlaceholder();
                if(ph == null){
                    // if it is a plain text box then take defaults from presentation.xml
                    XMLSlideShow ppt = getParentShape().getSheet().getSlideShow();
                    CTTextParagraphProperties themeProps = ppt.getDefaultParagraphStyle(getLevel());
                    if(themeProps != null) ok = visitor.fetch(themeProps);
                }

                if(!ok){
                    // defaults for placeholders are defined in the slide master
                    CTTextParagraphProperties defaultProps = getDefaultMasterStyle();
                    if(defaultProps != null) ok = visitor.fetch(defaultProps);
                }
            }
        }
View Full Code Here

Examples of org.openxmlformats.schemas.drawingml.x2006.main.CTTextParagraphProperties

                "declare namespace xdr='http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing' " +
                "declare namespace a='http://schemas.openxmlformats.org/drawingml/2006/main' " +
                ".//xdr:txBody/a:lstStyle/a:lvl" + (_level + 1) + "pPr"
        );
        if (o.length == 1) {
            CTTextParagraphProperties props = (CTTextParagraphProperties) o[0];
            return fetch(props);
        }
        return false;
    }
View Full Code Here

Examples of org.openxmlformats.schemas.drawingml.x2006.main.CTTextParagraphProperties

            if(!ok){
                CTPlaceholder ph = shape.getCTPlaceholder();
                if(ph == null){
                    // if it is a plain text box then take defaults from presentation.xml
                    XMLSlideShow ppt = shape.getSheet().getSlideShow();
                    CTTextParagraphProperties themeProps = ppt.getDefaultParagraphStyle(_p.getLevel());
                    if(themeProps != null) {
                        fetcher.isFetchingFromMaster = true;
                        ok = fetcher.fetch(themeProps);
                    }
                }
                if (!ok) {
                    CTTextParagraphProperties defaultProps =  _p.getDefaultMasterStyle();
                    if(defaultProps != null) {
                        fetcher.isFetchingFromMaster = true;
                        ok = fetcher.fetch(defaultProps);
                    }
                }
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.