Skip to content

Allow quick navigation for spelling errors in MS Word using w and shift+w#7258

Merged
michaelDCurran merged 9 commits into
nvaccess:masterfrom
BabbageCom:i6942
Jun 23, 2017
Merged

Allow quick navigation for spelling errors in MS Word using w and shift+w#7258
michaelDCurran merged 9 commits into
nvaccess:masterfrom
BabbageCom:i6942

Conversation

@LeonarddeR

Copy link
Copy Markdown
Collaborator

Link to issue number:

#6942

Summary of the issue:

Currently, there is no effective way in MS Word to list and navigate spelling errors. There is the alt+f7 key stroke, but activating that automatically pop ups the context menu to change the particular error.

Description of how this pull request fixes the issue:

This pull request adds a new quick navigation command for errors, bound to the letter w. Consult the discussion in #6942 for more details about how we made this decision.

The error command navigates to spelling and grammatical errors in Word. Also, errors have been added to the Word elements list and can be listed there.

Testing performed:

Purposely made some grammar and spelling mistakes. I was able to jump through those with w (forwards) and shift+w (backwards). Also, I was able to list them in the elements list. Spelling errors which are part of grammatical errors are shown at a sub level in the elements list tree, as expected.

Known issues with pull request:

Spelling and grammar checking while typing should have been enabled in Word for this feature to work correctly. Spelling error checking is enabled by default, for grammar, this doesn't seem to be the case. should we document this?

Change log entry:

@LeonarddeR LeonarddeR changed the title ALlow quick navigation for spelling and grammatical errors in MS Word using w and shift+w Allow quick navigation for spelling and grammatical errors in MS Word using w and shift+w Jun 6, 2017

@michaelDCurran michaelDCurran left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good. But:
In the past we added support for reportting gramma errors in Microsoft Word. But from the change log:
Removed reporting of grammar errors, as this causes crashes in Microsoft Word. (#5954, #5877)
It is possible that this usage out-of-process will not cause a crash, but this must be tested on Windows XP to make sure.
The safest option would be for now to only support spelling errors.

return browseMode.mergeQuickNavItemIterators([spellingErrors,grammaticalErrors],direction)
elif nodeType=="graphic":
return GraphicWinWordCollectionQuicknavIterator(nodeType,self,direction,rangeObj,includeCurrent).iterate()
return GraphicWinWordCollectionQuicknavIterator(nodeType,self,direction,rangeObj,includeCurrent).iterate()

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did this line change?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See above, another extra space here which shouldn't exist

return browseMode.mergeQuickNavItemIterators([comments,revisions],direction)
elif nodeType in ("table","container"):
return TableWinWordCollectionQuicknavIterator(nodeType,self,direction,rangeObj,includeCurrent).iterate()
return TableWinWordCollectionQuicknavIterator(nodeType,self,direction,rangeObj,includeCurrent).iterate()

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did this line change?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was, probably by accident, indented with two tabs and one space, I removed the space to bring this in line with other return statements here.

@LeonarddeR

Copy link
Copy Markdown
Collaborator Author

It is possible that this usage out-of-process will not cause a crash, but this must be tested on Windows XP to make sure.

What has Windows Xp to do with this, if I may ask? I don't see any references to XP in #5954

The safest option would be for now to only support spelling errors.

I agree, however that would mean we'd never test this properly.

How about an incubation in Next and asking people (e.g. on NVDA devel) to specifically test this feature with multiple versions of Office? We'd make sure that this has been tested somewhat more thoroughly before merging. A try build might be a viable alternative.

Of course I'd be happy to remove support for grammatical errors if desired, but it feels a bit like choosing de path of least resistance here, which doesn't necessarily have to be bad of course.

@michaelDCurran

michaelDCurran commented Jun 7, 2017 via email

Copy link
Copy Markdown
Member

@LeonarddeR

LeonarddeR commented Jun 7, 2017 via email

Copy link
Copy Markdown
Collaborator Author

@michaelDCurran

michaelDCurran commented Jun 7, 2017 via email

Copy link
Copy Markdown
Member

Leonard de Ruijter added 2 commits June 7, 2017 08:41
…ext of the spelling error in a similar way to how this is done for comments and revisions
@LeonarddeR

Copy link
Copy Markdown
Collaborator Author

@michaelDCurran: re 0730972

I think this approach is a bit nicer than the one I used before with super, but if you disagree, I'm happy to roll this back.

@LeonarddeR LeonarddeR changed the title Allow quick navigation for spelling and grammatical errors in MS Word using w and shift+w Allow quick navigation for spelling errors in MS Word using w and shift+w Jun 7, 2017
michaelDCurran added a commit that referenced this pull request Jun 8, 2017
@michaelDCurran michaelDCurran merged commit 8782a7b into nvaccess:master Jun 23, 2017
@nvaccessAuto nvaccessAuto added this to the 2017.3 milestone Jun 23, 2017
jcsteh added a commit that referenced this pull request Aug 14, 2017
… comments in future.

1. Translators reported that some new translatable strings introduced in PR #7258 were missing translator comments. Add translator comments for these.
2. Add some code (`checkPot`) to check for missing translator comments in the translation template (pot). For now, we have a set of expected failures, since fixing all existing 87 messages that don't have translator comments is going to take some work. However, we want to fail for any new messages that get introduced without comments.
3. Run `checkPot` as part of `scons tests`. This means tests (and thus builds) will fail so we learn about these problems early.
4. `checkPot` can also be run alone with `scons checkPot`.
5. Now that `scons tests` runs `checkPot` (which depends on `pot`), don't explicitly run `scons pot` on AppVeyor.
jcsteh added a commit that referenced this pull request Aug 14, 2017
… comments in future.

1. Translators reported that some new translatable strings introduced in PR #7258 were missing translator comments. Add translator comments for these.
2. Add some code (`checkPot`) to check for missing translator comments in the translation template (pot). For now, we have a set of expected failures, since fixing all existing 87 messages that don't have translator comments is going to take some work. However, we want to fail for any new messages that get introduced without comments.
3. Run `checkPot` as part of `scons tests`. This means tests (and thus builds) will fail so we learn about these problems early.
4. `checkPot` can also be run alone with `scons checkPot`.
5. Now that `scons tests` runs `checkPot` (which depends on `pot`), don't explicitly run `scons pot` on AppVeyor.
jcsteh added a commit that referenced this pull request Aug 14, 2017
… comments in future.

1. Translators reported that some new translatable strings introduced in PR #7258 were missing translator comments. Add translator comments for these.
2. Add some code (`checkPot`) to check for missing translator comments in the translation template (pot). For now, we have a set of expected failures, since fixing all existing 87 messages that don't have translator comments is going to take some work. However, we want to fail for any new messages that get introduced without comments.
3. Run `checkPot` as part of `scons tests`. This means tests (and thus builds) will fail so we learn about these problems early.
4. `checkPot` can also be run alone with `scons checkPot`.
5. Now that `scons tests` runs `checkPot` (which depends on `pot`), don't explicitly run `scons pot` on AppVeyor.
@dkager

dkager commented Oct 9, 2017

Copy link
Copy Markdown
Contributor

The "errors" radio button in the elements list in Word is missing a capital "E". Seems worth fixing for cosmetic reasons, but not worth a PR.

@LeonarddeR LeonarddeR added the BabbageWork Pull requests filed on behalf of Babbage B.V. label Oct 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

BabbageWork Pull requests filed on behalf of Babbage B.V.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants