From 33d2cf7008de79106b5da4bba0241aa14d81d88f Mon Sep 17 00:00:00 2001 From: Bartosz Kosiorek Date: Sat, 5 Jun 2021 19:30:46 +0200 Subject: WMF Change the sign of read fields in BITBLT and DIB records Additionally the names of variables were improved, and additional checks were added for unsupported cases Change-Id: Id84ef1218c5c2a40c8d01f2d40857d892badbb9f Change-Id: I1b8571d0a627827bc1e67c2bfc6c1932d58c5233 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116744 Tested-by: Jenkins Reviewed-by: Bartosz Kosiorek --- drawinglayer/source/tools/primitive2dxmldump.cxx | 28 ++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'drawinglayer') diff --git a/drawinglayer/source/tools/primitive2dxmldump.cxx b/drawinglayer/source/tools/primitive2dxmldump.cxx index 24c390c7e0f3..295c13fde6e9 100644 --- a/drawinglayer/source/tools/primitive2dxmldump.cxx +++ b/drawinglayer/source/tools/primitive2dxmldump.cxx @@ -16,6 +16,7 @@ #include #include +#include #include #include #include @@ -37,6 +38,7 @@ #include #include #include +#include using namespace drawinglayer::primitive2d; @@ -205,6 +207,32 @@ void Primitive2dXmlDump::decomposeAndWrite( switch (nId) { + case PRIMITIVE2D_ID_BITMAPPRIMITIVE2D: + { + const BitmapPrimitive2D& rBitmapPrimitive2D = dynamic_cast(*pBasePrimitive); + rWriter.startElement("bitmap"); + + basegfx::B2DHomMatrix const & rMatrix = rBitmapPrimitive2D.getTransform(); + rWriter.attribute("xy11", rMatrix.get(0,0)); + rWriter.attribute("xy12", rMatrix.get(0,1)); + rWriter.attribute("xy13", rMatrix.get(0,2)); + rWriter.attribute("xy21", rMatrix.get(1,0)); + rWriter.attribute("xy22", rMatrix.get(1,1)); + rWriter.attribute("xy23", rMatrix.get(1,2)); + rWriter.attribute("xy31", rMatrix.get(2,0)); + rWriter.attribute("xy32", rMatrix.get(2,1)); + rWriter.attribute("xy33", rMatrix.get(2,2)); + + const BitmapEx aBitmapEx(VCLUnoHelper::GetBitmap(rBitmapPrimitive2D.getXBitmap())); + const Size& rSizePixel(aBitmapEx.GetSizePixel()); + + rWriter.attribute("height", rSizePixel.getHeight()); + rWriter.attribute("width", rSizePixel.getWidth()); + rWriter.attribute("checksum", aBitmapEx.GetChecksum()); + + rWriter.endElement(); + } + break; case PRIMITIVE2D_ID_HIDDENGEOMETRYPRIMITIVE2D: { const HiddenGeometryPrimitive2D& rHiddenGeometryPrimitive2D = dynamic_cast(*pBasePrimitive); -- cgit