From 5eacc359688dfd81c1ff4310889d71e6768dac14 Mon Sep 17 00:00:00 2001 From: "fly.li" Date: Wed, 1 Sep 2021 21:36:43 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=86JStreamWork=E7=B1=BB=E4=B8=AD=E7=9B=B8?= =?UTF-8?q?=E5=85=B3=E6=96=B9=E6=B3=95=E5=90=88=E5=B9=B6=E5=88=B0JWorkBook?= =?UTF-8?q?=E4=B8=AD=EF=BC=8C=E8=BF=99=E4=BA=9B=E6=96=B9=E6=B3=95=E6=A0=B9?= =?UTF-8?q?=E6=8D=AE=E6=8A=A5=E8=A1=A8=E5=BC=95=E6=93=8E=E5=B1=9E=E6=80=A7?= =?UTF-8?q?=E7=9A=84=E8=AE=BE=E7=BD=AE=E8=BF=9B=E8=A1=8C=E4=BA=86=E4=B8=8D?= =?UTF-8?q?=E5=90=8C=E7=9A=84=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/mainframe/JWorkBook.java | 22 ++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/JWorkBook.java b/designer-realize/src/main/java/com/fr/design/mainframe/JWorkBook.java index 0887ffdea..855201733 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/JWorkBook.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/JWorkBook.java @@ -82,6 +82,8 @@ import com.fr.main.impl.WorkBook; import com.fr.main.impl.WorkBookAdapter; import com.fr.main.impl.WorkBookX; import com.fr.main.parameter.ReportParameterAttr; +import com.fr.nx.app.designer.menu.CalculateAttrAction; +import com.fr.nx.app.designer.utils.CptCompileUtil; import com.fr.poly.PolyDesigner; import com.fr.poly.creator.BlockCreator; import com.fr.privilege.finegrain.WorkSheetPrivilegeControl; @@ -99,6 +101,7 @@ import com.fr.stable.StableUtils; import com.fr.stable.StringUtils; import com.fr.stable.module.Module; import com.fr.stable.project.ProjectConstants; +import com.fr.third.jodd.util.ArraysUtil; import com.fr.web.controller.ViewRequestConstants; import com.fr.workspace.WorkContext; @@ -693,8 +696,13 @@ public class JWorkBook extends JTemplate { } protected void addShortCut(MenuDef exportMenuDef, MenuDef excelExportMenuDef) { - exportMenuDef.addShortCut(excelExportMenuDef, new PDFExportAction(this), new WordExportAction(this), new SVGExportAction(this), - new CSVExportAction(this), new TextExportAction(this), new EmbeddedExportExportAction(this)); + if (CptCompileUtil.isNewEngine(this.getTarget())){ + exportMenuDef.addShortCut(excelExportMenuDef, new PDFExportAction(this), new WordExportAction(this), new SVGExportAction(this), + new CSVExportAction(this), new TextExportAction(this)); + }else { + exportMenuDef.addShortCut(excelExportMenuDef, new PDFExportAction(this), new WordExportAction(this), new SVGExportAction(this), + new CSVExportAction(this), new TextExportAction(this), new EmbeddedExportExportAction(this)); + } } /** @@ -718,7 +726,8 @@ public class JWorkBook extends JTemplate { */ @Override public ShortCut[] shortcut4TemplateMenu() { - return ArrayUtils.addAll(new ShortCut[]{ + boolean isNewEngine = CptCompileUtil.isNewEngine(this.getTarget()); + ShortCut[] commonShortCut = ArrayUtils.addAll(new ShortCut[]{ new ReportWebAttrAction(this), new ReportExportAttrAction(this), new ReportParameterAction(this), @@ -728,8 +737,15 @@ public class JWorkBook extends JTemplate { new ReportWatermarkAction(this), new NameSeparator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Utils_Current_Sheet")), }, this.reportComposite.getEditingReportComponent().shortcut4TemplateMenu()); + if (isNewEngine){ + return ArraysUtil.insert(commonShortCut, new CalculateAttrAction(this), 5); + }else { + return commonShortCut; + } } + + /** * 模板的工具 *