Bug 66039 - FILEOPEN: table in DOCX text box is not imported - add groupshape support
Summary: FILEOPEN: table in DOCX text box is not imported - add groupshape support
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: Other All
: high normal
Assignee: Attila Bakos (NISZ)
URL:
Whiteboard: target:7.4.0
Keywords: filter:docx
: 73022 81958 96642 100074 105378 119142 122960 127506 132374 132512 132516 141181 (view as bug list)
Depends on:
Blocks: DOC-Textbox DOCX-Grouped-Shapes
  Show dependency treegraph
 
Reported: 2013-06-22 09:33 UTC by Andras Timar
Modified: 2022-02-02 17:19 UTC (History)
13 users (show)

See Also:
Crash report or crash signature:
Regression By:


Attachments
bugdoc (63.50 KB, application/msword)
2013-06-22 09:33 UTC, Andras Timar
Details
bugdoc compare MSO-LO (74.48 KB, image/jpeg)
2016-11-17 16:25 UTC, Timur
Details
bugdoc saved in MSO as DOCX (57.90 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2020-10-19 07:30 UTC, Timur
Details
Resaved bugdoc with patch in Writer 7.3 master (333.30 KB, image/png)
2021-09-28 12:47 UTC, Attila Bakos (NISZ)
Details
Resolved Fixed (300.50 KB, image/jpeg)
2022-01-06 11:56 UTC, Attila Bakos (NISZ)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andras Timar 2013-06-22 09:33:40 UTC
Created attachment 81199 [details]
bugdoc

The table in text box is imported incorrectly.
Comment 1 Jorendc 2013-06-25 22:31:45 UTC
I can confirm this behavior using Mac OSX 10.8.3 with LibreOffice 4.1.0.1 RC. Only top text is visible, no table.

Kind regards,
Joren
Comment 2 Jan Koberstein 2013-06-26 08:14:24 UTC
Hello,

I can confirm that the attached document is displayed impropperly/the table inside text box is ignored with
OS: Win7 Home Premium 32bit, LibO version: 4.1.0.1 (Build ID: 1b39567) and
OS: Win7 Home Premium 32bit, LibO version: 3.6.6.2 (Build ID: f969faf) and
OS: Linux Mint 12 64bit, LibO version: 3.4.4 OOO340m1 (Build: 402).

A short look into the file-information of the doc shows the file was created with MS Word 9.0 (MS Word 2000).
So I created a similar doc with MS Word 2007, saved it as DOCX and DOC and openend both in above mentioned LibO versions and the new docs are displayed as expected.

I suppose this problem only affects documents saved with older MS Word versions that are no longer supported by MS.

Regards,
Jan Koberstein
Comment 3 Jorendc 2013-06-26 09:05:13 UTC
Nice research Jan. Really appreciated!

@Timar: you know the origin of this document? If it is your document, are you able to reproduce Jan' findings?

Kind regards,
Joren
Comment 4 Andras Timar 2013-06-26 09:20:39 UTC
(In reply to comment #3)
It is out of question, that you can create a document form scratch, that looks the same and opens well in LibreOffice. Almost all import problems can be worked around that way. In this case, the problem probably is, that a feature of binary doc format is not implemented in LibreOffice -- tables in groupshapes(?). See bug 66040 for the rtf counterpart, which has been fixed already.
Comment 5 QA Administrators 2015-04-19 03:20:21 UTC Comment hidden (obsolete)
Comment 6 Andras Timar 2015-04-19 07:55:30 UTC Comment hidden (obsolete)
Comment 7 QA Administrators 2016-09-20 09:24:47 UTC Comment hidden (obsolete)
Comment 8 Andras Timar 2016-09-20 09:34:32 UTC
Confirmed with Version: 5.3.0.0.alpha0+
Build ID: 0f33526ec27a3abcfa1ca9348a46238b1432e5e4
Comment 9 Timur 2016-11-17 16:25:47 UTC
Created attachment 128819 [details]
bugdoc compare MSO-LO
Comment 10 Timur 2017-01-31 12:05:12 UTC
Since Andras referenced bug 66040 that Miklos fixed for RTF, I add him and description from that bug. 
DOCX saved with MSO and opened in LO is also wrong.
Comment 11 QA Administrators 2018-10-01 02:53:33 UTC Comment hidden (obsolete)
Comment 12 Timur 2018-10-01 15:10:26 UTC Comment hidden (obsolete)
Comment 13 QA Administrators 2019-10-02 02:56:20 UTC Comment hidden (obsolete)
Comment 14 Andras Timar 2019-10-02 12:36:39 UTC Comment hidden (obsolete)
Comment 15 Timur 2020-10-19 07:30:11 UTC
Created attachment 166490 [details]
bugdoc saved in MSO as DOCX

Repro 7.1+. Both DOC and DOCX.
Comment 16 Attila Bakos (NISZ) 2021-09-28 12:47:10 UTC
Created attachment 175317 [details]
Resaved bugdoc with patch in Writer 7.3 master

Hi,

This ticket is about two type of bugdoc:
1) DOC (binary format): still bad.
2) DOCX (OOXML): soon, with patch (https://gerrit.libreoffice.org/c/core/+/122577) comes better, see my attachment.
Comment 17 László Németh 2022-01-06 09:18:59 UTC
*** Bug 127506 has been marked as a duplicate of this bug. ***
Comment 18 László Németh 2022-01-06 09:41:57 UTC
*** Bug 73022 has been marked as a duplicate of this bug. ***
Comment 19 László Németh 2022-01-06 09:42:09 UTC
*** Bug 81958 has been marked as a duplicate of this bug. ***
Comment 20 Commit Notification 2022-01-06 09:42:16 UTC
Attila Bakos (NISZ) committed a patch related to this issue.
It has been pushed to "master":

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

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

It will be available in 7.4.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 21 László Németh 2022-01-06 09:42:23 UTC
*** Bug 122960 has been marked as a duplicate of this bug. ***
Comment 22 László Németh 2022-01-06 09:44:46 UTC
tdf#66039 DOCX: import textboxes (with tables, images etc.) in group shapes

Text boxes in group shapes were imported as shapes, losing
complex text content: tables (tdf#66039), colors (tdf#73022),
images (tdf#81958), lists, paragraph styles, hyperlinks
(tdf#122960) and track changes.

Note: a few unit tests have been deactivated temporarily.
Test document "groupshape-trackedchanges.docx" of
testGroupshapeTrackedchanges is imported correctly now:
with track changes, and the test was modified accordingly.

Follow-up to commit 2951cbdf3a6e2b62461665546b47e1d253fcb834
"tdf#143574 OOXML export/import of textboxes in group shapes".
Comment 23 Attila Bakos (NISZ) 2022-01-06 11:24:29 UTC
*** Bug 132516 has been marked as a duplicate of this bug. ***
Comment 24 Attila Bakos (NISZ) 2022-01-06 11:24:39 UTC
*** Bug 132374 has been marked as a duplicate of this bug. ***
Comment 25 Attila Bakos (NISZ) 2022-01-06 11:24:49 UTC
*** Bug 132512 has been marked as a duplicate of this bug. ***
Comment 26 Attila Bakos (NISZ) 2022-01-06 11:44:29 UTC
*** Bug 96642 has been marked as a duplicate of this bug. ***
Comment 27 Attila Bakos (NISZ) 2022-01-06 11:53:46 UTC
*** Bug 141181 has been marked as a duplicate of this bug. ***
Comment 28 Attila Bakos (NISZ) 2022-01-06 11:56:08 UTC
Created attachment 177344 [details]
Resolved Fixed
Comment 29 Timur 2022-01-06 13:30:26 UTC
Wow for duplicates. 
Now QA should go thru all and verify, and redirect it's duplicates here.
Comment 30 Attila Bakos (NISZ) 2022-01-07 07:47:01 UTC
I am so sorry but i did not paid attention, and i closed this issue, however only the docx part fixed the doc still bad. So I want to ask someone to file a new bug for the doc part. Thanks.
Comment 31 Timur 2022-01-10 13:41:07 UTC
*** Bug 119142 has been marked as a duplicate of this bug. ***
Comment 32 Timur 2022-01-10 13:42:35 UTC
*** Bug 105378 has been marked as a duplicate of this bug. ***
Comment 33 Timur 2022-01-10 14:00:22 UTC Comment hidden (obsolete)
Comment 34 Attila Bakos (NISZ) 2022-01-10 14:03:03 UTC
(In reply to Timur from comment #33)
> I went thru duplicates. Thanks once more for fixing this!!
> I'll report DOC and put in See Also.

Thank you for creating the report for the doc part. You are welcome! ;)
Comment 35 Gabor Kelemen (allotropia) 2022-01-16 23:59:37 UTC
*** Bug 100074 has been marked as a duplicate of this bug. ***
Comment 36 Commit Notification 2022-01-31 16:17:19 UTC
Attila Bakos (NISZ) committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/e1dc4a5815a56eef27d2c83f7971e0eb1ac09b45

Related tdf#66039 DOCX WPG import: Do not put extra paragraph at the end

It will be available in 7.4.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 37 Commit Notification 2022-02-02 13:21:54 UTC
Attila Bakos (NISZ) committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/3b0a0e70cb67fc2e1f9999d2e8cbb9cfcd8c670e

Related tdf#66039 DOCX import: fix Z-order of group shapes

It will be available in 7.4.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 38 Attila Bakos (NISZ) 2022-02-02 13:46:29 UTC
*** Bug 73022 has been marked as a duplicate of this bug. ***
Comment 39 Commit Notification 2022-02-02 17:19:28 UTC
Attila Bakos (NISZ) committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/3ee6e4e7c2046c4124b5c34f053888d3ee0a5a53

Related tdf#66039: restore unit tests disabled temporarily

It will be available in 7.4.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.