Bug 160631 - FORMATTING: Incorrect fontsize of style percentage after reopening file saved file
Summary: FORMATTING: Incorrect fontsize of style percentage after reopening file saved...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Fonts
  Show dependency treegraph
 
Reported: 2024-04-11 19:24 UTC by Matt C
Modified: 2024-04-13 17:05 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Test for Incorrect fontsize of style percentage after reopening file saved file. (9.62 KB, application/vnd.oasis.opendocument.text)
2024-04-11 19:24 UTC, Matt C
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matt C 2024-04-11 19:24:56 UTC
Created attachment 193632 [details]
Test for Incorrect fontsize of style percentage after reopening file saved file.

When creating a character style inherited from another with a fontsize different to 12pt, and using a percentage of the inherited fontsize, the saved and reopened file has the fontsize of the percentage of 12pt rather than the percentage of the inherited fontsize.  Adjusting the percentage while the document is open causes the fontsize to become correct, but saving and reopening the document causes the error to reassert itself.

To simulate:
Create a document with a small amount of text.
Create a dummy character style "Chr Text Body" with "Liberation Sans", 8pt.
Create a new character style "Quote" inherited from "Chr Text Body" and with "Liberation Serif", 105%.
Select a word from the text and apply the "Quote" style.
This should show the word as Liberation Serif at 8.4pt.
Save the document, close the document, reopen the document.
The word that was 8.4pt is now 12.6pt.
Opening the style and changing the percentage and applying it causes the font to become the correct size.
Comment 1 Regina Henschel 2024-04-12 09:11:11 UTC
The values are correctly written to file. The style itself has the percent-value after loading. But the calculated font height is wrong.

I see the error in Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: c9d4f99b2bb54ac7735b3e0d0cadbafbd0279518
CPU threads: 32; OS: Windows 10.0 Build 22631; UI render: default; VCL: win
Locale: de-DE (de_DE); UI: en-US
Calc: threaded

I see the error already in OOo3.2.