Bug 76803 - FILEOPEN: Image in .docx header not displayed
Summary: FILEOPEN: Image in .docx header not displayed
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.2.0.4 release
Hardware: Other All
: medium normal
Assignee: Michael Stahl (allotropia)
URL:
Whiteboard: BSA target:4.4.0 target:4.3.1 target:...
Keywords: regression
Depends on:
Blocks:
 
Reported: 2014-03-30 17:50 UTC by Edward Betts
Modified: 2014-07-15 07:17 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Sample document. (38.96 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2014-03-30 17:50 UTC, Edward Betts
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Edward Betts 2014-03-30 17:50:35 UTC
Created attachment 96625 [details]
Sample document.

Somebody sent me a Word document in docx format, it contains an image that doesn't appear when I open the document in OpenOffice Writer. I can view picture by right clicking it, picking "Picture..." then the Picture tab.
Operating System: Windows 7
Version: 4.2.2.1 release
Comment 1 sophie 2014-04-11 07:45:17 UTC
Confirmed using Version: 4.2.3.3
Build ID: 882f8a0a489bc99a9e60c7905a60226254cb6ff0 Ubuntu 13.10. The logo in the header is not displayed, but you can access the properties. 
Set as new, plateform all - Sophie
Comment 2 tommy27 2014-05-03 23:00:48 UTC
4.0.6.2 and 4.1.5.3 releases under Win7x64 partially show a small portion of that image in the header (upper left corner), same results in AOO 4.1.0

4.2.3.3 and 4.3.0.0.alpha1+ (*) shows nothing

(*) Build ID: 0b03f7ed575838f90e6b1ebec3538a3a214f81fb
TinderBox: Win-x86@42, Branch:master, Time: 2014-04-30_02:30:2
Comment 3 Michael Stahl (allotropia) 2014-07-03 22:44:18 UTC
the image in the header has a negative crop, but that is not the problem...

bibisect range:
 6c3d74e8b779b1eb2d9779ed84f1518e078113c4..f42768fe0b60ecbbe9c68d775329bf28c0690131

regression from:

commit f8307e5ae11e8235fa1fb88ed52625bf9c650dc2
Author:     Michael Stahl <mstahl@redhat.com>
AuthorDate: Fri Aug 30 19:13:40 2013 +0200

    fdo#41068: writerfilter: fix image wrap polygon import


before the commit we get:

debug:11638:1:  gcd 4294746427 1350
debug:11638:1: ret 1

now:

debug:14717:1:  gcd 220869 1350
debug:14717:1: ret 9
debug:14717:1: nNumerator -220869 mnNumerator 477194047 nGCD 9
debug:14717:1: x 477194047 / 150

debug:14304:1: WrapPolygon [0]: 3181293 0
debug:14304:1: WrapPolygon [1]: 3181293 3661
debug:14304:1: WrapPolygon [2]: 16988 3661
debug:14304:1: WrapPolygon [3]: 16988 0
debug:14304:1: WrapPolygon [4]: 3181293 0

the gcd result of 9 is correct now for -220869 but the subsequent division
is an unsigned one and changes the sign of -220869 to +477194047.

with signed division:

debug:15322:1:  gcd 220869 1350
debug:15322:1: ret 9
debug:15322:1: nNumerator -220869 mnNumerator -24541 nGCD 9
debug:15322:1: x -24541 / 150

debug:15322:1: WrapPolygon [0]: -163 0
debug:15322:1: WrapPolygon [1]: -163 3661
debug:15322:1: WrapPolygon [2]: 16988 3661
debug:15322:1: WrapPolygon [3]: 16988 0
debug:15322:1: WrapPolygon [4]: -163 0

fixed on master
Comment 4 Commit Notification 2014-07-03 22:45:27 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

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

fdo#76803: writerfilter: fix image wrap polygon import again



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 5 Commit Notification 2014-07-05 13:57:00 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-4-3":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=e255e5eedf9263b4a98bdf74bcbbc25a52f09bec&h=libreoffice-4-3

fdo#76803: writerfilter: fix image wrap polygon import again


It will be available in LibreOffice 4.3.1.

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 6 Commit Notification 2014-07-05 14:19:49 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-4-2":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=9bd699883800fe8bb554000b769d27fd5dcdfd83&h=libreoffice-4-2

fdo#76803: writerfilter: fix image wrap polygon import again


It will be available in LibreOffice 4.2.6.

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 7 Commit Notification 2014-07-15 07:17:11 UTC
Jan Holesovsky committed a patch related to this issue.
It has been pushed to "master":

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

fdo#76803: Kill resourcemodel::Fraction, and use Fraction from tools instead.



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 8 Commit Notification 2014-07-15 07:17:25 UTC
Jan Holesovsky committed a patch related to this issue.
It has been pushed to "master":

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

fdo#76803: Unit test so that this never regresses.



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.