Created attachment 161339 [details] Comparison MSO 2010 and LibreOffice 7.0 master Steps to reproduce: 1. Open attachment 70890 [details] from bug 57780 -> first page's header/footer are on page 2. See comparison image Reproduced in Version: 7.0.0.0.alpha1+ Build ID: 82894d85147840f1f587e9530b12f0058f2ef2c3 CPU threads: 4; OS: Linux 4.19; UI render: default; VCL: gtk3 Locale: en-US (en_US.UTF-8); UI: en-US Calc: threaded [Bug found by office-interoperability-tools]
Regression introduced by: https://cgit.freedesktop.org/libreoffice/core/commit/?id=509a02aa96f6d7620cb0bf06c20b3bfa0641be92 author Michael Stahl <Michael.Stahl@cib.de> 2020-02-18 19:18:47 +0100 committer Michael Stahl <michael.stahl@cib.de> 2020-02-19 16:48:28 +0100 commit 509a02aa96f6d7620cb0bf06c20b3bfa0641be92 (patch) tree facaac50f8f787613756e1339501a421f98e6700 parent 4d5c0eaf3e0d3d3bcd9e691fffee19b75f3d6631 (diff) tdf#125682 sw: don't insert empty page before first page with even number Bisected with: bibisect-linux64-6.5 Adding Cc: to Michael Stahl
AFAIK even-first Word documents never worked properly so i'm not sure this can be called a regression. as the commit message says: A useful improvement would be to detect in Word import filters that the first page is even numbered and then invert the mapping of all of the page styles, i.e. odd header/footer->left instead of right, and if mirrorMargins, pgMar left -> inner instead of outer.
ah right, if i revert the commit, i get a blank page inserted before the first one, so it was broken before anyway => removing regression
*** Bug 162148 has been marked as a duplicate of this bug. ***
It does seem a little strange that we "don't insert empty page before first page with even number", but we do insert an empty page in the middle of a document if there is a page change from even-to-even or odd-to-odd. I would expect that inverting left and right for the first section would cause disaster at export time... But it's a pretty low priority problem - rarely do people start a document with an even page number.
Also look at Test-DOC-saved.doc (attachment 130353 [details] from bug 105148). It's export-to-DOCX was affected by the patch for bug 161521. So after this import bug is fixed, export to DOCX should be tested/verified as well.