From 9f5ceb14347af4448aeeb082c345d4b6438115c6 Mon Sep 17 00:00:00 2001 From: Michael Curran Date: Fri, 9 Feb 2024 10:20:09 +1000 Subject: [PATCH] MS word object model browse mode: native selection mode is on by default a and cannot be turned off, so ensure the toggle message reflects this. (#16151) Follow up from #16129 Fixes #16097 Summary of the issue: Selecting text in Browse mode in Microsoft Word moves the physical selection. Thus it is the equivalent to native selection mode. Pr #16129 ensured that Browse mode in MS word with UI Automation took this into account and made the toggle message report that native selection mode could not be turned off. However this has not been done for MS Word object model, and NVDA states that native selection mode is unsupported. Description of user facing changes When trying to toggle native selection mode in Browse mode in MS Word when not using UI Automation, NvDA will correctly state that native selection mode cannot be turned off. When copying text with control+c in browse mode in MS Word when not using UI Automation, formatting is now also copied. Description of development approach Set browse mode for MS Word object model's _nativeAppSelectionMode to True. --- source/NVDAObjects/window/winword.py | 1 + 1 file changed, 1 insertion(+) diff --git a/source/NVDAObjects/window/winword.py b/source/NVDAObjects/window/winword.py index f0160640a4b..ca6d77db4bb 100755 --- a/source/NVDAObjects/window/winword.py +++ b/source/NVDAObjects/window/winword.py @@ -1167,6 +1167,7 @@ def _get_focusableNVDAObjectAtStart(self): class WordDocumentTreeInterceptor(browseMode.BrowseModeDocumentTreeInterceptor): TextInfo=BrowseModeWordDocumentTextInfo + _nativeAppSelectionMode = True def _activateLongDesc(self,controlField): longDesc=controlField.get('longdescription')