|
|
|
@ -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,9 +696,14 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
protected void addShortCut(MenuDef exportMenuDef, MenuDef excelExportMenuDef) { |
|
|
|
|
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<WorkBook, WorkBookUndoState> {
|
|
|
|
|
*/ |
|
|
|
|
@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<WorkBook, WorkBookUndoState> {
|
|
|
|
|
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; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 模板的工具 |
|
|
|
|
* |
|
|
|
|