Bug 138027 - FILEOPEN DOCX Shape anchored to paragraph with page break falls to next page
Summary: FILEOPEN DOCX Shape anchored to paragraph with page break falls to next page
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.1.0.4 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:docx
Depends on:
Blocks: OOXML-Shapes
  Show dependency treegraph
 
Reported: 2020-11-06 07:32 UTC by NISZ LibreOffice Team
Modified: 2023-12-14 12:28 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file from Word with shape anchored to the non-last paragraph - good (572.72 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2020-11-06 07:32 UTC, NISZ LibreOffice Team
Details
Screenshot of the working document side by side in Word and Writer (101.87 KB, image/png)
2020-11-06 07:33 UTC, NISZ LibreOffice Team
Details
Example file from Word with shape anchored to the last paragraph (572.67 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2020-11-06 07:33 UTC, NISZ LibreOffice Team
Details
Screenshot of the non-working document side by side in Word and Writer (97.82 KB, image/png)
2020-11-06 07:33 UTC, NISZ LibreOffice Team
Details
Similar file made from scratch in W13 - no error (16.64 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2020-11-06 07:42 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-11-06 07:32:31 UTC
Created attachment 167049 [details]
Example file from Word with shape anchored to the non-last paragraph - good

Attached document was minimized from attachment #83023 [details] (the Hayden Management document in DOCX).
Looks like the first page shapes are anchored to the last paragraph that also has the page break. 
This causes Writer to add a new paragraph after the page break and anchor the shapes to that, moving them to the second page.

Adding another paragraph to the first page and anchoring the shape to that however makes the shape stay on the first page.

However there must be something else to this since I can’t reproduce the problematic behavior with a new file from scratch.

Steps to reproduce:
    1. Open attached file

Actual results:
Shape is on the second page.

Expected results:
Shape on the first page.

LibreOffice details:
Version: 7.1.0.0.alpha1+ (x64)
Build ID: eeed9103350d886f5913aed9b525d863a421dffa
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: hu-HU (hu_HU); UI: en-US
Calc: CL

Already in:
Verzió: 4.1.0.4
Build az.: 89ea49ddacd9aa532507cbf852f2bb22b1ace28

Page break was not yet imported in:
Verzió: 4.0.0.3 (Build az.: 7545bee9c2a0782548772a21bc84a9dcc583b89)
Comment 1 NISZ LibreOffice Team 2020-11-06 07:33:02 UTC
Created attachment 167050 [details]
Screenshot of the working document side by side in Word and Writer
Comment 2 NISZ LibreOffice Team 2020-11-06 07:33:20 UTC
Created attachment 167051 [details]
Example file from Word with shape anchored to the last paragraph
Comment 3 NISZ LibreOffice Team 2020-11-06 07:33:44 UTC
Created attachment 167052 [details]
Screenshot of the non-working document side by side in Word and Writer
Comment 4 NISZ LibreOffice Team 2020-11-06 07:42:27 UTC
Created attachment 167053 [details]
Similar file made from scratch in W13 - no error
Comment 5 Dieter 2020-11-21 18:01:42 UTC
I confirm it with attachment 167051 [details] and

Version: 7.0.3.1 (x64)
Build ID: d7547858d014d4cf69878db179d326fc3483e082
CPU threads: 4; OS: Windows 10.0 Build 19042; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: threaded

in comparison with Word 2016

I also confirm, that attachment 167049 [details] works
Comment 6 QA Administrators 2022-11-22 03:35:26 UTC Comment hidden (obsolete)
Comment 7 Dieter 2022-11-22 07:04:02 UTC
Still a problem in

Version: 7.4.3.1 (x64) / LibreOffice Community
Build ID: 3793858a34d8fef5b92f8fee233f97766f05e281
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: CL