diff --git a/designer-realize/src/main/java/com/fr/nx/app/designer/JStreamBook.java b/designer-realize/src/main/java/com/fr/nx/app/designer/JStreamBook.java index 9af3d83da..15f64a044 100644 --- a/designer-realize/src/main/java/com/fr/nx/app/designer/JStreamBook.java +++ b/designer-realize/src/main/java/com/fr/nx/app/designer/JStreamBook.java @@ -6,7 +6,6 @@ import com.fr.design.actions.file.export.PDFExportAction; import com.fr.design.actions.file.export.SVGExportAction; import com.fr.design.actions.file.export.TextExportAction; import com.fr.design.actions.file.export.WordExportAction; -import com.fr.design.mainframe.JTemplate; import com.fr.design.mainframe.JWorkBook; import com.fr.design.menu.MenuDef; import com.fr.design.menu.ShortCut; @@ -15,7 +14,6 @@ import com.fr.general.ComparatorUtils; import com.fr.locale.InterProviderFactory; import com.fr.log.FineLoggerFactory; import com.fr.main.impl.WorkBook; -import com.fr.nx.app.designer.utils.CptCompileUtil; import com.fr.nx.cptx.entry.metadata.CptxMetadata; import com.fr.nx.app.designer.menu.CalculateAttrAction; import com.fr.nx.app.designer.toolbar.TemplateTransformer; @@ -94,31 +92,26 @@ public class JStreamBook extends JWorkBook { new CSVExportAction(this), new TextExportAction(this)); } + + @Override + public String getPath() { + return getEditingFILE().getPath() + getSuffix(); + } + public String getTemplateName() { return getEditingFILE().getName() + getSuffix(); } private String getSuffix() { - String path = this.getEditingFILE().getPath(); - CptxMetadata metadata = CptxFileUtils.getMetadata(path); - //兼容另存为模式中标题显示 + CptxMetadata metadata = CptxFileUtils.getMetadata(this.getEditingFILE().getPath()); if (metadata != null && metadata.isForceCpt()) { - if (path.endsWith(".cptx")){ - return InterProviderFactory.getProvider().getLocText("Fine-Plugin_Engine_Compatibility_Mode"); - } else if (path.endsWith(".cpt")){ - return InterProviderFactory.getProvider().getLocText("Fine-Plugin_Engine_Paging_Engine_Not_Work"); - } + return InterProviderFactory.getProvider().getLocText("Fine-Plugin_Engine_Compatibility_Mode"); } return StringUtils.EMPTY; } @Override public ShortCut[] shortcut4TemplateMenu() { - //兼容另存为流程中,在cptx转换成cpt时,在不重新关闭打开文件的基础上刷新面板 - if (!CptCompileUtil.isNewEngine(this.getTarget())){ - return ArraysUtil.insert(super.shortcut4TemplateMenu(), new CalculateAttrAction(this), 5); - } else { - return super.shortcut4TemplateMenu(); - } + return ArraysUtil.insert(super.shortcut4TemplateMenu(), new CalculateAttrAction(this), 5); } -} +} \ No newline at end of file