|
|
@ -22,6 +22,7 @@ import com.fr.main.impl.WorkBook; |
|
|
|
import com.fr.report.cell.cellattr.CellInsertPolicyAttr; |
|
|
|
import com.fr.report.cell.cellattr.CellInsertPolicyAttr; |
|
|
|
import com.fr.report.cell.cellattr.core.RichChar; |
|
|
|
import com.fr.report.cell.cellattr.core.RichChar; |
|
|
|
import com.fr.report.cell.cellattr.core.group.DSColumn; |
|
|
|
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.FormulaProvider; |
|
|
|
import com.fr.stable.ParameterProvider; |
|
|
|
import com.fr.stable.ParameterProvider; |
|
|
|
import com.fr.stable.StringUtils; |
|
|
|
import com.fr.stable.StringUtils; |
|
|
@ -495,6 +496,35 @@ public enum FormulaReplaceObject implements DealWithInfoValue { |
|
|
|
public boolean check(Info info) { |
|
|
|
public boolean check(Info info) { |
|
|
|
return true; |
|
|
|
return true; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* 排序 |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
FORMULA_SORT_EXPRESSION("FormulaSortExpression"){ |
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public Map<String, String> getValue(Object... o) { |
|
|
|
|
|
|
|
HashMap<String, String> map = new HashMap<>(); |
|
|
|
|
|
|
|
if (StringUtils.isNotEmpty(((FormulaSortExpression) o[0]).getFormula())) { |
|
|
|
|
|
|
|
map.put("content", ((FormulaSortExpression) o[0]).getFormula()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return map; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
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)); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public boolean check(Info info) { |
|
|
|
|
|
|
|
if (info.getContent().getReplaceObject() instanceof FormulaSortExpression){ |
|
|
|
|
|
|
|
FormulaSortExpression sortExpression = (FormulaSortExpression) info.getContent().getReplaceObject(); |
|
|
|
|
|
|
|
return StringUtils.equals(sortExpression.getFormula(), info.getContent().getOldShowStr()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
; |
|
|
|
; |
|
|
|
|
|
|
|
|
|
|
|