Created attachment 160718 [details] Example file from Word Attached document contains a text box with page number inserted from Word using the Header / Footer tools -> Page number -> On page margin -> Page X -> Emphasized band on the left. When opening this file in Writer, the text box horizontal size grows significantly. Same preset has a right side variant, which works: relative width from right margin opens with correct size. Steps to reproduce: 1. Open attached document 2. Or insert a custom Word page number field with: 3. Header / Footer tools -> Page number -> On page margin -> Page X -> Emphasized band, save document and open in Writer Actual results: Text box is almost as wide as the page instead of about 2cm. Expected results: Narrow box at the left margin. LibreOffice details: Version: 7.0.0.0.alpha1+ (x64) Build ID: 0e3196c49b84651df20b770d5cd7f0bbb19dfc40 CPU szálak: 4; OS: Windows 6.3 Build 9600; Felületmegjelenítés: Skia/Raster; VCL: win; Locale: hu-HU (hu_HU); UI: hu-HU Calc: CL Also happens in: Verzió: 6.0.0.3 Build az.: 64a0f66915f38c6217de274f0aa8e15618924765 CPU szálak: 4; OS: Windows 6.3; Felületmegjelenítés: GL; Területi beállítások: hu-HU (hu_HU); Calc: CL Version: 5.0.0.5 Build ID: 1b1a90865e348b492231e1c451437d7a15bb262b Locale: hu-HU (hu_HU) Version: 4.3.0.4 Build ID: 62ad5818884a2fc2e5780dd45466868d41009ec0 But not in: Verzió: 4.2.0.4 Build az.: 05dceb5d363845f2cf968344d7adab8dcfb2ba71 Bibisected using bibisect-win32-4.3 to: URL: https://cgit.freedesktop.org/libreoffice/core/commit/?id=166af05c63598426c375544b5e1e01818aa13747 author Miklos Vajna <vmiklos@collabora.co.uk> 2014-01-27 17:51:50 +0100 committer Miklos Vajna <vmiklos@collabora.co.uk> 2014-01-27 18:00:10 +0100 DOCX import: handle wp14:pctWidth for Writer TextFrames Adding CC to: Miklos Vajna
Created attachment 160719 [details] Shape size settings in Word
Created attachment 160720 [details] Screenshot of the original document side by side in Word and Writer
Reproduced in Version: 7.0.0.0.alpha0+ Build ID: b540e8bc7111ba03ee675a507c098e140a5e81dc CPU threads: 4; OS: Linux 4.19; UI render: default; VCL: gtk3; Locale: en-US (en_US.UTF-8); UI-Language: en-US Calc: threaded Adding Cc to: Miklos Vajna
Created attachment 161839 [details] Page number frame in the right page margin (In reply to NISZ LibreOffice Team from comment #0) > Created attachment 160718 [details] > Same preset has a right side variant, which works: relative width from right > margin opens with correct size. I see the same error with the page number in the right margin. It is an import error. Neither ODF (current 1.3) nor LibreOffice have means to express the width relative to the page margin, but the width is always a fixed length. So the relative value of Word should be transformed in a fixed length during import. You might keep the fact, that it is relative in Word in the operability bag, so that you can recreate the percent value on export to docx. The position as relative to "right margin" is interpreted correctly and can be written to ODF without problems. In case you intend to extend LibreOffice so, that width of objects (which objects?) can be set relative to a reference (which references?) please write a feature request for ODF for review here before finishing the implementation.
@Szabolcs, Balázs: it seems, LO has already supported this in most of the use cases, see lo-ext "layout-attribute" in https://issues.oasis-open.org/browse/OFFICE-3854, and the related code parts.
Szabolcs Toth committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/7380905abc0833d9e4c4fe731d76174db8a8724c tdf#132976 DOCX import: fix shape width relative to left margin It will be available in 7.1.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.
Szabolcs Toth committed a patch related to this issue. It has been pushed to "libreoffice-7-0": https://git.libreoffice.org/core/commit/5451833f3af5582a8cab7e4b3da402f083f56908 tdf#132976 DOCX import: fix shape width relative to left margin It will be available in 7.0.0.1. 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.