Skip to content

Commit 156c4f6

Browse files
authored
Merge 1412782 into 81d81dc
2 parents 81d81dc + 1412782 commit 156c4f6

2 files changed

Lines changed: 19 additions & 0 deletions

File tree

source/NVDAObjects/UIA/wordDocument.py

Lines changed: 10 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,15 @@ 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 while rendering the document content"),
309+
gesture ="kb:NVDA+v",
310+
)
311+
def script_toggleScreenLayout(self, gesture):
312+
#translators: The message reported for not supported toggling of screen layout
313+
ui.message(_("Not supported in this document."))
314+
305315
class WordDocumentNode(UIA):
306316
TextInfo=WordDocumentTextInfo
307317

source/NVDAObjects/window/winword.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1151,6 +1151,15 @@ 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 while rendering the document content"),
1157+
gesture ="kb:NVDA+v",
1158+
)
1159+
def script_toggleScreenLayout(self, gesture):
1160+
#translators: The message reported for not supported toggling of screen layout
1161+
ui.message(_("Not supported in this document."))
1162+
11541163
class WordDocument(Window):
11551164

11561165
def winwordColorToNVDAColor(self,val):

0 commit comments

Comments
 (0)