Bug 113066 - [EMF] Writer wrongly shows graphics semicircles from CAD that were pasted as GDI
Summary: [EMF] Writer wrongly shows graphics semicircles from CAD that were pasted as GDI
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: graphics stack (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: low normal
Assignee: Bartosz
URL:
Whiteboard: target:7.4.0 target:7.3.3
Keywords: filter:emf
Depends on:
Blocks: EMF-WMF
  Show dependency treegraph
 
Reported: 2017-10-12 12:36 UTC by archie
Modified: 2022-03-11 11:46 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:
Regression By:


Attachments
Documents with a graphics image which is misinterpreted by LibreOffice, and those created by MSWord are correctly opened by MSWord and incorrectly by LibrOffice Writer (1.85 MB, application/x-zip-compressed)
2017-10-12 12:36 UTC, archie
Details
Libr_Office and Word files to illustrate bug (25.36 KB, application/x-zip-compressed)
2017-10-30 14:07 UTC, archie
Details
sample (14.75 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2017-10-30 14:58 UTC, Xisco Faulí
Details
comparison MSO 2010 and LibreOffice 6.0 (11.47 KB, image/png)
2017-10-30 14:59 UTC, Xisco Faulí
Details
extracted image (7.55 KB, image/x-emf)
2018-11-01 12:46 UTC, Regina Henschel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description archie 2017-10-12 12:36:35 UTC
Created attachment 136922 [details]
Documents with a graphics image which is misinterpreted by LibreOffice, and those created by MSWord are correctly opened by MSWord and incorrectly by LibrOffice Writer

Images with semicircles appear to be misinterpreted with the semi-circle drawn back-to-front.
Comment 1 Xisco Faulí 2017-10-27 00:10:22 UTC Comment hidden (obsolete)
Comment 2 archie 2017-10-30 14:02:07 UTC Comment hidden (obsolete)
Comment 3 archie 2017-10-30 14:07:40 UTC
Created attachment 137372 [details]
Libr_Office and Word files to illustrate bug

I have attached 2 files to show the issue:

The word PYREOS has been copied from a CAD package to the and pasted (as GDI metafile) in LibreOffice to Pyreos.doc.  I have done exactly the same operation using Microsoft Word and saved as Pyreos_Word.docx.

If you open Pyreos.odt in LibreOffice you will see the word PYREOS with all the circular sections reversed.  I cannot open this file in Microsoft Word.

If you open Pyreos_Word.docx in Microsoft word, you will see that this has been correctly translated.  If you open this file in LibreOffice, it displays it incorrectly.

I hope that this illustrates the issue more clearly.
Comment 4 Xisco Faulí 2017-10-30 14:58:01 UTC
Confirmed in

Version: 6.0.0.0.alpha1+
Build ID: 0c46b3a9a384d5b70a708c3e9459a790dd815c63
CPU threads: 1; OS: Windows 6.1; UI render: default; 
Locale: fr-BE (es_ES); Calc: group
Comment 5 Xisco Faulí 2017-10-30 14:58:17 UTC
Created attachment 137374 [details]
sample
Comment 6 Xisco Faulí 2017-10-30 14:59:26 UTC
Created attachment 137375 [details]
comparison MSO 2010 and LibreOffice 6.0
Comment 7 Xisco Faulí 2017-10-30 15:02:02 UTC
Reproduced back to 

LibreOffice 3.3.0 
OOO330m19 (Build:6)
tag libreoffice-3.3.0.4
Comment 8 QA Administrators 2018-11-01 03:52:47 UTC Comment hidden (obsolete)
Comment 9 Roman Kuznetsov 2018-11-01 09:58:15 UTC
still repro in

Version: 6.2.0.0.alpha0+
Build ID: cec31fdedd7c94f4ebf903a66456a75867db22b0
CPU threads: 4; OS: Windows 6.1; UI render: default; VCL: win; 
TinderBox: Win-x86@42, Branch:master, Time: 2018-10-21_22:54:44
Locale: ru-RU (ru_RU); Calc: threaded
Comment 10 Regina Henschel 2018-11-01 12:46:54 UTC
Created attachment 146223 [details]
extracted image

This has nothing to do with Word, but only with the image itself. I have attached the single image. Inserting the image directly in a Writer document shows the same problem. Inserting the image in a Draw document is wrong too, but in a different way.
Comment 11 QA Administrators 2019-11-02 03:45:36 UTC Comment hidden (obsolete)
Comment 12 QA Administrators 2021-11-02 04:10:09 UTC Comment hidden (obsolete)
Comment 13 Roman Kuznetsov 2022-03-01 12:26:02 UTC
In
Version: 7.4.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: aafd4c8431aa511511375ff39f87a7f8bde726e0
CPU threads: 8; OS: Windows 10.0 Build 19043; UI render: Skia/Raster; VCL: win
Locale: ru-RU (ru_RU); UI: en-US
Calc: threaded

the EMF looks so much better but still it isn't ideally
Comment 14 Commit Notification 2022-03-10 20:20:31 UTC
Bartosz Kosiorek committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/7b28920382d3820344bfc4075bac98f85e838dba

tdf#113066 tdf#142204 EMF Implement SETARCDIRECTION

It will be available in 7.4.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 15 Xisco Faulí 2022-03-11 11:45:23 UTC
Verified in

Version: 7.4.0.0.alpha0+ / LibreOffice Community
Build ID: dddee125cc32f1ad5228e598a7de04e9654e65c1
CPU threads: 8; OS: Linux 5.10; UI render: default; VCL: gtk3
Locale: es-ES (es_ES.UTF-8); UI: en-US
Calc: threaded

@Bartosz, thanks for fixing this issue!!
Comment 16 Commit Notification 2022-03-11 11:46:46 UTC
Bartosz Kosiorek committed a patch related to this issue.
It has been pushed to "libreoffice-7-3":

https://git.libreoffice.org/core/commit/6ab0f5a11d88dc40e56eb8210ed9493973d44e27

tdf#113066 tdf#142204 EMF Implement SETARCDIRECTION

It will be available in 7.3.3.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.