Bug 154481 - Fileopen DOCX: Last pages cut after grouped shape
Summary: Fileopen DOCX: Last pages cut after grouped shape
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.4.0.0 beta1+
Hardware: All All
: high normal
Assignee: Attila Bakos (NISZ)
URL:
Whiteboard: target:7.6.0 target:7.5.4 target:7.4.7
Keywords: bibisected, bisected, regression
Depends on:
Blocks: DOCX-Grouped-Shapes
  Show dependency treegraph
 
Reported: 2023-03-30 14:39 UTC by Timur
Modified: 2023-05-04 13:53 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Timur 2023-03-30 14:39:47 UTC
Open MSO DOCX attachment 186318 [details]. 
See that original 8 pages (or 7 before in LO) opens as 5 now, cutting last 2 pages. In real example it's from 117 to 34 pages. 

This is a regression from 7.4:

https://git.libreoffice.org/core/+/121cbc250b36290f0f8c7265fea57256dad69553

author	Attila Bakos (NISZ) <bakos.attilakaroly@nisz.hu>	Thu Nov 11 14:02:12 2021 +0100
committer	László Németh <nemeth@numbertext.org>	Thu Jan 06 10:41:32 2022 +0100

tdf#66039 DOCX: import textboxes (with tables, images etc.) in group shapes

I'm not seeing that Attila is active, also add CC NISZ.

Note that this DOCX is also suffering from bug 154478.
Comment 1 raal 2023-04-02 05:48:11 UTC
Confirm with Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 8e97ef854fb225dac37185c1911894b7d206fa8d
CPU threads: 4; OS: Linux 5.19; UI render: default; VCL: gtk3
Locale: cs-CZ (cs_CZ.UTF-8); UI: en-US
Calc: threaded
Comment 2 Attila Bakos (NISZ) 2023-04-06 11:47:48 UTC
As i saw, there will be a problem with the TOC, if i remove that works.
In details the problem is that, when a textbox starts i put that to the context stack so the content will be written into the textbox. After it ends i remove that. The TOC uses similar mechanism but if the TOC field has a group shape with textbox, the TOC will be put into the stack again resulting in broken handling (because the TOC will be in the top in the stack not the textbox). If i remove the TOC from the stack before i put the textbox, it works again, without page loss. So there is a patch for that: https://gerrit.libreoffice.org/c/core/+/150099 Hopefully this will fix the original 117 page bugdoc as well.
Comment 3 Commit Notification 2023-04-13 15:19:47 UTC
Attila Bakos (NISZ) committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/94de79e7d3c980b576192d2f264bee658716163a

tdf#154481 sw DOCX import: fix page loss and freezing at ODT export

It will be available in 7.6.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 4 Commit Notification 2023-04-13 20:55:30 UTC
Attila Bakos (NISZ) committed a patch related to this issue.
It has been pushed to "libreoffice-7-5":

https://git.libreoffice.org/core/commit/9d4cb8c356c0f83c81dc8e96b3e96e3c009a19f6

tdf#154481 sw DOCX import: fix page loss and freezing at ODT export

It will be available in 7.5.4.

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 Timur 2023-04-17 10:51:45 UTC
Attila, thanks for the fix, page 6 is fine now. Some notes:

- With the patch, in LO comments remain empty on page 4 which is bug 154478 but appeared from after grouped image (page 6 comment 5 and later)

- original DOCX stucks on what seems ordinary content, I'm waiting for bibi repo update to check and try to make minimal sample.
Comment 6 Commit Notification 2023-04-18 17:31:17 UTC
Attila Bakos (NISZ) committed a patch related to this issue.
It has been pushed to "libreoffice-7-4":

https://git.libreoffice.org/core/commit/4304ac507781a258c8e72390a90a9672b840546a

tdf#154481 sw DOCX import: fix page loss and freezing at ODT export

It will be available in 7.4.7.

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 7 NISZ LibreOffice Team 2023-04-19 07:36:20 UTC
VERIFIED IN:
Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 61b41646c5a93ca24f2c9f143cdb0da2c9258989
CPU threads: 8; OS: Windows 10.0 Build 19044; UI render: Skia/Vulkan; VCL: win
Locale: hu-HU (hu_HU); UI: hu-HU
Calc: CL threaded
Comment 8 Justin L 2023-05-04 13:53:38 UTC
(In reply to Commit Notification from comment #3)
> tdf#154481 sw DOCX import: fix page loss and freezing at ODT export

This patch has been superseded by the one in bug 154478.