Created attachment 144973 [details]
The attached DOCX has top and bottom margin set to -2" and -1.5" respectively, with some header/footer text. As far as I can see Word treats this as the non-negative value.
In Writer the header/footer aren't shown. After saving, the margins are set to unexpected values, though at least the header/footer text becomes visible.
Observed using LO 22.214.171.124 & 3.3.0 / Windows 7.
In 126.96.36.199 the header/footer are still visible on open (not in 188.8.131.52), though the margins are still incorrect. This change could be bibisected.
Created attachment 144974 [details]
Screenshot in Word
ECMA-376-1:2016 17.6.11 pgMar (Page Margins)
> A negative value indicates that the contents of the main document shall be measured
> from the bottom of the page extent regardless of the footer for that document, and
> therefore shall overlap the footer text.
A code pointer: SectionPropertyMap::PrepareHeaderFooterProperties (writerfilter/source/dmapper/PropertyMap.cxx)
Ww8 implementation for reference: wwSectionManager::SetPageULSpaceItems in sw/source/filter/ww8/ww8par6.cxx
(In reply to Aron Budea from comment #0)
> In 184.108.40.206 the header/footer are still visible on open (not in 220.127.116.11),
> though the margins are still incorrect. This change could be bibisected.
Here's the result with bibisect-linux-64-5.3. Seems unrelated, but apparently an exception is triggered somewhere.
author Justin Luth <firstname.lastname@example.org> 2016-09-09 12:42:55 +0300
committer Justin Luth <email@example.com> 2016-09-09 12:54:23 +0000
tdf#86926 writerfilter allow fallback if exceptions
I believe that there's no need in the bisecting, because there's a need to reimplement the function, and that fixes all this at once. The "regression" part is simply some coincidence.
I created a quick attempt: https://gerrit.libreoffice.org/60730. It is not complete, and I don't plan to continue it ATM. Feel free to continue based on it. Its problems are mentioned in the commit message.
Created attachment 154232 [details]
Sample DOCX compared MSO LO
*** Bug 118489 has been marked as a duplicate of this bug. ***