Created attachment 129246 [details] The problematic document Attached document has a paragraph in a text box (the one above the bottom image) with spacing set as "auto". This is imported in current master Writer as a fixed 0.49 cm spacing, making the paragraph text ("A projekt azonosító száma") invisible as the spacing is bigger than the text box itself.
Created attachment 129247 [details] Screenshot of the document in the current master build
Created attachment 129248 [details] The document in Word 2013
*** This bug has been marked as a duplicate of bug 102264 ***
Bug 102264 is poorly triaged, and I don't see this one as a duplicate of that one. I confirm the behavior. It can be seen from 4.1 and it worse before, not likely a regression. There was similar Bug 95031 which I add to CC, but only inside numbering.
Created attachment 129350 [details] test case with text box only
Created attachment 137631 [details] Similar test file in DOC format This also happens in DOC format: spacing is auto in Word, 0,49cm in Writer. Version: 5.4.2.2 Build ID: 22b09f6418e8c2d508a9eaf86b2399209b0990f4 CPU threads: 4; OS: Windows 6.2; UI render: default; Locale: hu-HU (hu_HU); Calc: group
Created attachment 137632 [details] The example doc in Word 2013 and LO 5.4.2
OpenDocument/document model of LibreOffice has no such feature, as beforeAutospacing/afterAutospacing of OOXML, so it only stores these attributes for OOXML export/import, keeping the original document layout only in MSO after modification in LibreOffice, too. Possible solutions: adding this feature to OpenDocument or search some workaround for the corner cases: text boxes and table rows, keeping the original layout of the document in LibreOffice, too.
(In reply to László Németh from comment #8) > Possible solutions: adding this feature to OpenDocument or search some > workaround for the corner cases: text boxes and table rows, keeping the > original layout of the document in LibreOffice, too. How about adding a compatibility option to Options - Writer - Compatibility ?
> How about adding a compatibility option to Options - Writer - Compatibility ? @Gábor, it seems, we could have a workaround, because this bad 14pt (~ 0.49cm) caused by the following workaround, see 280 TWIPS values in it: https://cgit.freedesktop.org/libreoffice/core/commit/?id=68e538ea6d6b2308de7c9390116fa06cd8c02d18
Created attachment 143540 [details] DOCX version of the second test file
@Gábor: I have attached the DOCX version of the second test file. I suggest to file a new issue for the original DOC. The suggested fix for this DOCX and for similar table importing problems: https://gerrit.libreoffice.org/#/c/57352/ Description: Top margin of first paragraph of a table cell with auto spacing, and bottom margin of last paragraph of a table cell with auto spacing are zero (except in numbered last paragraphs), but LibreOffice set 14pt instead of them, resulting much longer tables. Following cases needed special handling: - auto spacing in style - direct top and bottom auto spacing - direct top and bottom margins - footnotes in cell paragraphs
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=5c6bce38a01b21403a603acd3148cf3bbb4c685f tdf#104354 DOCX import: fix paragraph auto spacing in tables 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.
Created attachment 144499 [details] tdf104354-2b.docx: regression exposed by this document
Created attachment 144571 [details] firstParaInSection_auto.docx: proof that footnotes don't have zero-first autospacing I have proposed a complete re-write of the autospacing code at https://gerrit.libreoffice.org/59705 So, we also have to ensure that footnotes are not counted as "firstParaInSection". https://gerrit.libreoffice.org/59858 This unit test also proves that inherited autospacing is not over-ridden by a more-closely-inherited top-margin. That is good - otherwise things would really get complicated if we had layers of inheritance comparison. Comments have no paragraph formatting, so they should be unaffected by this either way. Another interesting thing is that if you disable autospacing on this document, it looks terrible in Word, but I'm not exactly sure why.
Justin Luth committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=61821277ed4974debd05af89cb7284602512088f tdf#104354 writerfilter: rewrite Autospacing 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.
Justin Luth committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=dff829e863fd05bedd5bcb713cd80c10fa582932 tdf#104354 writerfilter: not FirstParaInSection if InFootOrEndnote 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.
Created attachment 147857 [details] test case with text box compared MSO LO6.1 LO6.3+
From what I see, auto spacing is fixed for DOCX examples. I don't see that new issue was filed for the original DOC so I'll do and CC it.
*** Bug 114962 has been marked as a duplicate of this bug. ***