Download it now!
Bug 98639 - Spacing to contents (Paragraph-Borders-Padding) wrong for heading style after saving as docx and doc
Summary: Spacing to contents (Paragraph-Borders-Padding) wrong for heading style after...
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
(earliest affected)
Hardware: All All
: medium normal
Assignee: Not Assigned
Keywords: filter:docx
Depends on:
Blocks: DOCX-Styles
  Show dependency treegraph
Reported: 2016-03-13 21:15 UTC by Ivo Smelhaus
Modified: 2020-04-11 12:47 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:

incorrect position (1.13 KB, image/png)
2016-03-13 21:15 UTC, Ivo Smelhaus
example of affected docx (5.11 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2016-03-14 12:24 UTC, Ivo Smelhaus
original correct odt document (8.67 KB, application/vnd.oasis.opendocument.text)
2016-04-07 13:42 UTC, Ivo Smelhaus
picture explaining the problem (69.86 KB, image/png)
2016-04-07 13:44 UTC, Ivo Smelhaus
98639_borderSpacing.odt: based on default style - no heading style used. (10.39 KB, application/vnd.oasis.opendocument.text)
2020-04-08 07:32 UTC, Justin L

Note You need to log in before you can comment on or make changes to this bug.
Description Ivo Smelhaus 2016-03-13 21:15:16 UTC
Created attachment 123545 [details]
incorrect position

1. create a blank odt document
2. create a paragraph with some value in "Spacing to contents"-"left" (for better visualisation fill the area but it is not necessary)
3. Result is now as expected, i.e. paragraph area starts at page border and first character starts at position paragraph area + set value of "Spacing to contents"-"left"
4. Save the document in docx format
5. open the document in docx format
6. Result is now incorect, i.e. paragraph area starts at position of page boarder minus "Spacing to contents"-"left" so that the first character starts at page boarder

What makes this bug major is, that the formatting of the document is broken irreversibly, i.e. even after saving again as odt and formatting a new paragraph from scratch, the result is incorrect and the only workable solution, I have found, is creating a new document and copy paste the content. Otherwise alignment of all paragraph with non-zero value of "Spacing to contents"-"left" is broken.
Comment 1 Cor Nouws 2016-03-14 12:09:57 UTC Comment hidden (obsolete)
Comment 2 Ivo Smelhaus 2016-03-14 12:24:31 UTC Comment hidden (obsolete)
Comment 3 Timur 2016-04-07 09:59:14 UTC Comment hidden (obsolete)
Comment 4 Ivo Smelhaus 2016-04-07 13:42:33 UTC
Created attachment 124158 [details]
original correct odt document
Comment 5 Ivo Smelhaus 2016-04-07 13:44:56 UTC
Created attachment 124159 [details]
picture explaining the problem
Comment 6 Buovjaga 2016-05-06 13:04:33 UTC

Arch Linux 64-bit, KDE Plasma 5
Build ID: 540fee2dc7553152914f7f1d8a41921e765087ef
CPU Threads: 8; OS Version: Linux 4.5; UI Render: default; 
Locale: fi-FI (fi_FI.UTF-8)
Built on April 30th 2016
Comment 7 Cor Nouws 2016-05-06 13:44:15 UTC
In and daily, the result is a negative indent of the paragraph
In and the result is a lost spacing to contents (and an added Outline number to the following paragraph of the test file...)
Comment 8 QA Administrators 2017-05-22 13:41:06 UTC Comment hidden (obsolete)
Comment 9 Cor Nouws 2017-08-13 20:02:23 UTC
still not ok in Version:
Build ID: 368b583b992f2e9cad46c2362c9529a07c36d7a9
CPU threads: 4; OS: Linux 4.10; UI render: default; VCL: gtk2; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2017-08-10_02:55:46
Locale: nl-NL (nl_NL.UTF-8); Calc: group
Comment 10 QA Administrators 2018-08-14 02:32:08 UTC Comment hidden (obsolete)
Comment 11 Timur 2018-08-14 13:45:53 UTC
Repro 6.2+. But this is related to Bug 95576, heading style.
Comment 12 Justin L 2020-04-08 07:32:16 UTC
Created attachment 159414 [details]
98639_borderSpacing.odt: based on default style - no heading style used.

(In reply to Timur from comment #11)
> Repro 6.2+. But this is related to Bug 95576, heading style.

It is not related to heading style at all.

Confirmed in 7.0 master for exporting both as .doc and .docx.
Comment 13 Justin L 2020-04-11 12:47:47 UTC
Try it this way. Create a blank document, save it as .docx, and then close and re-open the blank document that is now in DOCX format. Now when you make your border, it will push into the left and right margins.

This is almost certainly due to a compatibility option in order to work the way Microsoft formats work. For example, MS formats have a maximum of 31pt for the border spacing - much less than LO can do. When you save as an MS format, you are stuck with the limitations there.

The compatibility was most likely introduced in LO 4.0 with commit 355d25eac764713f4d52eac801ade6e2ff1deab0 by Author: Cédric Bosdonnat on Wed Sep 19 16:19:37 2012 +0200
    n#779627: added quite some compat options from the ww8 filter on writerfilter