Bug 154192 - FILEOPEN DOCX: import fails special case for anchor-after-break in last paragraph of the document
Summary: FILEOPEN DOCX: import fails special case for anchor-after-break in last parag...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:docx
Depends on:
Blocks: DOCX-Page
  Show dependency treegraph
 
Reported: 2023-03-14 20:41 UTC by Justin L
Modified: 2023-10-05 14:39 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
shapeAnchorPageBreak3c.docx: (6.85 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2023-03-14 20:41 UTC, Justin L
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Justin L 2023-03-14 20:41:07 UTC
Created attachment 185960 [details]
shapeAnchorPageBreak3c.docx:

I guess you could call it a regression because anchoring was wrong before 7.6, but it worked in this special situation. In any case, the difference here is simply adding a <w:p/> at the end of the document causes the shapes to move before the break. LO has never identified the last paragraph of the document during import, so this is really inherited from OOo.

Compare this to ooxmlexport18's tdf153613_textboxAfterPgBreak3.docx (which is not the last paragraph). [I used Word 2010.]

Steps to reproduce
1- open the document in LO. Notice that the two shapes on the first page.

In Word, they are on the second page - the first page is blank.

As a code pointer, see 7.6 commit a9bc19c2d4a35606668aa2dcc53355651b71ee78
Author: Justin Luth on Wed Feb 15 13:54:31 2023 -0500
    tdf#153613 writerfilter: don't always split para for shape w/ pagebreak

Before this commit it accidentally looked good.
Comment 1 Justin L 2023-03-15 10:56:51 UTC Comment hidden (obsolete)
Comment 2 Justin L 2023-04-03 15:37:38 UTC Comment hidden (no-value)
Comment 3 Xisco Faulí 2023-10-04 11:09:40 UTC
Hi Justin
I found that attachment 104971 [details] from bug 82858 is also affected by the same issue
Comment 4 Justin L 2023-10-05 14:39:20 UTC
(In reply to Justin L from comment #1)
> The other commit that will be triggered by a bibisect is 7.6's commit
> 828fde37632a5bb0542b6925454690a5287d6490. 
I reverted that one...