From c0d3517bc9e3119ca3f0bf0863146dceef535b34 Mon Sep 17 00:00:00 2001 From: "Yuan.Wang" <1536296691@qq.com> Date: Fri, 27 Aug 2021 16:29:15 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-58270=20=E6=96=B0=E5=89=8D=E7=AB=AF?= =?UTF-8?q?=E5=A1=AB=E6=8A=A5=E5=89=A5=E7=A6=BB=E6=8F=92=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/preview/NewWritePreview.java | 39 ------------------- .../com/fr/design/mainframe/JWorkBook.java | 9 +++-- 2 files changed, 5 insertions(+), 43 deletions(-) delete mode 100644 designer-base/src/main/java/com/fr/design/preview/NewWritePreview.java diff --git a/designer-base/src/main/java/com/fr/design/preview/NewWritePreview.java b/designer-base/src/main/java/com/fr/design/preview/NewWritePreview.java deleted file mode 100644 index 8c7e408ff5..0000000000 --- a/designer-base/src/main/java/com/fr/design/preview/NewWritePreview.java +++ /dev/null @@ -1,39 +0,0 @@ -package com.fr.design.preview; - -import com.fr.design.fun.impl.AbstractPreviewProvider; - -import java.util.HashMap; -import java.util.Map; - -/** - * 新前端填报预览 - * by abel 2021/07/08 - */ -public class NewWritePreview extends AbstractPreviewProvider { - @Override - public String nameForPopupItem() { - return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Write_New_Preview"); - } - - @Override - public String iconPathForPopupItem() { - return "com/fr/design/images/buttonicon/writes.png"; - } - - @Override - public String iconPathForLarge() { - return "com/fr/design/images/buttonicon/writeb24.png"; - } - - @Override - public int previewTypeCode() { - return 99; - } - - @Override - public Map parametersForPreview() { - Map map = new HashMap(); - map.put("op", "write_new"); - return map; - } -} 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 3e9ca7629a..327f51747a 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 @@ -145,6 +145,7 @@ public class JWorkBook extends JTemplate { super(workBook, fileName); populateReportParameterAttr(); } + public JWorkBook(WorkBook workBook, FILE file, Parameter[] parameters) { super(workBook, file, parameters); populateReportParameterAttr(); @@ -489,7 +490,7 @@ public class JWorkBook extends JTemplate { double creatorWidth = blockCreator.getEditorBounds().width; double areaHeight = polyDezi.polyArea.getHeight(); double areaWidth = polyDezi.polyArea.getWidth(); - if(AssistUtils.equals(creatorWidth,0) || AssistUtils.equals(creatorHeight,0)){ + if (AssistUtils.equals(creatorWidth, 0) || AssistUtils.equals(creatorHeight, 0)) { return resolution; } double time = (areaHeight / creatorHeight) < (areaWidth / creatorWidth) ? (areaHeight / creatorHeight) : (areaWidth / creatorWidth); @@ -506,7 +507,7 @@ public class JWorkBook extends JTemplate { int row = reportPane.getSelection().getSelectedRows()[0]; double rowLength = reportPane.getSelection().getSelectedRows().length; double rowExtent = reportPane.getGrid().getVerticalExtent(); - if(AssistUtils.equals(columnLength,0) || AssistUtils.equals(rowLength,0)){ + if (AssistUtils.equals(columnLength, 0) || AssistUtils.equals(rowLength, 0)) { return resolution; } double time = (columnExtent / columnLength) < (rowExtent / rowLength) ? (columnExtent / columnLength) : (rowExtent / rowLength); @@ -929,7 +930,7 @@ public class JWorkBook extends JTemplate { public PreviewProvider[] supportPreview() { PreviewProvider[] templatePreviews = super.supportPreview(); return ArrayUtils.addAll(new PreviewProvider[]{ - new PagePreview(), new WritePreview(), new ViewPreview(), new MobilePreview(), new NewWritePreview() + new PagePreview(), new WritePreview(), new ViewPreview(), new MobilePreview() }, templatePreviews); } @@ -1212,7 +1213,7 @@ public class JWorkBook extends JTemplate { addExtraChooseFILEFilter(fileChooser); } - protected void addExtraChooseFILEFilter(FILEChooserPane fileChooser){ + protected void addExtraChooseFILEFilter(FILEChooserPane fileChooser) { Set providers = ExtraDesignClassManager.getInstance().getArray(ReportSupportedFileUIProvider.XML_TAG); for (ReportSupportedFileUIProvider provider : providers) { provider.addChooseFileFilter(fileChooser, this.suffix());