[orca/gnome-3-30] Work around Writer docs claiming to implement the selection interface



commit 5f89e540df3b15f189c40efefce6cdb8f97a22a2
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Sat Sep 29 09:07:00 2018 -0400

    Work around Writer docs claiming to implement the selection interface

 src/orca/scripts/apps/soffice/script.py | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/src/orca/scripts/apps/soffice/script.py b/src/orca/scripts/apps/soffice/script.py
index 1a74cf72e..29325b8a5 100644
--- a/src/orca/scripts/apps/soffice/script.py
+++ b/src/orca/scripts/apps/soffice/script.py
@@ -937,6 +937,10 @@ class Script(default.Script):
     def whereAmISelection(self, inputEvent=None, obj=None):
         obj = obj or orca_state.locusOfFocus
         if not self.utilities.isSpreadSheetCell(obj):
+            if self.utilities.inDocumentContent(obj):
+                # Because for some reason, the document implements the selection
+                # interface as if it were a spreadsheet or listbox. *sigh*
+                return super()._whereAmISelectedText(inputEvent, obj)
             return super().whereAmISelection(inputEvent, obj)
 
         return self.utilities.speakSelectedCellRange(self.utilities.getTable(obj))


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]