Skip to content

Commit

Permalink
Merge branch 't4878'. Fixes #4878
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelDCurran committed Oct 6, 2015
2 parents 0276d24 + 3227282 commit b2715ca
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
17 changes: 17 additions & 0 deletions source/NVDAObjects/window/excel.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import collections
import oleacc
import ui
import speech
from tableUtils import HeaderCellInfo, HeaderCellTracker
import config
import textInfos
Expand Down Expand Up @@ -987,6 +988,22 @@ def callback(result):
self.excelCellObject.addComment(d.Value)
gui.runScriptModalDialog(d, callback)

def reportFocus(self):
# #4878: Excel specific code for speaking format changes on the focused object.
info=self.makeTextInfo(textInfos.POSITION_FIRST)
info.expand(textInfos.UNIT_CHARACTER)
formatField=textInfos.FormatField()
formatConfig=config.conf['documentFormatting']
for field in info.getTextWithFields(formatConfig):
if isinstance(field,textInfos.FieldCommand) and isinstance(field.field,textInfos.FormatField):
formatField.update(field.field)
if not hasattr(self.parent,'_formatFieldSpeechCache'):
self.parent._formatFieldSpeechCache={}
text=speech.getFormatFieldSpeech(formatField,attrsCache=self.parent._formatFieldSpeechCache,formatConfig=formatConfig) if formatField else None
if text:
speech.speakText(text)
super(ExcelCell,self).reportFocus()

__gestures = {
"kb:NVDA+shift+c": "setColumnHeader",
"kb:NVDA+shift+r": "setRowHeader",
Expand Down
1 change: 1 addition & 0 deletions user_docs/en/changes.t2t
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

== New Features ==
- NVDA now appears in the Ease of Access Center in Windows 8 and later. (#308)
- When moving around cells in Excel, formatting changes are now automatically reported if the appropriate options are turned on in NVDA's Document Formatting Settings dialog. (#4878)


== Bug Fixes ==
Expand Down

0 comments on commit b2715ca

Please sign in to comment.