Bug 92454 - DOCX Import: Incorrect display of the headings - numbering style indents
Summary: DOCX Import: Incorrect display of the headings - numbering style indents
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.6.0.4 release
Hardware: All All
: medium major
Assignee: Miklos Vajna
URL:
Whiteboard: target:5.1.0 target:5.0.3 target:4.4.7
Keywords: bibisected, bisected, regression
Depends on:
Blocks:
 
Reported: 2015-06-30 12:22 UTC by Meroslav Tsaakoff
Modified: 2016-10-25 19:17 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Document with multiple headings (125.31 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2015-06-30 12:22 UTC, Meroslav Tsaakoff
Details
test file (13.71 KB, application/3dr)
2015-09-26 16:45 UTC, Cor Nouws
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Meroslav Tsaakoff 2015-06-30 12:22:30 UTC
Created attachment 116950 [details]
Document with multiple headings
Comment 1 Marc Kaulisch 2015-06-30 12:47:46 UTC
Hi Meroslav Tsaakoff, thanks for reporting this bug. I can confirm that there is something wrong here. I compared the documents between Word 2010 and LO 5.0.0.2 64 bit on Win8.1 and see that the heading is displayed wrongly.
Would you be so kind and add some more words on the problem - what does LO not do what it should do. Thank you very much.
Comment 2 Marc Kaulisch 2015-06-30 13:02:41 UTC
my short investigation:
the numbering style indents (connected to the Heading 2 paragraph style) from the docx file is integrated into LO paragraph style - and not: only into the numbering style

Confirm this bug for 4.4.5.0 as well on Win 8.1
Comment 3 Cor Nouws 2015-06-30 13:35:02 UTC
Heading 2 is linked with numbering style www8.
That is set to 7.0 / 7.64 for the first level.
Changing that solves the problem.

I see the same problem in 3.6.6 (may already be a problem earlier..)
But _that_ part of the document, shows correct in 3.3.0

So it is possibly a regression caused by some other (incremental) improvement.

@marc: please set
-  the version to the earliest one know, and in this case Whiteboard: bibisectrequest and Keywords: regression. (all three done now).

The real interesting work is finding related /same issues, and clarifying as much as possible to a single issue, single problem.

thanks a lot,
Cor
Comment 4 Matthew Francis 2015-08-17 03:59:42 UTC
As I don't have Word available to check, I'm assuming that the issue here is that the headings started to become inappropriately right-aligned.

That being the case, this seems to have begun at the below commit.
Adding Cc: to vmiklos@collabora.co.uk; Could you possibly take a look at this one? Thanks

commit 14d6cf1f8f86027d58fe56feae3139c314fbb058
Author: Miklos Vajna <vmiklos@suse.cz>
Date:   Tue Jun 19 09:28:06 2012 +0100

    n#758883 dmapper: always set list id during stylesheet import
    
    This way the sprm handlers can be aware that a numbering is provided by
    that style.
    
    Change-Id: I5b5f1570a9e50fd8b3372f5ac7a6cd48e9751254
Comment 5 Commit Notification 2015-09-22 06:48:42 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

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

tdf#92454 DOCX import: allow overriding para prop from num style in para style

It will be available in 5.1.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 6 Miklos Vajna 2015-09-22 06:49:22 UTC
The above fixes the indentation of the headings, marking as resolved.
Comment 7 Cor Nouws 2015-09-26 16:44:15 UTC
Hi Miklos,

Up until now, in Writer usually (and AFAIK – which is limited) also in the ODF
specs, the indent (margins) of the list styles prevail over those from the
paragraphs.

Testing with a recent daily, that changes and I'm not quite sure if it is good to impose the users on that..

I'll attach a simple test file
Comment 8 Cor Nouws 2015-09-26 16:45:08 UTC
Created attachment 119045 [details]
test file

(maybe you prefer me to open a new issue for this?)
Comment 9 Miklos Vajna 2015-09-28 08:09:50 UTC Comment hidden (obsolete)
Comment 10 Cor Nouws 2015-09-28 08:22:51 UTC
(In reply to Miklos Vajna from comment #9)
> Yes, please open a separate bug for that, this one is about a commit
> touching the DOCX importer causing a problem, nothing to do with ODF.

OK .. ;) see tdf#94562
Comment 11 Commit Notification 2015-09-30 11:31:43 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-5-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=d14c7b034d75730a85b5f6f843e39ff79840c272&h=libreoffice-5-0

tdf#92454 DOCX import: allow overriding para prop from num style in para style

It will be available in 5.0.3.

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 12 Timur 2015-10-06 11:15:49 UTC Comment hidden (obsolete)
Comment 13 Cor Nouws 2015-10-06 12:33:55 UTC
(In reply to Timur from comment #12)
> Please backport to 4.4.6.

Only when we are sure that noting is broken with the commit please..
Comment 14 Commit Notification 2015-10-07 06:24:23 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-4-4":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=2ca166ebbe2adbd8f129403c7f8e5646c70ab67d&h=libreoffice-4-4

tdf#92454 DOCX import: allow overriding para prop from num style in para style

It will be available in 4.4.7.

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 15 Robinson Tryon (qubit) 2015-12-17 09:15:32 UTC Comment hidden (obsolete)