Examples of CTTextSpacing


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

     *
     * @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.CTTextSpacing

     */
    public double getSpaceAfter(){
        CTTextParagraphProperties pr = _p.getPPr();
        if(pr == null || !pr.isSetSpcAft()) return 0; // TODO fetch from master

        CTTextSpacing spc = pr.getSpcAft();
        if(spc.isSetSpcPct()) return spc.getSpcPct().getVal()*0.001;
        else if (spc.isSetSpcPts()) return -spc.getSpcPts().getVal()*0.01;
        else return 0;
    }
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.