GNOME Bugzilla – Bug 361167
Add dynamic row and column header support in Orca for StarOffice/OpenOffice calc.
Last modified: 2006-10-14 15:23:04 UTC
The Orca user requirements have the following: "The user should be able to dinamically set a row or column as a header in openoffice calc. The hot keys for defining this will be insert+r for row and insert+c for column. In order to set a row or column the user should first set focus to the row or column that they wish to define and then press the appropriate hot key. Once the user has defined a row or column it will be used to first speak this header when moving between rows or columns. This will behave similar to the way orca reads headers in the evolution mail list when moving focus from column to column. For example, if row c is defined as headers the appropriate cell will first be read before reading the cell with focus when the column is changed."
Created attachment 74442 [details] [review] Patch to implement the enhancement. I've implemented two things beyond what is specified in the Orca User Requirements document: 1/ A "double-click" of Insert-r or Insert-c with clear the dynamic row or column. 2/ This new functionality is available as both braille and speech.
Changes checked into CVS HEAD. Bug closed as FIXED. If there is any tweaking required, please let me know.
Created attachment 74497 [details] [review] Adjustment to the way the dynamic rows/columns are spoken/brailled. The StarOffice.py scripts now subclasses _getBrailleRegionsForTableCellRow and _getSpeechForTableCellRow, so that we can braille/speak the dynamic headers (if present) only once per row, per the rules of how headers should be read.
Changes checked into CVS HEAD. Will, if you'd like me to use the equivalent of self.getText() in the SpeechGenerator and BrailleGenerator classes in StarOffice.py, please give me a clue on how to do this.
Hi Rich: Last night, I refactored the braille and speech generators to take the script as an argument. This allows the generator to delegate to the script for stuff like getText. All checked in (and working, I hope!).
Created attachment 74577 [details] [review] Further adjustments based on Will's feedback > The dynamic column header is only announced if you change columns (similar for rows). > Implementation confused what was row headers and what was column headers. They have now been reversed.
New changes checked into CVS. Still closed as FIXED. ;-)
Created attachment 74654 [details] [review] Yet more tweaking of this feature. More slight adjustments based on feedback from Will (thanks): * Reversed Insert-r and Insert-c hot-keys and improved the wording of the "help" for learn mode for these two hot-keys. * Adjusted a couple of names to make the code more understandable. * Adjusted a couple of comments to make the code more understandable.
New changes checked into CVS HEAD.
Created attachment 74685 [details] [review] Patch to allow row 0 and column 0 to be headers There was a small bug in the implementation - if row 0 or column 0 were specified to be used as headers, they would not be used. The problem is the result of needing to detect whether something has been specified as a header or not, and a non-None check was being used. I think this was the result of using the double-click to "clear" a table entry by setting the entry value to None. Since a check for None and 0 have the same result, 0-based row/col headers would not work. This patch uses "del" on the table entry for double-click, removing it completely from the table. This allows the check to be simplified to whether or not the table entry exists or not.