Bug 84399 - FILEOPEN: DOCX drawing canvas error (wrong size and text wrapping option imported)
Summary: FILEOPEN: DOCX drawing canvas error (wrong size and text wrapping option impo...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.3.0.4 release
Hardware: All All
: high normal
Assignee: Miklos Vajna
URL:
Whiteboard: BSA target:7.0.0 target:6.4.3
Keywords: bibisected, bisected, filter:docx, regression
: 101931 104384 109128 129700 (view as bug list)
Depends on:
Blocks: DOCX-Frames DOCX-Anchor-and-Text-Wrap
  Show dependency treegraph
 
Reported: 2014-09-27 17:52 UTC by Ljiljan
Modified: 2020-09-02 18:50 UTC (History)
12 users (show)

See Also:
Crash report or crash signature:


Attachments
additional explanation and various DOCX examples (226.58 KB, application/x-zip-compressed)
2014-09-27 17:52 UTC, Ljiljan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ljiljan 2014-09-27 17:52:42 UTC
Created attachment 106967 [details]
additional explanation and various DOCX examples

Problem description:

When DRAWING CANVAS is used in MS Office for drawing shapes and textboxes, LibreOffice does not correctly open MS Office DOCX file.
 

Steps to reproduce:
1. Insert Drawing canvas in MS Office (Insert -> Shapes -> Drawing Canvas) and create some lines and textboxes on it (type some text so it fits in at least two lines)... or alternatively, download some drawing examples from attachment in this bud.
2. Save it as DOCX.
3. Open it in LibreOffice. 

Current behavior:

Textboxes didn't keep their size and text wrapping option is disabled. Position is however kept. 

Expected behavior:

Textboxes should keep their size and text wrapping option enabled. 

              
Operating System: All
Version: 4.3.2.2 release
Comment 1 Joel Madero 2014-09-28 03:15:10 UTC
Confirmed:

Ubuntu 14.04 x64 running E17
LibreOffice 4.3.0 release (at least this old - confirmed with bibisect, so not a minor release regression). Updating  version as version is the oldest version that the problem shows itself.

Bibsected + regression

 ce81582766413e76a63c047bfd6227ab12fcd866 is the first bad commit
commit ce81582766413e76a63c047bfd6227ab12fcd866
Author: Bjoern Michaelsen <bjoern.michaelsen@canonical.com>
Date:   Mon May 12 01:37:21 2014 +0000

    source-hash-3d1b1eea83703919c43620f9adef05e5b24c4bed
    
    commit 3d1b1eea83703919c43620f9adef05e5b24c4bed
    Author:     Caolán McNamara <caolanm@redhat.com>
    AuthorDate: Wed Mar 19 12:27:07 2014 +0000
    Commit:     Caolán McNamara <caolanm@redhat.com>
    CommitDate: Wed Mar 19 15:37:56 2014 +0000
    
        coverity#735757 Unchecked dynamic_cast
    
        Change-Id: I268b9c4df81598f68b8da2c258d70c2118b69d82

:100644 100644 55e483c4a724436ee0e792f72b90a3d301c77064 46da6ac1f330f20bd0a4ebebe27910e2c0e49e49 M	ccache.log
:100644 100644 109c99441737bb49205950d8d26f994ab7ade8ca 88c019e4e1f3e2591ad255a84ebb468863e18b3f M	commitmsg
:100644 100644 489b61544cecbe2b2fc066ce04098712be6374d8 80fe30beee6868b7ef681d3d1040c51b252661ea M	make.log
:040000 040000 8d40ab0ff1362b98fa7646afb94a246acb54cd98 fe475bf82129a0a85c90230737d704d41ab77938 M	opt


# bad: [423a84c4f7068853974887d98442bc2a2d0cc91b] source-hash-c15927f20d4727c3b8de68497b6949e72f9e6e9e
# good: [65fd30f5cb4cdd37995a33420ed8273c0a29bf00] source-hash-d6cde02dbce8c28c6af836e2dc1120f8a6ef9932
git bisect start 'latest' 'oldest'
# good: [e02439a3d6297a1f5334fa558ddec5ef4212c574] source-hash-6b8393474974d2af7a2cb3c47b3d5c081b550bdb
git bisect good e02439a3d6297a1f5334fa558ddec5ef4212c574
# good: [4850941efe43ae800be5c76e1102ab80ac2c085d] source-hash-980a6e552502f02f12c15bfb1c9f8e6269499f4b
git bisect good 4850941efe43ae800be5c76e1102ab80ac2c085d
# good: [a900e72b6357882284c5955bdf939bf14269f5fb] source-hash-dd1050b182260a26a1d0ba6d0ef3a6fecc3f4e07
git bisect good a900e72b6357882284c5955bdf939bf14269f5fb
# skip: [e80660c5a1d812cd04586dae1f22767fc3778c4a] source-hash-07c60c8ee2d1465544a6a39e57bc06b3690b8dfb
git bisect skip e80660c5a1d812cd04586dae1f22767fc3778c4a
# bad: [df9bcaed2faa2a8d11b19f877cdff3a12a887278] source-hash-6ba9692d8bbe3e3c245aca9a7c928e81178d05f1
git bisect bad df9bcaed2faa2a8d11b19f877cdff3a12a887278
# bad: [9d57c189d74551d2b3770cc81139ea10a62e672f] source-hash-5b5e62650354788e50b44f32c22b687b2018aba9
git bisect bad 9d57c189d74551d2b3770cc81139ea10a62e672f
# bad: [ce81582766413e76a63c047bfd6227ab12fcd866] source-hash-3d1b1eea83703919c43620f9adef05e5b24c4bed
git bisect bad ce81582766413e76a63c047bfd6227ab12fcd866
# good: [4e0843c411a14e3065f96f196eeb4d603664f97f] source-hash-51605bf98220d7e54dee20af17c33cebe23a0813
git bisect good 4e0843c411a14e3065f96f196eeb4d603664f97f
# good: [bfba063779a12bca219e4a9fba9bba8b67821ec1] source-hash-86a32589e90ee983159fb5b2c6a594428ab7d422
git bisect good bfba063779a12bca219e4a9fba9bba8b67821ec1
# good: [db29eee512d03b1dc0139b3752bbe7931b165377] source-hash-77b6c1602aaa0bd059077765e7fabb53d9e6ddeb
git bisect good db29eee512d03b1dc0139b3752bbe7931b165377
# good: [e34eadbaf87d8e71ebd9cf34e6acc628ad0b4650] source-hash-7b56d303300fbf592473b28b654fd22fec110962
git bisect good e34eadbaf87d8e71ebd9cf34e6acc628ad0b4650
# first bad commit: [ce81582766413e76a63c047bfd6227ab12fcd866] source-hash-3d1b1eea83703919c43620f9adef05e5b24c4bed
Comment 2 Björn Michaelsen 2014-10-14 00:56:54 UTC
There 22 writer commits in range b56d303300fbf592473b28b654fd22fec110962..3d1b1eea83703919c43620f9adef05e5b24c4bed, of which:

commit 81f9fe3a14f0fc99afbfa7ce3a26a9c7855d0919
Author: Miklos Vajna <vmiklos@collabora.co.uk>
Date:   Wed Mar 19 09:59:32 2014 +0100

    fdo#74401 VML groupshape import: only handle v:rect as TextShape
    
    Regression from commit 75934fc178ed90b56d77eb1efebed5bdac8427b6 (VML
    import: handle shape with text inside groupshape as TextShape,
    2014-01-17), the problem was that TextShape is also a kind of rectangle,
    so that shouldn't be used for all shape with text in groupshapes, just
    for v:rect elements.
    
    This fix gives the required text wrapping for the referenced bugdoc
    without turning the rest of the shapes into rectangles.
    
    Change-Id: I6e343c65a869e335b641728adbc7984ee85377b5

looks kind of suspicious.
Comment 3 Björn Michaelsen 2014-10-16 14:59:18 UTC Comment hidden (obsolete)
Comment 4 Robinson Tryon (qubit) 2015-12-14 05:19:21 UTC Comment hidden (obsolete)
Comment 5 Xisco Faulí 2016-09-26 09:26:15 UTC
Adding Cc: to Miklos Vajna
Comment 6 QA Administrators 2018-07-19 02:41:46 UTC Comment hidden (obsolete)
Comment 7 Ljiljan 2018-07-21 05:44:27 UTC
Drawings that were created on Canvas in Microsoft Word 2007 still cannot be opened correctly. Tested with version 6.0.5.2.
Comment 8 Commit Notification 2020-03-03 06:57:39 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/198685ded79d64b21023ee85e9a15fa1b32705a0

tdf#84399 VML import: map <v:shape o:spt="202"> to TextShape

It will be available in 7.0.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 9 Xisco Faulí 2020-03-04 09:51:52 UTC
Verified in

Version: 7.0.0.0.alpha0+
Build ID: c57d6d39c80844c9d4c6bfed85cc151e52a67b34
CPU threads: 4; OS: Linux 4.19; UI render: default; VCL: gtk3; 
Locale: en-US (en_US.UTF-8); UI-Language: en-US
Calc: threaded

it fixes *all* the layout problems in *all* the files attached. Niceeee!!

@Miklos, thanks for fixing this issue!!
Comment 10 Commit Notification 2020-03-04 09:55:06 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-6-4":

https://git.libreoffice.org/core/commit/7d210f5c9bf7db39f0043d8d218b337b9a78053d

tdf#84399 VML import: map <v:shape o:spt="202"> to TextShape

It will be available in 6.4.3.

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 11 Xisco Faulí 2020-03-04 09:57:34 UTC
*** Bug 104384 has been marked as a duplicate of this bug. ***
Comment 12 Xisco Faulí 2020-03-04 10:16:49 UTC
*** Bug 101931 has been marked as a duplicate of this bug. ***
Comment 13 Xisco Faulí 2020-03-04 11:26:13 UTC
@Timur, I found I couple of regressions 198685ded79d64b21023ee85e9a15fa1b32705a0 fixed. Maybe you are able to find some more...
Comment 14 NISZ LibreOffice Team 2020-04-21 16:14:32 UTC
*** Bug 109128 has been marked as a duplicate of this bug. ***
Comment 15 NISZ LibreOffice Team 2020-09-02 18:50:06 UTC
*** Bug 129700 has been marked as a duplicate of this bug. ***