|
|
|
@ -4,27 +4,24 @@ import com.fr.base.BaseFormula;
|
|
|
|
|
import com.fr.base.Formula; |
|
|
|
|
import com.fr.base.Parameter; |
|
|
|
|
import com.fr.base.StoreProcedureParameter; |
|
|
|
|
import com.fr.base.core.KV; |
|
|
|
|
import com.fr.base.iofile.attr.WatermarkAttr; |
|
|
|
|
import com.fr.base.present.FormulaPresent; |
|
|
|
|
import com.fr.base.present.Present; |
|
|
|
|
import com.fr.data.condition.FormulaCondition; |
|
|
|
|
import com.fr.data.core.Compare; |
|
|
|
|
import com.fr.design.actions.replace.info.DealWithInfoValue; |
|
|
|
|
import com.fr.design.actions.replace.info.Info; |
|
|
|
|
import com.fr.design.actions.replace.utils.ShowValueUtils; |
|
|
|
|
import com.fr.design.file.HistoryTemplateListCache; |
|
|
|
|
import com.fr.form.main.Form; |
|
|
|
|
import com.fr.function.IF; |
|
|
|
|
import com.fr.general.GeneralUtils; |
|
|
|
|
import com.fr.js.NameJavaScript; |
|
|
|
|
import com.fr.js.SingleJavaScript; |
|
|
|
|
import com.fr.main.impl.WorkBook; |
|
|
|
|
import com.fr.report.cell.cellattr.CellInsertPolicyAttr; |
|
|
|
|
import com.fr.report.cell.cellattr.core.RichChar; |
|
|
|
|
import com.fr.report.cell.cellattr.core.group.DSColumn; |
|
|
|
|
import com.fr.report.core.sort.sortexpression.FormulaSortExpression; |
|
|
|
|
import com.fr.stable.FormulaProvider; |
|
|
|
|
import com.fr.stable.ParameterProvider; |
|
|
|
|
import com.fr.stable.StableUtils; |
|
|
|
|
import com.fr.stable.StringUtils; |
|
|
|
|
import com.fr.stable.collections.combination.Pair; |
|
|
|
|
import org.jetbrains.annotations.Nullable; |
|
|
|
@ -545,6 +542,40 @@ public enum FormulaReplaceObject implements DealWithInfoValue {
|
|
|
|
|
} |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 超链名字 |
|
|
|
|
*/ |
|
|
|
|
NAMEJAVASCRIPT("NameJavaScript") { |
|
|
|
|
@Override |
|
|
|
|
public Map<String, String> getValue(Object... o) { |
|
|
|
|
HashMap<String, String> map = new HashMap<>(); |
|
|
|
|
if (StringUtils.isNotEmpty(((NameJavaScript) o[0]).getName())) { |
|
|
|
|
map.put("content", ((NameJavaScript) o[0]).getName()); |
|
|
|
|
} |
|
|
|
|
return map; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public void setValue(Info info, String findStr, String replaceStr, List<Pair<Integer, Integer>> operatorArray) { |
|
|
|
|
Object replaceObject = info.getContent().getReplaceObject(); |
|
|
|
|
info.updateOldStr(((NameJavaScript)replaceObject).getName(), findStr); |
|
|
|
|
String str = ((NameJavaScript)replaceObject).getName(); |
|
|
|
|
ShowValueUtils.updateAfterReplaceStr(info, str, findStr, replaceStr); |
|
|
|
|
((NameJavaScript)replaceObject).setName(ShowValueUtils.replaceAll(str, findStr, replaceStr)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public boolean check(Info info) { |
|
|
|
|
if (info.getContent().getReplaceObject() instanceof NameJavaScript) { |
|
|
|
|
NameJavaScript nameJavaScript = (NameJavaScript) info.getContent().getReplaceObject(); |
|
|
|
|
if (StableUtils.canBeFormula(nameJavaScript.getName())) { |
|
|
|
|
return StringUtils.equals(nameJavaScript.getName(), info.getContent().getOldShowStr()); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|