OSDN Git Service

Remove the Microsoft Excel Cell Editor dialog for good, as it can't display dates...
authorJames Teh <jamie@jantrid.net>
Mon, 4 Jul 2011 05:17:46 +0000 (15:17 +1000)
committerJames Teh <jamie@jantrid.net>
Mon, 4 Jul 2011 05:17:46 +0000 (15:17 +1000)
The cell edit field can now be read and navigated anyway.
Fixes #1636.

source/NVDAObjects/window/excel.py
user_docs/en/changes.t2t

index 9b860a5..72db255 100755 (executable)
@@ -19,36 +19,6 @@ import scriptHandler
 \r
 xlA1 = 1\r
 \r
-class CellEditDialog(wx.Dialog):\r
-\r
-       def __init__(self,cell):\r
-               super(CellEditDialog,self).__init__(gui.mainFrame, wx.ID_ANY, title=_("NVDA Excel Cell Editor"))\r
-               self._cell=cell\r
-               mainSizer = wx.BoxSizer(wx.VERTICAL)\r
-               mainSizer.Add(wx.StaticText(self,wx.ID_ANY, label=_("Enter cell contents")))\r
-               self._cellText=wx.TextCtrl(self, wx.ID_ANY, size=(300, 200), style=wx.TE_RICH|wx.TE_MULTILINE)\r
-               self._cellText.Bind(wx.EVT_KEY_DOWN, self.onCellTextChar)\r
-               self._cellText.SetValue(self._cell.formulaLocal)\r
-               mainSizer.Add(self._cellText)\r
-               mainSizer.Add(self.CreateButtonSizer(wx.OK|wx.CANCEL))\r
-               self.Bind(wx.EVT_BUTTON,self.onOk,id=wx.ID_OK)\r
-               self.SetSizer(mainSizer)\r
-               self._cellText.SetFocus()\r
-\r
-       def onCellTextChar(self,evt):\r
-               if evt.GetKeyCode() == wx.WXK_RETURN:\r
-                       if evt.AltDown():\r
-                               i=self._cellText.GetInsertionPoint()\r
-                               self._cellText.Replace(i,i,"\n")\r
-                       else:\r
-                               self.onOk(None)\r
-                       return\r
-               evt.Skip(True)\r
-\r
-       def onOk(self,evt):\r
-               self._cell.formulaLocal=self._cellText.GetValue()\r
-               self.EndModal(wx.ID_OK)\r
-\r
 class ExcelBase(Window):\r
        """A base that all Excel NVDAObjects inherit from, which contains some useful methods."""\r
 \r
@@ -227,14 +197,6 @@ class ExcelCell(ExcelBase):
                if previous:\r
                        return ExcelCell(windowHandle=self.windowHandle,excelWindowObject=self.excelWindowObject,excelCellObject=previous)\r
 \r
-       def script_editCell(self,gesture):\r
-               gui.runScriptModalDialog(\r
-                       CellEditDialog(self.excelWindowObject.ActiveCell))\r
-\r
-       __gestures = {\r
-               "kb:f2": "editCell",\r
-       }\r
-\r
 class ExcelSelection(ExcelBase):\r
 \r
        role=controlTypes.ROLE_GROUPING\r
index 9f0d306..3312754 100644 (file)
@@ -80,7 +80,6 @@ Highlights of this release include major improvements concerning punctuation and
 - The selected state of selectable table rows is now reported the same way it is for list and tree view items.\r
 - Controls in Firefox and other Gecko applications can now be activated while in browse mode even if their content has been floated off-screen. (#801)\r
 - You can no longer show an NVDA settings dialog while a message dialog is being shown, as the settings dialog was frozen in this case. (#1451)\r
-- Reinstated the NVDA Excel Cell Editor dialog which was accidentally disabled in NVDA 2011.1.\r
 - In Microsoft Excel, there is no longer a lag when holding down or rapidly pressing keys to move between or select cells.\r
 - Fixed intermittent crashes of the NVDA service which meant that NVDA stopped running on secure Windows screens.\r
 - Fixed problems that sometimes occurred with braille displays when a change caused text that was being displayed to disappear. (#1377)\r