Bug 151874 - Always block editing of „No Character Style“, also at inherit-from
Summary: Always block editing of „No Character Style“, also at inherit-from
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.3.6.2 release
Hardware: All All
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Writer-Styles-Character
  Show dependency treegraph
 
Reported: 2022-11-03 09:52 UTC by Martin Sourada
Modified: 2024-09-14 16:15 UTC (History)
4 users (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 Martin Sourada 2022-11-03 09:52:25 UTC
Currently it’s possible to edit the No Character Style even though it shouldn’t be.

Steps:
1. Modify any character style (other than the No Character Style)
2. On Organizer tab set Inherit from to No Character Style
3. Click on Edit Style
4. Change parameters of No Character Style at will
5. Click OK
6. Click Cancel

Expected outcome:
The No Character Style should not be editable in any way.

Actual outcome:
All character styles inherit the changes of No Character Style, even if they have Inherit from set to None.

Version: 7.3.6.2 (x64) / LibreOffice Community
Build ID: c28ca90fd6e1a19e189fc16c05f8f8924961e12e
CPU threads: 4; OS: Windows 10.0 Build 19043; UI render: Skia/Raster; VCL: win
Locale: cs-CZ (cs_CZ); UI: en-US
Calc: threaded
Comment 1 Heiko Tietze 2022-11-08 08:40:10 UTC
No CS means what it says: the text takes all attributes from the paragraph style. We just show the entry in the list of CS as a way to remove the applied CS. See also bug 140818 for a recent renaming.

"No Character Style" is not a style and cannot apply attributes to the text. => NAB
Comment 2 Martin Sourada 2022-11-08 08:46:03 UTC
(In reply to Heiko Tietze from comment #1)
> No CS means what it says: the text takes all attributes from the paragraph
> style. We just show the entry in the list of CS as a way to remove the
> applied CS. See also bug 140818 for a recent renaming.
> 
> "No Character Style" is not a style and cannot apply attributes to the text.
> => NAB

Except that it doesn’t. It's actually possible to edit parameters of the No Character Style while it shouldn’t. Please try the steps from OP.
Comment 3 Martin Sourada 2022-11-08 08:53:54 UTC
Also it’s worth noting that it does not survive save/open which suggests that the capability is unintentional.
Comment 4 Dieter 2022-11-08 08:54:38 UTC
Heiko, I agree with Martin. I'm not sure, if we understand problem in the same way

Steps:
1. Open a document and CS in sidebar
2. Select any CS (for example "Definition") -> NEW or MODIFY
3. Open dropdown list in "Inherit from"

Actual result:
You can choose "No character style"

Expected result:
"No character style" shouldn't be part of the list

4. Select "No character style" and press "Edit Style" (Inherit changes to "-None-" and "No character style" is not longer part of the list)

=> Back to UNCONFIRMED

Additional information: I also don't see the need, why "No character style" has "New" as entry in context menu.
Comment 5 Heiko Tietze 2022-11-08 09:08:45 UTC
True, the "No CS" should not be offered as a parent, drag 'n drop onto it needs to be blocked, and - most important - the Edit Style function in the inheritance dialog needs to be disabled for "No CS" (might not be needed if No CS is not shown anymore).

Sorry for overlooking the "(should)n't" ;-)
Comment 6 Buovjaga 2024-09-14 16:15:55 UTC
Still repro

Arch Linux 64-bit
Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: fb39ae1bc7e4b1cbfc3108efca52ec310faf7363
CPU threads: 8; OS: Linux 6.10; UI render: default; VCL: kf6 (cairo+wayland)
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: CL threaded
Built on 14 September 2024