Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 0 additions & 19 deletions source/NVDAObjects/window/winword.py
Original file line number Diff line number Diff line change
Expand Up @@ -1372,24 +1372,6 @@ def script_increaseDecreaseFontSize(self,gesture):
# Translators: a message when increasing or decreasing font size in Microsoft Word
ui.message(_("{size:g} point font").format(size=val))

def script_toggleChangeTracking(self, gesture):
if not self.WinwordDocumentObject:
# We cannot fetch the Word object model, so we therefore cannot report the status change.
# The object model may be unavailable because this is a pure UIA implementation such as Windows 10 Mail,
# or it's within Windows Defender Application Guard.
# In this case, just let the gesture through and don't report anything.
return gesture.send()
val = self._WaitForValueChangeForAction(
lambda: gesture.send(),
lambda: self.WinwordDocumentObject.TrackRevisions
)
if val:
# Translators: a message when toggling change tracking in Microsoft word
ui.message(_("Change tracking on"))
else:
# Translators: a message when toggling change tracking in Microsoft word
ui.message(_("Change tracking off"))

@script(gesture="kb:control+shift+8")
def script_toggleDisplayNonprintingCharacters(self, gesture):
if not self.WinwordWindowObject:
Expand Down Expand Up @@ -1514,7 +1496,6 @@ def initOverlayClass(self):
"kb:control+1":"changeLineSpacing",
"kb:control+2":"changeLineSpacing",
"kb:control+5":"changeLineSpacing",
"kb:control+shift+e": "toggleChangeTracking",
"kb:control+pageUp": "caret_moveByLine",
"kb:control+pageDown": "caret_moveByLine",
}
Expand Down
42 changes: 42 additions & 0 deletions source/appModules/winword.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# A part of NonVisual Desktop Access (NVDA)
# This file is covered by the GNU General Public License.
# See the file COPYING for more details.
# Copyright (C) 2019-2020 NV Access Limited, Cyrille Bougot

""" App module for Microsoft Word.
Word and Outlook share a lot of code and components. This app module gathers the code that is relevant for
Microsoft Word only.
"""

import appModuleHandler
from scriptHandler import script
import ui
from NVDAObjects.IAccessible.winword import WordDocument


class AppModule(appModuleHandler.AppModule):

def chooseNVDAObjectOverlayClasses(self, obj, clsList):
if WordDocument in clsList:
clsList.insert(0, WinwordWordDocument)


class WinwordWordDocument(WordDocument):

@script(gesture="kb:control+shift+e")
def script_toggleChangeTracking(self, gesture):
if not self.WinwordDocumentObject:
# We cannot fetch the Word object model, so we therefore cannot report the status change.
# The object model may be unavailable because it's within Windows Defender Application Guard.
# In this case, just let the gesture through and don't report anything.
return gesture.send()
val = self._WaitForValueChangeForAction(
lambda: gesture.send(),
lambda: self.WinwordDocumentObject.TrackRevisions
)
if val:
# Translators: a message when toggling change tracking in Microsoft word
ui.message(_("Change tracking on"))
else:
# Translators: a message when toggling change tracking in Microsoft word
ui.message(_("Change tracking off"))
2 changes: 2 additions & 0 deletions user_docs/en/changes.t2t
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,14 @@ What's New in NVDA
- A freeze of several seconds experienced by a small amount of users when arrowing between cells in Excel should no longer occur. (#11818)
- In Microsoft Teams builds with version numbers like 1.3.00.28xxx, NVDA no longer fails reading messages in chats or Teams channels due to an incorrectly focused menu. (#11821)
- Text marked both as being a spelling and grammar error at the same time in Google Chrome will be appropriately announced as both a spelling and grammar error by NVDA. (#11787)
- When using Outlook (French locale), the shortcut for 'Reply all' (control+shift+R) works again. (#11196)


== Changes for Developers ==
- System tests can now send keys using spy.emulateKeyPress, which takes a key identifier that conforms to NVDA's own key names, and by default also blocks until the action is executed. (#11581)
- NVDA no longer requires the current directory to be the NVDA application directory in order to function. (#6491)
- The aria live politeness setting for live regions can now be found on NVDA Objects using the liveRegionPoliteness property. (#11596)
- It is now possible to define separate gestures for Outlook and Word document. (#11196)


= 2020.3 =
Expand Down