-
-
Notifications
You must be signed in to change notification settings - Fork 632
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve selection and merged cell announcements in LibreOffice Calc 7.3 and above #12849
Conversation
See test results for failed build of commit 1692477c49 |
Thanks to @michaelweghorn who's doing all the great stuff at the Libre side. |
I proposed a general way to announce selection in #6959. If people agree, I want to generalize the selection approach in with a follow up. |
|
||
def gridCoordStringToNumbers(coordString): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the removal of these functions and classes going to affect add-ons?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's very unlikely I think. Add-ons should avoid using appModules directly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@feerrenrut @michaelDCurran what do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@feerrenrut - requested you review pending this discussion, and my concerns including this in 2021.3
Co-authored-by: Sean Budd <seanbudd123@gmail.com>
@LeonarddeR you wrote:
I think that this assumption is not correct. In my Outlook Extended add-on, I import the native Outlook appModule to extend its capability. The import statements are as follow:
|
Indeed, the only reason why you would like to import an appModule directly is by extending it. With my statement, I meant that it is unlikely that an add-on would import a top level function from an appModule for another reason than extending the appModule. Having said that, I think that, while we should not break NVDA API compatibility other than in Addon API version changing releases, appModules shouldn't be treated as part of the NVDA API. NVDA makes this pretty clear by design, as many objects that are app specific yet reside in the core NVDAObjects package. |
If this PR doesn't preserve API compatibility it will have to wait until 2022.1 |
I guess that depends on whether the cleanup I did in the soffice appModule for stuff that hasn't been used for years is considered API breaking? |
This PR seems otherwise ready to go, other than API breaking concerns. Will aim to merge this in early once we branch for 2022.1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the wait @LeonarddeR
Link to issue number: Fixes nvaccess#13232 Summary of the issue: Since commit 32bf54e ("Improve selection and merged cell announcements in LibreOffice Calc 7.3 and above (nvaccess#12849)"), information about selected cells in LibreOffice Calc is queried using the IAccessibleTable2 interface which is supported from LibreOffice 7.3 on. The call to the 'selectedCells' method on that interface requests a list of currently selected accessibles. Since Calc can have more than 1 billion cells, generating the accessible objects for currently selected cells can take a long time when many cells are selected. Description of how this pull request fixes the issue: Before calling the 'selectedCells' method, the number of currently selectd cells is retrieved first and the previous mechanism of announcing exact selected cells is only used if at most 2000 cells are selected. Otherwise, only the number of selected cells is announced. For the special case where all cells are selected (i.e. the number of selected cells is the same as the number of the table's children), "all cells" are reported as selected.
Link to issue number: Fixes nvaccess#13232 Summary of the issue: Since commit 32bf54e ("Improve selection and merged cell announcements in LibreOffice Calc 7.3 and above (nvaccess#12849)"), information about selected cells in LibreOffice Calc is queried using the IAccessibleTable2 interface which is supported from LibreOffice 7.3 on. The call to the 'selectedCells' method on that interface requests a list of currently selected accessibles. Since Calc can have more than 1 billion cells, generating the accessible objects for currently selected cells can take a long time when many cells are selected. Description of how this pull request fixes the issue: Before calling the 'selectedCells' method, the number of currently selectd cells is retrieved first and the previous mechanism of announcing exact selected cells is only used if at most 2000 cells are selected. Otherwise, only the number of selected cells is announced. For the special case where all cells are selected (i.e. the number of selected cells is the same as the number of the table's children), "all cells" are reported as selected.
Link to issue number: Fixes nvaccess#13232 Summary of the issue: Since commit 32bf54e ("Improve selection and merged cell announcements in LibreOffice Calc 7.3 and above (nvaccess#12849)"), information about selected cells in LibreOffice Calc is queried using the 'IAccessibleTable2' interface which is supported from LibreOffice 7.3 on. The call to the 'selectedCells' method on that interface requests a list of a11y objects for all currently selected cells, of which only the first and the last one are actually needed for the announcement of selected cells. Since Calc spreadsheets have more than a billion cells, this is inefficient when many cells are selected and resulted in Calc becoming unresponsive. Description of how this pull request fixes the issue: Instead of using the 'selectedCells' method from the 'IAccessibleTable2' interface, the first and last selected cell are now retrieved using the 'accSelection' on the 'IAccessible' object of the table, which avoids that a11y objects for all other selected cells have to be generated as well.
Fixes #13232 Summary of the issue: Since PR #12849, information about selected cells in LibreOffice Calc is queried using the 'IAccessibleTable2' interface which is supported from LibreOffice 7.3 on. The call to the 'selectedCells' method on that interface requests a list of a11y objects for all currently selected cells, of which only the first and the last one are actually needed for the announcement of selected cells. Since Calc spreadsheets have more than a billion cells, this is inefficient when many cells are selected and resulted in Calc becoming unresponsive. Description of how this pull request fixes the issue: Instead of using the 'selectedCells' method from the 'IAccessibleTable2' interface, the first and last selected cell are now retrieved using the 'accSelection' on the 'IAccessible' object of the table, which avoids that a11y objects for all other selected cells have to be generated as well. Testing strategy: use LibreOffice Calc 7.3 or above select all cells in LO Calc and check that NVDA announces coordinate + content of the first cell (A1) and the last cell (AMJ1048576) in the spreadsheet test a few other selections in the spreadsheet (use shift + arrow keys to increase/decrease selection)
Link to issue number:
Fixes #9310
Fixes #6897
Summary of the issue:
In LibreOffice calc, selection is not announced and for merged cells, only the first cell is announced.
Description of how this pull request fixes the issue:
In LibreOffice 7.3 development branch, support for IAccessibleTable2 and IAccessibleTableCell were added. This allows us to implement something that works as expected.
Daily builds that support this new functionality can be downloaded here
Testing strategy:
Known issues with pull request:
LibreOffice doesn't fire selectionRemove event properly. This is a known issue that's being investigated.
Change log entries:
Changes
Code Review Checklist: