|
|
|
@ -58,7 +58,9 @@ 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 |
|
|
|
@ -88,8 +90,9 @@ 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 |
|
|
|
@ -120,8 +123,9 @@ 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)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -151,8 +155,9 @@ 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 |
|
|
|
@ -181,7 +186,9 @@ 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 |
|
|
|
@ -210,8 +217,9 @@ 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 |
|
|
|
@ -240,7 +248,9 @@ 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 |
|
|
|
@ -269,8 +279,9 @@ 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 |
|
|
|
@ -301,8 +312,9 @@ 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 |
|
|
|
@ -331,8 +343,9 @@ 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 |
|
|
|
@ -363,8 +376,9 @@ 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 |
|
|
|
@ -393,8 +407,9 @@ 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 |
|
|
|
@ -423,8 +438,9 @@ 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)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -457,7 +473,9 @@ 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); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -514,7 +532,9 @@ 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 |
|
|
|
@ -525,8 +545,7 @@ public enum FormulaReplaceObject implements DealWithInfoValue {
|
|
|
|
|
} |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String name; |
|
|
|
@ -554,6 +573,7 @@ public enum FormulaReplaceObject implements DealWithInfoValue {
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 校验内容 |
|
|
|
|
* |
|
|
|
|
* @param info |
|
|
|
|
* @return |
|
|
|
|
*/ |
|
|
|
|