From 65c38b21d2e1e3b01ebd47f753b2724eabb7259e Mon Sep 17 00:00:00 2001 From: vito Date: Tue, 8 Aug 2017 19:06:09 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=9A=E5=8F=91=E7=8E=B0=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E4=BA=86=E4=B8=80=E4=B8=AACellFormulaQuickEditor=EF=BC=8C?= =?UTF-8?q?=E8=BF=99=E6=A0=B7=E6=96=87=E5=AD=97=E5=92=8C=E5=85=AC=E5=BC=8F?= =?UTF-8?q?=E5=8F=AF=E4=BB=A5=E5=88=86=E5=BC=80=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/quickeditor/cellquick/CellFormulaQuickEditor.java | 7 +++++++ .../fr/quickeditor/cellquick/CellStringQuickEditor.java | 7 +------ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/designer/src/com/fr/quickeditor/cellquick/CellFormulaQuickEditor.java b/designer/src/com/fr/quickeditor/cellquick/CellFormulaQuickEditor.java index 07e2367eaf..0edadfc321 100644 --- a/designer/src/com/fr/quickeditor/cellquick/CellFormulaQuickEditor.java +++ b/designer/src/com/fr/quickeditor/cellquick/CellFormulaQuickEditor.java @@ -3,6 +3,8 @@ package com.fr.quickeditor.cellquick; import com.fr.base.Formula; import com.fr.base.Style; import com.fr.base.TextFormat; +import com.fr.design.actions.core.ActionFactory; +import com.fr.design.actions.insert.cell.FormulaCellAction; import com.fr.design.gui.itextfield.UITextField; import com.fr.grid.selection.CellSelection; import com.fr.quickeditor.CellQuickEditor; @@ -77,6 +79,11 @@ public class CellFormulaQuickEditor extends CellQuickEditor { return content; } + @Override + public Object getComboBoxSelected() { + return ActionFactory.createAction(FormulaCellAction.class); + } + private void changeReportPaneCell(String tmpText) { isEditing = true; diff --git a/designer/src/com/fr/quickeditor/cellquick/CellStringQuickEditor.java b/designer/src/com/fr/quickeditor/cellquick/CellStringQuickEditor.java index 68ce13eeff..f525682870 100644 --- a/designer/src/com/fr/quickeditor/cellquick/CellStringQuickEditor.java +++ b/designer/src/com/fr/quickeditor/cellquick/CellStringQuickEditor.java @@ -3,8 +3,6 @@ package com.fr.quickeditor.cellquick; import com.fr.base.Formula; import com.fr.base.Style; import com.fr.base.TextFormat; -import com.fr.design.actions.core.ActionFactory; -import com.fr.design.actions.insert.cell.FormulaCellAction; import com.fr.design.gui.itextfield.UITextField; import com.fr.grid.selection.CellSelection; import com.fr.quickeditor.CellQuickEditor; @@ -25,7 +23,6 @@ import java.awt.event.KeyEvent; */ public class CellStringQuickEditor extends CellQuickEditor { - private Object selectedItem; //instance private static CellStringQuickEditor THIS; //文本域 @@ -101,7 +98,6 @@ public class CellStringQuickEditor extends CellQuickEditor { textFormula.setReserveInResult(reserveInResult); textFormula.setReserveOnWriteOrAnaly(reserveOnWriteOrAnaly); cellElement.setValue(textFormula); - selectedItem = ActionFactory.createAction(FormulaCellAction.class); } else { Style style = cellElement.getStyle(); if (style != null && style.getFormat() != null && style.getFormat() == TextFormat.getInstance()) { @@ -109,7 +105,6 @@ public class CellStringQuickEditor extends CellQuickEditor { } else { cellElement.setValue(ReportHelper.convertGeneralStringAccordingToExcel(tmpText)); } - selectedItem = null; } fireTargetModified(); stringTextField.requestFocus(); @@ -158,7 +153,7 @@ public class CellStringQuickEditor extends CellQuickEditor { @Override public Object getComboBoxSelected() { - return selectedItem; + return null; } } \ No newline at end of file