Bug 58730 - paragraph styles line spacing does not stick when also specifying non-zero left and right margins
Summary: paragraph styles line spacing does not stick when also specifying non-zero le...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
Version:
(earliest affected)
3.5.0 release
Hardware: All All
: medium normal
Assignee: Caolán McNamara
URL:
Whiteboard: odf target:4.1.0 target:4.0.0.2 targe...
Keywords: regression
: 54627 57063 (view as bug list)
Depends on:
Blocks: mab4.0
  Show dependency treegraph
 
Reported: 2012-12-24 21:50 UTC by David
Modified: 2013-02-11 13:15 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
sample test document (8.53 KB, application/vnd.oasis.opendocument.text)
2012-12-24 21:50 UTC, David
Details
Screenshot of view with correct paragraph spacing (116.89 KB, image/jpeg)
2013-01-08 01:07 UTC, David
Details
Screenshot of view with incorrect paragraph spacing (66.13 KB, image/jpeg)
2013-01-08 01:10 UTC, David
Details
Screenshot of incorrect spacing using Ubuntu 12.10 (148.80 KB, image/jpeg)
2013-01-08 14:38 UTC, David
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David 2012-12-24 21:50:04 UTC
Created attachment 72084 [details]
sample test document

I believe this regression is new with version 4.0.  It has not been corrected as of beta 2.  I think that bugs 57063 and 58116 might be describing the same problem. I'm fairly certain that bug 57063 is the same issue but in my testing I've found it has nothing to do with using a template from an older version therefore I'm creating a new bug.  The problem can be duplicated by creating a new writer document from version 4.0 beta 2 and performing the following steps:

Create a new paragraph style called style1
Create a new paragraph style called style2
Create a new paragraph style called style3

Create the following lines in the document and set the styles accordingly:
This paragraph uses style1
This paragraph uses style2
This paragraph uses style3
This paragraph uses style1

Modify paragraph style1 to be linked with "none" and to have a below paragraph spacing of 0.10"

Modify paragraph style2 to be linked with style1
Modify paragraph style3 to be linked with style2

Save the document, close the program, and then re-load the document.  The paragraph spacing between the paragraphs is correct.

Now modify style2 to have and indent before text of 0.50" and after text of 0.50".

Save the document and close the program.  Re-open the document and the below spacing on style2 and style3 has been reset to 0"

This problem has been experienced on Linux and Windows XP and prevents me from being able to upgrade. A test document has been attached.
Comment 1 David 2012-12-24 22:09:17 UTC
Bug 57063 says that that bug was experienced in version 3.5.  But I haven't seen this bug until now because other major issues which weren't fixed until version 4.0 prevented me from being able to use my documents.
Comment 2 David 2012-12-25 01:13:12 UTC
I just installed version 3.5.7 on a clean virtual machine and created a new test document.  It looks like this problem started with the 3.5 version.  Version 3.4.6 works perfectly
Comment 3 David 2013-01-07 14:42:21 UTC
This is a regression which by the time version 4.0 is released will be a year old.  It is a very simple bug to duplicate but prevents me from being able to upgrade from version 3.4.6.  I am marking this critical because if LibreOffice is going to a new major version number a bug of this nature should be fixed unless it's expected for users to only use LibreOffice for trivial documents.
Comment 4 Joel Madero 2013-01-07 18:36:59 UTC
working on confirming the bug but I'm doing a few things first:

1. This is in no way a CRITICAL or HIGHEST priority bug. Critical/Major bugs are meant primarily for crashes, data loss, loss of basic functionality such as printing, etc... styles is no basic functionality. Marking appropriately (normal bug) 

2. Highest - Highest is meant for a bug that will affect a large majority of our users, this bug will not for many reasons (it only happens under specific situations when using styles which already isn't used by the vast majority of users). Marking as Normal

3. Changing version, version is used to show the OLDEST release that the bug behavior appeared, not the latest it has been seen on. You have said that you first see this on 3.5 so it's a regression in 3.5 which still exists, I will test the bug on 3.6 right now and mark as NEW if I can confirm.
Comment 5 Jorendc 2013-01-07 19:51:11 UTC
Can't reproduce this behavior with latest libreoffice master (Version 4.1.0.0.alpha0+ (Build ID: 907050b4f479465c25249d58aa6f8297c306468))

Tested with Ubuntu 12.10 x64
Comment 6 Joel Madero 2013-01-07 19:53:36 UTC
Same, tested with Master 4.1 and with 3.6.3.2

Marking as WFM. 

Please try backing up your configuration folder, deleting your configuration folder, and opening LibreOffice - this will give you a fresh configuration.
Comment 7 David 2013-01-07 20:48:42 UTC
As noted in my one message, I tested this on a CLEAN virtual machine. There was no previous install of LibreOffice on it.  By using the exact instructions I gave the document will fail to preserve line spacing on every version after 3.5.  3.4.6 works fine.  As of LibreOffice 4.0 beta 2 it still fails.
Comment 8 David 2013-01-07 21:45:34 UTC
I just installed the latest daily build dated 2013-01-07 on a CLEAN Windows XP virtual machine.  The virtual machine had no previous install of any version of LibreOffice or OpenOffice therefore there are no configuration folders to delete.  Following the instructions given in the first message the document failed exactly as I noted.  I create the styles by opening the style window and selecting "New Style from Selection" from a new, blank document.  I then downloaded the sample test document attached to this message thread and when I opened it it also displayed a spacing of 0" after the style2 and style3 paragraph but when I opened it up in version 3.4.6 it displayed the paragraphs correctly with a .10" after paragraph spacing.

Just in case there are any questions as to where the changes are being made, I'm referring to linking the styles under the paragraph style properties window in the Organizer tab.  The other options are changed in the Indents & Spacing tab in the "Before text", "After Text", and "Below paragraph" input boxes.  After making the changes you will need to close the document and re-open it in order to see the failure.


And IMO styles is a VERY basic function for any non-trivial document.
Comment 9 Joel Madero 2013-01-07 23:24:18 UTC
Changing platform to Windows as it's not on Linux (my test) or OS X (Joren's test). I don't have a Windows build so I'll try to find someone else to test it
Comment 10 Jorendc 2013-01-07 23:25:49 UTC
(In reply to comment #9)
> Changing platform to Windows as it's not on Linux (my test) or OS X (Joren's
> test). I don't have a Windows build so I'll try to find someone else to test
> it

Please do mind that I check it with Ubuntu 12.10, not with OS X :-).
Comment 11 David 2013-01-07 23:52:38 UTC
Please note that I mentioned that this also happens in Linux.  I am currently running Debian testing. I used a Windows XP virtual machine to make sure I had a clean install.
Comment 12 Joel Madero 2013-01-07 23:53:40 UTC
let me apologize for not thoroughly reading your bug. I'll try to find someone both on Linux and Windows to test, Joren and I both failed, he's running Ubuntu I'm running Bodhi Linux...unless we're mis understanding the steps
Comment 13 David 2013-01-08 01:07:29 UTC
Created attachment 72658 [details]
Screenshot of view with correct paragraph spacing
Comment 14 David 2013-01-08 01:10:40 UTC
Created attachment 72659 [details]
Screenshot of view with incorrect paragraph spacing

I have added two attachments to this thread.  The one attachment shows how the attached sample test document should look and the other one shows the incorrect spacing.
Comment 15 David 2013-01-08 14:38:57 UTC
Created attachment 72675 [details]
Screenshot of incorrect spacing using Ubuntu 12.10

I installed Ubuntu 12.10 onto a virtual machine and the version 3.6.2 which was included in the default install behaves worse than what I've been experiencing under Windows XP and Debian.  I've added another attachment showing the screenshot from the Ubuntu window.  In addition to the below paragraph spacing be 0" instead of .10", the left indent spacing is also at .5" instead of 0".  I have the style1 settings windows shown which shows that the left & right indent is set at 0" and the below spacing is set at .1" for this style but instead it displays style1 as .5" indent and 0" below spacing.  And style2 & style3 which which should also have .1" below spacing displays as 0" spacing.
Comment 16 David 2013-01-08 15:17:41 UTC
I'm not sure what the difference was when I created the document in 3.6.2 under Ubuntu but when I opened the sample test document attachment it showed the incorrect paragraph spacing problem that I've been having without the additional indent problems.
Comment 17 Cor Nouws 2013-01-08 16:26:39 UTC
Hi,
I can confirm the problem on
Version 4.0.0.0.beta2+ (Build ID: 09e52d6bad90e9d73e7de29372f5be08cbf82ac)
TinderBox: Linux-x86_10-Release-Configuration, Branch:libreoffice-4-0, Time: 2013-01-07_14:50:57
Running Ubuntu.

Other testers: don't forget the multiple closing down and restarting ;-)
Comment 18 Cor Nouws 2013-01-08 16:29:02 UTC
confirmed > new
Comment 19 Cor Nouws 2013-01-08 16:30:21 UTC
@david: interesting how much corners of the programm people do use ;-)

(In reply to comment #0)
> I believe this regression is new with version 4.0.  It has not been

The version of the issue is set to 3.5.o - could you pls try te find a more precise version? thanks!
Comment 20 David 2013-01-08 21:52:47 UTC
As mentioned earlier, from version 3.5.0 I was unable to upgrade due to another severe issue I was having.  That issue was fixed recently and that's when I discovered this problem.  I originally thought it started with 4.0 but then discovered that it also started with the 3.5 branch. 

I am almost certain that bug 57063 is describing this same problem.  But in that thread they are running in circles assuming it has something to do with template files when the problem is actually very easy to reproduce with a new document.

And in regards to the comment about what corners of the program are being used... The use of styles in OpenOffice/LibreOffice is something that IMO is way too undervalued.  So many people don't realize how much they can help you.  Maybe that is because in MS word they are much more complicated to use.
Comment 21 Joel Madero 2013-01-08 21:58:01 UTC
I definitely don't disagree with you about styles being useful, I just think they aren't used by many people and therefore we need to look at it from that framework. I think pivot tables (previously data pilot) is incredibly useful but I accept that they are used quite rarely. Furthermore, CRITICAL and MAJOR bugs are reserved ALMOST completely for crashes, data loss, inability to install, etc....this bug clearly doesn't get close to being of that importance.

I'm glad Cor was able to reproduce the bug, I suspect it was not reproduced by Joren and myself because we weren't fully closing LibreOffice as your description says we must (our mistake).


Michael: I added you to see if you had any ideas what's going on here or could you suggest another developer who might know (and of course be able to fix it).
Comment 22 David 2013-01-08 22:13:55 UTC
@Joel
> I definitely don't disagree with you about styles being useful, I just think they aren't used by many people and therefore we need to look at it from that framework. 

That's probably because of how difficult it is to use them properly in MS Word so when they come to OpenOffice/LibreOffice they have no idea what they're missing.
Comment 23 David 2013-01-14 13:23:43 UTC
Is there any possibility that this regression gets fixed in time for the 4.0 release? I would really like to be able to upgrade from 3.4.6.
Comment 25 Caolán McNamara 2013-01-17 12:59:12 UTC
What I think I see is that the [UL|LR]Space class has a deficiency where "100%" also serves as a flag that the value is an absolute value so we can't truly handle an up/lower space property which wants to specify e.g. 200% upper but 100% lower of its parent (try typing 100% vs 200% into the edit style dialog and revisit your style). So on xml load that ends up meaning 200%, 0 lower.

review of a workaround at https://gerrit.libreoffice.org/#/c/1735/
Comment 26 Not Assigned 2013-01-17 23:45:23 UTC
Caolan McNamara committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=23c099a0236062724430efb986251637095c8d4f

Resolves: fdo#58730 workaround [UL|LR]Space 100% problem



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 27 Not Assigned 2013-01-17 23:52:18 UTC
Caolan McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-4-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=7872f3d93f415c945c07f393380b60c7f584a244&h=libreoffice-4-0

Resolves: fdo#58730 workaround [UL|LR]Space 100% problem


It will be available in LibreOffice 4.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 28 Not Assigned 2013-01-17 23:58:54 UTC
Caolan McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-3-6":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=abb84c2cce54a903ef846cbfe297b2bbc62ff260&h=libreoffice-3-6

Resolves: fdo#58730 workaround [UL|LR]Space 100% problem


It will be available in LibreOffice 3.6.6.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 29 Michael Stahl (allotropia) 2013-01-18 00:03:30 UTC
should be fixed now on master & all active release branches;
adding "odf" whiteboard due to possible interop impact of the bug.
Comment 30 David 2013-01-18 15:23:09 UTC
Thank you!  I'll check it out and see how it works.
Comment 31 Michael Stahl (allotropia) 2013-01-25 14:23:44 UTC
*** Bug 57063 has been marked as a duplicate of this bug. ***
Comment 32 Michael Stahl (allotropia) 2013-02-11 13:15:08 UTC
*** Bug 54627 has been marked as a duplicate of this bug. ***