Download it now!
Bug 74401 - FILEOPEN: DOCX: Figures with text which are on canvas become rectangles
Summary: FILEOPEN: DOCX: Figures with text which are on canvas become rectangles
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.3.0.0.alpha0+ Master
Hardware: All All
: medium normal
Assignee: Miklos Vajna
URL:
Whiteboard: target:4.3.0
Keywords: regression
Depends on:
Blocks: mab4.3
  Show dependency treegraph
 
Reported: 2014-02-02 18:05 UTC by Alexandr
Modified: 2014-10-14 00:56 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
A screenshot with LO 4.3.0 19dec2013 (89.05 KB, image/png)
2014-02-02 18:05 UTC, Alexandr
Details
A screenshot with LO 4.3.0 18jan2014 (40.86 KB, image/png)
2014-02-02 18:06 UTC, Alexandr
Details
screenshot 4.2 vs 4.3 (73.88 KB, image/png)
2014-02-16 09:32 UTC, tommy27
Details
screenshot from Word 2007 of test document previously shown in LO 4.2.0.4 and master (94.82 KB, image/png)
2014-03-18 15:29 UTC, V Stuart Foote
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandr 2014-02-02 18:05:17 UTC
Created attachment 93242 [details]
A screenshot with LO 4.3.0 19dec2013

Figures in docx, which contain text, become rectangles in LibreOffice. I create two bugreports: one for figures on canvas and other for figures which are NOT on canvas, because for the case with canvas is reproducible only on some 4.3.0alpha0 builds. I am not sure about the word “canvas”, because I have only localized version of MS Word. Please, correct me if it is not correct word.

This bugreport is about the case WITH canvas.

How to reproduce:
1. Create new document in MS Word 2010 (I don't try other versions)
2. Add new canvas (Insert->figure->new canvas)
3 Create new figure, for example, ellipse (Insert → Figure). Make sure that the figure is on the canvas
4 Right click on figure, add text
5 Save the file in docx format.
6 Open the file in LibreOffice writer

You see a rectangle instead of the figure.
In bug 74397 attachment 93238 [details] top line of figures demonstrate the bug

I tried different versions of LibreOffice. Figures have normal shape in versions 4.1.4.2,  4.2.0.3, 4.3.0.0.alpha0+ Build ID: fdc1b1fc174da27e3016370fdb603d6bbe49af4d TinderBox: Linux-rpm_deb-x86_64@46-TDF, Branch:master, Time: 2013-12-26_10:00:24

Figures become rectangles in
Version: 4.3.0.0.alpha0+
Build ID: 602c87b4259d118e5db6d8a990c4695103f916dd
TinderBox: Linux-rpm_deb-x86_64@46-TDF, Branch:master, Time: 2014-01-18_00:02:21
and
Version: 4.3.0.0.alpha0+
Build ID: 599b3c91dc5bd9c04e70b38246acac9914a6b219
TinderBox: Linux-rpm_deb-x86_64@46-TDF, Branch:master, Time: 2014-02-01_23:39:30
Comment 1 Alexandr 2014-02-02 18:06:41 UTC
Created attachment 93243 [details]
A screenshot with LO 4.3.0 18jan2014
Comment 2 Jorendc 2014-02-12 18:57:23 UTC
Mmh, looks very related to bug 70942... looks like there was a patch committed on 13 January 2014.

Kind regards,
Joren
Comment 3 Alexandr 2014-02-13 16:33:25 UTC
Thank you, Jorendc, for noticing me the bug 70942. That bug is about shapes without canvas, so another my report (bug 74397) is a duplicate. It seems I should improve my searching skills.
Comment 4 tommy27 2014-02-16 07:08:21 UTC
(In reply to comment #0)
> ...
> 
> This bugreport is about the case WITH canvas.
> 
> How to reproduce:
> 1. Create new document in MS Word 2010 (I don't try other versions)
> ....

please attach a test case for those who don't have  MS Word 2010
Comment 5 Alexandr 2014-02-16 09:01:32 UTC
Tommy, the test document is attachment 93238 [details] for bug 74397. Top line of figures in this document is on canvas.
Comment 6 tommy27 2014-02-16 09:32:15 UTC
Created attachment 94155 [details]
screenshot 4.2 vs 4.3

(In reply to comment #5)
> Tommy, the test document is attachment 93238 [details] for bug 74397. Top
> line of figures in this document is on canvas.

confirmed. that is nasty. I add a comparative screenshot between 4.2 and 4.3
Comment 7 V Stuart Foote 2014-03-18 15:29:41 UTC
Created attachment 96009 [details]
screenshot from Word 2007 of test document previously shown in LO 4.2.0.4 and master

A screenshot from Word 2007 of the https://bugs.freedesktop.org/attachment.cgi?id=93238 test document.  Notice that even 4.2.x OOXML import is mishandling the shapes.
Comment 8 Miklos Vajna 2014-03-18 20:14:36 UTC
This is a regression from 75934fc178ed90b56d77eb1efebed5bdac8427b6:

Author: Miklos Vajna <vmiklos@collabora.co.uk>
Date:   Fri Jan 17 17:25:08 2014 +0100

    VML import: handle shape with text inside groupshape as TextShape
    
    This matches the behavior of the WW8 import and gives us the required
    text wrapping when the shape text doesn't fit in a single line.
    
    Change-Id: I32a13516503620344d313593834be29a3dc9f726

I'll take care of this.
Comment 9 Commit Notification 2014-03-19 09:07:32 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=81f9fe3a14f0fc99afbfa7ce3a26a9c7855d0919

fdo#74401 VML groupshape import: only handle v:rect as TextShape



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 10 Miklos Vajna 2014-03-19 09:07:50 UTC
Regression was master-only, no backport.
Comment 11 Alexandr 2014-03-22 13:50:24 UTC
Hello.
The bug is not reproducible with LibreOffice Writer 4.3.0.0.alpha0+ Build ID: 926435ef5ab26e647c09887d471bde25b24e1c16 TinderBox: Linux-rpm_deb-x86_64@46-TDF, Branch:master, Time: 2014-03-22_00:09:10

Miklos, could you also handle rounded rectangles as textshapes? They were not affected by this bug (see shape 2 “Smooth angle rectangle” in the screenshots)