Bug 118533 - RTF/DOCX auto paragraph spacing gets zero top margin at top of pages
Summary: RTF/DOCX auto paragraph spacing gets zero top margin at top of pages
Status: REOPENED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.2.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: László Németh
URL:
Whiteboard: target:6.2.0
Keywords:
Depends on: 82006 107480
Blocks: DOCX-Paragraph
  Show dependency treegraph
 
Reported: 2018-07-04 09:32 UTC by László Németh
Modified: 2023-05-23 14:47 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description László Németh 2018-07-04 09:32:50 UTC
Description:
First paragraphs of a document with beforeAutospacing gets zero top margin. It needs to fix unit tests of Bug 107480 and Bug 82006 this way, see attached screen shoots of those issue and the test documents:

https://cgit.freedesktop.org/libreoffice/core/tree/sw/qa/extras/rtfexport/data/fdo82006.rtf
https://cgit.freedesktop.org/libreoffice/core/tree/sw/qa/extras/rtfexport/data/tdf107480.rtf

Actual Results:
14pt space before the first paragraph

Expected Results:
0pt space before the first paragraph


Reproducible: Always


User Profile Reset: No



Additional Info:
Comment 1 Commit Notification 2018-07-04 09:39:42 UTC
László Németh committed a patch related to this issue.
It has been pushed to "master":

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

tdf#118533 RTF/DOCX import: fix beforeAutospacing for first paragraph

It will be available in 6.2.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 2 Commit Notification 2018-07-10 15:58:30 UTC
László Németh committed a patch related to this issue.
It has been pushed to "master":

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

tdf#118533 fix shape import: zero top margin only in first paragraph

It will be available in 6.2.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 3 László Németh 2018-08-01 14:32:17 UTC
We cannot solve this only during import, because it depends from the actual page break, too.
Comment 4 Luke 2018-08-02 02:49:24 UTC
Miklos,
You've spend a lot of time on in this area. Any suggestions? Do we need a compatibility mode?
Comment 5 Miklos Vajna 2018-08-02 08:07:42 UTC
Looks like the correct fix here will be to finally extend the sw doc model for these auto margins and support it in core (so the layout can react to this), instead of the large amount of hacks during both import and export.

Compatibility flag is not necessarily needed if this will be a new feature in core. It's possible to just implement it to behave the same way as it does in Word.
Comment 6 Justin L 2018-08-31 11:27:50 UTC
I added setting the very first paragraph in the document to be auto-spaced as zero in the proposed re-write of the autospacing code at https://gerrit.libreoffice.org/59705.

This doesn't solve the problem of the top of each page having a auto-spaced zero margin though, so this bug report still remains open - just that the most noticeable case can be resolved easily.
Comment 7 László Németh 2018-08-31 11:29:34 UTC
(In reply to Justin L from comment #6)
> I added setting the very first paragraph in the document to be auto-spaced
> as zero in the proposed re-write of the autospacing code at
> https://gerrit.libreoffice.org/59705.
> 
> This doesn't solve the problem of the top of each page having a auto-spaced
> zero margin though, so this bug report still remains open - just that the
> most noticeable case can be resolved easily.

@Justin: thanks for the fix! László