Bug 94307 - Child automatic character styles not recalculated correctly on reopening document
Summary: Child automatic character styles not recalculated correctly on reopening docu...
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Writer-Styles-Character
  Show dependency treegraph
 
Reported: 2015-09-17 11:05 UTC by matthias.sonstiges
Modified: 2023-10-29 22:31 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Example document and screenshots (200.29 KB, application/zip)
2015-09-17 11:05 UTC, matthias.sonstiges
Details

Note You need to log in before you can comment on or make changes to this bug.
Description matthias.sonstiges 2015-09-17 11:05:18 UTC
Created attachment 118793 [details]
Example document and screenshots

Version: 5.0.1.2
Build ID: 00m0(Build:2)
Locale: en-US (C)

There seems to be an issue with automatic formatting after reopen a prepared document. I tried this with "character style". If two styles are linked the text is correctly formatted but after reopen the document one style is not correctly set.

If this is done with "paragraph style", everything is working fine. The paragraphs are formatted correctly after reopen the document.

Instruction to reproduce the issue with "character style": 
Create style one and format some text area with that style one.
Create second style, based on style one. Format another text area with that style two.
Change setting in style two to set the font size "- 2 pt" realtive to style one.
-> The second text area is correclty formatted after apply that style.
Save and close the document.
Open the document.
-> The second text area is set to style two but it is not formatted in that way.
-> After open the style two properties and apply once again the text area two is formatted correctly.

Screenshot description:
01: Prepared text. First sentence is formatted with style "text_bold".
02: Create new style, based on style "text_bold".
03: Set style "text" to second sentence.
04: Both sentences are formatted correctly. Sentence two (style "text") has font size "- 2 pt" based on font size of style "text_bold".
05: Document was saved. Reload now.
06: The second sentence is not formatted as expected (style "text"). The font size should be "- 2 pt" based on style "text_bold" but is seems to be smaller.
07: Open settings for style "text".
08: Apply settings by simply click on "OK".
09: The second sentence (style "text") is correclty formatted after apply the style once again.

LL_issue_char_style.odt: Document to reproduce.
Comment 1 Yousuf Philips (jay) (retired) 2015-09-20 11:52:05 UTC
Hello matthias,

Thank you for reporting the bug. I can confirm that the bug is present in master.

Version: 5.1.0.0.alpha1+
Build ID: cbf3fac0a5a1be34b2e1a58da959debd24ebc017
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2015-09-17_07:03:22
Locale: en-US (en_US.UTF-8)
Comment 2 matthias.sonstiges 2016-09-25 05:26:35 UTC
OS: Windows 7
Version: 5.2.1.2
Build ID: 31dd62db80d4e60af04904455ec9c9219178d620
Locale: de-DE (de_DE)

Still open with written LO version. The problem seems not (only) to be the reload of the document.

Again, the problem is only seen with character style, not paragraph style!

Example to reproduce.
* Create a new character style "style_1".
* Set a font size of 20 pt for character style "style_1".
* Assign a text area to "style_1".
-> The text assigned to character style "style_1" is formatted with font size of 20 pt, this is correct.
* Create a new character style "style_2", based on "style_1".
* Set a font size of "-2 pt" for character style "style_2", means a relative value.
* Assign a second text area to "style_2".
-> The text assigned to character style "style_2" is correctly formatted with font size of 18 pt (20 - 2 pt).
* Change font size settings of character style "style_1" to 30 pt and apply.
-> The font size of the text based on style_1 is changed to 30 pt but font size of the text based on style_2 is not changed to 28 pt (30 - 2 pt). That's the bug!
Comment 3 Xisco Faulí 2017-09-29 08:52:40 UTC Comment hidden (obsolete)
Comment 4 matthias.sonstiges 2017-10-03 10:37:22 UTC
Version: 5.3.6.1
Build-ID: 1:5.3.6~rc1-0ubuntu0.16.04.1~lo0
CPU-Threads: 2; BS-Version: Linux 4.10; UI-Render: Standard; VCL: gtk3; Layout-Engine: neu; 
Gebietsschema: de-DE (de_DE.UTF-8); Calc: CL

Still open with written LO version. The problem seems not (only) to be the reload of the document. Solution could be to automatically apply all character formattings after opening/reloading a writer file.
Comment 5 Yousuf Philips (jay) (retired) 2017-10-04 18:59:08 UTC
Regina, Maxim: Any thoughts on why this is happening?
Comment 6 Regina Henschel 2017-10-04 19:56:39 UTC
No, don't know. But it is surely a bug.
The token "font-size-rel" is assigned to XML_FONT_SIZE_REL. But for that I do not find, where it is actually used.
Comment 7 QA Administrators 2018-10-05 02:52:30 UTC Comment hidden (obsolete)
Comment 8 matthias.sonstiges 2018-10-05 20:57:52 UTC
Version: 6.0.6.2
Build-ID: 1:6.0.6-0ubuntu0.16.04.1
CPU-Threads: 4; BS: Linux 4.15; UI-Render: Standard; VCL: gtk3; 
Gebietsschema: de-DE (de_DE.UTF-8); Calc: group

Still open with mentioned LL version.
Comment 9 QA Administrators 2019-10-06 03:17:44 UTC Comment hidden (obsolete)
Comment 10 matthias.sonstiges 2019-10-12 09:16:02 UTC
Version: 6.3.1.2 (x86)
Build-ID: b79626edf0065ac373bd1df5c28bd630b4424273
CPU-Threads: 1; BS: Windows 6.1; UI-Render: Standard; VCL: win; 
Gebietsschema: de-DE (de_DE); UI-Sprache: de-DE
Calc: threaded

I tested the portable Version of LO and on a windows system (instead of linux, which was base for this ticket). This is because i don't want to install the newest version on my productive linux system.

Steps:
Download example document.
Open the document with LO Writer
-> Formatting of text with style_2 is wrong
Open format settings of style_2 and apply setting
-> Formatting is correct
Reload document
-> Formatting is wrong

Result: Still open with mentioned LO version.
Comment 11 QA Administrators 2021-10-12 03:54:04 UTC Comment hidden (obsolete)
Comment 12 matthias.sonstiges 2021-10-17 22:38:40 UTC
Version: 7.2.1.2 / LibreOffice Community
Build ID: 2c9f9a7aa7c967a1b7ec3448959cff87b32f6580
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3
Locale: de-DE (de_DE.UTF-8); UI: de-DE
Calc: threaded

Still present with the mentioned Linux LibreOffice Version.
Comment 13 QA Administrators 2023-10-18 03:14:59 UTC Comment hidden (obsolete)
Comment 14 matthias.sonstiges 2023-10-29 22:31:34 UTC
Solved. Tested with following LibreOffice Version. Thx!

Version: 7.6.2.1 (X86_64) / LibreOffice Community
Build ID: 56f7684011345957bbf33a7ee678afaf4d2ba333
CPU threads: 12; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: de-DE (de_DE.UTF-8); UI: de-DE
Flatpak
Calc: threaded