From a77c1731701cf19768e61571ea2c07b344673c53 Mon Sep 17 00:00:00 2001 From: Starryi Date: Tue, 28 Dec 2021 14:16:57 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-65059=20=E8=AE=BE=E8=AE=A1=E5=99=A8-?= =?UTF-8?q?=E7=BB=99=E5=A4=9A=E4=B8=AA=E5=8D=95=E5=85=83=E6=A0=BC=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E8=BE=B9=E6=A1=86=EF=BC=8C=E9=A2=84=E8=A7=88=E6=97=B6?= =?UTF-8?q?=E5=8F=AA=E6=9C=89=E4=B8=80=E4=B8=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 【问题原因】 问题原因设置单元格边框时,如果某个位置没有单元格会自动创建一个有默认主题单元格样式的单元格, 那么之后网页查看时,默认样式单元格会生效,导致设置的有边框样式被覆盖 【改动思路】 报表工具栏上对单元格做的操作,都会将单元格样式变为自定义样式,因此需要在样式设置结束后,将样式 变为自定义样式 --- .../com/fr/design/actions/cell/BorderAction.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/design/actions/cell/BorderAction.java b/designer-realize/src/main/java/com/fr/design/actions/cell/BorderAction.java index 844e4f70b..8752d54de 100644 --- a/designer-realize/src/main/java/com/fr/design/actions/cell/BorderAction.java +++ b/designer-realize/src/main/java/com/fr/design/actions/cell/BorderAction.java @@ -110,13 +110,17 @@ public class BorderAction extends ElementCaseAction implements ChangeListener { public boolean update(ElementCasePane elementCasePane) { - resetSelectedElementsStyleToCustom(elementCasePane); - + boolean success; if (oldCellBorderStyle.isNoneBorderStyle()) { //无边框格式 - return BorderUtils.updateCellBorderStyle(elementCasePane, oldCellBorderStyle); + success = BorderUtils.updateCellBorderStyle(elementCasePane, oldCellBorderStyle); + } else { + success = BorderUtils.update(elementCasePane, oldCellBorderStyle); + } + if (success) { + resetSelectedElementsStyleToCustom(elementCasePane); } - return BorderUtils.update(elementCasePane, oldCellBorderStyle); + return success; } @Override