From d1fe8799fccaeb5b6ae801b55903ff6421d20cb8 Mon Sep 17 00:00:00 2001 From: Hoky <303455184@qq.com> Date: Thu, 30 Dec 2021 15:53:10 +0800 Subject: [PATCH 1/2] =?UTF-8?q?KERNEL-9928=20=E9=87=8D=E6=9E=84=E6=B0=B4?= =?UTF-8?q?=E5=8D=B0=E5=8A=A0=E8=BD=BD=201.=E6=94=B9=E6=88=90=E5=B8=B8?= =?UTF-8?q?=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/fr/design/report/WatermarkSettingPane.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/report/WatermarkSettingPane.java b/designer-base/src/main/java/com/fr/design/report/WatermarkSettingPane.java index d4e9a902bb..e79bfcf6b8 100644 --- a/designer-base/src/main/java/com/fr/design/report/WatermarkSettingPane.java +++ b/designer-base/src/main/java/com/fr/design/report/WatermarkSettingPane.java @@ -1,5 +1,6 @@ package com.fr.design.report; +import com.fr.base.iofile.attr.WaterMarkProvideConstant; import com.fr.base.iofile.attr.WatermarkAttr; import com.fr.design.dialog.AbstractTemplateServerSettingPane; import com.fr.report.core.ReportUtils; @@ -42,7 +43,7 @@ public class WatermarkSettingPane extends AbstractTemplateServerSettingPane { } public void populate(WatermarkAttr watermark) { - if (watermark.getWaterMarkProvider().equals("TEMPLATE")) { + if (watermark.getWaterMarkProvider().equals(WaterMarkProvideConstant.TEMPLATE)) { chooseComboBox.setSelectedIndex(SINGLE_SET); watermarkPane.populate(watermark); } else { From d062899bf7f024f870cf37eff66b5479d96cfb04 Mon Sep 17 00:00:00 2001 From: Hoky <303455184@qq.com> Date: Thu, 30 Dec 2021 17:00:08 +0800 Subject: [PATCH 2/2] =?UTF-8?q?REPORT-65192=20=E5=85=AC=E5=BC=8F=E5=90=88?= =?UTF-8?q?=E6=B3=95=E6=80=A7=E6=A3=80=E6=B5=8B=E9=94=99=E8=AF=AF=E5=AD=97?= =?UTF-8?q?=E7=AC=A6=E4=BD=8D=E7=BD=AE=E8=BF=94=E5=9B=9E=E4=B8=8D=E6=AD=A3?= =?UTF-8?q?=E7=A1=AE=201.=E5=A6=82=E6=9E=9C=E8=BF=94=E5=9B=9E=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E4=BD=8D=E7=BD=AE=EF=BC=8C=E5=88=99=E6=A8=A1=E7=B3=8A?= =?UTF-8?q?=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/fr/design/formula/FormulaPane.java | 10 +++++++--- .../exception/function/FormulaCheckWrongFunction.java | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/formula/FormulaPane.java b/designer-base/src/main/java/com/fr/design/formula/FormulaPane.java index 74bf3fe76f..904cdf00b0 100644 --- a/designer-base/src/main/java/com/fr/design/formula/FormulaPane.java +++ b/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()) { showMessageDialog(checkResult.getTips(), checkResult.isValid()); } else { - String position = Toolkit.i18nText("Fine-Design_Basic_Formula_The") + (checkResult.getFormulaCoordinates().getColumns()) - + Toolkit.i18nText("Fine-Design_Basic_Formula_Error_Position") + " "; + int columns = checkResult.getFormulaCoordinates().getColumns(); + 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( FormulaPane.this, 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")}, Toolkit.i18nText("Fine-Design_Basic_Formula_Check_Result")); if (confirmDialog == 0) { - formulaTextArea.setCaretPosition(checkResult.getFormulaCoordinates().getColumns()); + formulaTextArea.setCaretPosition(Math.max(columns, 0)); formulaTextArea.requestFocus(); return false; } diff --git a/designer-base/src/main/java/com/fr/design/formula/exception/function/FormulaCheckWrongFunction.java b/designer-base/src/main/java/com/fr/design/formula/exception/function/FormulaCheckWrongFunction.java index 5328ca56ef..417e9b37a6 100644 --- a/designer-base/src/main/java/com/fr/design/formula/exception/function/FormulaCheckWrongFunction.java +++ b/designer-base/src/main/java/com/fr/design/formula/exception/function/FormulaCheckWrongFunction.java @@ -74,7 +74,7 @@ public class FormulaCheckWrongFunction implements Function