diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2024-07-10 12:26:37 +0500 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2024-07-10 22:20:00 +0200 |
commit | 37217909f2e7c042eab9a8b5eb1ab0a88cdda513 (patch) | |
tree | 40b360914dd3a1cd353b9cfa822eb6669eab403e /sw/qa | |
parent | b2cb093d8bd8fbfa4204cb10daec52ec6c283e04 (diff) |
tdf#161979: Render GDI metafile using drawinglayer in XOutBitmap
After the changes related to EMF+ reworking, much of the code was removed
from VCL, e.g. commit 217ad59a412ebab07a106b14c8976d20bddb9356 (tdf#111486
Removed not used EMF+ code, 2018-12-07). EMF+ code is now in drawinglayer
(see EmfPlusHelperData::processEmfPlusData). Unfortunately, we can't make
ImpGraphic::draw in VCL to use drawinglayer for rendering, because VCL is
lower in dependency tree (it only can use drawinglayercore).
Change-Id: I08f8c8ec66baf3dde1f35481144d5e1819bb5fc1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170311
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sw/qa')
-rw-r--r-- | sw/qa/extras/htmlexport/data/tdf161979_metafile.fodt | 200 | ||||
-rw-r--r-- | sw/qa/extras/htmlexport/htmlexport.cxx | 48 |
2 files changed, 248 insertions, 0 deletions
diff --git a/sw/qa/extras/htmlexport/data/tdf161979_metafile.fodt b/sw/qa/extras/htmlexport/data/tdf161979_metafile.fodt new file mode 100644 index 000000000000..f8fdcddb375f --- /dev/null +++ b/sw/qa/extras/htmlexport/data/tdf161979_metafile.fodt @@ -0,0 +1,200 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.text"> + <office:automatic-styles> + <style:style style:name="fr1" style:family="graphic" style:parent-style-name="Graphics"> + <style:graphic-properties style:vertical-pos="top" style:vertical-rel="baseline" style:horizontal-pos="center" style:horizontal-rel="paragraph" style:mirror="none" fo:clip="rect(0in, 0in, 0in, 0in)" draw:luminance="0%" draw:contrast="0%" draw:red="0%" draw:green="0%" draw:blue="0%" draw:gamma="100%" draw:color-inversion="false" draw:image-opacity="100%" draw:color-mode="standard"/> + </style:style> + </office:automatic-styles> + <office:body> + <office:text> + <text:p>Text</text:p> + <text:p><draw:frame draw:style-name="fr1" draw:name="Image1" text:anchor-type="as-char" svg:width="0.4236in" svg:height="0.7043in" draw:z-index="0"><draw:image draw:mime-type="image/x-vclgraphic"> + <office:binary-data>VkNMTVRGAQAxAAAAAQAAAAEAGwAAAAcAAAAAAAAAAAABAAAA7AkAAAEAAADsCQAAADQEAAD9 + BgAADQAAAIQAAQAFAAAAAAAAAAGFAAEABQAAAP///wABjQABAAIAAAAAAI0AAQACAAAAAACE + AAEABQAAAAAAAAABhQABAAUAAAD///8AAYoAAQA4AAAABQAyAAAAAAAAAAAAAAAAAAAAAQAA + AAIAAwAAAAAAAAD/AwAAAAAAAAAAAP8DAAAAAAAAAAAAAACLAAEAAgAAAP//jQABAAIAAAAA + AIQAAQAFAAAAAAAAAAFtAAMAUwAAAAIAFAMAACABAAAxAAAA/QYAAAUAOgAAAAEAAAAAAAAA + AAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAbQAD + AFMAAAACADQEAAAxAAAAUQEAAA4GAAAFADoAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIwAAQAAAAAA + </office:binary-data> + </draw:image> + </draw:frame></text:p> + <text:p/> + <text:p><draw:frame draw:style-name="fr1" draw:name="Image2" text:anchor-type="as-char" svg:width="2.4484in" svg:height="0.7453in" draw:z-index="1"><draw:image draw:mime-type="image/x-vclgraphic"> + <office:binary-data>VkNMTVRGAQAxAAAAAQAAAAEAGwAAAAAAAAAAAAAAAAABAAAAAQAAAAEAAAABAAAAAUsYAABl + BwAADgAAAIsAAQACAAAAIACNAAEAAgAAAAAAAAIBAFYAAAAUAEVNRl9QTFVTX0hFQURFUl9J + TkZPAAAAADgAAAAAAAAAAAAAAEoYAABkBwAAYRMAAGgbAADSAAAAKQEAAAAAgD8AAAAAAAAA + AAAAgD8AAAAAAAAAAAACAQAyAAAACABFTUZfUExVUwAAAAAgAAAAAUABABwAAAAQAAAAAhDA + 2wAAAABYAgAAWAIAAEYAAAAAAgEAwgIAAAgARU1GX1BMVVMAAAAAsAIAAB5ABQAMAAAAAAAA + AB9AAwAMAAAAAAAAADBAAgAQAAAABAAAAAAAgD8hQAcADAAAAAAAAAAiQAQADAAAAAAAAAAq + QAAAJAAAABgAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAAAArQAAADAAAAAAAAAAeQAYADAAA + AAAAAAAhQAUADAAAAAAAAAAeQAkADAAAAAAAAAAqQAAAJAAAABgAAAAAAIA/AAAAAAAAAAAA + AIA/AAAAAAAAAAAhQAcADAAAAAAAAAAqQAAAJAAAABgAAACwAiw6AAAAAAAAAACwAiw6AMBf + xAAQHsUrQAAADAAAAAAAAAAqQAAAJAAAABgAAACwAiw6AAAAAAAAAACwAiw6AMBfxAAQHsUr + QAAADAAAAAAAAAAqQAAAJAAAABgAAACwAiw6AAAAAAAAAACwAiw6AAAAQAAAN0MrQAAADAAA + AAAAAAAeQAYADAAAAAAAAAAhQAUADAAAAAAAAAAeQAkADAAAAAAAAAAqQAAAJAAAABgAAACw + Aiw6AAAAAAAAAACwAiw6AAAAQAAAN0MhQAcADAAAAAAAAAArQAA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AAAAZAAAAAIQwNsAAAAAAQAAAAIAAAAAACBAAAAA + AAAAAAAAAAAAAAAgQQAAgD8AAAAAAAAAAAAAAAAAAAAAKAAAAAIQwNsDAAAAACAAAAAAwD8A + AEDAAAAAAAAAAAAAAMC/AABAwAABgUICEMDbAAAAADIAt/8IQAsDWAAAAEwAAAACEMDbBwAA + AAAAAAAAAAAAADMlSFL0HUjZxLtHUvSdSP2QtEbgl+tIIL2XRbedHEnbZFHGHMRCScaOtEaA + 6mhJGOloRwADAwMDAwMAFUALABAAAAAEAAAACgAAACQAAAAAAgEApgAAAAgARU1GX1BMVVMA + AAAAlAAAACtAAAAMAAAAAAAAACtAAAAMAAAAAAAAAB5ABgAMAAAAAAAAACFABQAMAAAAAAAA + AAhADAQYAAAADAAAAAIQwNsAAAAAAwAAEDRADAAMAAAAAAAAAB5ACQAMAAAAAAAAACpAAAAk + AAAAGAAAAAAAgD8AAAAAAAAAAAAAgD8AAAAAAAAAACFABwAMAAAAAAAAAEwAAAAAAgEAIgAA + AAgARU1GX1BMVVMAAAAAEAAAAAJAAAAMAAAAAAAAAA4AAACMAAEAAAAAAA== + </office:binary-data> + </draw:image> + </draw:frame></text:p> + </office:text> + </office:body> +</office:document>
\ No newline at end of file diff --git a/sw/qa/extras/htmlexport/htmlexport.cxx b/sw/qa/extras/htmlexport/htmlexport.cxx index 02f0fd654620..b39d02a8ff86 100644 --- a/sw/qa/extras/htmlexport/htmlexport.cxx +++ b/sw/qa/extras/htmlexport/htmlexport.cxx @@ -3141,6 +3141,54 @@ CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, testReqIF_160867) .endsWith("foo/bar")); } +CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, testHTML_161979) +{ + // Given a document with two embedded metafiles: + createSwDoc("tdf161979_metafile.fodt"); + ExportToHTML(); + xmlDocUniquePtr pDoc = parseXml(maTempFile); + CPPUNIT_ASSERT(pDoc); + // First image: it has no EMF+ actions, and didn't use canvas rendering before the fix; + // yet, it didn't export correctly. + OUString imgName = getXPath(pDoc, "/html/body/p[2]/img"_ostr, "src"_ostr); + CPPUNIT_ASSERT(imgName.endsWith(".gif")); + INetURLObject aUrl(maTempFile.GetURL()); + aUrl.setName(imgName); + Graphic graphic; + CPPUNIT_ASSERT_EQUAL(ERRCODE_NONE, GraphicFilter().ImportGraphic(graphic, aUrl)); + + // Check that only ~4% of pixels are not transparent (before the fix, it was completely black) + BitmapEx bitmap = graphic.GetBitmapEx(); + Size size = bitmap.GetSizePixel(); + int numNonTransparent = 0; + for (tools::Long y = 0; y < size.Height(); ++y) + for (tools::Long x = 0; x < size.Width(); ++x) + if (bitmap.GetPixelColor(x, y) != COL_TRANSPARENT) + ++numNonTransparent; + CPPUNIT_ASSERT_DOUBLES_EQUAL(0.04, numNonTransparent / double(size.Height() * size.Width()), + 0.01); + + // Second image: it consists of EMF+ records (no EMF fallback). It used canvas rendering + // before the fix; it also didn't export correctly. + imgName = getXPath(pDoc, "/html/body/p[4]/img"_ostr, "src"_ostr); + CPPUNIT_ASSERT(imgName.endsWith(".gif")); + aUrl.SetURL(maTempFile.GetURL()); + aUrl.setName(imgName); + graphic.Clear(); + CPPUNIT_ASSERT_EQUAL(ERRCODE_NONE, GraphicFilter().ImportGraphic(graphic, aUrl)); + + // Check that some pixels are transparent (before the fix, it was completely black) + bitmap = graphic.GetBitmapEx(); + size = bitmap.GetSizePixel(); + numNonTransparent = 0; + for (tools::Long y = 0; y < size.Height(); ++y) + for (tools::Long x = 0; x < size.Width(); ++x) + if (bitmap.GetPixelColor(x, y) != COL_TRANSPARENT) + ++numNonTransparent; + CPPUNIT_ASSERT(numNonTransparent > 0); + CPPUNIT_ASSERT(numNonTransparent < size.Height() * size.Width()); +} + } // end of anonymous namespace CPPUNIT_PLUGIN_IMPLEMENT(); |