From ad5153b945ded1ab03e0afeb06a665ea8308e462 Mon Sep 17 00:00:00 2001 From: zack Date: Fri, 5 Jul 2019 11:06:42 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-18855=20&=20REPORT-18857=20jpg=E5=9B=BE?= =?UTF-8?q?=E7=89=87=E6=8C=81=E4=B9=85=E5=8C=96=E9=81=97=E6=BC=8F=E4=BA=86?= =?UTF-8?q?=E4=B8=80=E4=BA=9B=E5=9C=BA=E6=99=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/actions/insert/flot/ImageFloatAction.java | 2 +- .../src/main/java/com/fr/design/headerfooter/ImagePane.java | 2 +- .../src/main/java/com/fr/design/mainframe/JWorkBook.java | 4 +--- designer-realize/src/main/java/com/fr/grid/Grid.java | 1 - 4 files changed, 3 insertions(+), 6 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/design/actions/insert/flot/ImageFloatAction.java b/designer-realize/src/main/java/com/fr/design/actions/insert/flot/ImageFloatAction.java index 9ba3ee9961..d7f98a2122 100644 --- a/designer-realize/src/main/java/com/fr/design/actions/insert/flot/ImageFloatAction.java +++ b/designer-realize/src/main/java/com/fr/design/actions/insert/flot/ImageFloatAction.java @@ -87,7 +87,7 @@ public class ImageFloatAction extends ElementCaseAction { if (selectedFile != null && selectedFile.isFile()) { CellImage cellImage = selectImagePane.update(); - Image image = cellImage.getImage(); + Image image = cellImage.getBufferImage(); JTemplate currentEditingTemplate = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate(); currentEditingTemplate.setPictureElem(floatElement, cellImage); diff --git a/designer-realize/src/main/java/com/fr/design/headerfooter/ImagePane.java b/designer-realize/src/main/java/com/fr/design/headerfooter/ImagePane.java index 1011f8036c..02d46c82aa 100644 --- a/designer-realize/src/main/java/com/fr/design/headerfooter/ImagePane.java +++ b/designer-realize/src/main/java/com/fr/design/headerfooter/ImagePane.java @@ -78,7 +78,7 @@ public class ImagePane extends BasicPane { } public Image update() { - return this.imagePreviewPane.getImage(); + return this.imagePreviewPane.getImageWithSuffix(); } /** 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 6e72e98fef..07136bc1ef 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 @@ -68,7 +68,6 @@ import com.fr.file.FILE; import com.fr.file.FileNodeFILE; import com.fr.file.filetree.FileNode; import com.fr.general.ComparatorUtils; -import com.fr.general.ImageWithSuffix; import com.fr.general.ModuleContext; import com.fr.grid.Grid; import com.fr.grid.GridUtils; @@ -90,7 +89,6 @@ import com.fr.report.elementcase.TemplateElementCase; import com.fr.report.poly.PolyWorkSheet; import com.fr.report.worksheet.WorkSheet; import com.fr.stable.ArrayUtils; -import com.fr.stable.CoreGraphHelper; import com.fr.stable.StableUtils; import com.fr.stable.StringUtils; import com.fr.stable.module.Module; @@ -623,7 +621,7 @@ public class JWorkBook extends JTemplate { if (workBook instanceof WorkBookAdapter) { elem.setValue(new CellImagePainter(cellImage)); } else { - elem.setValue(ImageWithSuffix.build(cellImage.getImage(),cellImage.getSuffix())); + elem.setValue(cellImage.getImage()); } } diff --git a/designer-realize/src/main/java/com/fr/grid/Grid.java b/designer-realize/src/main/java/com/fr/grid/Grid.java index 16b8924731..19e68a9139 100644 --- a/designer-realize/src/main/java/com/fr/grid/Grid.java +++ b/designer-realize/src/main/java/com/fr/grid/Grid.java @@ -961,7 +961,6 @@ public class Grid extends BaseGridComponent { if (!ComparatorUtils.equals_exactly(oldValue, newValue)) { if (newValue instanceof CellImage) { CellImage cellImage = (CellImage) newValue; - newValue = cellImage.getImage(); JTemplate currentEditingTemplate = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate(); currentEditingTemplate.setPictureElem(selectedFloatElement, cellImage);