Bug 119973 - FILEOPEN EMF image has black background
Summary: FILEOPEN EMF image has black background
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
6.1.0.0.beta1+
Hardware: All All
: medium normal
Assignee: Bartosz
URL:
Whiteboard: target:26.8.0 target:26.2.3
Keywords: filter:emf
Depends on:
Blocks: Digital-Signature-Lines
  Show dependency treegraph
 
Reported: 2018-09-19 06:22 UTC by Samuel Mehrbrodt
Modified: 2026-03-17 08:34 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
screenshot (11.66 KB, image/png)
2018-09-19 06:22 UTC, Samuel Mehrbrodt
Details
bugdoc (7.70 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2018-11-13 10:49 UTC, Samuel Mehrbrodt
Details
budgoc (196.57 KB, application/vnd.oasis.opendocument.graphics)
2018-11-15 08:01 UTC, Samuel Mehrbrodt
Details
image.emf (177.25 KB, image/emf)
2018-11-15 08:33 UTC, Samuel Mehrbrodt
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Samuel Mehrbrodt 2018-09-19 06:22:26 UTC
Created attachment 145007 [details]
screenshot

After signing a signature line in ooxml, the background turns black (see attached screenshot).

This is probably a result of converting SVG to EMF for OOXML.
Comment 1 Bartosz 2018-10-01 19:53:38 UTC
Please provide sample document where problems occur, and step by step instruction how to reproduce the issue.
Comment 2 Samuel Mehrbrodt 2018-11-13 10:49:13 UTC
1. Open attached document
2. Right click on the signature line, "Sign signature line"
3. Fill in your name, select a certificate, click "Sign"

Expected: Signature line is signed and has a transparent background.
Actual: Signature line is signed, but background is black (makes it unreadable)
Comment 3 Samuel Mehrbrodt 2018-11-13 10:49:28 UTC Comment hidden (obsolete)
Comment 4 Samuel Mehrbrodt 2018-11-14 14:42:01 UTC
This is merely a display problem in LO. When opening the emf file in Word, the image is shown correctly.
Comment 5 Samuel Mehrbrodt 2018-11-15 08:01:15 UTC
Created attachment 146646 [details]
budgoc

Attaching new bugdoc including an affected emf file.
No need to sign the document, just open this file to see the problem.
Comment 6 Samuel Mehrbrodt 2018-11-15 08:33:36 UTC
Created attachment 146648 [details]
image.emf
Comment 7 Samuel Mehrbrodt 2019-01-23 11:58:23 UTC
Found out that this only happens in debug mode.
Comment 8 Timur 2020-10-28 08:39:08 UTC
Repro Win LO 6.1 and 6.2 OpenGL, no repro 6.2 GDI, repro 7.1+ GDI, no repro Skia.
Repro GTK3, no repro Skia and GEN in Linux GTK3.
Comment 9 QA Administrators 2022-10-29 03:38:48 UTC Comment hidden (obsolete)
Comment 10 QA Administrators 2024-10-29 03:12:53 UTC Comment hidden (obsolete)
Comment 11 Commit Notification 2026-03-15 16:47:30 UTC
Bartosz Kosiorek committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/f0a3081314e8e952a0f254b9d9cab0af003fb065

tdf119973 tdf160063 emfio: Reset GDI trackers on EMF+ GetDC record

It will be available in 26.8.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 12 Commit Notification 2026-03-17 07:19:16 UTC
Bartosz Kosiorek committed a patch related to this issue.
It has been pushed to "libreoffice-26-2":

https://git.libreoffice.org/core/commit/bc01cfa8588b50422078736b92de2effb25000bd

tdf119973 tdf160063 emfio: Reset GDI trackers on EMF+ GetDC record

It will be available in 26.2.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.