From eb63b92671655b467a2a0c2b93913cf181d22175 Mon Sep 17 00:00:00 2001 From: neil Date: Fri, 30 Jun 2017 17:11:00 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-2825=20=E8=AE=AD=E7=BB=83=E6=8F=92?= =?UTF-8?q?=E4=BB=B6button=E5=87=BA=E7=8E=B0=E4=BA=86=E5=A4=9A=E4=B8=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mainframe/templateinfo/JWorkBookProcessInfo.java | 8 +++++++- .../fun/impl/AbstractDsinFrameUpButtonProvider.java | 3 ++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/designer/src/com/fr/design/mainframe/templateinfo/JWorkBookProcessInfo.java b/designer/src/com/fr/design/mainframe/templateinfo/JWorkBookProcessInfo.java index bf5d835d2..306c6b0d1 100644 --- a/designer/src/com/fr/design/mainframe/templateinfo/JWorkBookProcessInfo.java +++ b/designer/src/com/fr/design/mainframe/templateinfo/JWorkBookProcessInfo.java @@ -2,6 +2,7 @@ package com.fr.design.mainframe.templateinfo; import com.fr.base.parameter.ParameterUI; import com.fr.main.impl.WorkBook; +import com.fr.main.parameter.ReportParameterAttr; import com.fr.report.cellcase.CellCase; import com.fr.report.poly.PolyWorkSheet; import com.fr.report.worksheet.WorkSheet; @@ -68,7 +69,12 @@ public class JWorkBookProcessInfo extends TemplateProcessInfo { } // 获取模板控件数 public int getWidgetCount() { - ParameterUI pui = template.getReportParameterAttr().getParameterUI(); + ReportParameterAttr attr = template.getReportParameterAttr(); + if (attr == null) { + return 0; + } + + ParameterUI pui = attr.getParameterUI(); return pui == null ? 0 : (pui.getAllWidgets().length - 1); } } diff --git a/designer_base/src/com/fr/design/fun/impl/AbstractDsinFrameUpButtonProvider.java b/designer_base/src/com/fr/design/fun/impl/AbstractDsinFrameUpButtonProvider.java index bd1f70829..03e76dcdf 100644 --- a/designer_base/src/com/fr/design/fun/impl/AbstractDsinFrameUpButtonProvider.java +++ b/designer_base/src/com/fr/design/fun/impl/AbstractDsinFrameUpButtonProvider.java @@ -2,6 +2,7 @@ package com.fr.design.fun.impl; import com.fr.design.fun.DesignerFrameUpButtonProvider; import com.fr.design.gui.ibutton.UIButton; +import com.fr.stable.fun.impl.AbstractProvider; import com.fr.stable.fun.mark.API; /** @@ -10,7 +11,7 @@ import com.fr.stable.fun.mark.API; * Time: 15:50 */ @API(level = DesignerFrameUpButtonProvider.CURRENT_LEVEL) -public abstract class AbstractDsinFrameUpButtonProvider implements DesignerFrameUpButtonProvider { +public abstract class AbstractDsinFrameUpButtonProvider extends AbstractProvider implements DesignerFrameUpButtonProvider { @Override public UIButton[] getUpButtons(int menuState) { return new UIButton[0];