Bug 158128 - Writer - Changes tab saves the Mark configuration incorrectly compared to documentation
Summary: Writer - Changes tab saves the Mark configuration incorrectly compared to doc...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
24.2.0.0 alpha0+
Hardware: All All
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Options-Dialog
  Show dependency treegraph
 
Reported: 2023-11-09 10:28 UTC by Gabor Kelemen (allotropia)
Modified: 2023-11-27 09:13 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gabor Kelemen (allotropia) 2023-11-09 10:28:42 UTC
The documentation of the Writer/Revision/LinesChanged/Mark key says the possible values are 0-4:

https://cgit.freedesktop.org/libreoffice/core/tree/officecfg/registry/schema/org/openoffice/Office/Writer.xcs#n2549

However the code of the Options - Writer - Changes dialog saves (and loads) the value set in the Mark dropdown as text::HoriOrientation type, which does not match the value range in the documentation.

This is unnecessary, and makes it more difficult to create lockdown extensions pre-setting this to some value.

1. Open Writer, go to Options - Writer - Changes
2. In the Mark dropdown select the Right margin option. Press OK, restart Writer.
3. Open Options - Advanced - Expert Configuration
4. Search for LinesChanged
-> the Mark key has value 1 instead of the documented 2. 
Setting the Left Margin option results in a value of 3 instead of the documented 1.
Setting the Outer Margin option results in a value of 5 instead of the documented 3.
Setting the Inner Margin option results in a value of 4, matching the documented 4.
Setting the None option results in a value of 0, matching the documented 0.

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 97b6b6b16c4b623f8a34393a906272439a7f0314
CPU threads: 8; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: hu-HU (hu_HU.UTF-8); UI: hu-HU
Calc: threaded
Comment 1 Gabor Kelemen (allotropia) 2023-11-09 10:31:37 UTC
Mentioned dialog code is:

https://cgit.freedesktop.org/libreoffice/core/tree/sw/source/ui/config/optpage.cxx#n1771

SwRedlineOptionsTabPage::FillItemSet
SwRedlineOptionsTabPage::Reset

Storing the items position in the dropdown would match the documentation.
Comment 2 Buovjaga 2023-11-27 09:13:29 UTC
Repro.

Working link to documentation:
https://opengrok.libreoffice.org/xref/core/officecfg/registry/schema/org/openoffice/Office/Writer.xcs?r=88487227#2320

Arch Linux 64-bit, X11
Version: 24.2.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: 86c682273d907c77404637c89e584047de1c1099
CPU threads: 8; OS: Linux 6.6; UI render: default; VCL: kf5 (cairo+xcb)
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: threaded
Built on 27 November 2023