Skip to content

Commit

Permalink
MS word object model browse mode: native selection mode is on by defa…
Browse files Browse the repository at this point in the history
…ult 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.
  • Loading branch information
michaelDCurran authored Feb 9, 2024
1 parent 464cce6 commit 9f5ceb1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions source/NVDAObjects/window/winword.py
Original file line number Diff line number Diff line change
Expand Up @@ -1167,6 +1167,7 @@ def _get_focusableNVDAObjectAtStart(self):
class WordDocumentTreeInterceptor(browseMode.BrowseModeDocumentTreeInterceptor):

TextInfo=BrowseModeWordDocumentTextInfo
_nativeAppSelectionMode = True

def _activateLongDesc(self,controlField):
longDesc=controlField.get('longdescription')
Expand Down

0 comments on commit 9f5ceb1

Please sign in to comment.