Examples of CTText


Examples of org.openxmlformats.schemas.wordprocessingml.x2006.main.CTText

     * @param value the literal text which shall be displayed in the document
     * @param pos - position in the text array (NB: 0 based)
     */
    public void setText(String value, int pos) {
        if(pos > run.sizeOfTArray()) throw new ArrayIndexOutOfBoundsException("Value too large for the parameter position in XWPFRun.setText(String value,int pos)");
        CTText t = (pos < run.sizeOfTArray() && pos >= 0) ? run.getTArray(pos) : run.addNewT();
        t.setStringValue(value);
        preserveSpaces(t);
    }
View Full Code Here

Examples of org.openxmlformats.schemas.wordprocessingml.x2006.main.CTText

    }

    private static Integer getCTTextIndexFromRun(XWPFRun run, String findText) {
        Integer index = null;
        for (int i = 0; i < run.getCTR().getTList().size(); i++) {
            CTText text = run.getCTR().getTList().get(i);
            if (StringUtils.containsIgnoreCase(text.getStringValue(), findText)) {
                index = i;
                break;
            }
        }
        return index;
View Full Code Here

Examples of org.openxmlformats.schemas.wordprocessingml.x2006.main.CTText

     * Sets the text of this text run
     *
     * @param value the literal text which shall be displayed in the document
     */
    public void setText(String value) {
        CTText t = run.sizeOfTArray() == 0 ? run.addNewT() : run.getTArray(0);
        t.setStringValue(value);
    }
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.