Skip to content

Commit 6e2cd0f

Browse files
authored
Merge fa10d40 into 81d81dc
2 parents 81d81dc + fa10d40 commit 6e2cd0f

2 files changed

Lines changed: 21 additions & 0 deletions

File tree

source/NVDAObjects/UIA/wordDocument.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
from UIAUtils import *
1919
from . import UIA, UIATextInfo
2020
from NVDAObjects.window.winword import WordDocument as WordDocumentBase
21+
from scriptHandler import script
2122

2223
"""Support for Microsoft Word via UI Automation."""
2324

@@ -302,6 +303,16 @@ def _iterNodesByType(self,nodeType,direction="next",pos=None):
302303

303304
ElementsListDialog=ElementsListDialog
304305

306+
@script(
307+
# Translators: the description for the toggleScreenLayout script.
308+
description=_("Toggles on and off if the screen layout is preserved
309+
while rendering the document content"),
310+
gesture="kb:NVDA+v",
311+
)
312+
def script_toggleScreenLayout(self, gesture):
313+
# Translators: The message reported for not supported toggling of screen layout
314+
ui.message(_("Not supported in this document."))
315+
305316
class WordDocumentNode(UIA):
306317
TextInfo=WordDocumentTextInfo
307318

source/NVDAObjects/window/winword.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1151,6 +1151,16 @@ def script_previousColumn(self,gesture):
11511151
"kb:shift+pageDown":None,
11521152
}
11531153

1154+
@script(
1155+
# Translators: the description for the toggleScreenLayout script.
1156+
description=_("Toggles on and off if the screen layout is preserved
1157+
while rendering the document content"),
1158+
gesture="kb:NVDA+v",
1159+
)
1160+
def script_toggleScreenLayout(self, gesture):
1161+
# Translators: The message reported for not supported toggling of screen layout
1162+
ui.message(_("Not supported in this document."))
1163+
11541164
class WordDocument(Window):
11551165

11561166
def winwordColorToNVDAColor(self,val):

0 commit comments

Comments
 (0)