Issue 124107 - Inherited style property "Space above/below Paragraph" lost for particular styles
Summary: Inherited style property "Space above/below Paragraph" lost for particular st...
Status: CLOSED FIXED
Alias: None
Product: Writer
Classification: Application
Component: formatting (show other issues)
Version: 3.4.0 Beta (OOo)
Hardware: All All
: P3 Major (vote)
Target Milestone: 4.1.1
Assignee: Oliver-Rainer Wittmann
QA Contact:
URL:
Keywords: regression
: 124554 (view as issue list)
Depends on:
Blocks:
 
Reported: 2014-01-24 18:25 UTC by Joe Smith
Modified: 2017-05-20 10:35 UTC (History)
8 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: 4.1.0
Developer Difficulty: ---
jsc: 4.1.1_release_blocker+


Attachments
Sample Document (8.67 KB, application/vnd.oasis.opendocument.text)
2014-01-25 08:55 UTC, Rainer Bielefeld
no flags Details
Sample Document TOC Heading (8.14 KB, application/vnd.oasis.opendocument.text)
2014-03-31 11:43 UTC, Rainer Bielefeld
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description Joe Smith 2014-01-24 18:25:10 UTC
Testing AOO 4.0.1 on Fedora Linux 17

Steps to reproduce:

1) File > New > Text Document

2) Enter two text paragraphs, for example:

One (Enter)
Two (Enter)

3) Edit > Select All

4) Apply paragraph style "Text body indent"

Note that the paragraphs have non-zero "space below" inherited from the parent style "Text body". (Format > Paragraph > Indents & Spacing > Spacing > Below paragraph)

5) File > Save (file type: ODF Text Document)

6) File > Reload

Note that the paragraphs have "space below" of zero.
Comment 1 Rainer Bielefeld 2014-01-25 08:55:15 UTC
Reproducible with server installation of "AOO 4.1.0-Dev – English UI / German locale - [AOO410m1(Build:9750) - Rev. 1559824 - 2014-01-22]" on German WIN7 Home Premium (64bit)", own separate user profile.

Preparation (you may skip and only use attached sample document)
11. Proceed similar to original report until step 4
11.1 From AOO Start center open blank new Document
11.2 Type "one<tab>one<tab>one<enter>two<tab>two<tab>two<enter>"
11.3 <control+a> to selet all
11.4 apply paragraph style "Text body indent" via Sidebar
12. In sidebar -> Styles and Formatting -> Rightclick "Text Body"
13. Modify Text Color to green 
14. Modify 'Indents & Spacing - Test below paragraph' to 20mm
15. OK for all
    > You see green text with big tab distances between word and 20mm distance 
      between lines
16. Save as "sample20.odt", close and reopen
    As expected color and TABs as changed 
    Bug: Space below Paragraph from Style "Text body" not respected

Additional info:
(a) it's a file-open problem as you can see with attached "sampledocument.odt"
(a1) "sampledocument.odt" already shows missing space below paragraph with
     server installation of "AOO 3.4.0 – German UI / German locale 
     [AOO340m1(Build:9590) - Rev.1327774]" on German WIN7 Home Premium
    (64bit)", own separate user profile
(a2) still worked fine with"OOo 3.3.0 English UI / German locale 
     [OOO330m20 (Build 9567)]" on WIN7 Home Premium (64bit) DE 
(b) Major issue, if you safe "sampledocument.odt" from affected AOO, inherited
    space below paragraph will be lost for future, so existing documents 
    will become destroyed by AOO
Comment 2 Rainer Bielefeld 2014-01-25 08:55:54 UTC
Created attachment 82389 [details]
Sample Document

See comment above how to use!
Comment 3 Joe Smith 2014-01-27 16:50:43 UTC
Thanks for having a look, Rainer. Nice work!

I was also able to check OOo 3.3 (en_US on Linux) and likewise, I do NOT see the problem there.

As already pointed out, an existing, correct document saved by AOO will be damaged:

Saving a sample document with OOo 3.3, then opening the document with 4.0.1 shows correct behavior; re-saving the document (no edits) under 4.0.1 and re-opening shows the problem again.

Comparing the styles.xml saved by the two versions shows different content in the "Text body indent" style but it's the inheritance of the fo:margin-bottom property from "Text body" that's failing.
Comment 4 Joe Smith 2014-01-27 16:57:24 UTC
> an existing, correct document saved by AOO will be damaged: ...

Sorry, that's not exactly right. Saving & reopening a working document with AOO afterward has the incorrect text layout/appearance (no space below pp) but the document itself does not appear to be damaged. Opening the document in OOo 3.3 after it was saved by AOO 401 still shows the correct layout under OOo 3.3.

So it seems not to be a file problem at all.
Comment 5 Andre 2014-02-19 10:56:14 UTC
The strange thing is, that I can reproduce the bug (via steps in Description).  But when I choose style "Text body" instead of "Text body indent" then everything is fine.
Comment 6 mroe 2014-03-18 09:48:44 UTC
Will anyone work on this issue?

The problem is, that _all_ documents which uses inherited styles where the spacing is inherited will displayed and printed incorrectly! Missing spaces shift page breaks.

The bug occurs with all inherited paragraph styles, predefined and also user defined.

This bug should have a higher priority. If there can be find a solution this bug should be a show stopper.
Comment 7 Rainer Bielefeld 2014-03-31 11:13:42 UTC
*** Issue 124554 has been marked as a duplicate of this issue. ***
Comment 8 Rainer Bielefeld 2014-03-31 11:42:41 UTC
This is not a general problem with all "Space Below Paragraph" as you can see with document I will attach, created with OOo 2.0.2:

21: open "Source_OOo202".
    > TOC looks fine, 4,2mm between "Contents Heading" and top page margin, 
     2,1mm between "Contents Heading" and first TOC item.
22: 'Rightlick heading of TOC -> Edit Paragraph Style -> Change 
    "Indents & Spacing", check and remember spacings -> [Cancel]
23. In 'Sidebar -> Styles & Formatting -> Paragraph Styles -> Heading-Style
    -> Change "Spacings above / below paragraph both to 20mm
    -> Change 'Font Effect -> Font Color' to green
     [ok]
    > All changes will be applied to Text "Heading 1" and  "Contents Heading",
      inherited styles work fine
24. Save under new name -> Close -> Reopen
    As expected: Headings still green and spacing below Heaing with text 
                 "Heading 1" still 20mm
    Bug: Spacing below AND above TOC-Heading lost (please check in Styles after
         right click on TOC-heading)
Comment 9 Rainer Bielefeld 2014-03-31 11:43:22 UTC
Created attachment 83042 [details]
Sample Document TOC Heading

See comment above how to use
Comment 10 mroe 2014-03-31 12:13:25 UTC
Interesting thing ...
Seems, if the font size of a paragraph style is defined in percent (%), the inherited spacing is respected. This also happens if it changed back to point (pt). But this isn't a practicable workaround ...
Comment 11 Oliver-Rainer Wittmann 2014-07-03 13:59:57 UTC
taking over to work on a solution
Comment 12 Oliver-Rainer Wittmann 2014-07-04 07:16:48 UTC
Defect caused by changes made for issue 117001

It already occurs in OOo 3.4.0 Beta
Comment 13 Oliver-Rainer Wittmann 2014-07-04 07:55:33 UTC
New paragraph export property map entry CTF_PARAMARGINALL_REL is not been considered on the export. Thus, ODF fo:margin="100%" is exported.
It needs to be handled as the new paragraph export property map entry CTF_PARAMARGINALL --> suppress its export as OOo version 3.3.0 and before are not able to import ODF attribute fo:margin
Comment 14 SVN Robot 2014-07-04 08:19:13 UTC
"orw" committed SVN revision 1607793 into trunk:
124107: ODF export - suppress export of fo:margin for paragraph styles
Comment 15 Oliver-Rainer Wittmann 2014-07-04 08:32:32 UTC
the provided fix for the ODF export solves the described defect.

But the recent ODF import code come across the ODF attribute fo:margin="100%" written by versions AOO 3.4.0...AOO 4.1.0. It is not handled as expected - 'the margin values are 100% of the parent style'. Thus a further change for the ODF import code is needed.
Comment 16 Oliver-Rainer Wittmann 2014-07-04 10:23:25 UTC
An additional reason to handle fo:margin="100%" is that the <SvxULSpaceItem> and <SvxRLSpaceItem> are not able to handle this proportional value.
Comment 17 Oliver-Rainer Wittmann 2014-07-04 12:01:18 UTC
adjust treatment of fo:margin="100%" of paragraph styles in ODF import - revision 1607836
Comment 18 Oliver-Rainer Wittmann 2014-07-04 12:02:11 UTC
requesting to consider this issue as release blocker for planned 4.1.1 release:
- defect is serious
- fix is available and of low risk
Comment 19 SVN Robot 2014-07-04 12:02:55 UTC
"orw" committed SVN revision 1607836 into trunk:
124107: ODF import - ignore fo:margin="100%" for paragraph styles as core att...
Comment 20 jsc 2014-07-04 13:11:51 UTC
grant showstopper flag
Comment 21 SVN Robot 2014-07-04 14:19:35 UTC
"orw" committed SVN revision 1607861 into branches/AOO410:
124107: ODF export - suppress export of fo:margin for paragraph styles
Comment 22 SVN Robot 2014-07-04 14:40:13 UTC
"orw" committed SVN revision 1607867 into branches/AOO410:
124107: ODF import - ignore fo:margin="100%" for paragraph styles as core att...
Comment 23 mroe 2014-07-04 14:59:20 UTC
Thank you so very much!  :-)  :-)  :-)
Comment 24 Joe Smith 2014-07-18 15:50:27 UTC
Tested OpenOffice 4.1.1  411m2(Build:9771) on Fedora Linux

Ok now, with my documents, the test document attached here, and following the steps in the description. 

Thanks so much!
Comment 25 samalipraveena 2014-07-19 05:17:27 UTC
Followed the steps and the bug is still in AOO4.1.1
Comment 26 mroe 2014-07-19 12:30:11 UTC
@samalipraveena:
What do you doing?
Why you change the state from RESOLVED FIXED to VERIFIED WONTFIX?

This issue is definitively FIXED in 4.1.1!

Please describe your steps, if you think the issue still occurs!

Compare the result between 4.1.0 and 4.1.1!
Comment 27 samalipraveena 2014-07-20 20:51:54 UTC
I'm doing the verification of bugs for A004.1.1
Followed the steps like below:
1) File > New > Text Document

2) Enter two text paragraphs, for example:

One (Enter)
Two (Enter)

3) Edit > Select All

4) Apply paragraph style "Text body indent"

Note that the paragraphs have non-zero "space below" inherited from the parent style "Text body". (Format > Paragraph > Indents & Spacing > Spacing > Below paragraph)

5) File > Save (file type: ODF Text Document)

6) File > Reload

Note that the paragraphs have "space below" of zero.
Bug:- the paragraphs have "space below" of zero.
Comment 28 Joe Smith 2014-07-20 22:28:13 UTC
What version are you testing? Check under Help > About OO, or run from the command line with the -h option and look at the first line of output.

I've re-checked the steps as I described in comment 24 and I get the expected result: the paragraphs have the correct spacing after re-loading.

If you're getting different results, please post the complete AOO version information. The changes may not be in the version you're testing.
Comment 29 Oliver-Rainer Wittmann 2014-07-21 08:28:13 UTC
(In reply to mroe from comment #26)
> @samalipraveena:
> What do you doing?
> Why you change the state from RESOLVED FIXED to VERIFIED WONTFIX?
> 
> This issue is definitively FIXED in 4.1.1!
> 
> Please describe your steps, if you think the issue still occurs!
> 
> Compare the result between 4.1.0 and 4.1.1!

@mroe:
Calm down a little bit.

I think samalipraveena tried to express by the new state that the fixed failed. Due to the missing capabilities of Bugzilla this is not directly possible.

@samalipraveena:
WONTFIX means that the defect will not be fixed. That is why mroe was puzzled by you choose it.
In general we set status REOPENED to a RESOLVED issue, when it had been observed that a fix failed.

@samalipraveena:
As two other persons - namely mroe and Joe Smith - have seen that the issue is fixed I am asking you to provide the version information your installed AOO
Comment 30 samalipraveena 2014-07-21 21:46:28 UTC
I think samalipraveena tried to express by the new state that the fixed failed. Due to the missing capabilities of Bugzilla this is not directly possible.
samalipraveena: yes.

@samalipraveena:
WONTFIX means that the defect will not be fixed. That is why mroe was puzzled by you choose it.
In general we set status REOPENED to a RESOLVED issue, when it had been observed that a fix failed.
samalipraveena: Okay. In future, I'll set the state to REOPENED if a fix fails.

I checked this fix in AOO4.1.1 m1 snapshot build. I'll check it in m2 or latest snapshot build. I think it should be okay.
Comment 31 samalipraveena 2014-07-21 23:39:12 UTC
Hi all,
I checked it in m2 snapshot build; the fix is working; thanks.
Comment 32 Oliver-Rainer Wittmann 2014-07-22 07:10:28 UTC
(In reply to samalipraveena from comment #31)
> Hi all,
> I checked it in m2 snapshot build; the fix is working; thanks.

Thanks for your double-checking.