Bug 58611

Summary: FORMATTING: Failures in style inheritance
Product: LibreOffice Reporter: y3kcjd5 <HAstraeus>
Component: WriterAssignee: Not Assigned <libreoffice-bugs>
Status: NEW --- QA Contact:
Severity: normal    
Priority: medium    
Version: 3.6.4.3 release   
Hardware: All   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: Demo document of faulty inheritance. Instructions included.
Example to generalize in all dialogues concerning formats (char, paragraph, page)

Description y3kcjd5 2012-12-21 09:21:04 UTC
Created attachment 71910 [details]
Demo document of faulty inheritance. Instructions included.

Most of the time, I try to make my styles as ambiguous as possible, and use inheritance to cover the remaining properties, to facilitate potential future editing.
(When editing styles, I use the Organizer tab to see what properties are specifically defined for a style, and use the reset/default/standard button on the appropriate property tab to clear those properties I want inherited.)
For instance, if I set the default style font, I can then not adjust the font in any other styles and this property will be inherited by child styles.
There are, however, some conditions under which this seems not to work properly.
The best example I can think of is line indentation and spacing for headers, though this is by no means the only instance.
Regardless of what indentation I select for the parent class 'Heading', I find that all the child classes will default to an indentation of 0cm left, 0cm right, and -0.76cm first line for some unknown reason.
In addition, if I specify the values for indentation for the child styles, by association(?) the paragraph spacing values are automatically specified (can't remember if they default to 0cm or the inherited values).
This means that I cannot specify indentation without also specifying paragraph spacing.
The ultimate effect of these two problems is that I cannot define indentation and spacing for headers using the parent 'Heading' Style and expect them to be inherited; I must also enter in the same values for all the child heading styles.
This may or may not be related, but I have found that (font) sizes for character styles will always be based off of 12pt when written as percentages (AFAIK), and are not inherited from the parent (paragraph) style.

This is not a v4.0.0.0beta1 regression.
Win7x64Ult.
Comment 1 y3kcjd5 2012-12-21 11:41:20 UTC
To test & explain the character styles bug:
Open a new document and type some text.
Go to the Styles & Formatting window and modify the Default Style font size to be 16pt.
In the Styles and Formatting window, go to Character Styles (second button above the list of styles) and modify the Emphasis character style font size to be 150% (just type 150% into the font size dropdown).
Select the line of text you typed in the document, and set it to the Default Style paragraph style.
Then set it to the Emphasis character style.

From this you would expect that the text become 16pt*150%=24pt. But, as you should have seen in the demo document as well, the resulting font size is 12pt*150%=18pt.
Comment 2 Jorendc 2012-12-21 15:04:22 UTC
This is a DUPLICATE of bug 54627
> Most of the time, I try to make my styles as ambiguous as possible, and use
> inheritance to cover the remaining properties, to facilitate potential
> future editing.
> (When editing styles, I use the Organizer tab to see what properties are
> specifically defined for a style, and use the reset/default/standard button
> on the appropriate property tab to clear those properties I want inherited.)
> For instance, if I set the default style font, I can then not adjust the
> font in any other styles and this property will be inherited by child styles.
> There are, however, some conditions under which this seems not to work
> properly.
> The best example I can think of is line indentation and spacing for headers,
> though this is by no means the only instance.
> Regardless of what indentation I select for the parent class 'Heading', I
> find that all the child classes will default to an indentation of 0cm left,
> 0cm right, and -0.76cm first line for some unknown reason.
> In addition, if I specify the values for indentation for the child styles,
> by association(?) the paragraph spacing values are automatically specified
> (can't remember if they default to 0cm or the inherited values).
> This means that I cannot specify indentation without also specifying
> paragraph spacing.
> The ultimate effect of these two problems is that I cannot define
> indentation and spacing for headers using the parent 'Heading' Style and
> expect them to be inherited; I must also enter in the same values for all
> the child heading styles.
----------------------------------------------------------------------------

This is a NEW bug
> This may or may not be related, but I have found that (font) sizes for
> character styles will always be based off of 12pt when written as
> percentages (AFAIK), and are not inherited from the parent (paragraph) style.
> 
> This is not a v4.0.0.0beta1 regression.
> Win7x64Ult.

I can reproduce under Ubuntu 12.10 and Mac OSX 10.8.2; LibreOffice 3.6.4.3 as well as LibreOffice 4.0.0.0b1.

Thanks for reporting.
Comment 3 y3kcjd5 2012-12-21 22:51:04 UTC
I have looked at the duplicate bug, and feel I should point out that:
-My demo document is not broken and was created in LibreOffice, not OpenOffice
-This report is (more) specific as to the conditions under which the problem occurs
-This report/document includes specific steps that reliably reproduce the problem(s)
-The bugs in this report can be reproduced both in v3.6.4.3 and v4.0.0.0beta1
Therefore I believe that this report should not be resolved in the same manner as its predecessor, bug 54627.
Comment 4 David 2013-02-07 13:29:05 UTC
This looks to be a duplicate of bug 58730 which was fixed in 4.0.0 RC2.
Comment 5 y3kcjd5 2013-02-15 15:10:30 UTC
There are apparently 3 different issues in this bug (I initially thought they were all one problem):
1. If indentation for a paragraph heading style is specified, spacing values are also automatically specified (and can no longer be inherited). This issue seems to be resolved as of v4.0.0.3, so this may be the duplicate.
2. Indentation for paragraph heading styles does not inherit correctly, it always defaults to .76cm before and -.76cm first line (see demo document). This issue still exists as of v4.0.0.3.
3. Percentage sizes (e.g. 150%) for character styles do not inherit correctly, they are always based off of 12pt (so 150% always produces 18pt font). See first comment for details. This issue still exists as of v4.0.0.3.
Comment 6 Stefano Borselli 2014-02-28 20:28:55 UTC
Created attachment 94918 [details]
Example to generalize in all dialogues concerning formats (char, paragraph, page)

 Example to generalize in all dialogues concerning formats (char, paragraph, page)

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.