From 4a35c118a3a6b954827953674cc9bad435c394ee Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Mon, 26 Oct 2020 21:16:28 +0100 Subject: tdf#137413 EMF import: fix transparency in the PDF fallback case Commit d75c5b38911557173c54a78f42ff220ab3918573 (tdf#136836 emfio: speed up import of EMF import when the orig PDF is available, 2020-09-17) improved both performance and correctness of the EMF import, in case it had a PDF fallback. It turns out that PDF fallback can be nominally non-transparent, and still the EMF equivalent supports transparency. Fix the problem by enabling transparency in the PDF-in-EMF case. Change-Id: I4d1585a5db6f28bd9c9cb380b5f193f4d5edcc8d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104849 Reviewed-by: Miklos Vajna Tested-by: Jenkins --- emfio/inc/mtftools.hxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'emfio/inc') diff --git a/emfio/inc/mtftools.hxx b/emfio/inc/mtftools.hxx index 5c0c60973350..70471b66ea21 100644 --- a/emfio/inc/mtftools.hxx +++ b/emfio/inc/mtftools.hxx @@ -441,6 +441,7 @@ namespace emfio BitmapEx aBmpEx; tools::Rectangle aOutRect; sal_uInt32 nWinRop; + bool m_bForceAlpha = false; BSaveStruct(const Bitmap& rBmp, const tools::Rectangle& rOutRect, sal_uInt32 nRop) : aBmpEx(rBmp) @@ -448,10 +449,12 @@ namespace emfio , nWinRop(nRop) {} - BSaveStruct(const BitmapEx& rBmpEx, const tools::Rectangle& rOutRect, sal_uInt32 nRop) + BSaveStruct(const BitmapEx& rBmpEx, const tools::Rectangle& rOutRect, sal_uInt32 nRop, + bool bForceAlpha = false) : aBmpEx(rBmpEx) , aOutRect(rOutRect) , nWinRop(nRop) + , m_bForceAlpha(bForceAlpha) {} }; -- cgit