Browse Source

Pull request #7402: KERNEL-9928 重构水印加载 && REPORT-65192

Merge in DESIGN/design from ~HOKY.HE/design-hoky:release/11.0 to release/11.0

* commit 'd062899bf7f024f870cf37eff66b5479d96cfb04':
  REPORT-65192 公式合法性检测错误字符位置返回不正确 1.如果返回错误位置,则模糊处理
  KERNEL-9928 重构水印加载 1.改成常量
bugfix/11.0
Hoky.He 3 years ago
parent
commit
f32b0cc67d
  1. 10
      designer-base/src/main/java/com/fr/design/formula/FormulaPane.java
  2. 2
      designer-base/src/main/java/com/fr/design/formula/exception/function/FormulaCheckWrongFunction.java
  3. 3
      designer-base/src/main/java/com/fr/design/report/WatermarkSettingPane.java

10
designer-base/src/main/java/com/fr/design/formula/FormulaPane.java

@ -867,8 +867,12 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula {
if (checkResult.isValid()) { if (checkResult.isValid()) {
showMessageDialog(checkResult.getTips(), checkResult.isValid()); showMessageDialog(checkResult.getTips(), checkResult.isValid());
} else { } else {
String position = Toolkit.i18nText("Fine-Design_Basic_Formula_The") + (checkResult.getFormulaCoordinates().getColumns()) int columns = checkResult.getFormulaCoordinates().getColumns();
+ Toolkit.i18nText("Fine-Design_Basic_Formula_Error_Position") + " "; String position = StringUtils.EMPTY;
if (columns >= 0) {
position = Toolkit.i18nText("Fine-Design_Basic_Formula_The") + columns
+ Toolkit.i18nText("Fine-Design_Basic_Formula_Error_Position") + " ";
}
int confirmDialog = FineJOptionPane.showConfirmDialog( int confirmDialog = FineJOptionPane.showConfirmDialog(
FormulaPane.this, FormulaPane.this,
position + messageTips, position + messageTips,
@ -879,7 +883,7 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula {
new String[]{Toolkit.i18nText("Fine-Design_Basic_Formula_Check_Result"), Toolkit.i18nText("Fine-Design_Basic_Formula_Continue")}, new String[]{Toolkit.i18nText("Fine-Design_Basic_Formula_Check_Result"), Toolkit.i18nText("Fine-Design_Basic_Formula_Continue")},
Toolkit.i18nText("Fine-Design_Basic_Formula_Check_Result")); Toolkit.i18nText("Fine-Design_Basic_Formula_Check_Result"));
if (confirmDialog == 0) { if (confirmDialog == 0) {
formulaTextArea.setCaretPosition(checkResult.getFormulaCoordinates().getColumns()); formulaTextArea.setCaretPosition(Math.max(columns, 0));
formulaTextArea.requestFocus(); formulaTextArea.requestFocus();
return false; return false;
} }

2
designer-base/src/main/java/com/fr/design/formula/exception/function/FormulaCheckWrongFunction.java

@ -74,7 +74,7 @@ public class FormulaCheckWrongFunction implements Function<Exception, FormulaChe
invalidFormula = invalidFormula.substring(0, invalidFormula.indexOf(",")); invalidFormula = invalidFormula.substring(0, invalidFormula.indexOf(","));
} }
int index = formulaText.indexOf(invalidFormula); int index = formulaText.indexOf(invalidFormula);
return Math.max(index, 0); return index;
} }
} }

3
designer-base/src/main/java/com/fr/design/report/WatermarkSettingPane.java

@ -1,5 +1,6 @@
package com.fr.design.report; package com.fr.design.report;
import com.fr.base.iofile.attr.WaterMarkProvideConstant;
import com.fr.base.iofile.attr.WatermarkAttr; import com.fr.base.iofile.attr.WatermarkAttr;
import com.fr.design.dialog.AbstractTemplateServerSettingPane; import com.fr.design.dialog.AbstractTemplateServerSettingPane;
import com.fr.report.core.ReportUtils; import com.fr.report.core.ReportUtils;
@ -42,7 +43,7 @@ public class WatermarkSettingPane extends AbstractTemplateServerSettingPane {
} }
public void populate(WatermarkAttr watermark) { public void populate(WatermarkAttr watermark) {
if (watermark.getWaterMarkProvider().equals("TEMPLATE")) { if (watermark.getWaterMarkProvider().equals(WaterMarkProvideConstant.TEMPLATE)) {
chooseComboBox.setSelectedIndex(SINGLE_SET); chooseComboBox.setSelectedIndex(SINGLE_SET);
watermarkPane.populate(watermark); watermarkPane.populate(watermark);
} else { } else {

Loading…
Cancel
Save