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:
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.
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.
We cannot solve this only during import, because it depends from the actual page break, too.
Miklos, You've spend a lot of time on in this area. Any suggestions? Do we need a compatibility mode?
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.
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.
(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ó