Browse Source

取消对JStreamWork的修改

research/11.0
fly.li 3 years ago
parent
commit
846fbfe832
  1. 21
      designer-realize/src/main/java/com/fr/nx/app/designer/JStreamBook.java

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