Bug 165083 - FILESAVE ODT->DOCX: margins swapped for EVEN/ODD page styles
Summary: FILESAVE ODT->DOCX: margins swapped for EVEN/ODD page styles
Status: ASSIGNED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
24.8.0.0 beta1+
Hardware: All All
: medium normal
Assignee: Oliver Specht (CIB)
URL:
Whiteboard:
Keywords: bibisected, bisected, filter:docx, regression
Depends on:
Blocks: Writer-Styles-Page-Odd-Even
  Show dependency treegraph
 
Reported: 2025-02-06 17:43 UTC by Justin L
Modified: 2025-03-20 07:35 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
bigMargins.odt: exaggerated example (12.84 KB, application/vnd.oasis.opendocument.text)
2025-02-06 17:43 UTC, Justin L
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Justin L 2025-02-06 17:43:53 UTC
Created attachment 199019 [details]
bigMargins.odt: exaggerated example

Exporting to DOCX from non-DOCX files inverts the margin for left pages.

This started in 25.2 (backported to 24.8) with
commit 8ef9573f087b86f93860c8d07d04b60a40512836
Author: Oliver Specht on Tue Jun 11 08:51:09 2024 +0200
    tdf#161521 fix page margins on first page with mirrord layout

Steps to reproduce
1.) open bigMargins.odt. (Noticed the first page has content on the left side, and the second page has it on the right side.)
2.) export to DOCX format and reload.

Notice that the big margins are applied to the left side in both cases after Oliver's commit. Probably GetFilter needs to be consulted at export time? (although that might not be terribly reliable if the document isn't reloaded immediately, but is instead re-saved...)

I noticed this when looking at Test-DOC-saved.doc (attachment 130353 [details] from bug 105148). So the same problem comes when converting from DOC to DOCX.

Found by Collabora's mso-test
Comment 1 mikhail.machine 2025-02-11 08:07:07 UTC
Hello Justin L,

Thank you for reporting the bug. I can confirm that the bug is present in master.

Version: 25.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: a8ec21adf255b70bb6eeb0a1717190df303d8b26
CPU threads: 12; OS: Windows 10 X86_64 (build 19045); UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_FI); UI: en-US
/Writer: threaded