Bug 109029 - Character style percentage font sizes are not updated automatically
Summary: Character style percentage font sizes are not updated automatically
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.3.3.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Font-Size
  Show dependency treegraph
 
Reported: 2017-07-09 06:15 UTC by Kenneth Hanson
Modified: 2023-03-14 12:18 UTC (History)
2 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 Kenneth Hanson 2017-07-09 06:15:36 UTC
Description:
With paragraph styles it is possible to create a nested hierarchy of styles with percentage font sizes, where the percentage is calculated based on the parent style. These values are automatically updated when the parent value changes.

Character styles ought to work the same way, but they don't. Bug 108498, Comment 4 states:

> It should be based on its parent style.
> 
> It is in ODF 20.183fo:font-size
> "In contrast to XSL, percentage values can be used within common styles only
> and are based on the font height of the parent style rather than to the font
> height of the attributes neighborhood. Absolute font heights and relative
> font heights are not supported."
> 
> So with the current fo:font-size it is not possible to base the character
> font-size on the paragraph in which the character is, which gets this style
> applied.
> 
> The percent values is written to file and the percent value is calculated,
> when the style is defined in the beginning. But the text in the document is
> not updated, when the font-size of the parent character style is changed.
> 
> If you revisit the character Font dialog page and click on OK without any
> changes, then the text in the document is updated.

There are several problems with this. The issue in this bug is the fact that child styles do not update to reflect changes in the parent. (The fact that the values displayed by the interface are misleading given the actual behavior, and the fact that the advice in the last paragraph fails in certain circumstances will be addressed separately, if need be.)

The fact that percentage font sizes in character styles do not work like they do in paragraph styles is confusing to the user.

Also, the need to have to manually update all child styles almost completely defeats the purpose of having percentage font sizes at all. I can't see anything in the ODF spec that implies that there should be a difference, either in the quote above or elsewhere (I looked as best I could).

Can we get the character style behavior changed to match paragraph styles? If so, the other issues I mentioned will be taken care of as well.


Steps to Reproduce:
1. Create a character style with a parent and a percentage font size.
2. Change the parent font size

Actual Results:  
The child style font size does not change

Expected Results:
The child style font size should change


Reproducible: Always

User Profile Reset: 

Additional Info:


User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:54.0) Gecko/20100101 Firefox/54.0
Comment 1 RGB 2017-07-09 11:29:57 UTC
I can confirm the problem on 5.3.4. 

I created two character styles, the second a child of the first one with font set at 200%. After applying the second style to some text I went to the first character style and changed the font from 12pt to 24pt. Result: the text with the second character style did not change. Finally I entered the second character style and clicked on "OK" without changing anything: only then the text with the second character style was updated.

Note that the style preview on the sidebar is updated, but the style applied on the text is not. Only when you edit the child style the system recognize the changes on the parent style.
Comment 2 QA Administrators 2018-07-10 02:36:50 UTC Comment hidden (obsolete)
Comment 3 Regina Henschel 2018-07-10 08:10:44 UTC
The problem still exists in Version: 6.1.0.0.beta2+ (x64)
Build ID: 67a56897ec1e4f2bab2c3291b8dd225710d2ae29
CPU threads: 8; OS: Windows 10.0; UI render: default; 
TinderBox: Win-x86_64@62-TDF, Branch:libreoffice-6-1, Time: 2018-06-29_13:19:46
Locale: de-DE (en_US); Calc: CL
Comment 4 QA Administrators 2019-10-30 03:36:17 UTC Comment hidden (obsolete)
Comment 5 Kenneth Hanson 2019-11-02 02:53:31 UTC
No change as of v6.3.2.2.
Comment 6 QA Administrators 2023-03-14 03:25:05 UTC Comment hidden (obsolete)
Comment 7 RGB 2023-03-14 12:18:16 UTC
Problem still present in

Version: 7.5.1.2 (X86_64) / LibreOffice Community
Build ID: fcbaee479e84c6cd81291587d2ee68cba099e129
CPU threads: 8; OS: Linux 5.14; UI render: default; VCL: kf5 (cairo+xcb)
Locale: es-ES (es_ES.UTF-8); UI: es-ES
Calc: threaded

Same behavior as described in Comment 1