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