Browse Source

REPORT-75998 增加注释、调整格式

feature/x
Destiny.Lin 2 years ago
parent
commit
eca25b845d
  1. 1
      designer-realize/src/main/java/com/fr/design/actions/replace/action/content/cell/SearchCellAction.java
  2. 2
      designer-realize/src/main/java/com/fr/design/actions/replace/action/content/floatelement/SearchFloatAction.java
  3. 10
      designer-realize/src/main/java/com/fr/design/actions/replace/action/content/formula/chart/SearchChartCollectionFormulaAction.java
  4. 1
      designer-realize/src/main/java/com/fr/design/actions/replace/action/content/formula/highlight/condition/SearchFormulaConditionAction.java
  5. 12
      designer-realize/src/main/java/com/fr/design/actions/replace/action/content/js/SearchChartJSAction.java
  6. 12
      designer-realize/src/main/java/com/fr/design/actions/replace/utils/ShowValueUtils.java

1
designer-realize/src/main/java/com/fr/design/actions/replace/action/content/cell/SearchCellAction.java

@ -17,7 +17,6 @@ import com.fr.form.ui.widget.CRBoundsWidget;
import com.fr.general.GeneralUtils;
import com.fr.main.impl.WorkBook;
import com.fr.report.cell.CellElement;
import com.fr.report.cell.cellattr.core.RichText;
import com.fr.report.elementcase.ElementCase;
import com.fr.report.poly.PolyECBlock;
import com.fr.report.report.Report;

2
designer-realize/src/main/java/com/fr/design/actions/replace/action/content/floatelement/SearchFloatAction.java

@ -85,7 +85,7 @@ public class SearchFloatAction implements SearchAction {
if (floatElement.getValue() instanceof ChartCollection) {
floatInfo.setChartExist(true);
}
if (!(floatElement.getValue() instanceof ImageWithSuffix)){
if (!(floatElement.getValue() instanceof ImageWithSuffix)) {
result.add(floatInfo);
}
}

10
designer-realize/src/main/java/com/fr/design/actions/replace/action/content/formula/chart/SearchChartCollectionFormulaAction.java

@ -97,20 +97,20 @@ public class SearchChartCollectionFormulaAction {
Toolkit.i18nText("Fine-Design_Chart_Interactive")
);
if (chart.getPlot() instanceof VanChartCustomPlot){
if (chart.getPlot() instanceof VanChartCustomPlot) {
VanChartCustomPlot plot = chart.getPlot();
for (int i = 0 ; i < plot.getCustomPlotList().size() ; i++){
for (int i = 0; i < plot.getCustomPlotList().size(); i++) {
ITContent customContent = ITContent.copy(conditionContent);
customContent.addOtherPos(CustomPlotFactory.getTitle(CustomPlotFactory.getCustomType(plot.getCustomPlotList().get(i))));
dealPlot(formulaInfos,customContent,plot.getCustomPlotList().get(i));
dealPlot(formulaInfos, customContent, plot.getCustomPlotList().get(i));
}
} else if (chart.getPlot() != null) {
dealPlot(formulaInfos,conditionContent,chart.getPlot());
dealPlot(formulaInfos, conditionContent, chart.getPlot());
}
}
private void dealPlot(List<FormulaInfo> formulaInfos, ITContent content, Plot plot){
private void dealPlot(List<FormulaInfo> formulaInfos, ITContent content, Plot plot) {
NameJavaScriptGroup javaScriptGroup = plot.getHotHyperLink();
if (javaScriptGroup != null) {
for (int i = 0; i < javaScriptGroup.size(); i++) {

1
designer-realize/src/main/java/com/fr/design/actions/replace/action/content/formula/highlight/condition/SearchFormulaConditionAction.java

@ -21,7 +21,6 @@ public class SearchFormulaConditionAction implements SearchConditionFormula {
}
@Override
public void searchFormulaFromCondition(List<FormulaInfo> formulaInfos, ITContent content, Condition condition) {
if (((FormulaCondition) (condition)).getFormula() != null) {

12
designer-realize/src/main/java/com/fr/design/actions/replace/action/content/js/SearchChartJSAction.java

@ -67,18 +67,18 @@ public class SearchChartJSAction {
//坐标轴
searchAxisJS(jsInfos, chartContent, chartCollection.getChart(i));
//组合图表-条件属性-超链特判
dealCustomPlot(jsInfos, conditionContent,chartCollection.getChart(i));
dealCustomPlot(jsInfos, conditionContent, chartCollection.getChart(i));
}
}
private void dealCustomPlot(List<JSInfo> jsInfos, ITContent conditionContent, Chart chart) {
if (chart.getPlot() instanceof VanChartCustomPlot){
if (chart.getPlot() instanceof VanChartCustomPlot) {
VanChartCustomPlot customPlot = chart.getPlot();
for (VanChartPlot plot : customPlot.getCustomPlotList()){
for (VanChartPlot plot : customPlot.getCustomPlotList()) {
NameJavaScriptGroup javaScriptGroup = plot.getHotHyperLink();
if (javaScriptGroup != null){
for (int i = 0 ; i < javaScriptGroup.size();i++){
if (javaScriptGroup.getNameHyperlink(i).getJavaScript() instanceof JavaScriptImpl){
if (javaScriptGroup != null) {
for (int i = 0; i < javaScriptGroup.size(); i++) {
if (javaScriptGroup.getNameHyperlink(i).getJavaScript() instanceof JavaScriptImpl) {
ITContent content = ITContent.copy(conditionContent);
content.addOtherPos(
CustomPlotFactory.getTitle(CustomPlotFactory.getCustomType(plot)),

12
designer-realize/src/main/java/com/fr/design/actions/replace/utils/ShowValueUtils.java

@ -1,7 +1,6 @@
package com.fr.design.actions.replace.utils;
import com.fr.design.actions.replace.ui.ITReplaceMainDialog;
import com.fr.stable.StringUtils;
import com.fr.stable.collections.combination.Pair;
@ -30,6 +29,7 @@ public class ShowValueUtils {
public static final String NUMBER_REGEX = "[0-9]";
public static final String ENGLISH_REGEX = "[a-zA-Z]";
private static List<String> specialCharList = new ArrayList<>();
static {
//正则特殊字符:? * () [] {} ^ $ .
//如果是? 并采用通配符 ,会自动转成“.” 所以 ? 不用处理
@ -84,8 +84,8 @@ public class ShowValueUtils {
*/
public static String changeRegex(String regex) {
String change = "\\";
for (int i = 0 ; i < specialCharList.size() ; i ++){
regex = regex.replace(specialCharList.get(i),change + specialCharList.get(i));
for (int i = 0; i < specialCharList.size(); i++) {
regex = regex.replace(specialCharList.get(i), change + specialCharList.get(i));
}
regex = regex.replace(NUMBER, NUMBER_REGEX);
regex = regex.replace(ENGLISH, ENGLISH_REGEX);
@ -185,6 +185,12 @@ public class ShowValueUtils {
return failReturn;
}
/**
* 支持通配符的contains
* @param originStr
* @param matchStr
* @return
*/
public static boolean contains(String originStr, String matchStr) {
if (ITReplaceMainDialog.isMatched()) {
String str = changeRegex(matchStr);

Loading…
Cancel
Save