All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.microwww.ttp.replace.ReplaceExpress Maven / Gradle / Ivy

There is a newer version: 0.0.6-release
Show newest version
package com.github.microwww.ttp.replace;

import com.github.microwww.ttp.Tools;
import org.apache.poi.xslf.usermodel.XSLFTextParagraph;

public class ReplaceExpress {
    private XSLFTextParagraph paragraph;
    private String text;

    public ReplaceExpress(XSLFTextParagraph paragraph, String text) {
        this.paragraph = paragraph;
        this.text = text;
    }

    public String getPattern() {
        return text.substring(1);
    }

    public void replace(String text) {
        Tools.replace(paragraph, this.text, text);
        //run.setText(StringUtils.replace(run.getRawText(), this.text, text));
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy