Issue 4279 - Problem with fontsize in style when expressed in percentage (%)
Summary: Problem with fontsize in style when expressed in percentage (%)
Alias: None
Product: Writer
Classification: Application
Component: code (show other issues)
Version: 641
Hardware: PC All
: P3 Trivial with 8 votes (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
: 32752 57343 (view as issue list)
Depends on:
Reported: 2002-04-26 16:38 UTC by pmartino
Modified: 2017-05-20 11:20 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Note You need to log in before you can comment on or make changes to this issue.
Description pmartino 2002-04-26 16:38:35 UTC
If you define a new style with fontsize defined as a percentage versus a first
style, if this % is 100, it is converted automatically in fixed point size.
This is a problem since if you modify the first style, you new style won't be
Define default style as Font=Times Pt 12
Define Style "MyStyle" based on Default with Font size =100%
Save your style
Edit your style and look at the font size. The size is now 12 pt.
Change MyStyle to font size=101%,
Save and open, the size is still 101% as expected.
Comment 1 stefan.baltzer 2002-04-29 16:06:31 UTC
Reassigned to Ulf.
Comment 2 ulf.stroehler 2003-01-28 12:04:06 UTC
US->ES: Stylist is your baby. Pls. have a look. Thx.
Comment 3 eric.savary 2003-01-28 13:40:46 UTC
ES->AMA: some remarks:
- broken = no.
- this only happens with character styles ; paragraph styles update
- the sub character style only updates when the character style dialog
is called again and confirmed with Ok.
Comment 4 pmartino 2003-01-29 14:10:42 UTC
It may not be broken but I think it is inconsistent. Try the following:
- Define "Default" Style as 12pt
- Define a new Style "MyStyle" based on "Default" with FontSize=100%
(Not 12pt but 100%)
- As expected the FontSize of "MyStyle" is 12pt.
- Change  FontSize of "Default" to 24pt
- FontSize of "MyStyle" is still 12pt AND NOT 24pt as expected.
- To get the Font Size updated, you must:
     * edit "MyStyle" again
    * choose "Font"
     * Click "Standard" button at the bottom right
    * Now the FontSize of "MyStyle" is updated when "Default" style
FontSIze is changed 

Rem: This works only with 100%. If you choose 101%, the style is
updated correctly.
Comment 5 andreas.martens 2003-02-05 10:03:57 UTC
AMA->OS: There are two problems. First the 100% font height will
stored not as percentage but as an absolute value. This is visible at
the organizer tab page. If you choose another value than 100% you'll
get really a relative font height. But then the other problem occurs,
if you change the font height in the "parent" style the font height of
the "child" style will not be recalculated until you call the
style/modify and press Okay.
Comment 6 Oliver Specht 2003-02-05 10:38:11 UTC
Comment 7 stefan.baltzer 2003-10-01 18:25:20 UTC
SBA: According to the roadmap
this issue was retargeted to OOo Later.
Comment 8 michael.ruess 2004-08-10 06:49:56 UTC
*** Issue 32752 has been marked as a duplicate of this issue. ***
Comment 9 Oliver Specht 2004-11-05 14:12:00 UTC
Comment 10 mbu 2004-11-05 14:16:28 UTC
Comment 11 mbu 2004-11-16 10:25:40 UTC
problem is fixed, layout and dialogues used the value 100 as an indicator for
the "absolute case", which is obviously wrong. I introduced a new member
"SFX_MAPUNIT_ABSOLUTE" in the SfxMapUnit enumeration and differentiated
accordingly where necessary.
Comment 12 mbu 2004-11-25 08:58:41 UTC
Comment 13 mbu 2004-11-25 08:59:42 UTC
Comment 14 mbu 2005-01-10 10:16:56 UTC
Comment 15 mbu 2005-01-10 10:17:31 UTC
Comment 16 eric.savary 2005-01-11 18:01:35 UTC
Comment 17 eric.savary 2005-01-11 18:07:18 UTC
verified in cws mbu2
Comment 18 eric.savary 2005-01-11 18:07:33 UTC
Comment 19 eric.savary 2005-01-20 17:53:30 UTC
ok in src680m73
Comment 20 openoffice 2005-02-02 12:47:40 UTC
dvo: Most unfortunately, this fix introduced rather severe problems elsewhere
(issue 41746), so I had to remove the fix again. The problem was that after the
fix, the API could no longer determine whether a relative height was set at all,
and would then always save a (possibly wrong) value, which would cause massive
problems when displaying the documents.
Comment 21 openoffice 2005-02-02 12:51:22 UTC
dvo->os: I send it to you for fixing again, presumably later.

I think the best way to fix this would be to split the font height item into
three, so that all three sizes (absolute, relative, difference) can idependently
maintain their property states. This would solve the original problem reported
by pmartino, plus all import/export problems. (In fact, this would allow us to
remove some special case treatements that are currently necessary.) I do realize
this would take somewhat more time, however.
Comment 22 Regina Henschel 2005-11-04 10:22:57 UTC
*** Issue 57343 has been marked as a duplicate of this issue. ***
Comment 23 eponymousalias 2011-07-22 06:04:42 UTC
More than 9 years after being reported, this issue is still with us in OO 3.3.0.  In fact, it's even worse.

My document is formatted in 11pt (as I have set the "Text body" paragraph style, and use that style for the body of my document).  Now I set up a Source Text character style, and set the font size (say) to 75%, so the x-height of my chosen monospaced font lines up with my ordinary text font, according to externally-measured x-height information.  Trouble is, when I'm in an 11pt "Text body" paragraph and apply the Source Text character style to a word, I end up with a 9pt word, not a 75%*11pt word.  Also, if I have, say, a Quote paragraph style that I set to 9pt, then if I apply the Source Text character style to a word in a Quote paragraph, that word ends up still at 9pt, *not* at 75%*9pt.  My conclusion is that percent-font-size application in a character style is relative to some absolute font size whose origin can be neither identified nor changed, *not* relative to the context in which the text being char-styled is located.  This is in direct contradiction to the documentation ( 3.3 Writer Guide, Chapter 7, page 218, "Creating a new character style").

The situation above is illustrative of many other contexts where it would be useful to specify a relative font size in a character style, sometimes 100% and sometimes not.

I can't tell you how infuriating it is to get a significant amount of a work entered into a tool like this and then to find out that the most basic stuff is broken and simply cannot be made to work, especially when the documentation you relied on when choosing the tool clearly said otherwise.
Comment 24 eponymousalias 2011-07-22 06:33:42 UTC
The other type of character-style relative font size ("+0pt") suffers from exactly the same problem -- testing shows that it is relative to some mysterious undocumented absolute base size, not to the size of the paragraph-style font that controls the text to which the character-style is being applied.
Comment 25 Daniel 2013-01-24 20:09:50 UTC
I've fount this problem too. One solution is "Restore" the font, but you lost font tormat and have to reformat.
I think that when you put 100% on font size, then the program must restore the size link with parent.

Greetings :)
Comment 26 Marcus 2017-05-20 11:20:06 UTC
Reset assigne to the default "".