From 28b3259514500f1ddb9bdeaae0ee02b864a93547 Mon Sep 17 00:00:00 2001 From: "fly.li" Date: Fri, 3 Sep 2021 17:10:31 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-55243=EF=BC=9A=E5=B0=86JStreamWork?= =?UTF-8?q?=E5=90=88=E5=B9=B6=E5=88=B0JWorkBook=E5=8F=8AJTemplate=E7=9A=84?= =?UTF-8?q?=E6=B5=81=E7=A8=8B=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/design/mainframe/JWorkBook.java | 4 ++-- .../src/main/java/com/fr/nx/app/designer/CptxApp.java | 3 ++- 2 files changed, 4 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 0ba6c6991..9fdbf6762 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 @@ -718,7 +718,7 @@ public class JWorkBook extends JTemplate { } protected void addShortCut(MenuDef exportMenuDef, MenuDef excelExportMenuDef) { - if (CptCompileUtil.isNewEngine(this.getTarget())){ + if (CptCompileUtil.isNewEngine(this.getTarget(), getEditingFILE().getPath())){ exportMenuDef.addShortCut(excelExportMenuDef, new PDFExportAction(this), new WordExportAction(this), new SVGExportAction(this), new CSVExportAction(this), new TextExportAction(this)); }else { @@ -748,7 +748,7 @@ public class JWorkBook extends JTemplate { */ @Override public ShortCut[] shortcut4TemplateMenu() { - boolean isNewEngine = CptCompileUtil.isNewEngine(this.getTarget()); + boolean isNewEngine = CptCompileUtil.isNewEngine(this.getTarget(), getEditingFILE().getPath()); ShortCut[] commonShortCut = ArrayUtils.addAll(new ShortCut[]{ new ReportWebAttrAction(this), new ReportExportAttrAction(this), diff --git a/designer-realize/src/main/java/com/fr/nx/app/designer/CptxApp.java b/designer-realize/src/main/java/com/fr/nx/app/designer/CptxApp.java index 4597d0234..35aba93d8 100644 --- a/designer-realize/src/main/java/com/fr/nx/app/designer/CptxApp.java +++ b/designer-realize/src/main/java/com/fr/nx/app/designer/CptxApp.java @@ -3,6 +3,7 @@ package com.fr.nx.app.designer; import com.fr.base.extension.FileExtension; import com.fr.design.mainframe.AbstractAppProvider; import com.fr.design.mainframe.JTemplate; +import com.fr.design.mainframe.JWorkBook; import com.fr.file.FILE; import com.fr.log.FineLoggerFactory; import com.fr.main.impl.WorkBook; @@ -36,7 +37,7 @@ public class CptxApp extends AbstractAppProvider { */ @Override public JTemplate openTemplate(FILE tplFile) { - return new JStreamBook(asIOFile(tplFile), tplFile); + return new JWorkBook(asIOFile(tplFile), tplFile); } @Override