Bug 41068 - DOCX import: image wrapping polygon wrongly imported causes embedded image to be partially obscured
Summary: DOCX import: image wrapping polygon wrongly imported causes embedded image to...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.4.3 release
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Michael Stahl (CIB)
URL:
Whiteboard: bibisected35 bibisected35older target...
Keywords: regression
Depends on:
Blocks:
 
Reported: 2011-09-21 00:06 UTC by Kevin Hunter
Modified: 2014-07-03 22:44 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot of Libreoffice not displaying a complete image, juxtaposed with OpenOffice.org 3.2's (reference) rendering (199.53 KB, image/png)
2011-09-21 00:06 UTC, Kevin Hunter
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin Hunter 2011-09-21 00:06:17 UTC
Created attachment 51447 [details]
Screenshot of Libreoffice not displaying a complete image, juxtaposed with OpenOffice.org 3.2's (reference) rendering

With the same document as attached to Bug #41013, the spiral-esque image is only partially displayed.  Attached are two screenshots (merged into one image) of what is displayed and a reference image.  Note that the partial image is also what is sent to the printer.
Comment 1 Kevin Hunter 2011-09-21 00:12:43 UTC
For reference, this is tested against the core git master branch, as pulled Sep 20, 2011.

-----
$ uname -a
Linux hani 2.6.35-30-generic #59-Ubuntu SMP Tue Aug 30 19:00:03 UTC 2011 x86_64 GNU/Linux

$ git branch
* master

$ git log --pretty=oneline -1
3e5edf6ca9d3bc56549602bda2adc855dd57f658 Add missing chart data point ODF1.2 standard symbols
-----
Comment 2 Rainer Bielefeld Retired 2011-09-21 03:27:06 UTC
I also saw that problem with the few 3.4 and 3.5 versions that did not crash trying to open the document. This might be related to the root problem in Bug 41013

@Cédric:
Please feel free to reassign (or reset Assignee to default) if it’s not your area or if provided information is not sufficient. Please set Status to ASSIGNED if you accept this Bug.
Comment 3 Björn Michaelsen 2011-12-23 13:24:52 UTC
Since all new unconfirmed bugs start in state UNCONFIRMED now and old unconfirmed bugs were moved to NEEDINFO with a explanatory comment, all bugs promoted above those bug states to NEW and later are automatically confirmed making the CONFIRMED whiteboard status redundant. Thus it will be removed.
Comment 4 Korrawit Pruegsanusak 2012-02-25 15:37:35 UTC
Regression does not appear in oldest version of bibisect-3.5.tar.lzma and must be older.
Comment 5 Björn Michaelsen 2012-02-27 11:41:21 UTC
@Korrawit: Thanks for bibisecting! The text on the wiki page I wrote was unfortunately misleading, it has to say:
"Regression does appear in the oldest version of bibisect-3.5.tar.lzma and must be older." (I just confirmed that myself.)

I corrected the wiki-page, sorry for the confusion and thanks again for bibisecting!
Comment 6 Michael Stahl (CIB) 2013-08-30 12:01:12 UTC
rendered correctly in OOo 3.2.1, OOo 3.3
rendered wrongly in OOo 3.4 beta, LO 3.4.3, AOO 4.0.0

(don't have a LO 3.4.x release older than 3.4.3 here)

so it broke in OOo between OOo 3.3 and DEV300_m103 (which
is what the libreoffice-3-4 branch was based on)
Comment 7 Michael Stahl (CIB) 2013-08-30 15:19:31 UTC
removning this bit in document.xml results in a correct rendering:

            <wp:wrapTight wrapText="bothSides">
              <wp:wrapPolygon edited="0">
                <wp:start x="9120" y="470"/>
                <wp:lineTo x="6240" y="939"/>
                <wp:lineTo x="-480" y="6104"/>
                <wp:lineTo x="480" y="16435"/>
                <wp:lineTo x="6720" y="21130"/>
                <wp:lineTo x="8160" y="21130"/>
                <wp:lineTo x="13440" y="21130"/>
                <wp:lineTo x="15360" y="21130"/>
                <wp:lineTo x="20640" y="16904"/>
                <wp:lineTo x="21120" y="15496"/>
                <wp:lineTo x="21600" y="10330"/>
                <wp:lineTo x="21600" y="5635"/>
                <wp:lineTo x="15840" y="939"/>
                <wp:lineTo x="12480" y="470"/>
                <wp:lineTo x="9120" y="470"/>
              </wp:wrapPolygon>
            </wp:wrapTight>

... so regression was introduced by:

commit 86898639d4144a078ed295d0a8bef406868802cb
Author:     Henning Brinkmann <hbrinkm@openoffice.org>
AuthorDate: Tue Aug 17 11:18:40 2010 +0200

    writerfilter09: use WrapPolygonHandler

... so in Word one can click on the picture then
Picture Tools->Wrap Text->Edit Wrap Points
and see that there are about 14 wrap points around
the circle but evidently we don't import those properly.
Comment 8 Michael Stahl (CIB) 2013-08-30 17:35:23 UTC
fixed on master
Comment 9 Commit Notification 2013-08-30 17:40:01 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

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

fdo#41068: writerfilter: fix image wrap polygon import



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 Commit Notification 2013-08-31 18:05:19 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-4-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=67ef58d1b338b4a57cae69174de987626250c651&h=libreoffice-4-1

fdo#41068: writerfilter: fix image wrap polygon import


It will be available in LibreOffice 4.1.2.

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.