Skip to content

Commit

Permalink
Merge pull request #16597 from nvaccess/beta
Browse files Browse the repository at this point in the history
Beta to master
  • Loading branch information
seanbudd authored May 23, 2024
2 parents e9b3157 + b37ed5a commit 4c53f4a
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 10 deletions.
13 changes: 13 additions & 0 deletions source/NVDAObjects/UIA/wordDocument.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from typing import (
Optional,
Dict,
Generator,
)

import enum
Expand Down Expand Up @@ -38,6 +39,7 @@
from scriptHandler import script
import eventHandler
from globalCommands import SCRCAT_SYSTEMCARET
import documentBase

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

Expand Down Expand Up @@ -514,6 +516,17 @@ def _iterNodesByType(self,nodeType,direction="next",pos=None):

ElementsListDialog=ElementsListDialog

def _iterTextStyle(
self,
kind: str,
direction: documentBase._Movement = documentBase._Movement.NEXT,
pos: textInfos.TextInfo | None = None
) -> Generator[browseMode.TextInfoQuickNavItem, None, None]:
raise NotImplementedError(
"word textInfos are not supported due to multiple issues with them - #16569"
)


class WordDocumentNode(UIA):
TextInfo=WordDocumentTextInfo

Expand Down
12 changes: 12 additions & 0 deletions source/NVDAObjects/window/winword.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from typing import (
Optional,
Dict,
Generator,
TYPE_CHECKING,
)

Expand Down Expand Up @@ -44,6 +45,7 @@
from . import _msOfficeChart
import locationHelper
from enum import IntEnum
import documentBase

if TYPE_CHECKING:
import inputCore
Expand Down Expand Up @@ -1253,6 +1255,16 @@ def script_previousColumn(self,gesture):
self.rootNVDAObject._moveInTable(row=False,forward=False)
braille.handler.handleCaretMove(self)

def _iterTextStyle(
self,
kind: str,
direction: documentBase._Movement = documentBase._Movement.NEXT,
pos: textInfos.TextInfo | None = None
) -> Generator[browseMode.TextInfoQuickNavItem, None, None]:
raise NotImplementedError(
"word textInfos are not supported due to multiple issues with them - #16569"
)

__gestures={
"kb:tab":"trapNonCommandGesture",
"kb:shift+tab":"trapNonCommandGesture",
Expand Down
11 changes: 11 additions & 0 deletions source/appModules/outlook.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@
from NVDAObjects.UIA import UIA
from NVDAObjects.UIA.wordDocument import WordDocument as UIAWordDocument
import languageHandler
from typing import Generator
import documentBase
import browseMode

PR_LAST_VERB_EXECUTED=0x10810003
VERB_REPLYTOSENDER=102
Expand Down Expand Up @@ -605,6 +608,14 @@ def script_tab(self,gesture):
speech.speakTextInfo(info, reason=controlTypes.OutputReason.FOCUS)
braille.handler.handleCaretMove(self)

def _iterTextStyle(
self,
kind: str,
direction: documentBase._Movement = documentBase._Movement.NEXT,
pos: textInfos.TextInfo | None = None
) -> Generator[browseMode.TextInfoQuickNavItem, None, None]:
raise NotImplementedError("Outlook is not supported due to performance - #16408")

__gestures={
"kb:tab":"tab",
"kb:shift+tab":"tab",
Expand Down
8 changes: 0 additions & 8 deletions source/browseMode.py
Original file line number Diff line number Diff line change
Expand Up @@ -2370,14 +2370,6 @@ def _iterTextStyle(
direction: documentBase._Movement = documentBase._Movement.NEXT,
pos: textInfos.TextInfo | None = None
) -> Generator[TextInfoQuickNavItem, None, None]:
from NVDAObjects.window.winword import BrowseModeWordDocumentTextInfo
if isinstance(pos, BrowseModeWordDocumentTextInfo):
raise NotImplementedError(
"non-UIA word textInfos are not supported due to multiple issues with them - #16569"
)
from appModules.outlook import OutlookUIAWordDocument
if isinstance(api.getFocusObject(), OutlookUIAWordDocument):
raise NotImplementedError("Outlook is not supported due to performance - #16408")
if direction not in [
documentBase._Movement.NEXT,
documentBase._Movement.PREVIOUS,
Expand Down
4 changes: 2 additions & 2 deletions source/locale/en/symbols.dic
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ complexSymbols:
; phrase ending (?<=[^\s;]);(?=\s|$)
: phrase ending (?<=[^\s:]):(?=\s|$)
# Series of dots used for visual presentation, e.g. in table of contents
padding . \.{4,}
multiple . \.{4,}
# Others
decimal point (?<![^\d -])\.(?=\d)
in-word ' (?<=[^\W_])['’]
Expand All @@ -27,7 +27,7 @@ symbols:
? sentence ending question all always
; phrase ending semi most always
: phrase ending colon most always
padding . padding dots all always
multiple . multiple dots all always
decimal point none always
in-word ' tick all norep
negative number minus none norep
Expand Down

0 comments on commit 4c53f4a

Please sign in to comment.