From bb26dd08041630faea295b8535554341b9f26738 Mon Sep 17 00:00:00 2001 From: Starryi Date: Fri, 7 Jan 2022 10:35:45 +0800 Subject: [PATCH 1/2] =?UTF-8?q?REPORT-65576=20=E6=A1=86=E9=80=89=E5=8D=95?= =?UTF-8?q?=E5=85=83=E6=A0=BC=EF=BC=8C=E5=88=87=E6=8D=A2=E4=B8=BB=E9=A2=98?= =?UTF-8?q?=EF=BC=8C=E4=BC=9A=E5=BD=B1=E5=93=8D=E5=8D=95=E5=85=83=E6=A0=BC?= =?UTF-8?q?=E5=86=85=E5=AE=B9=E7=9A=84=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 【问题原因】 格式面板从单元格样式面板中移除后,所以不能通过样式面板配置项修改格式。 这就要求修改样式面板中的设置项,产生新的样式对象,需要保留旧的样式对象中格式配置, 保证格式不变 【改动思路】 同上 --- .../fr/design/mainframe/cell/settingpane/CellStylePane.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/CellStylePane.java b/designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/CellStylePane.java index ec3c1bd05..3bdd034c6 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/CellStylePane.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/CellStylePane.java @@ -11,7 +11,6 @@ import com.fr.design.mainframe.theme.utils.DefaultThemedTemplateCellElementCase; import com.fr.design.style.BorderUtils; import com.fr.design.utils.gui.AdjustWorkBookDefaultStyleUtils; import com.fr.design.utils.gui.GUICoreUtils; -import com.fr.report.cell.DefaultTemplateCellElement; import com.fr.report.cell.TemplateCellElement; import com.fr.report.elementcase.TemplateElementCase; @@ -20,7 +19,7 @@ import javax.swing.JPanel; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; import java.awt.BorderLayout; -import java.awt.Rectangle; +import java.text.Format; /** * @author zhou @@ -118,7 +117,10 @@ public class CellStylePane extends AbstractCellAttrPane { AdjustWorkBookDefaultStyleUtils.adjustCellElement(cellElement); elementCase.addCellElement(cellElement); } + Format format = cellElement.getStyle().getFormat(); Style style = stylePane.updateBean(); + // 格式不能通过样式面板中的配置项修改,因此需要保留 + style = style.deriveFormat(format); cellElement.setStyle(style); } }); From 346bd67c91665b512379e25b50c1e9d1a05f25db Mon Sep 17 00:00:00 2001 From: Hoky <303455184@qq.com> Date: Fri, 7 Jan 2022 10:40:25 +0800 Subject: [PATCH 2/2] =?UTF-8?q?REPORT-65290=20=E8=AE=BE=E8=AE=A1=E5=99=A8-?= =?UTF-8?q?=E6=B0=B4=E5=8D=B0=EF=BC=8C=E5=B9=B3=E5=8F=B0=E6=94=B9=E5=8F=98?= =?UTF-8?q?=E6=B0=B4=E5=8D=B0=E5=BC=80=E5=85=B3=EF=BC=8C=E6=A8=A1=E6=9D=BF?= =?UTF-8?q?=E6=B0=B4=E5=8D=B0=E5=8F=98=E6=88=90=E4=BA=86=E6=A8=A1=E6=9D=BF?= =?UTF-8?q?=E5=8D=95=E7=8B=AC=E8=AE=BE=E7=BD=AE=201.=E5=88=A4=E6=96=AD?= =?UTF-8?q?=E6=B0=B4=E5=8D=B0=E7=9A=84=E6=9C=89=E6=95=88=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/report/WatermarkSettingPane.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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 e79bfcf6b..f3de6eef9 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 @@ -34,6 +34,7 @@ public class WatermarkSettingPane extends AbstractTemplateServerSettingPane { @Override protected void populateServerSettings() { WatermarkAttr watermarkAttr = ReportUtils.getWatermarkAttrFromServerConfig(); + watermarkAttr.setValid(true); watermarkPane.populate(watermarkAttr); } @@ -55,8 +56,9 @@ public class WatermarkSettingPane extends AbstractTemplateServerSettingPane { public WatermarkAttr update() { WatermarkAttr watermark = watermarkPane.update(); - if (isUsingServerSettings()) { - watermark.setValid(false); + if (!isUsingServerSettings()) { + watermark.setValid(true); + watermark.setWaterMarkProvider(WaterMarkProvideConstant.TEMPLATE); } return watermark; }