Bug 77454 - WW8 import mangles negative Crop values on Images. imgages are then almost invisible
Summary: WW8 import mangles negative Crop values on Images. imgages are then almost in...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.2.3.3 release
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Michael Stahl (allotropia)
URL:
Whiteboard: target:4.3.0 target:4.2.5
Keywords: bibisected, regression
Depends on:
Blocks:
 
Reported: 2014-04-14 22:46 UTC by Cristian Gómez
Modified: 2022-06-11 04:41 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
.doc original file, pdf resulting file and screenshot with how I see it (280.92 KB, application/7z)
2014-04-14 22:46 UTC, Cristian Gómez
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Cristian Gómez 2014-04-14 22:46:01 UTC
Created attachment 97368 [details]
.doc original file, pdf resulting file and screenshot with how I see it

Hi guys

I'm having trouble with latest LibreOffice build on my pc (I have Ubuntu and installed via DEB packages version 4.2.3.3 Build ID: 882f8a0a489bc99a9e60c7905a60226254cb6ff). In LibreOffice 3.5 on a CentOS server (installed via repos), the .doc opened in a better way (not perfect because original .doc file doesn't respect margins). In attached .png screenshot you can see that the image isn't visible but when you click on it, you can see properties dialog and others showing the image properly but in the file or the PDF aren't images there. 

Do you know if maybe there's one library I missed at manual upgrade via DEB packages? or how can I debug this in order to help more

Thanks in advance
Comment 1 sophie 2014-04-22 16:43:14 UTC
Hi, I think it's a duplicate of bug 76803, the document produced is a docx, but it's the same result. Could you have a look at the other bug? Sophie
Comment 2 tommy27 2014-05-03 23:07:26 UTC
tested under Win7x64

image completely shown in LibO 4.1.5.3

mostly not shown in LibO 4.2.0.4 and 4.2.3.3 except a thin vertical line in the middle

not shown at all in LibO 4.3.0.0.alpha1+
Build ID: 0b03f7ed575838f90e6b1ebec3538a3a214f81fb
TinderBox: Win-x86@42, Branch:master, Time: 2014-04-30_02:30:23


@sophie 
I think bug 76803 is a different issue since the behaviour across different releases varies.
Comment 3 Andras Timar 2014-05-04 17:50:25 UTC
First bad commit is in the range of 2fb0b401ae351744773a19872377c076831f8c62..ebeff1814cbecfba9bbeaeba8067b58f71703a39, probably it is 2e51675... Resolves: #i123500# unified Graphic processing to use GraphicPrimitive2D.
Comment 4 Commit Notification 2014-05-24 16:38:51 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

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

fdo#77454: fix WW8 import/export of negative image crop



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-05-25 19:38:38 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=18959222dd3161df03e3f7213cf497819260d69f&h=libreoffice-4-2

fdo#77454: fix WW8 import/export of negative image crop


It will be available in LibreOffice 4.2.5.

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-05-26 09:52:50 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=9f504936095411fcefdb65b6e09bd557068af20f&h=libreoffice-4-3

fdo#77454: fix WW8 import/export of negative image crop


It will be available in LibreOffice 4.3.

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-05-27 11:38:03 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

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

fdo#77454: sw: ww8 import: add heuristic to ignore mangled crop values



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-05-27 11:39:33 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=5f80a1059b19355753ce7950f7f900f51b13c2f0&h=libreoffice-4-3

fdo#77454: sw: ww8 import: add heuristic to ignore mangled crop values


It will be available in LibreOffice 4.3.

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 9 Michael Stahl (allotropia) 2014-05-27 12:18:23 UTC
yes 2e51675 looks responsible... although...

the images all have cropping applied that is very large,
80 or 393 times the image size.
the GraphicManager based rendering effectively ignored the
excessive cropping but the drawing-layer does not
and calls OutputDevice::DrawBitmapEx with a 1-pixel width or height.

the problen is that the WW8 import and export do not handle
negative crop values properly, and round-tripping a document
through OOo/LO will corrupt the cropping values.

so first i've fixed the WW8 filters to handle negative crops
right, and then added a check to detect overly large crops
that have probably been corrupted by older LO versions
and just ignore them.
Comment 10 Commit Notification 2014-05-28 15:31:25 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=a1f385b74a542ab3caaa8abbefc39f14bf27ca72&h=libreoffice-4-2

fdo#77454: sw: ww8 import: add heuristic to ignore mangled crop values


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 11 Commit Notification 2014-06-07 14:42:36 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-4-2-5":

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

fdo#77454: sw: ww8 import: add heuristic to ignore mangled crop values


It will be available already in LibreOffice 4.2.5.

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 12 Robinson Tryon (qubit) 2015-12-17 07:56:42 UTC
Migrating Whiteboard tags to Keywords: (bibisected)
[NinjaEdit]