[orca] Writer: Ensure we fall back on native headers when dynamic headers aren't set



commit 55ce9f3c4dd1ed9fc9cff4e165f1319c7754be4d
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Wed Jan 2 15:06:53 2019 -0500

    Writer: Ensure we fall back on native headers when dynamic headers aren't set

 src/orca/scripts/apps/soffice/speech_generator.py | 12 ++----------
 src/orca/speech_generator.py                      |  2 ++
 2 files changed, 4 insertions(+), 10 deletions(-)
---
diff --git a/src/orca/scripts/apps/soffice/speech_generator.py 
b/src/orca/scripts/apps/soffice/speech_generator.py
index ac0cd3d07..781127dca 100644
--- a/src/orca/scripts/apps/soffice/speech_generator.py
+++ b/src/orca/scripts/apps/soffice/speech_generator.py
@@ -293,7 +293,7 @@ class SpeechGenerator(speech_generator.SpeechGenerator):
         rowHeader, columnHeader = \
             self._script.utilities.getDynamicHeadersForCell(obj, newOnly)
         if not rowHeader:
-            return []
+            return super()._generateRowHeader(obj, **args)
 
         result = []
         text = self._script.utilities.displayedText(rowHeader)
@@ -303,10 +303,6 @@ class SpeechGenerator(speech_generator.SpeechGenerator):
 
         return result
 
-    def _generateNewRowHeader(self, obj, **args):
-        args['newOnly'] = True
-        return self._generateRowHeader(obj, **args)
-
     def _generateColumnHeader(self, obj, **args):
         """Returns an array of strings (and possibly voice and audio
         specifications) that represent the column header for an object
@@ -319,7 +315,7 @@ class SpeechGenerator(speech_generator.SpeechGenerator):
         rowHeader, columnHeader = \
             self._script.utilities.getDynamicHeadersForCell(obj, newOnly)
         if not columnHeader:
-            return []
+            return super()._generateColumnHeader(obj, **args)
 
         result = []
         text = self._script.utilities.displayedText(columnHeader)
@@ -329,10 +325,6 @@ class SpeechGenerator(speech_generator.SpeechGenerator):
 
         return result
 
-    def _generateNewColumnHeader(self, obj, **args):
-        args['newOnly'] = True
-        return self._generateColumnHeader(obj, **args)
-
     def _generateTooLong(self, obj, **args):
         """If there is text in this spread sheet cell, compare the size of
         the text within the table cell with the size of the actual table
diff --git a/src/orca/speech_generator.py b/src/orca/speech_generator.py
index 506da6739..68ac62d70 100644
--- a/src/orca/speech_generator.py
+++ b/src/orca/speech_generator.py
@@ -775,6 +775,7 @@ class SpeechGenerator(generator.Generator):
         if not self._script.utilities.cellRowChanged(obj):
             return []
 
+        args['newOnly'] = True
         return self._generateRowHeader(obj, **args)
 
     def _generateNewColumnHeader(self, obj, **args):
@@ -794,6 +795,7 @@ class SpeechGenerator(generator.Generator):
         if args.get('readingRow'):
             return []
 
+        args['newOnly'] = True
         return self._generateColumnHeader(obj, **args)
 
     def _generateRealTableCell(self, obj, **args):


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