Bug 136339 - Standard (aka "Reset to Parent") button in paragraph styles doesn't function for the highlighting tab (does not switch between "None" and "Color")
Summary: Standard (aka "Reset to Parent") button in paragraph styles doesn't function ...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.1.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Styles-Dialog
  Show dependency treegraph
 
Reported: 2020-08-31 18:58 UTC by Telesto
Modified: 2024-04-24 16:48 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file (15.73 KB, application/vnd.oasis.opendocument.text)
2020-08-31 18:58 UTC, Telesto
Details
Settings in Organizer tab and white background and text color in Styles sidebar (99.48 KB, image/png)
2020-10-11 14:08 UTC, Thomas Lendo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2020-08-31 18:58:11 UTC
Description:
Standard button in paragraph styles doesn't function for the highlighting tab

Steps to Reproduce:
1. open the attached file
2. Sidebar -> Text Body -> Modify -> Highlighting tab
3. Press Standard

Actual Results:
Nothing

Expected Results:
Reset to 'inherited style' (Default style


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.1.0.0.alpha0+ (x64)
Build ID: 1e0cfd5662d95cea84e80e4fe10d52c3b1101ae6
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: default; VCL: win
Locale: nl-NL (nl_NL); UI: en-US
Calc: CL
Comment 1 Telesto 2020-08-31 18:58:28 UTC
Created attachment 164934 [details]
Example file
Comment 2 Thomas Lendo 2020-10-11 14:03:29 UTC
I can confirm that in Highlighting and Area fill tab, settings are not being set back to the inherited style settings bug and something remains in the Organizer tab. For example when using Standard button in the Highlighting tab, "White,Not Transparent" remains.

Negative side effect is, that in the Styles sidebar with activated preview, both the background and text color are white!

PS: In LibreOffice 3.3.0 there is no Highlighting tab at all and there was no Area fill tab but a simple background tab, so this must be a regression.
Comment 3 Thomas Lendo 2020-10-11 14:08:38 UTC
Created attachment 166267 [details]
Settings in Organizer tab and white background and text color in Styles sidebar

Maybe the source issue caused also bug 135871.
Comment 4 Stéphane Guillou (stragu) 2021-06-14 13:41:18 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

As the description talks only about the "Highlighting" tab, and as Bug 129363 already focuses on the "Area" tab, changing the title to only refer to the former.
Comment 5 Glen Campbell 2024-04-19 20:38:45 UTC
I started to work on this several days ago and I could reproduce it at that time. I have since updated to the latest in the code base and I can not reproduce this now. That is, pressing the "reset to parent" button causes the yellow highlighting to reset to white and the character color remains black. I hate to say something is "magically fixed", but perhaps someone did some unrelated work that accomplished the fix here. stephane.guillou@libreoffice.org - could you please retest to confirm and close if so?

Of course, the "standard" button is now the "reset to parent" button.
Comment 6 Stéphane Guillou (stragu) 2024-04-22 07:14:01 UTC
(In reply to Glen Campbell from comment #5)
> perhaps someone did
> some unrelated work that accomplished the fix here.
> could you please retest to confirm
Indeed, if both parent and child use a highlight colour, "Reset to Parent" does work. I also see it fixed in 24.2.2.2, whereas it does not work in 7.6.6.3. This can be tested in the sample document with e.g. "First Line Indent", changing its highlight colour, then resetting to its parent's (Body Text).

However, if I follow the steps in comment 0, it is not completely fixed: the parent (Default Paragraph Style) uses "None" in the Highlighting tab, whereas the child (Body Text) uses a colour. Clicking "Reset to Parent" applies a white highlight colour, which is not correct. It should change the Highlighting from "Color" to "None".

The relevant commit is:

commit 167fb166e4097c4a855c08a70cdf70c19d4d87ac
author	Jim Raykowski Tue Oct 17 17:21:33 2023 -0800
committer	Jim Raykowski Fri Nov 03 03:18:38 2023 +0100
tdf#157801 Fix direct formatting is applied after pressing OK in the
Character properties dialog when the Highlighting tab Color page is
open and the color has not been changed
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158100

... which corresponds to build [642a7091b9e1e4eceaba9c350bd64f653b647845] in linux-64-24.2 bibisect repo.

Jim, thanks for the side-effect fix!

Let's keep this report open as "Reset to Parent" should also change from "Color" to "None" in this case (instead of applying a white highlight).
Comment 7 Glen Campbell 2024-04-24 12:31:16 UTC
(In reply to Stéphane Guillou (stragu) from comment #6)
> (In reply to Glen Campbell from comment #5)
> > perhaps someone did
> > some unrelated work that accomplished the fix here.
> > could you please retest to confirm
> Indeed, if both parent and child use a highlight colour, "Reset to Parent"
> does work. I also see it fixed in 24.2.2.2, whereas it does not work in
> 7.6.6.3. This can be tested in the sample document with e.g. "First Line
> Indent", changing its highlight colour, then resetting to its parent's (Body
> Text).
> 
> However, if I follow the steps in comment 0, it is not completely fixed: the
> parent (Default Paragraph Style) uses "None" in the Highlighting tab,
> whereas the child (Body Text) uses a colour. Clicking "Reset to Parent"
> applies a white highlight colour, which is not correct. It should change the
> Highlighting from "Color" to "None".
> 
> The relevant commit is:
> 
> commit 167fb166e4097c4a855c08a70cdf70c19d4d87ac
> author	Jim Raykowski Tue Oct 17 17:21:33 2023 -0800
> committer	Jim Raykowski Fri Nov 03 03:18:38 2023 +0100
> tdf#157801 Fix direct formatting is applied after pressing OK in the
> Character properties dialog when the Highlighting tab Color page is
> open and the color has not been changed
> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158100
> 
> ... which corresponds to build [642a7091b9e1e4eceaba9c350bd64f653b647845] in
> linux-64-24.2 bibisect repo.
> 
> Jim, thanks for the side-effect fix!
> 
> Let's keep this report open as "Reset to Parent" should also change from
> "Color" to "None" in this case (instead of applying a white highlight).

I had an interesting conversation with heiko.tietze@documentfoundation.org on https://bugs.documentfoundation.org/show_bug.cgi?id=135834. Should I employ the multi-step process as described there, or something else? Or is this "over-engineering"?
Comment 8 Stéphane Guillou (stragu) 2024-04-24 12:50:15 UTC
(In reply to Glen Campbell from comment #7)
> I had an interesting conversation with heiko.tietze@documentfoundation.org
> on https://bugs.documentfoundation.org/show_bug.cgi?id=135834. Should I
> employ the multi-step process as described there, or something else? Or is
> this "over-engineering"?
"Reset to Parent" is distinct to "Reset". As you can see, you have both buttons in the Style dialog.

- "Reset" resets the setting to whatever it was when the dialog/tab was opened. I think I agree with the resolution in bug 135834: it should only apply to the current tab. No need for a two-step process (which is Heiko's point, I believe).
- On the other hand, "Reset to Parent" has the clear role of "use whatever setting is used by the parent style". E.g., if the child uses Highlighting > Color, and the parent has Highlighting > None, "Reset to Parent" should switch to None.
Comment 9 Glen Campbell 2024-04-24 16:48:03 UTC
(In reply to Stéphane Guillou (stragu) from comment #8)
> - "Reset" resets the setting to whatever it was when the dialog/tab was
> opened. I think I agree with the resolution in bug 135834: it should only
> apply to the current tab. No need for a two-step process (which is Heiko's
> point, I believe).
> - On the other hand, "Reset to Parent" has the clear role of "use whatever
> setting is used by the parent style". E.g., if the child uses Highlighting >
> Color, and the parent has Highlighting > None, "Reset to Parent" should
> switch to None.

OK - will look into it.