From 48f4dbb2e3eed98e283047bac4f5d8ff8f813e06 Mon Sep 17 00:00:00 2001 From: kerry Date: Tue, 22 Nov 2016 17:30:41 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-747=20=E5=8D=95=E5=85=83=E6=A0=BC?= =?UTF-8?q?=E6=8B=B7=E8=B4=9D=E5=8F=AF=E5=A4=8D=E5=88=B6=E5=AE=BD=E9=AB=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cell/clipboard/CellElementsClip.java | 20 ++++++++++++++++--- designer/src/com/fr/grid/GridUtils.java | 2 +- .../com/fr/grid/selection/CellSelection.java | 2 +- 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/designer/src/com/fr/design/cell/clipboard/CellElementsClip.java b/designer/src/com/fr/design/cell/clipboard/CellElementsClip.java index 89015286da..44621af89d 100644 --- a/designer/src/com/fr/design/cell/clipboard/CellElementsClip.java +++ b/designer/src/com/fr/design/cell/clipboard/CellElementsClip.java @@ -17,12 +17,16 @@ import com.fr.report.elementcase.TemplateElementCase; * The clip of CellElement. */ public class CellElementsClip implements Cloneable, java.io.Serializable { + private int column; + private int row; private int columnSpan = 0; private int rowSpan = 0; private TemplateCellElement[] clips; - public CellElementsClip(int columnSpan, int rowSpan, TemplateCellElement[] clips) { + public CellElementsClip(int column, int row, int columnSpan, int rowSpan, TemplateCellElement[] clips) { + this.column = column; + this.row = row; this.columnSpan = columnSpan; this.rowSpan = rowSpan; @@ -81,10 +85,20 @@ public class CellElementsClip implements Cloneable, java.io.Serializable { column + cellElement.getColumn(), row + cellElement.getRow() ), false); } - + //设置单元格的宽高 + pasteWidthAndHeight(ec, column, row, columnSpan, rowSpan); return new CellSelection(column, row, columnSpan, rowSpan); } - + + public void pasteWidthAndHeight(TemplateElementCase ec, int column, int row, int columnSpan, int rowSpan){ + for(int i = 0; i