UI Automation in Microsoft Word: Use move by sentence custom pattern when available instead of the legacy model (#19367)
<!-- Please read and fill in the following template, for an explanation
of the sections see:
https://github.com/nvaccess/nvda/blob/master/projectDocs/dev/githubPullRequestTemplateExplanationAndExamples.md
Please also note that the NVDA project has a Citizen and Contributor
Code of Conduct which can be found at
https://github.com/nvaccess/nvda/blob/master/CODE_OF_CONDUCT.md. NV
Access expects that all contributors and other community members read
and abide by the rules set out in this document while participating or
contributing to this project. This includes creating or commenting on
issues and pull requests.
Please initially open PRs as a draft.
When you would like a review, mark the PR as "ready for review".
See
https://github.com/nvaccess/nvda/blob/master/.github/CONTRIBUTING.md.
-->
### Link to issue number:
Closes #13517.
### Summary of the issue:
NVDA exclusively uses Word's legacy object model for sentence
navigation, even when UIA is enabled.
### Description of how this pull request fixes the issue:
Added support for the [UIA custom
extension](https://docs.microsoft.com/en-gb/office/uia/word/wordcustompatterns)
to move and expand by sentence in supported scenarios. The legacy
implementation remains as a fallback on systems without remote ops
support (Windows below 11/Cobalt platform) or older Office versions.
### Testing strategy:
Moved by sentence in a large document and verified functionality.