|
|
|
@ -58,12 +58,14 @@ public enum FormulaReplaceObject implements DealWithInfoValue {
|
|
|
|
|
public void setValue(Info info, String findStr, String replaceStr, List<Pair<Integer, Integer>> operatorArray) { |
|
|
|
|
Object replaceObject = info.getContent().getReplaceObject(); |
|
|
|
|
info.updateOldStr(((Formula) replaceObject).getContent(), findStr); |
|
|
|
|
((Formula) replaceObject).setContent(ShowValueUtils.replaceAll(((Formula) replaceObject).getContent(), findStr, replaceStr)); |
|
|
|
|
String str = ((Formula) replaceObject).getContent(); |
|
|
|
|
ShowValueUtils.updateAfterReplaceStr(info, str, findStr, replaceStr); |
|
|
|
|
((Formula) replaceObject).setContent(ShowValueUtils.replaceAll(str, findStr, replaceStr)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public boolean check(Info info) { |
|
|
|
|
if (info.getContent().getReplaceObject() instanceof Formula){ |
|
|
|
|
if (info.getContent().getReplaceObject() instanceof Formula) { |
|
|
|
|
Formula formula = (Formula) info.getContent().getReplaceObject(); |
|
|
|
|
return StringUtils.equals(formula.getContent(), info.getContent().getOldShowStr()); |
|
|
|
|
} |
|
|
|
@ -88,13 +90,14 @@ public enum FormulaReplaceObject implements DealWithInfoValue {
|
|
|
|
|
Object replaceObject = info.getContent().getReplaceObject(); |
|
|
|
|
//更新上一次操作的信息
|
|
|
|
|
info.updateOldStr(((FormulaCondition) replaceObject).getFormula(), findStr); |
|
|
|
|
|
|
|
|
|
((FormulaCondition) replaceObject).setFormula(ShowValueUtils.replaceAll(((FormulaCondition) replaceObject).getFormula(), findStr, replaceStr)); |
|
|
|
|
String str = ((FormulaCondition) replaceObject).getFormula(); |
|
|
|
|
ShowValueUtils.updateAfterReplaceStr(info, str, findStr, replaceStr); |
|
|
|
|
((FormulaCondition) replaceObject).setFormula(ShowValueUtils.replaceAll(str, findStr, replaceStr)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public boolean check(Info info) { |
|
|
|
|
if (info.getContent().getReplaceObject() instanceof FormulaCondition){ |
|
|
|
|
if (info.getContent().getReplaceObject() instanceof FormulaCondition) { |
|
|
|
|
FormulaCondition condition = (FormulaCondition) info.getContent().getReplaceObject(); |
|
|
|
|
return StringUtils.equals(condition.getFormula(), info.getContent().getOldShowStr()); |
|
|
|
|
} |
|
|
|
@ -120,14 +123,15 @@ public enum FormulaReplaceObject implements DealWithInfoValue {
|
|
|
|
|
if (((Compare) replaceObject).getValue() instanceof Formula) { |
|
|
|
|
Formula formula = (Formula) ((Compare) replaceObject).getValue(); |
|
|
|
|
info.updateOldStr(formula.getContent(), findStr); |
|
|
|
|
|
|
|
|
|
formula.setContent(ShowValueUtils.replaceAll(formula.getContent(), findStr, replaceStr)); |
|
|
|
|
String str = formula.getContent(); |
|
|
|
|
ShowValueUtils.updateAfterReplaceStr(info, str, findStr, replaceStr); |
|
|
|
|
formula.setContent(ShowValueUtils.replaceAll(str, findStr, replaceStr)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public boolean check(Info info) { |
|
|
|
|
if (info.getContent().getReplaceObject() instanceof Compare){ |
|
|
|
|
if (info.getContent().getReplaceObject() instanceof Compare) { |
|
|
|
|
Compare compare = (Compare) info.getContent().getReplaceObject(); |
|
|
|
|
return StringUtils.equals(GeneralUtils.objectToString(compare.getValue()), info.getContent().getOldShowStr()); |
|
|
|
|
} |
|
|
|
@ -151,13 +155,14 @@ public enum FormulaReplaceObject implements DealWithInfoValue {
|
|
|
|
|
public void setValue(Info info, String findStr, String replaceStr, List<Pair<Integer, Integer>> operatorArray) { |
|
|
|
|
Object replaceObject = info.getContent().getReplaceObject(); |
|
|
|
|
info.updateOldStr(((Formula) ((com.fr.base.core.KV) replaceObject).getValue()).getContent(), findStr); |
|
|
|
|
|
|
|
|
|
((Formula) ((com.fr.base.core.KV) replaceObject).getValue()).setContent(ShowValueUtils.replaceAll(((Formula) ((com.fr.base.core.KV) replaceObject).getValue()).getContent(), findStr, replaceStr)); |
|
|
|
|
String str = ((Formula) ((com.fr.base.core.KV) replaceObject).getValue()).getContent(); |
|
|
|
|
ShowValueUtils.updateAfterReplaceStr(info, str, findStr, replaceStr); |
|
|
|
|
((Formula) ((com.fr.base.core.KV) replaceObject).getValue()).setContent(ShowValueUtils.replaceAll(str, findStr, replaceStr)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public boolean check(Info info) { |
|
|
|
|
if (info.getContent().getReplaceObject() instanceof com.fr.base.core.KV){ |
|
|
|
|
if (info.getContent().getReplaceObject() instanceof com.fr.base.core.KV) { |
|
|
|
|
com.fr.base.core.KV kv = (com.fr.base.core.KV) info.getContent().getReplaceObject(); |
|
|
|
|
return StringUtils.equals(GeneralUtils.objectToString(kv.getValue()), info.getContent().getOldShowStr()); |
|
|
|
|
} |
|
|
|
@ -181,12 +186,14 @@ public enum FormulaReplaceObject implements DealWithInfoValue {
|
|
|
|
|
public void setValue(Info info, String findStr, String replaceStr, List<Pair<Integer, Integer>> operatorArray) { |
|
|
|
|
Object replaceObject = info.getContent().getReplaceObject(); |
|
|
|
|
info.updateOldStr(((Formula) (((CellInsertPolicyAttr) replaceObject).getDefaultInsertValue())).getContent(), findStr); |
|
|
|
|
((Formula) (((CellInsertPolicyAttr) replaceObject).getDefaultInsertValue())).setContent(ShowValueUtils.replaceAll(((Formula) (((CellInsertPolicyAttr) replaceObject).getDefaultInsertValue())).getContent(), findStr, replaceStr)); |
|
|
|
|
String str = ((Formula) (((CellInsertPolicyAttr) replaceObject).getDefaultInsertValue())).getContent(); |
|
|
|
|
ShowValueUtils.updateAfterReplaceStr(info, str, findStr, replaceStr); |
|
|
|
|
((Formula) (((CellInsertPolicyAttr) replaceObject).getDefaultInsertValue())).setContent(ShowValueUtils.replaceAll(str, findStr, replaceStr)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public boolean check(Info info) { |
|
|
|
|
if (info.getContent().getReplaceObject() instanceof CellInsertPolicyAttr){ |
|
|
|
|
if (info.getContent().getReplaceObject() instanceof CellInsertPolicyAttr) { |
|
|
|
|
CellInsertPolicyAttr policyAttr = (CellInsertPolicyAttr) info.getContent().getReplaceObject(); |
|
|
|
|
return StringUtils.equals(GeneralUtils.objectToString(policyAttr.getDefaultInsertValue()), info.getContent().getOldShowStr()); |
|
|
|
|
} |
|
|
|
@ -210,13 +217,14 @@ public enum FormulaReplaceObject implements DealWithInfoValue {
|
|
|
|
|
public void setValue(Info info, String findStr, String replaceStr, List<Pair<Integer, Integer>> operatorArray) { |
|
|
|
|
Object replaceObject = info.getContent().getReplaceObject(); |
|
|
|
|
info.updateOldStr(((FormulaPresent) replaceObject).getFormulaContent(), findStr); |
|
|
|
|
|
|
|
|
|
((FormulaPresent) replaceObject).setFormulaContent(ShowValueUtils.replaceAll(((FormulaPresent) replaceObject).getFormulaContent(), findStr, replaceStr)); |
|
|
|
|
String str = ((FormulaPresent) replaceObject).getFormulaContent(); |
|
|
|
|
ShowValueUtils.updateAfterReplaceStr(info, str, findStr, replaceStr); |
|
|
|
|
((FormulaPresent) replaceObject).setFormulaContent(ShowValueUtils.replaceAll(str, findStr, replaceStr)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public boolean check(Info info) { |
|
|
|
|
if (info.getContent().getReplaceObject() instanceof FormulaPresent){ |
|
|
|
|
if (info.getContent().getReplaceObject() instanceof FormulaPresent) { |
|
|
|
|
FormulaPresent present = (FormulaPresent) info.getContent().getReplaceObject(); |
|
|
|
|
return StringUtils.equals(present.getFormulaContent(), info.getContent().getOldShowStr()); |
|
|
|
|
} |
|
|
|
@ -240,12 +248,14 @@ public enum FormulaReplaceObject implements DealWithInfoValue {
|
|
|
|
|
public void setValue(Info info, String findStr, String replaceStr, List<Pair<Integer, Integer>> operatorArray) { |
|
|
|
|
Object replaceObject = info.getContent().getReplaceObject(); |
|
|
|
|
info.updateOldStr(((SingleJavaScript) replaceObject).getFileName(), findStr); |
|
|
|
|
((SingleJavaScript) replaceObject).setFileName(ShowValueUtils.replaceAll(((SingleJavaScript) replaceObject).getFileName(), findStr, replaceStr)); |
|
|
|
|
String str = ((SingleJavaScript) replaceObject).getFileName(); |
|
|
|
|
ShowValueUtils.updateAfterReplaceStr(info, str, findStr, replaceStr); |
|
|
|
|
((SingleJavaScript) replaceObject).setFileName(ShowValueUtils.replaceAll(str, findStr, replaceStr)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public boolean check(Info info) { |
|
|
|
|
if (info.getContent().getReplaceObject() instanceof SingleJavaScript){ |
|
|
|
|
if (info.getContent().getReplaceObject() instanceof SingleJavaScript) { |
|
|
|
|
SingleJavaScript javaScript = (SingleJavaScript) info.getContent().getReplaceObject(); |
|
|
|
|
return StringUtils.equals(javaScript.getFileName(), info.getContent().getOldShowStr()); |
|
|
|
|
} |
|
|
|
@ -269,15 +279,16 @@ public enum FormulaReplaceObject implements DealWithInfoValue {
|
|
|
|
|
public void setValue(Info info, String findStr, String replaceStr, List<Pair<Integer, Integer>> operatorArray) { |
|
|
|
|
Object replaceObject = info.getContent().getReplaceObject(); |
|
|
|
|
info.updateOldStr(((Formula) (((ParameterProvider) replaceObject).getValue())).getContent(), findStr); |
|
|
|
|
|
|
|
|
|
((Formula) (((ParameterProvider) replaceObject).getValue())).setContent(ShowValueUtils.replaceAll(((Formula) (((ParameterProvider) replaceObject).getValue())).getContent(), findStr, replaceStr)); |
|
|
|
|
String str = ((Formula) (((ParameterProvider) replaceObject).getValue())).getContent(); |
|
|
|
|
ShowValueUtils.updateAfterReplaceStr(info, str, findStr, replaceStr); |
|
|
|
|
((Formula) (((ParameterProvider) replaceObject).getValue())).setContent(ShowValueUtils.replaceAll(str, findStr, replaceStr)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public boolean check(Info info) { |
|
|
|
|
if (info.getContent().getReplaceObject() instanceof ParameterProvider){ |
|
|
|
|
if (info.getContent().getReplaceObject() instanceof ParameterProvider) { |
|
|
|
|
ParameterProvider provider = (ParameterProvider) info.getContent().getReplaceObject(); |
|
|
|
|
if (provider.getValue() instanceof Formula){ |
|
|
|
|
if (provider.getValue() instanceof Formula) { |
|
|
|
|
return StringUtils.equals(GeneralUtils.objectToString(provider.getValue()), info.getContent().getOldShowStr()); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -301,13 +312,14 @@ public enum FormulaReplaceObject implements DealWithInfoValue {
|
|
|
|
|
public void setValue(Info info, String findStr, String replaceStr, List<Pair<Integer, Integer>> operatorArray) { |
|
|
|
|
Object replaceObject = info.getContent().getReplaceObject(); |
|
|
|
|
info.updateOldStr(((FormulaProvider) replaceObject).getContent(), findStr); |
|
|
|
|
|
|
|
|
|
((FormulaProvider) replaceObject).setContent(ShowValueUtils.replaceAll(((FormulaProvider) replaceObject).getContent(), findStr, replaceStr)); |
|
|
|
|
String str = ((FormulaProvider) replaceObject).getContent(); |
|
|
|
|
ShowValueUtils.updateAfterReplaceStr(info, str, findStr, replaceStr); |
|
|
|
|
((FormulaProvider) replaceObject).setContent(ShowValueUtils.replaceAll(str, findStr, replaceStr)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public boolean check(Info info) { |
|
|
|
|
if (info.getContent().getReplaceObject() instanceof FormulaProvider){ |
|
|
|
|
if (info.getContent().getReplaceObject() instanceof FormulaProvider) { |
|
|
|
|
FormulaProvider provider = (FormulaProvider) info.getContent().getReplaceObject(); |
|
|
|
|
return StringUtils.equals(provider.getContent(), info.getContent().getOldShowStr()); |
|
|
|
|
} |
|
|
|
@ -331,15 +343,16 @@ public enum FormulaReplaceObject implements DealWithInfoValue {
|
|
|
|
|
public void setValue(Info info, String findStr, String replaceStr, List<Pair<Integer, Integer>> operatorArray) { |
|
|
|
|
Object replaceObject = info.getContent().getReplaceObject(); |
|
|
|
|
info.updateOldStr(((Formula) (((Parameter) replaceObject).getValue())).getContent(), findStr); |
|
|
|
|
|
|
|
|
|
((Formula) (((Parameter) replaceObject).getValue())).setContent(ShowValueUtils.replaceAll(((Formula) (((Parameter) replaceObject).getValue())).getContent(), findStr, replaceStr)); |
|
|
|
|
String str = ((Formula) (((Parameter) replaceObject).getValue())).getContent(); |
|
|
|
|
ShowValueUtils.updateAfterReplaceStr(info, str, findStr, replaceStr); |
|
|
|
|
((Formula) (((Parameter) replaceObject).getValue())).setContent(ShowValueUtils.replaceAll(str, findStr, replaceStr)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public boolean check(Info info) { |
|
|
|
|
if (info.getContent().getReplaceObject() instanceof Parameter){ |
|
|
|
|
if (info.getContent().getReplaceObject() instanceof Parameter) { |
|
|
|
|
Parameter parameter = (Parameter) info.getContent().getReplaceObject(); |
|
|
|
|
if (parameter.getValue() instanceof Formula){ |
|
|
|
|
if (parameter.getValue() instanceof Formula) { |
|
|
|
|
return StringUtils.equals(((Formula) parameter.getValue()).getContent(), info.getContent().getOldShowStr()); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -363,13 +376,14 @@ public enum FormulaReplaceObject implements DealWithInfoValue {
|
|
|
|
|
public void setValue(Info info, String findStr, String replaceStr, List<Pair<Integer, Integer>> operatorArray) { |
|
|
|
|
Object replaceObject = info.getContent().getReplaceObject(); |
|
|
|
|
info.updateOldStr(((DSColumn) replaceObject).getResult(), findStr); |
|
|
|
|
|
|
|
|
|
((DSColumn) replaceObject).setResult(ShowValueUtils.replaceAll(((DSColumn) replaceObject).getResult(), findStr, replaceStr)); |
|
|
|
|
String str = ((DSColumn) replaceObject).getResult(); |
|
|
|
|
ShowValueUtils.updateAfterReplaceStr(info, str, findStr, replaceStr); |
|
|
|
|
((DSColumn) replaceObject).setResult(ShowValueUtils.replaceAll(str, findStr, replaceStr)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public boolean check(Info info) { |
|
|
|
|
if (info.getContent().getReplaceObject() instanceof DSColumn){ |
|
|
|
|
if (info.getContent().getReplaceObject() instanceof DSColumn) { |
|
|
|
|
DSColumn column = (DSColumn) info.getContent().getReplaceObject(); |
|
|
|
|
return StringUtils.equals(column.getResult(), info.getContent().getOldShowStr()); |
|
|
|
|
} |
|
|
|
@ -393,13 +407,14 @@ public enum FormulaReplaceObject implements DealWithInfoValue {
|
|
|
|
|
public void setValue(Info info, String findStr, String replaceStr, List<Pair<Integer, Integer>> operatorArray) { |
|
|
|
|
Object replaceObject = info.getContent().getReplaceObject(); |
|
|
|
|
info.updateOldStr(((BaseFormula) replaceObject).getContent(), findStr); |
|
|
|
|
|
|
|
|
|
((BaseFormula) replaceObject).setContent(ShowValueUtils.replaceAll(((BaseFormula) replaceObject).getContent(), findStr, replaceStr)); |
|
|
|
|
String str = ((BaseFormula) replaceObject).getContent(); |
|
|
|
|
ShowValueUtils.updateAfterReplaceStr(info, str, findStr, replaceStr); |
|
|
|
|
((BaseFormula) replaceObject).setContent(ShowValueUtils.replaceAll(str, findStr, replaceStr)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public boolean check(Info info) { |
|
|
|
|
if (info.getContent().getReplaceObject() instanceof BaseFormula){ |
|
|
|
|
if (info.getContent().getReplaceObject() instanceof BaseFormula) { |
|
|
|
|
BaseFormula formula = (BaseFormula) info.getContent().getReplaceObject(); |
|
|
|
|
return StringUtils.equals(formula.getContent(), info.getContent().getOldShowStr()); |
|
|
|
|
} |
|
|
|
@ -423,16 +438,17 @@ public enum FormulaReplaceObject implements DealWithInfoValue {
|
|
|
|
|
public void setValue(Info info, String findStr, String replaceStr, List<Pair<Integer, Integer>> operatorArray) { |
|
|
|
|
Object replaceObject = info.getContent().getReplaceObject(); |
|
|
|
|
info.updateOldStr(((Formula) ((StoreProcedureParameter) replaceObject).getValue()).getContent(), findStr); |
|
|
|
|
|
|
|
|
|
((Formula) ((StoreProcedureParameter) replaceObject).getValue()).setContent(ShowValueUtils.replaceAll(((Formula) ((StoreProcedureParameter) replaceObject).getValue()).getContent(), findStr, replaceStr)); |
|
|
|
|
String str = ((Formula) ((StoreProcedureParameter) replaceObject).getValue()).getContent(); |
|
|
|
|
ShowValueUtils.updateAfterReplaceStr(info, str, findStr, replaceStr); |
|
|
|
|
((Formula) ((StoreProcedureParameter) replaceObject).getValue()).setContent(ShowValueUtils.replaceAll(str, findStr, replaceStr)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public boolean check(Info info) { |
|
|
|
|
if (info.getContent().getReplaceObject() instanceof StoreProcedureParameter){ |
|
|
|
|
if (info.getContent().getReplaceObject() instanceof StoreProcedureParameter) { |
|
|
|
|
StoreProcedureParameter procedureParameter = (StoreProcedureParameter) info.getContent().getReplaceObject(); |
|
|
|
|
if (procedureParameter.getValue() instanceof Formula){ |
|
|
|
|
if (procedureParameter.getValue() instanceof Formula) { |
|
|
|
|
return StringUtils.equals(GeneralUtils.objectToString(procedureParameter.getValue()), info.getContent().getOldShowStr()); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -457,13 +473,15 @@ public enum FormulaReplaceObject implements DealWithInfoValue {
|
|
|
|
|
WorkBook workBook = (WorkBook) HistoryTemplateListCache.getInstance().getCurrentEditingTemplate().getTarget(); |
|
|
|
|
WatermarkAttr watermarkAttr = (WatermarkAttr) info.getContent().getReplaceObject(); |
|
|
|
|
info.updateOldStr(watermarkAttr.getText(), findStr); |
|
|
|
|
watermarkAttr.setText(ShowValueUtils.replaceAll(watermarkAttr.getText(), findStr, replaceStr)); |
|
|
|
|
String str = watermarkAttr.getText(); |
|
|
|
|
ShowValueUtils.updateAfterReplaceStr(info, str, findStr, replaceStr); |
|
|
|
|
watermarkAttr.setText(ShowValueUtils.replaceAll(str, findStr, replaceStr)); |
|
|
|
|
workBook.addAttrMark(watermarkAttr); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public boolean check(Info info) { |
|
|
|
|
if (info.getContent().getReplaceObject() instanceof WatermarkAttr){ |
|
|
|
|
if (info.getContent().getReplaceObject() instanceof WatermarkAttr) { |
|
|
|
|
WatermarkAttr watermarkAttr = ((WatermarkAttr) info.getContent().getReplaceObject()); |
|
|
|
|
return StringUtils.equals(watermarkAttr.getText(), info.getContent().getOldShowStr()); |
|
|
|
|
} |
|
|
|
@ -473,11 +491,11 @@ public enum FormulaReplaceObject implements DealWithInfoValue {
|
|
|
|
|
/** |
|
|
|
|
* 存储字符串类型需要特殊处理 |
|
|
|
|
*/ |
|
|
|
|
STRING("String"){ |
|
|
|
|
STRING("String") { |
|
|
|
|
@Override |
|
|
|
|
public Map<String, String> getValue(Object... o) { |
|
|
|
|
HashMap<String, String> map = new HashMap<>(); |
|
|
|
|
if (StringUtils.isNotEmpty(GeneralUtils.objectToString(o[0]))){ |
|
|
|
|
if (StringUtils.isNotEmpty(GeneralUtils.objectToString(o[0]))) { |
|
|
|
|
map.put("content", GeneralUtils.objectToString(o[0])); |
|
|
|
|
} |
|
|
|
|
return map; |
|
|
|
@ -486,7 +504,7 @@ public enum FormulaReplaceObject implements DealWithInfoValue {
|
|
|
|
|
@Override |
|
|
|
|
public void setValue(Info info, String findStr, String replaceStr, List<Pair<Integer, Integer>> operatorArray) { |
|
|
|
|
FormulaTag formulaTag = FormulaTag.match(info.getContent().getTag()); |
|
|
|
|
if (formulaTag != null){ |
|
|
|
|
if (formulaTag != null) { |
|
|
|
|
info.updateOldStr(GeneralUtils.objectToString(info.getContent().getReplaceObject()), findStr); |
|
|
|
|
formulaTag.setValue(info, findStr, replaceStr, operatorArray); |
|
|
|
|
} |
|
|
|
@ -500,7 +518,7 @@ public enum FormulaReplaceObject implements DealWithInfoValue {
|
|
|
|
|
/** |
|
|
|
|
* 排序 |
|
|
|
|
*/ |
|
|
|
|
FORMULA_SORT_EXPRESSION("FormulaSortExpression"){ |
|
|
|
|
FORMULA_SORT_EXPRESSION("FormulaSortExpression") { |
|
|
|
|
@Override |
|
|
|
|
public Map<String, String> getValue(Object... o) { |
|
|
|
|
HashMap<String, String> map = new HashMap<>(); |
|
|
|
@ -514,19 +532,20 @@ public enum FormulaReplaceObject implements DealWithInfoValue {
|
|
|
|
|
public void setValue(Info info, String findStr, String replaceStr, List<Pair<Integer, Integer>> operatorArray) { |
|
|
|
|
Object replaceObject = info.getContent().getReplaceObject(); |
|
|
|
|
info.updateOldStr((((FormulaSortExpression) replaceObject).getFormula()), findStr); |
|
|
|
|
((FormulaSortExpression) replaceObject).setFormula(ShowValueUtils.replaceAll((((FormulaSortExpression) replaceObject).getFormula()), findStr, replaceStr)); |
|
|
|
|
String str = (((FormulaSortExpression) replaceObject).getFormula()); |
|
|
|
|
ShowValueUtils.updateAfterReplaceStr(info, str, findStr, replaceStr); |
|
|
|
|
((FormulaSortExpression) replaceObject).setFormula(ShowValueUtils.replaceAll(str, findStr, replaceStr)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public boolean check(Info info) { |
|
|
|
|
if (info.getContent().getReplaceObject() instanceof FormulaSortExpression){ |
|
|
|
|
if (info.getContent().getReplaceObject() instanceof FormulaSortExpression) { |
|
|
|
|
FormulaSortExpression sortExpression = (FormulaSortExpression) info.getContent().getReplaceObject(); |
|
|
|
|
return StringUtils.equals(sortExpression.getFormula(), info.getContent().getOldShowStr()); |
|
|
|
|
} |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String name; |
|
|
|
@ -554,6 +573,7 @@ public enum FormulaReplaceObject implements DealWithInfoValue {
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 校验内容 |
|
|
|
|
* |
|
|
|
|
* @param info |
|
|
|
|
* @return |
|
|
|
|
*/ |
|
|
|
|