Bug 80503 - VIEWING: EMF images in DOC file not rendered correctly
Summary: VIEWING: EMF images in DOC file not rendered correctly
Status: RESOLVED DUPLICATE of bug 103026
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: graphics stack (show other bugs)
Version:
(earliest affected)
4.2.0.4 release
Hardware: Other Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: BSA target:4.5.0
Keywords: bibisected, filter:emf, regression
Depends on:
Blocks: EMF-WMF
  Show dependency treegraph
 
Reported: 2014-06-24 22:11 UTC by stef56
Modified: 2017-08-24 17:34 UTC (History)
9 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot LO 4.2.4.2 420m0 build 2 (133.54 KB, image/png)
2014-06-24 22:11 UTC, stef56
Details
LibO 4.0 VS 4.1 (295.84 KB, image/png)
2014-06-25 03:42 UTC, Yousuf Philips (jay) (retired)
Details
4.2.6 screenshot (188.22 KB, image/png)
2014-08-23 19:26 UTC, Yousuf Philips (jay) (retired)
Details
4.2.6 Windows screenshot (195.16 KB, image/png)
2014-08-23 19:58 UTC, Andras Timar
Details
reduced test case (40.00 KB, application/msword)
2014-12-01 21:28 UTC, Chris Sherlock
Details
EMF file not rendering correctly (287.10 KB, application/emf)
2014-12-02 00:33 UTC, Chris Sherlock
Details
import in LO 4.4.0: beta1 OK, beta2 NOK (226.09 KB, image/jpeg)
2014-12-24 18:23 UTC, Timur
Details
MSO 2010 vs. LO 5.0 alpha1 in Windows (page 3/8) (168.03 KB, image/png)
2015-05-18 13:08 UTC, Timur
Details

Note You need to log in before you can comment on or make changes to this bug.
Description stef56 2014-06-24 22:11:02 UTC
Created attachment 101703 [details]
Screenshot LO 4.2.4.2 420m0 build 2

Problem description: 

Steps to reproduce:
1. Download doc file at http://www.cgedd.fr/prix-immobilier-friggit.doc
Open the file either with LO 4.0.2.2 or Microsoft Word
Open same file with LO 4.2.42
Current behavior: Most of curves are missing

Expected behavior:

              
Operating System: Ubuntu
Version: 4.2.0.4 release
Comment 1 Yousuf Philips (jay) (retired) 2014-06-25 03:39:45 UTC
Confirmed in Linux Mint on 4.1.6, 4.2.5 and 4.3.0. This loss of lines in the graph happens on each page.
Comment 2 Yousuf Philips (jay) (retired) 2014-06-25 03:42:03 UTC
Created attachment 101715 [details]
LibO 4.0 VS 4.1

In 4.1 the horizontal lines are still there, but in 4.2 those are gone.
Comment 3 Yousuf Philips (jay) (retired) 2014-06-25 05:54:09 UTC
Confirmed this doesnt effect windows in 4.2.4 and 4.3.0.
Comment 4 Yousuf Philips (jay) (retired) 2014-06-25 06:07:02 UTC
Confirmed also on Ubuntu 14.04 with 4.2.3.
Comment 5 Xisco Faulí 2014-06-27 12:01:17 UTC
bibisected:

7663cb9f55dbc851de5f8900f865e7fc534bd77e is the first bad commit
commit 7663cb9f55dbc851de5f8900f865e7fc534bd77e
Author: Bjoern Michaelsen <bjoern.michaelsen@canonical.com>
Date:   Sat May 10 18:17:06 2014 +0000

    source-hash-f579d49aafe53f6a5500c7c4a0ca28953de9fecf
    
    commit f579d49aafe53f6a5500c7c4a0ca28953de9fecf
    Author:     Kohei Yoshida <kohei.yoshida@collabora.com>
    AuthorDate: Wed Nov 27 21:27:57 2013 -0500
    Commit:     Kohei Yoshida <kohei.yoshida@collabora.com>
    CommitDate: Wed Nov 27 21:28:45 2013 -0500
    
        Broadcast changes on undo / redo of cell range deletion.
    
        Change-Id: I48141ca77277c2de5b3526358cfadb12e3f4fbdd

:100644 100644 323b7c3f15f14e2b3f91044037bb3e932c91d27e 70cb79cf4c2810b748d2433fde445261011ff821 M	ccache.log
:100644 100644 641ff81f3a90380873e8ec16a8ea0dcf50c63fd4 b955f3fdda6ec5aa3badb09b4597cd154f988e0b M	commitmsg
:100644 100644 efe1e7f5e9bd603a7e88245cd56b90ba212630d2 d119c5c51e1908b91c86e0c216117da0664bbca9 M	make.log
:040000 040000 b13984540a4580ce7e4beeb510ef6372c89933a6 f15ec1b9c04349b3ca2f5468c6f007fde3fdacce 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
# bad: [4850941efe43ae800be5c76e1102ab80ac2c085d] source-hash-980a6e552502f02f12c15bfb1c9f8e6269499f4b
git bisect bad 4850941efe43ae800be5c76e1102ab80ac2c085d
# skip: [a043626b542eb8314218d7439534dce2fc325304] source-hash-9379a922c07df3cdb7d567cc88dfaaa39ead3681
git bisect skip a043626b542eb8314218d7439534dce2fc325304
# skip: [aba65c3e4c0df07e4909aeefb758cdb688242bf6] source-hash-827524abfb4b577d08276fde40929a9adfb7ff1a
git bisect skip aba65c3e4c0df07e4909aeefb758cdb688242bf6
# skip: [aba65c3e4c0df07e4909aeefb758cdb688242bf6] source-hash-827524abfb4b577d08276fde40929a9adfb7ff1a
git bisect skip aba65c3e4c0df07e4909aeefb758cdb688242bf6
# good: [c81a8a0dcfc1ed095a80e4485c89dd0fcaf73f31] source-hash-c69ed33628ec0b7abf6296539cf280d6c4265930
git bisect good c81a8a0dcfc1ed095a80e4485c89dd0fcaf73f31
# good: [c81a8a0dcfc1ed095a80e4485c89dd0fcaf73f31] source-hash-c69ed33628ec0b7abf6296539cf280d6c4265930
git bisect good c81a8a0dcfc1ed095a80e4485c89dd0fcaf73f31
# bad: [30cde618212ecaf5725321372bd1b8339f8e2b9f] source-hash-137f872aa8e6e598e7c7ed1ffa4d21e580e22bdb
git bisect bad 30cde618212ecaf5725321372bd1b8339f8e2b9f
# bad: [30cde618212ecaf5725321372bd1b8339f8e2b9f] source-hash-137f872aa8e6e598e7c7ed1ffa4d21e580e22bdb
git bisect bad 30cde618212ecaf5725321372bd1b8339f8e2b9f
# good: [c8a5658505930ebcd7ac5bc6057a6f7204f4e1d3] source-hash-547750e8c2d001f92e3e303ebfda9b395538e741
git bisect good c8a5658505930ebcd7ac5bc6057a6f7204f4e1d3
# good: [c8a5658505930ebcd7ac5bc6057a6f7204f4e1d3] source-hash-547750e8c2d001f92e3e303ebfda9b395538e741
git bisect good c8a5658505930ebcd7ac5bc6057a6f7204f4e1d3
# good: [3f7dffadbdabcc8730fd19598afa9f5f70dca5b5] source-hash-2abcff25137c7c9af007554c97a4512319ec2e4d
git bisect good 3f7dffadbdabcc8730fd19598afa9f5f70dca5b5
# good: [3f7dffadbdabcc8730fd19598afa9f5f70dca5b5] source-hash-2abcff25137c7c9af007554c97a4512319ec2e4d
git bisect good 3f7dffadbdabcc8730fd19598afa9f5f70dca5b5
# good: [641c999c8334a92273589d1a7931e8733fb265ef] source-hash-22029c7e17b4cb48acb058d47ec9c3b6b8b6b294
git bisect good 641c999c8334a92273589d1a7931e8733fb265ef
# good: [641c999c8334a92273589d1a7931e8733fb265ef] source-hash-22029c7e17b4cb48acb058d47ec9c3b6b8b6b294
git bisect good 641c999c8334a92273589d1a7931e8733fb265ef
# good: [277ceb260ef1f2482baf3c86e9df2787d318b957] source-hash-4f94f16ba15218e5e7a9eb4d72ddb4cb62884dbb
git bisect good 277ceb260ef1f2482baf3c86e9df2787d318b957
# good: [277ceb260ef1f2482baf3c86e9df2787d318b957] source-hash-4f94f16ba15218e5e7a9eb4d72ddb4cb62884dbb
git bisect good 277ceb260ef1f2482baf3c86e9df2787d318b957
# bad: [7663cb9f55dbc851de5f8900f865e7fc534bd77e] source-hash-f579d49aafe53f6a5500c7c4a0ca28953de9fecf
git bisect bad 7663cb9f55dbc851de5f8900f865e7fc534bd77e
# first bad commit: [7663cb9f55dbc851de5f8900f865e7fc534bd77e] source-hash-f579d49aafe53f6a5500c7c4a0ca28953de9fecf
Comment 6 Andras Timar 2014-08-23 17:08:49 UTC
It's fixed in LibreOffice 4.2.6 as a result of work of Tomaz Vajngerl (Collabora) who fixed many WMF/EMF/EMF+ related bugs.
Comment 7 Yousuf Philips (jay) (retired) 2014-08-23 19:24:51 UTC
Unfortunately, this is not fixed in 4.2.6 or 4.3.2.

Version: 4.3.2.0.0+
Build ID: d2eec11f0a6f27e13a4a834942f8acf20ae62cec
TinderBox: Linux-rpm_deb-x86@45-TDF, Branch:libreoffice-4-3, Time: 2014-08-09_04:20:14
Comment 8 Yousuf Philips (jay) (retired) 2014-08-23 19:26:15 UTC
Created attachment 105173 [details]
4.2.6 screenshot
Comment 9 Andras Timar 2014-08-23 19:58:34 UTC
Created attachment 105174 [details]
4.2.6 Windows screenshot

Interesting, it is good on Windows.
Comment 10 Yousuf Philips (jay) (retired) 2014-08-23 20:55:59 UTC
As stated in comment 3 "Confirmed this doesnt effect windows in 4.2.4 and 4.3.0.", so this is a linux only issue. :)
Comment 11 Chris Sherlock 2014-12-01 21:27:17 UTC
When was this working? Is this really a regression - if so I'd like to bisect it to find out where this started to occur.
Comment 12 Chris Sherlock 2014-12-01 21:28:34 UTC
Created attachment 110322 [details]
reduced test case
Comment 13 Chris Sherlock 2014-12-02 00:33:45 UTC
Created attachment 110334 [details]
EMF file not rendering correctly
Comment 14 Chris Sherlock 2014-12-02 01:00:34 UTC
I'm going to open that EMF file when I get home, but use:

export SAL_LOG=+INFO.cppcanvas.emf+INFO.vcl.emf

Hoepfully might show me what's going on.
Comment 15 Chris Sherlock 2014-12-02 10:16:55 UTC
OK, so it's the new EMF+ rendering engine causing this. 

To confirm, set the following in a shell, then run LibreOffice:

export EMF_PLUS_DISABLE=1

Now open the EMF I attached. Image shows fine. 

Now do the following

export EMF_PLUS_DISABLE=0

Open the EMF I attached - missing lots of stuff. 

I'll work on this. But EMF+ stuff is a mess, to be honest.
Comment 16 Tomaz Vajngerl 2014-12-02 10:43:59 UTC
Tsch.. Might be better to invest time into getting rid of cppcanvas/mtfrenderer which is responsible for EMF+ rendering (and only that!) and implement EMF+ extensions in drawinglayer.
Comment 17 Chris Sherlock 2014-12-09 03:24:46 UTC
Agreed! I've created a demo metafile viewer, about to commit this. It will reproduce the issue, and should make fixing this easier.
Comment 18 Commit Notification 2014-12-09 03:28:30 UTC
Chris Sherlock committed a patch related to this issue.
It has been pushed to "master":

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

vcl: add new metafile viewer demo - mainly for fdo#80503

It will be available in 4.5.0.

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 19 Timur 2014-12-24 18:23:11 UTC
Created attachment 111295 [details]
import in LO 4.4.0: beta1 OK, beta2 NOK

(In reply to Jay Philips from comment #3)
> Confirmed this doesnt effect windows in 4.2.4 and 4.3.0.
From 4.4.0 beta2, Windows import is not OK. Tested in Win7 64 bit. 
Is this related to changes here or somewhere else?
Comment 20 Chris Sherlock 2014-12-25 03:02:56 UTC
I think that's a different issue. Is that with EMF_PLUS_DISABLE set to 0, or set to 1?

If set to 1, then the old method doesn't handle UTF16LE to well, which is the text encoding in that EMF file.
Comment 21 Timur 2014-12-26 13:59:06 UTC
EMF_PLUS_DISABLE is not set in Windows. I agree that's a different issue because it happens also with LO 4.5.0 master, where this patch should be already.
Comment 22 Chris Sherlock 2014-12-26 14:35:37 UTC
Timur, I should have made it more clear - that commit is for a demo app. I'm working on a more robust solution.
Comment 23 Tom 2015-01-26 17:24:33 UTC
Just confirming that the daily build resolves the issue for me on Linux Mint.
Comment 24 Timur 2015-05-18 13:08:26 UTC
Created attachment 115694 [details]
MSO 2010 vs. LO 5.0 alpha1 in Windows (page 3/8)

This bug is marked as Linux only, and really, images in DOC file are not rendered correctly in Linux daily build. 
For example, EMF image on page 2/8 (should be 1/7) opens correctly in Windows and is non existing in Linux. 
But, even in Windows, images on page 3/8 (that should be 2/7) are not open correctly.
Comment 25 Robinson Tryon (qubit) 2015-12-14 05:23:39 UTC Comment hidden (obsolete)
Comment 26 Xisco Faulí 2016-09-10 15:58:23 UTC
Hi Chris,
I'm setting this ticket back to NEW as it has been inactive for more than 3
months.
Feel free to assign it back to you if you're still working on this.
Regards
Comment 27 Xisco Faulí 2016-10-05 22:08:46 UTC
Regression introduced by

author	Jan Holesovsky <kendy@collabora.com>	2013-11-27 12:11:04 (GMT)
committer	Jan Holesovsky <kendy@collabora.com>	2013-11-27 12:11:59 (GMT)
commit	843b211820075fceefe94a3bd73612ae7539361b (patch)
tree	c93f73d7bd4ffe3974fd56c83253f9d54b3918c7
parent	ec746c830c4ce86e446b929a88a3376a51871314 (diff)

cairo canvas: Line dashing size depends on the line width.

Adding Cc: to Jan Holesovsky
Comment 28 Caolán McNamara 2016-10-06 09:05:21 UTC
mark this as the duplicate of the one with the fix for the linux-specific lack of output after a bad line dash is set on a cairo context

*** This bug has been marked as a duplicate of bug 103026 ***