Fix Excel cell formatting reporting#15100
Conversation
|
@CyrilleB79, could you please have a test? |
|
Tested from source (commit eeb7e49) with one property having default value (underline) and one property having no specific default value (font size). I confirm that the reported issue is fixed, i.e. moving from cell to cell reports the property only when it changes. However I can see a non critical change of behaviour with the following STR:
At last step, with NVDA 2023.1, we can hear: "Sheet2 table 11.0 pt underline The cell's content". With this PR instead, we can hear: "Sheet2 table The cell's content", i.e. formatting is not reported again. |
|
@CyrilleB79 Thanks for testing. I think that finding, though it is a change, is consistent with how this happens in Word. For example:
|
No, I disagree. With your STR, in Word, it does not report immediately when leaving the ribbon. But if you ensure that the word "Hello" is not selected, e.g. just put the caret between the two l's of "Hello", you will have "underline" reported as soon as you leave the ribbon. |
|
Well if you insist, I can certainly look into this.
|
I actually can't reproduce this. For me the behavior is that underline is reported properly.
NVDA ssays: sheet 1 table underlined hello A1. |
|
Sorry, my STR was not complete enough. If you take your STR, add the following steps to reproduce the issue: Or alternatively: |
eeb7e49 to
7c6b1db
Compare
7c6b1db to
be1222f
Compare
|
Never mind, the approach I used was way to complex. I changed this pr with a two lines fix that should work as expected. |
Setting |
CyrilleB79
left a comment
There was a problem hiding this comment.
Good job! Seems all fine to me.
Link to issue number:
Fixes #15091
Summary of the issue:
Pr #14984 broke Excel cell formatting reporting in such a way that it would always report all formatting, regardless of whether the formatting changed between cells.
Description of user facing changes
Ensure that cell formatting isn't repeated needlessly.
Description of development approach
When getting the selection in script_changeSelection, override the parent of the selection with self. This ensures that the format field cache on the work sheet will persist when moving through cells.
Testing strategy:
Test the str from #15091
Known issues with pull request:
None known
Change log entries:
None needed, issue regressed after 2023.1.
Code Review Checklist: