Bug 124152 - Paragraph child styles not updated in realtime after modifying "Default style" in "Styles" panel
Summary: Paragraph child styles not updated in realtime after modifying "Default style...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.2 all versions
Hardware: All All
: medium minor
Assignee: Jim Raykowski
URL:
Whiteboard: target:6.4.0 target:6.3.0.1
Keywords:
Depends on:
Blocks: Sidebar-Styles
  Show dependency treegraph
 
Reported: 2019-03-18 13:10 UTC by rafael.linux.user
Modified: 2019-11-04 12:30 UTC (History)
3 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 rafael.linux.user 2019-03-18 13:10:29 UTC
Description:
If user modifies "default style" font to another font, change is not reflected instantly on "Styles panel", but when user click on each paragraph style name or user resize "Styles and format" window or user minimizes and restore Writer window.

Steps to Reproduce:
1.Access to "Styles" panel
2.Right click on "Default style" , then "Modify" and appear "Paragraph Style: Style"
3.Click "Font" tab and select some very distint font.
4.Click "OK"


Actual Results:
Styles names doesn't change aspect to the new selected font.

Expected Results:
Paragraphs on document changes accordly to the new font, however, "Styles" panel styles names doesn't change (till you click on each one or resize styles window)


Reproducible: Always


User Profile Reset: No


OpenGL enabled: Yes

Additional Info:
[Information automatically included from LibreOffice]
Locale: es
Module: TextDocument
[Information guessed from browser]
OS: Linux (All)
OS is 64bit: yes
Comment 1 Xisco Faulí 2019-03-20 23:13:59 UTC
Thanks for reporting this issue.
Is the option 'Show previews' at the bottom of the sidebar activated ?
Comment 2 rafael.linux.user 2019-03-21 10:28:08 UTC
In fact, I tried the issue in the official LibreOffice version for OpenSUSE 15 and with the "fresh" AppImage. In both, the option you mentioned was enabled.

;)
Comment 3 Xisco Faulí 2019-04-12 10:58:23 UTC
Could you please paste the info from Help - about LibreOffice ?
Comment 4 rafael.linux.user 2019-04-12 11:12:47 UTC
From repositories
Versión: 6.1.3.2
Id. de compilación: 10(Build:2)
Subprocs. CPU: 4; SO: Linux 4.12; Repres. IU: predet.; VCL: gtk3_kde5; 
Configuración regional: es-ES (es_ES.UTF-8); 
Calc: threaded

But as I commented, it happens in the AppImage too:
Versión: 6.2.1.2
Id. de compilación: 7bcb35dc3024a62dea0caee87020152d1ee96e71
Subprocs. CPU: 4; SO: Linux 4.12; Repres. IU: predet.; VCL: kde5; 
Configuración regional: es-ES (es_ES.UTF-8); Idioma de IU: es-ES
Calc: threaded
Comment 5 QA Administrators 2019-05-08 21:48:16 UTC Comment hidden (obsolete)
Comment 6 Xisco Faulí 2019-05-09 09:12:56 UTC
Do you reproduce it if you launch LibreOffice from the commandline with SAL_USE_VCLPLUGIN=gtk3 libreoffice ?
Comment 7 rafael.linux.user 2019-05-09 10:45:54 UTC
I just tried it now. It doesn't solve the issue. And I can CONFIRM that the same occurs in Windows 10 with latest stable LibreOffice version in 20 PCs in a classroom.
Comment 8 QA Administrators 2019-05-14 03:03:12 UTC Comment hidden (obsolete)
Comment 9 Dieter 2019-05-15 20:38:27 UTC
I can't confirm with

Version: 6.3.0.0.alpha1+ (x64)
Build ID: e92dcfdc7bd7b237e0bee26ff226a102d9e8e766
CPU threads: 4; OS: Windows 10.0; UI render: GL; VCL: win; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2019-05-14_00:00:57
Locale: en-US (de_DE); UI-Language: en-US
Calc: threaded

and also not with

Version: 6.2.3.2 (x64)
Build-ID: aecc05fe267cc68dde00352a451aa867b3b546ac
CPU-Threads: 4; BS: Windows 10.0; UI-Render: GL; VCL: win; 
Gebietsschema: de-DE (de_DE); UI-Sprache: de-DE
Calc: threaded

I could change font to Vivaldi.
Comment 10 rafael.linux.user 2019-05-16 09:40:05 UTC
I never talk about I was not able to change the font, in any way. I wrote that (in your case) just after you change the font in the "Styles" panel, child styles appearance (according to the new font) are not immediately showed with the new font style in the "Styles" panel. That's the fact. Is not related to the possibility to change the font, is about change is not reflected after user change window dimensions.
Comment 11 Dieter 2019-05-16 11:55:58 UTC
(In reply to rafael.linux.user from comment #10)
> I never talk about I was not able to change the font, in any way. I wrote
> that (in your case) just after you change the font in the "Styles" panel,
> child styles appearance (according to the new font) are not immediately
> showed with the new font style in the "Styles" panel. That's the fact. Is
> not related to the possibility to change the font, is about change is not
> reflected after user change window dimensions.

Rafael, from your bug report it was not clear to me, that you're talking about the child styles. Here I can confirm the behaviour you describe.
Comment 12 rafael.linux.user 2019-05-16 12:41:07 UTC
You have reason, Dieter. My fault. When I wrote the issue I didn't mentioned the "child", cause I thought it was obvious to the eyes that the whole styles should change according to the parent and that doesn't happen.

I'll try to change the title of the bug to clarify the bug.

Thank you
Comment 13 Xisco Faulí 2019-05-22 16:17:31 UTC
Also reproduced in

Version: 5.2.0.0.alpha1+
Build ID: 5b168b3fa568e48e795234dc5fa454bf24c9805e
CPU Threads: 4; OS Version: Linux 4.15; UI Render: default; 
Locale: ca-ES (ca_ES.UTF-8)

The issue get fixed if the sidebar is hidden and then displayed.

@Jim, I thought you might be interested in this issue...
Comment 14 Jim Raykowski 2019-05-23 09:19:40 UTC
Xisco, Thanks for letting me know about this one. Here is a one line patch, actually two if you include the 'else'. Not thoroughly tested but reading the code it seems to be what has been missing that has caused this bug.
https://gerrit.libreoffice.org/#/c/72826/
Comment 15 rafael.linux.user 2019-05-23 11:41:31 UTC
(In reply to Xisco Faulí from comment #13)
> Also reproduced in
> 
> Version: 5.2.0.0.alpha1+
> Build ID: 5b168b3fa568e48e795234dc5fa454bf24c9805e
> CPU Threads: 4; OS Version: Linux 4.15; UI Render: default; 
> Locale: ca-ES (ca_ES.UTF-8)
> 
> The issue get fixed if the sidebar is hidden and then displayed.
> 
> @Jim, I thought you might be interested in this issue...

That's a workaround (the same that I commented simply resizing the "styles" window) not a fix.
Comment 16 Xisco Faulí 2019-05-23 12:07:56 UTC
(In reply to rafael.linux.user from comment #15)

> That's a workaround (the same that I commented simply resizing the "styles"
> window) not a fix.

Do not panic, Jim already has a fix for it
Comment 17 Xisco Faulí 2019-05-23 14:56:49 UTC
(In reply to Jim Raykowski from comment #14)
> Xisco, Thanks for letting me know about this one. Here is a one line patch,
> actually two if you include the 'else'. Not thoroughly tested but reading
> the code it seems to be what has been missing that has caused this bug.
> https://gerrit.libreoffice.org/#/c/72826/

Hi jim,
I do confirm your commit fix the issue, however, if I use Ctrl+z after modifying the script, the same problem is seen. I guess that's another issue ?
Comment 18 Jim Raykowski 2019-05-24 03:18:17 UTC
(In reply to Xisco Faulí from comment #17)
> I do confirm your commit fix the issue, however, if I use Ctrl+z after
> modifying the script, the same problem is seen. I guess that's another issue
> ?

I've added to the patch to make undo redo work as expected. I think it needs looked over by those with higher understanding LO undo redo. This is my first go in this area of the code.
Comment 19 Commit Notification 2019-06-05 08:35:54 UTC
Jim Raykowski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/0d6ec494f83fb26524bf3a5fc7af27c225293e87%5E%21

tdf#124152 Broadcast StyleSheetModified to update style tree list box

It will be available in 6.4.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 20 Commit Notification 2019-06-06 21:23:32 UTC
Jim Raykowski committed a patch related to this issue.
It has been pushed to "libreoffice-6-3":

https://git.libreoffice.org/core/+/ea3d32fc359a30216dac8fb0b9b79bb9d616026b%5E%21

tdf#124152 Broadcast StyleSheetModified to update style tree list box

It will be available in 6.3.0.1.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 21 Dieter 2019-07-03 16:43:57 UTC
Works for all styles except "Heading" (with childs) and "Preformatted text". Tested with

Version: 6.4.0.0.alpha0+ (x64)
Build ID: ae823e4633a76d13cebc6432b9e44b9b2862326b
CPU threads: 4; OS: Windows 10.0; UI render: GL; VCL: win; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2019-06-26_23:06:07
Locale: de-DE (de_DE); UI-Language: en-US
Calc: threaded
Comment 22 Timothy Rooney 2019-11-01 15:54:59 UTC
I guess I should download 6.4.0.0 to check this for myself. At any rate, the problem I encountered seems similar to what is described here. I am trying to change the font color in a table from black to Default. The change to the font color is not saved when I perform all the steps that should save those changes. I expect the fix that save the change of the actual font would now also save a change to the font color. Without testing, I don't know if this is the case. Please consider also testing that the implemented fix does now also save changes to the default font color so that Automatic can be selected as the color instead of black.
Comment 23 Jim Raykowski 2019-11-02 03:26:14 UTC
(In reply to Dieter Praas from comment #21)
> Works for all styles except "Heading" (with childs) and "Preformatted text".
> Tested with
> 
Hi Dieter, I think the Headings and "Preformatted text" do not change when Default style font is changed because these styles have fonts already. I found pressing the Standard button when on the Font tab page in the Paragraph Style dialog will remove the font set for the style and use the inherited from, in this case Default style font. Check out the Organizer tab for Headings and Preformatted text before and after the Standard button is pressed in the Font tab page. I just learned this by trying to figure out why the font doesn't change for these styles as you reported. HTH
Comment 24 Jim Raykowski 2019-11-02 03:58:02 UTC
(In reply to Timothy Rooney from comment #22)
> I guess I should download 6.4.0.0 to check this for myself. At any rate, the
> problem I encountered seems similar to what is described here. I am trying
> to change the font color in a table from black to Default. The change to the
> font color is not saved when I perform all the steps that should save those
> changes. I expect the fix that save the change of the actual font would now
> also save a change to the font color. Without testing, I don't know if this
> is the case. Please consider also testing that the implemented fix does now
> also save changes to the default font color so that Automatic can be
> selected as the color instead of black.

Hi Timothy, 

Please open a new bug report for this with detailed steps for reproduction. Here is a link for help on how to report a bug so as to give others the best opportunity to help solve.

https://wiki.documentfoundation.org/QA/BugReport
Comment 25 Dieter 2019-11-04 12:30:06 UTC
(In reply to Jim Raykowski from comment #23)
> Hi Dieter, I think the Headings and "Preformatted text" do not change when
> Default style font is changed because these styles have fonts already. I
> found pressing the Standard button when on the Font tab page in the
> Paragraph Style dialog will remove the font set for the style and use the
> inherited from, in this case Default style font. Check out the Organizer tab
> for Headings and Preformatted text before and after the Standard button is
> pressed in the Font tab page.

Thank you for investigating. => VERIFIED FIXED