Bug 161521 - FILEOPEN DOCX/RTF Wrong inner margin in mirrored page, starting on Even side
Summary: FILEOPEN DOCX/RTF Wrong inner margin in mirrored page, starting on Even side
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.6.0.4 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:25.2.0 target:24.8.0.0.beta2
Keywords:
Depends on:
Blocks: RTF DOCX-Page
  Show dependency treegraph
 
Reported: 2024-06-11 23:04 UTC by Gabor Kelemen (allotropia)
Modified: 2024-07-22 17:16 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Manually made example file (148 bytes, application/msword)
2024-06-11 23:04 UTC, Gabor Kelemen (allotropia)
Details
The example file in Word 2016 and in Writer master (106.50 KB, image/png)
2024-06-11 23:06 UTC, Gabor Kelemen (allotropia)
Details
The example file saved as docx by Word 2016 (13.76 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2024-06-11 23:06 UTC, Gabor Kelemen (allotropia)
Details
The example file saved as doc by Word 2016 (22.00 KB, application/msword)
2024-06-11 23:07 UTC, Gabor Kelemen (allotropia)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gabor Kelemen (allotropia) 2024-06-11 23:04:23 UTC
Created attachment 194668 [details]
Manually made example file

Attached minimal RTF represents a special case of page margin settings: it is mirrored, with the outside margin being 4.7 cm, and starting on an even page.

This is imported incorrectly in Writer: while in Word the 4.7 cm margin is on the left side of the first page, in Writer is on the right side, changing page layout.

1. Open attached document
-> "Hello" and "Footer" text is at the very left edge of the page, instead of being 4.7 cm from it.
In Print view there is an automatically inserted blank page in front of the page.

Version: 24.8.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: 5a75414d1772d1fd998f405e3b9bd80b1f10c51f
CPU threads: 14; OS: Windows 10 X86_64 (10.0 build 19045); UI render: Skia/Raster; VCL: win
Locale: hu-HU (hu_HU); UI: en-US
Calc: default

In RTF this started in 3.6, but not yet in 3.5. 
In DOCX or DOC formats it was like this already in 3.3, and still is in master.
Comment 1 Gabor Kelemen (allotropia) 2024-06-11 23:06:04 UTC
Created attachment 194669 [details]
The example file in Word 2016 and in Writer master

Sorry, it should be 4.27 cm, not 4.7
Comment 2 Gabor Kelemen (allotropia) 2024-06-11 23:06:43 UTC
Created attachment 194670 [details]
The example file saved as docx by Word 2016
Comment 3 Gabor Kelemen (allotropia) 2024-06-11 23:07:05 UTC
Created attachment 194671 [details]
The example file saved as doc by Word 2016
Comment 4 Commit Notification 2024-06-17 22:59:18 UTC
Oliver Specht committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/8ef9573f087b86f93860c8d07d04b60a40512836

tdf#161521 fix page margins on first page with mirrord layout

It will be available in 25.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 5 Commit Notification 2024-06-21 10:48:31 UTC
Oliver Specht committed a patch related to this issue.
It has been pushed to "libreoffice-24-8":

https://git.libreoffice.org/core/commit/f28ca4a018d12557c7e8a18658e5b2cc8e7877e0

tdf#161521 fix page margins on first page with mirrord layout

It will be available in 24.8.0.0.beta2.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 6 Stéphane Guillou (stragu) 2024-07-01 15:17:27 UTC
Reproduced in:

Version: 24.2.4.2 (X86_64) / LibreOffice Community
Build ID: 51a6219feb6075d9a4c46691dcfe0cd9c4fff3c2
CPU threads: 8; OS: Linux 6.5; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: CL threaded

Fix verified in:

Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 5bf58785ba2831de4efc2afe9df463b4a753ccb1
CPU threads: 8; OS: Linux 6.5; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: CL threaded

Oliver, OK to mark as fixed?
Comment 7 Gabor Kelemen (allotropia) 2024-07-22 17:16:38 UTC
Split off the doc case which is still open, but for RTF/DOCX this looks good now.