Bug 167616 - EMF: EMR_ANGLEARC is not implemented
Summary: EMF: EMR_ANGLEARC is not implemented
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
25.2.0.0 alpha0+
Hardware: All Windows (All)
: medium normal
Assignee: Bartosz
URL: https://dev.blog.documentfoundation.o...
Whiteboard: target:26.2.0 target:25.8.1
Keywords:
Depends on:
Blocks: EMF-WMF
  Show dependency treegraph
 
Reported: 2025-07-21 09:55 UTC by Sergey
Modified: 2025-08-11 10:58 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
WMF with ARCs (52.24 KB, image/x-wmf)
2025-07-21 09:56 UTC, Sergey
Details
Comparsion file (170.87 KB, image/jpeg)
2025-07-21 09:57 UTC, Sergey
Details
All of records in WMF file exists in emfreader.cxx (200.92 KB, application/pdf)
2025-07-25 11:25 UTC, Piotr Osada
Details
View of WMF file in EMF Parser (49.21 KB, image/png)
2025-07-25 11:33 UTC, Piotr Osada
Details
Test EMF image with ANGLEARC (280 bytes, image/emf)
2025-08-04 16:46 UTC, Bartosz
Details
Test ANGLEARC without ARCDIRECTION (268 bytes, image/emf)
2025-08-04 17:00 UTC, Bartosz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sergey 2025-07-21 09:55:12 UTC
Description:
Round segments of WMF files are not displayed properly

Steps to Reproduce:
insert attached WMF into Writer ot Calc

Actual Results:
Round segments of WMF file are not displayed

Expected Results:
Need that WMF files displayed correctly


Reproducible: Always


User Profile Reset: Yes

Additional Info:
Version: 25.2.5.2 (X86_64) / LibreOffice Community
Build ID: 03d19516eb2e1dd5d4ccd751a0d6f35f35e08022
CPU threads: 14; OS: Windows 10 X86_64 (10.0 build 19045); UI render: Skia/Raster; VCL: win
Locale: ru-RU (ru_RU); UI: ru-RU
Calc: CL threaded
Comment 1 Sergey 2025-07-21 09:56:42 UTC
Created attachment 201919 [details]
WMF with ARCs
Comment 2 Sergey 2025-07-21 09:57:06 UTC
Created attachment 201920 [details]
Comparsion file
Comment 3 Regina Henschel 2025-07-21 13:05:07 UTC
Error is as described. Tested with Version: 26.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 697fadb8f4efdc09091088261ca1b43984c029b4
CPU threads: 32; OS: Windows 11 X86_64 (build 26100); UI render: Skia/Vulkan; VCL: win
Locale: de-DE (de_DE); UI: en-US
Calc: threaded

and with Version: 24.8.3.2 (X86_64) / LibreOffice Community
Build ID: 48a6bac9e7e268aeb4c3483fcf825c94556d9f92
CPU threads: 32; OS: Windows 11 X86_64 (10.0 build 26100); UI render: default; VCL: win
Locale: de-DE (de_DE); UI: en-US
Calc: threaded

The attached image is correctly shown in MS Office, Softmaker Office and IrfanView. So I conclude, that it is not a problem in the image itself but a bug in LibreOffice.
Comment 4 Saburo 2025-07-22 11:52:34 UTC
Might not be related, but I tried opening the wmf in Inkscape on Windows, and although it showed a preview, it would not open the file.
Comment 5 Piotr Osada 2025-07-25 11:25:53 UTC
Created attachment 201988 [details]
All of records in WMF file exists in emfreader.cxx
Comment 6 Piotr Osada 2025-07-25 11:33:40 UTC
Created attachment 201989 [details]
View of WMF file in EMF Parser
Comment 7 Piotr Osada 2025-07-25 11:36:53 UTC
Comment on attachment 201989 [details]
View of WMF file in EMF Parser

By the way:
You can change the number in the cell indicated by a red arrow on pic to show only n of first 'code lines' of metafile.

In 'Filter' tab, you can hide selected lines.
Comment 8 Bartosz 2025-08-01 22:25:42 UTC
The Libreoffice implementation is missing EMR_ANGLEARC imlpementation. I will implement that with proper tests:

https://learn.microsoft.com/ru-ru/openspecs/windows_protocols/ms-emf/3b04a2e2-9ba5-477f-b79c-5710635d04b9
Comment 9 Bartosz 2025-08-03 06:16:10 UTC
Initial implementation is created here:
https://gerrit.libreoffice.org/c/core/+/188865
Comment 10 Bartosz 2025-08-04 16:46:42 UTC
Created attachment 202167 [details]
Test EMF image with ANGLEARC
Comment 11 Bartosz 2025-08-04 17:00:00 UTC
Created attachment 202169 [details]
Test ANGLEARC without ARCDIRECTION
Comment 12 Commit Notification 2025-08-06 12:47:18 UTC
Bartosz Kosiorek committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/1b68f859034ecc2342a772685d6563fa1ad71f7f

tdf#167616 EMF Add support for EMR_ANGLEARC record

It will be available in 26.2.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 13 Commit Notification 2025-08-08 18:03:46 UTC
Bartosz Kosiorek committed a patch related to this issue.
It has been pushed to "libreoffice-25-8":

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

tdf#167616 EMF Add support for EMR_ANGLEARC record

It will be available in 25.8.1.

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 14 Bartosz 2025-08-11 10:31:48 UTC
How I could get EMFParser? From where I could download it?