Skip to content

Commit 4aa8f28

Browse files
authored
Merge a16be81 into d3ba21a
2 parents d3ba21a + a16be81 commit 4aa8f28

2 files changed

Lines changed: 20 additions & 2 deletions

File tree

source/NVDAObjects/window/winword.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1402,6 +1402,9 @@ def script_tab(self,gesture):
14021402
* If not in a table, announces the distance of the caret from the left edge of the document, and any remaining text on that line.
14031403
"""
14041404
gesture.send()
1405+
self.reportTab()
1406+
1407+
def reportTab(self):
14051408
selectionObj=self.WinwordSelectionObject
14061409
inTable=selectionObj.tables.count>0 if selectionObj else False
14071410
info=self.makeTextInfo(textInfos.POSITION_SELECTION)

source/appModules/outlook.py

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import ctypes
1212
from hwPortUtils import SYSTEMTIME
1313
import scriptHandler
14+
from scriptHandler import script
1415
import winKernel
1516
import comHelper
1617
import NVDAHelper
@@ -29,6 +30,7 @@
2930
import ui
3031
from NVDAObjects.IAccessible import IAccessible
3132
from NVDAObjects.window import Window
33+
from NVDAObjects.window.winword import WordDocument as BaseWordDocument
3234
from NVDAObjects.IAccessible.winword import WordDocument, WordDocumentTreeInterceptor, BrowseModeWordDocumentTextInfo, WordDocumentTextInfo
3335
from NVDAObjects.IAccessible.MSHTML import MSHTML
3436
from NVDAObjects.behaviors import RowWithFakeNavigation, Dialog
@@ -552,7 +554,20 @@ def script_tab(self,gesture):
552554
"kb:shift+tab":"tab",
553555
}
554556

555-
class OutlookWordDocument(WordDocument):
557+
558+
class BaseOutlookWordDocument(BaseWordDocument):
559+
560+
@script(gestures=["kb:tab", "kb:shift+tab"])
561+
def script_tab(self, gesture):
562+
bookmark = self.makeTextInfo(textInfos.POSITION_SELECTION).bookmark
563+
gesture.send()
564+
info, caretMoved = self._hasCaretMoved(bookmark)
565+
if not caretMoved:
566+
return
567+
self.reportTab()
568+
569+
570+
class OutlookWordDocument(WordDocument, BaseOutlookWordDocument):
556571

557572
def _get_isReadonlyViewer(self):
558573
# #2975: The only way we know an email is read-only is if the underlying email has been sent.
@@ -575,7 +590,7 @@ def _get_role(self):
575590
ignoreEditorRevisions=True
576591
ignorePageNumbers=True # This includes page sections, and page columns. None of which are appropriate for outlook.
577592

578-
class OutlookUIAWordDocument(UIAWordDocument):
593+
class OutlookUIAWordDocument(UIAWordDocument, BaseOutlookWordDocument):
579594
""" Forces browse mode to be used on the UI Automation Outlook message viewer if the message is being read)."""
580595

581596
def _get_isReadonlyViewer(self):

0 commit comments

Comments
 (0)