-
-
Notifications
You must be signed in to change notification settings - Fork 615
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
Excel: A sound is played when typing into protected cells rather than speaking typed characters #6571
Conversation
…hen typing into protected cells.
@feerrenrut: review please. |
@@ -1155,6 +1156,15 @@ def _get_states(self): | |||
states.add(controlTypes.STATE_UNLOCKED) | |||
return states | |||
|
|||
def event_typedCharacter(self,ch): | |||
# # 6570: You cannot type into protected cells. | |||
# A part from speaking characters being miss-leading, Office 2016 protected view doubles characters as well. |
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.
minor: "Apart" rather than "A part"
@@ -1155,6 +1156,15 @@ def _get_states(self): | |||
states.add(controlTypes.STATE_UNLOCKED) | |||
return states | |||
|
|||
def event_typedCharacter(self,ch): | |||
# # 6570: You cannot type into protected cells. |
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.
minor: there is a space between the hash symbol and the issue number.
# # 6570: You cannot type into protected cells. | ||
# A part from speaking characters being miss-leading, Office 2016 protected view doubles characters as well. | ||
# Therefore for any non-control char on protected cells, play the default sound rather than speaking the character | ||
if ord(ch)>26 and controlTypes.STATE_UNLOCKED not in self.states and controlTypes.STATE_PROTECTED in self.parent.states: |
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.
It would be helpful if 26 was a named value. Is it the first printable character code?
How about this @feerrenrut? I addressed the comment issues, but I changed the numeric value into a space. I can add a constant if you think it is really necessary... |
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.
Looks good to me.
Fixes #6570