Bug 136640 - FILEOPEN DOCX Shape anchored to page appears as anchored to paragraph
Summary: FILEOPEN DOCX Shape anchored to page appears as anchored to paragraph
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.3.0.4 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:docx, implementationError
Depends on:
Blocks: DOCX-Anchor-and-Text-Wrap
  Show dependency treegraph
 
Reported: 2020-09-10 09:46 UTC by NISZ LibreOffice Team
Modified: 2020-09-10 13:33 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file from Word with shape / textbox anchored to page (17.24 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2020-09-10 09:46 UTC, NISZ LibreOffice Team
Details
The Position and Size dialog / Layout dialog side by side (165.25 KB, image/png)
2020-09-10 09:47 UTC, NISZ LibreOffice Team
Details
Inserting empty paragraphs before the shape correctly does not change its position (67.56 KB, image/png)
2020-09-10 09:48 UTC, NISZ LibreOffice Team
Details

Note You need to log in before you can comment on or make changes to this bug.
Description NISZ LibreOffice Team 2020-09-10 09:46:54 UTC
Created attachment 165348 [details]
Example file from Word with shape / textbox anchored to page

Attached document contains two textboxes made in Word.
First one is anchored by default to text, it’s imported as anchored To paragraph. Adding paragraphs before it makes it move with the text, as expected.
The second one is anchored to page, and it’s imported as anchored To paragraph too, according to the Position and size dialog. 
But adding paragraphs before it does not make it move with the text, it stays in place as if it were indeed anchored to page.

Steps to reproduce:
    1. Open attached document
    2. Open the lower shapes Position and size dialog

Actual results:
Anchor is To paragraph.

Expected results:
Anchor should be To page.

LibreOffice details:
Version: 7.1.0.0.alpha0+ (x64)
Build ID: 34a09c9c61bff30e8c4d16132bb47b2b1b16e422
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: default; VCL: win
Locale: hu-HU (hu_HU); UI: en-US
Calc: CL

Also happens in:
Version: 7.0.0.3 (x64)
Build ID: 8061b3e9204bef6b321a21033174034a5e2ea88e
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

Verzió: 6.0.0.3
Build az.: 64a0f66915f38c6217de274f0aa8e15618924765
CPU szálak: 4; OS: Windows 6.3; Felületmegjelenítés: alapértelmezett; 
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.4.0.3
Build ID: de093506bcdc5fafd9023ee680b8c60e3e0645d7
Locale: hu_HU
In 4.3 they were imported as frames, but the problem was also present: the lower frame said it’s anchored to paragraph, but behaved correctly as if it were anchored to page.
Comment 1 NISZ LibreOffice Team 2020-09-10 09:47:51 UTC
Created attachment 165349 [details]
The Position and Size dialog / Layout dialog side by side
Comment 2 NISZ LibreOffice Team 2020-09-10 09:48:07 UTC
Created attachment 165350 [details]
Inserting empty paragraphs before the shape correctly does not change its position
Comment 3 Mike Kaganski 2020-09-10 09:58:18 UTC
This second object is not anchored "to page" in Word (which doesn't have a "to page" anchoring at all IIUC). It is anchored to text, but *positioned* to page. You may see that by adding paragraphs in the beginning of the page in Word, until the text that the object is anchored to moves to the next page; the object moves to that page along with its anchor (and then it is placed on the same fixed place on that new page).
Comment 4 Mike Kaganski 2020-09-10 10:08:57 UTC
But a *different* (actual) problem (do you see it perhaps?) is that the object that is correctly gets imported positioned to page vertically, gets *slightly* moved down (~0.02 cm per each added empty paragraph in my testing with 7.0.1.2) when you likewise insert paragraphs in the beginning of the page in Writer.
Comment 5 Mike Kaganski 2020-09-10 10:36:24 UTC
... and that movement is a regression, being OK in Version: 4.3.0.4
Build ID: 62ad5818884a2fc2e5780dd45466868d41009ec0
Comment 6 NISZ LibreOffice Team 2020-09-10 13:33:14 UTC
(In reply to Mike Kaganski from comment #4)
> But a *different* (actual) problem (do you see it perhaps?) is that the
> object that is correctly gets imported positioned to page vertically, gets
> *slightly* moved down (~0.02 cm per each added empty paragraph in my testing
> with 7.0.1.2) when you likewise insert paragraphs in the beginning of the
> page in Writer.

I see that happening in 7.0.0.3 (starting from 4.4.0.3) but not in master after:

https://git.libreoffice.org/core/+/ee6cd34eb3a2bd1f1340063ee4b90a72ff0c9532

tdf#123621 sw: fix textbox position according to DOCX