Bug 159306 - LibreOffice Draw 7.6 handles metafiles worse than 7.4
Summary: LibreOffice Draw 7.6 handles metafiles worse than 7.4
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
Version:
(earliest affected)
7.6.4.1 release
Hardware: x86 (IA32) All
: medium normal
Assignee: Bartosz
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
Depends on:
Blocks: EMF-WMF
  Show dependency treegraph
 
Reported: 2024-01-21 01:41 UTC by mostafa
Modified: 2025-01-23 19:01 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
WMF example (20.58 KB, image/x-wmf)
2024-01-21 09:44 UTC, Telesto
Details
Screenshot (42.88 KB, image/png)
2024-01-21 09:45 UTC, Telesto
Details
EMF+ image where the issue is reproducible (130.02 KB, image/emf)
2025-01-23 19:01 UTC, Bartosz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mostafa 2024-01-21 01:41:47 UTC
Description:
I updated from LO 7.4 to 7.6, and there was a behavior change where certain .wmf files look worse than they did in 7.4.

Previously, importing .wmf files from a chemical structure editor drew all the lines with 0.01" thickness (and it looked good). Now, they're drawn with 0.00" thickness and I have to go in, break the object, select all the lines, and manually set them to 0.01". On top of that, when "breaking" the object, the components are scattered all over the page. I found that if the object is placed so that the top left corner is precisely at the top left corner of the page, things stay in place after breaking. The lines can then all be selected and set to 0.01", but this is unusably tedious especially for complicated drawings.

Regarding the line-thickness issue, I suspect it's from this commit: https://gerrit.libreoffice.org/c/core/+/146551

I linked to an example file and screenshot explaining what I mean in the 'Other Information' section.

Steps to Reproduce:
1. Insert -> Image -> .wmf file (I attached the one I used in the example)
2. Right click -> Break

Actual Results:
1. When the file is imported, all the lines are set to 0.00" thickness, which looks quite bad. They used to import as 0.01" thickness by default.

2. After 'Right click -> Break', the .wmf object's elements are randomly scattered all over the document. This doesn't happen if the .wmf is positioned exactly at the top-left corner of the page, however.

Expected Results:
1. Inserting a .wmf file should have the default line-width be 0.01", or perhaps have it possible to change the default

2. 'Right click -> Break'ing a .wmf object should keep all the components in place, as it used to do in LO7.4


Reproducible: Always


User Profile Reset: Yes

Additional Info:
A screenshot and example .wmf file can be found here:
https://github.com/LibreOffice/core/commit/bbdbe8ea2ef176ef6f08b30b3c18876c2c4f0c22#commitcomment-135821157
Comment 1 Telesto 2024-01-21 09:44:25 UTC
Created attachment 192082 [details]
WMF example
Comment 2 Telesto 2024-01-21 09:45:23 UTC
Created attachment 192083 [details]
Screenshot
Comment 3 Telesto 2024-01-21 09:53:43 UTC
Confirm
Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: ba8f4bff6015013013df652efbfaf4d9ae10c881
CPU threads: 8; OS: macOS 13.6.3; UI render: Skia/Raster; VCL: osx
Locale: nl-NL (nl_NL.UTF-8); UI: en-US
Calc: threaded
Comment 4 raal 2024-12-15 07:18:57 UTC
This seems to have begun at the below commit in bibisect repository/OS linux-64-7.6.
Adding Cc: to Bartosz Kosiorek ; Could you possibly take a look at this one?
Thanks
 ed17fa2b8aa1a7d5f410d1fbd1212de76c7401ee is the first bad commit
commit ed17fa2b8aa1a7d5f410d1fbd1212de76c7401ee
Author: Jenkins Build User <tdf@pollux.tdf>
Date:   Tue Oct 24 18:12:47 2023 +0200

    source bbdbe8ea2ef176ef6f08b30b3c18876c2c4f0c22

146551: tdf#142018 Properly create Pen width if style is COSMETIC | https://gerrit.libreoffice.org/c/core/+/146551
Comment 5 Bartosz 2025-01-23 19:01:20 UTC
Created attachment 198709 [details]
EMF+ image where the issue is reproducible

With this image, it looks better than with LO 7.4