Bug 129363 - UI: "Standard"(aka "Reset to Parent") button on "Area" tab doesn't restore inherited style settings
Summary: UI: "Standard"(aka "Reset to Parent") button on "Area" tab doesn't restore in...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.2.7.1 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Writer-Styles-Paragraph Styles-Dialog
  Show dependency treegraph
 
Reported: 2019-12-13 06:54 UTC by John
Modified: 2023-04-15 15:59 UTC (History)
5 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 John 2019-12-13 06:54:02 UTC
Description:
1. Open the properties of some paragraph style based on Default Style. For example, Table Contents.

2. Select Area tab, then select Hatch, then select red color for your hatch and then press OK to close the window.

3. Insert some table to be sure its cells have red hatch. Just for convenience.

4. Reopen the window of the Table Contents style and repeat the previous steps: select Area tab and then select Hatch. Press Standard button. Note that it doesn't reset the hatching to that of the parent style, i.e. to none.

To reset the hatching to none you need select Area tab and then None. But from now, the hatching of the Table Contents style will not inherit the hatching of its parent style. So that, if you add some hatching to Default Style, then Table Contents will not have it.

The only way I have found to fix it is to manually edit styles.xml, i.e. manually remove this:

```
<style:style style:name="Table_20_Contents" style:display-name="Table Contents" style:family="paragraph" style:parent-style-name="Standard" style:class="extra"><loext:graphic-properties draw:fill="hatch" draw:fill-hatch-name="Hatching_20_2" draw:fill-hatch-solid="false"/><style:paragraph-properties fo:background-color="#ff0000" text:number-lines="false" text:line-number="0"/></style:style>
```

The lack of this enhancement could be very frustrating for some users. They have _no_ way (except editing styles.xml) to properly reset the Area.

Steps to Reproduce:
-

Actual Results:
-

Expected Results:
-


Reproducible: Always


User Profile Reset: No



Additional Info:
Comment 1 John 2019-12-13 07:00:02 UTC
I'm not sure is it a request for an enhancement or a bug.
Comment 2 John 2020-01-06 12:21:26 UTC
As I now understand, it is actually bug. 

The "Area" tab of paragraph style window doesn't reset it to the parent style.

I change the status from enhancement to a bug. Actually, it is quite serious bug, because it can harm the inheritance system you have developed for you document. And there will be no way to fix it.
Comment 3 Xisco Faulí 2020-01-20 11:56:56 UTC
You can't confirm your own bugs. Moving it back to UNCONFIRMED until someone
else confirms it.
Comment 4 Dieter 2020-01-20 16:10:08 UTC
I confirm it with

Version: 6.5.0.0.alpha0+ (x64)
Build ID: 350d25da375f221edfa37309324ce3c68cf297ef
CPU threads: 4; OS: Windows 10.0 Build 18362; UI render: default; VCL: win; 
Locale: de-DE (de_DE); UI-Language: en-GB
Calc: threaded

Regarding to writer Help 6,0, page 192 it should work: "If you want to reset the properties of a child style to that of the parent style, click the Standard button located at the bottom of each Paragraph and Character style dialog."
Comment 5 Julien Nabet 2020-06-14 09:35:52 UTC
On pc Debian x86-64 with master sources updated today, I could reproduce this.

I also noticed this:
- modify Table contents style
- select Area tab
- select Hatch
- select red color
- click "Standard" button (so no "Ok" button first)
=> "red" is changed to "black"
but it's still "Hatch" instead of "None".

Code pointer:
https://opengrok.libreoffice.org/xref/core/sfx2/source/dialog/tabdlg.cxx?r=503e0173#462

But I must recognize I don't understand anything with pool/clearItem/invalidateItem ... mechanism.
Comment 6 Stéphane Guillou (stragu) 2021-06-14 13:35:14 UTC
Reproduced in:

Version: 7.2.0.0.alpha1+ / LibreOffice Community
Build ID: bb54d6d8241a06a6772052b77b67d6a4f686426c
CPU threads: 8; OS: Linux 4.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:master, Time: 2021-06-11_20:14:38
Calc: threaded

Note that that "Standard" button is now called "Reset to Parent".

Definitely a bug as the tooltip for the button says:

"Values on this tab specified in "Contains" on Organizer are removed"

... and the hatching settings show up in the "Contains" section, in the "Organizer" tab.

This is relevant for all other choices in the Area tab: it either does nothing, or only changes the colour instead of removing the area fill entirely (for Color and Hatch)