Skip to content

Libre Office: Fix German heading formatting commands#17836

Merged
seanbudd merged 2 commits into
nvaccess:masterfrom
CyrilleB79:germanFix
Mar 27, 2025
Merged

Libre Office: Fix German heading formatting commands#17836
seanbudd merged 2 commits into
nvaccess:masterfrom
CyrilleB79:germanFix

Conversation

@CyrilleB79

@CyrilleB79 CyrilleB79 commented Mar 17, 2025

Copy link
Copy Markdown
Contributor

Link to issue number:

Fix-up of #17153.

Summary of the issue:

When modifying heading style with ctrl+1/2/3/4/5 or turning back to body text with ctrl+0, other formatting changes might be reported in languages where "ctrl" is translated differently, e.g. "Strg" in German.

Description of user facing changes

Only style and no other associated formatting changes should be reported when modifying heading styles with ctrl+1/2/3/4/5 or turning back to body text with ctrl+0.

Description of development approach

Do not use the displayName property to define which type of gesture we are dealing with, Use modifierNames and mainKeyName properties instead since they are not translated.

Testing strategy:

Manual tests done by @michaelweghorn (see #17836 (comment)).

Known issues with pull request:

If in any language other gestures than ctrl+1/2/3/4/5/0 are used, this code is not be valid. In this case, a specific script should be made for heading/body text formatting.

For now I think that it's not the case (confirmed by @michaelweghorn in #17836 (comment)), so there is no point in developing specific code for a theoretical situation.

Code Review Checklist:

  • Documentation:
    • Change log entry
    • User Documentation
    • Developer / Technical Documentation
    • Context sensitive help for GUI changes
  • Testing:
    • Unit tests
    • System (end to end) tests
    • Manual testing
  • UX of all users considered:
    • Speech
    • Braille
    • Low Vision
    • Different web browsers
    • Localization in other languages / culture than English
  • API is compatible with existing add-ons.
  • Security precautions taken.

@coderabbitai summary

@CyrilleB79

Copy link
Copy Markdown
Contributor Author

@michaelweghorn I have found this potential issue reading soffice's code, but have not experimented myself. Indeed, I have only a portable LO 24.8, but reporting headings formatting is only available from 25.2 onwards.

Could you tests with and without this PR, launching NVDA in German (command line: nvda --lang=de)? Are both the issue and the fix confirmed? Thanks.

@CyrilleB79

Copy link
Copy Markdown
Contributor Author

@Adriani90 are you a German Libre Office user or have you the opportunity to test? (before and after this PR) Required minimal LO version is 25.2.

@CyrilleB79 CyrilleB79 changed the title LO: Fix German heading formatting commands Libre Office: Fix German heading formatting commands Mar 19, 2025
@michaelweghorn

Copy link
Copy Markdown
Contributor

@michaelweghorn I have found this potential issue reading soffice's code, but have not experimented myself. Indeed, I have only a portable LO 24.8, but reporting headings formatting is only available from 25.2 onwards.

Could you tests with and without this PR, launching NVDA in German (command line: nvda --lang=de)? Are both the issue and the fix confirmed? Thanks.

@CyrilleB79 Thanks! I can confirm the previous check wouldn't work when using German language, while this here does.
(I did local test modifications because the announcement was still fine without those changes in practice in my setup, but that is "by chance": Only the first change (formatting-related button/combobox/... value change) is announced and this presumably happens to be the "Paragraph Style" combobox in my setup, but that's not something to rely on, as it's not at all guaranteed. Checking whether the code path is taken as expected by adding extra output etc. confirms your observation.)

Known issues with pull request:

If in any language other gestures than ctrl+1/2/3/4/5/0 are used, this code is not be valid. In this case, a specific script should be made for heading/body text formatting.

For now I think that it's not the case, so there is no point in developing specific code for a theoretical situation.

@michaelweghorn could you confirm this?

Yes, that's my understanding, too, as I see no language/locale-specific modifications for these in LibreOffice's officecfg/registry/data/org/openoffice/Office/Accelerators.xcu.

@CyrilleB79 CyrilleB79 marked this pull request as ready for review March 21, 2025 07:04
@CyrilleB79 CyrilleB79 requested a review from a team as a code owner March 21, 2025 07:04
@CyrilleB79 CyrilleB79 requested a review from seanbudd March 21, 2025 07:04
@CyrilleB79

Copy link
Copy Markdown
Contributor Author

Adding to 2025.1 milestone since it is a fix-up of #17153 which was merged during 2025.1 dev cycle.

@CyrilleB79 CyrilleB79 added this to the 2025.1 milestone Mar 26, 2025
@seanbudd seanbudd merged commit eb867b5 into nvaccess:master Mar 27, 2025
@CyrilleB79 CyrilleB79 deleted the germanFix branch March 28, 2025 12:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants