summaryrefslogtreecommitdiff
path: root/drawinglayer
diff options
context:
space:
mode:
authorBartosz Kosiorek <gang65@poczta.onet.pl>2021-06-05 19:30:46 +0200
committerBartosz Kosiorek <gang65@poczta.onet.pl>2021-06-05 20:20:24 +0200
commit33d2cf7008de79106b5da4bba0241aa14d81d88f (patch)
treecccfea3a55086a0fcb9a0c089d7cbfc72ca5dfc7 /drawinglayer
parent399a6472f666ae6c3e20b6f8367f9fd089c15605 (diff)
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 <gang65@poczta.onet.pl>
Diffstat (limited to 'drawinglayer')
-rw-r--r--drawinglayer/source/tools/primitive2dxmldump.cxx28
1 files changed, 28 insertions, 0 deletions
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 <memory>
#include <sal/log.hxx>
+#include <drawinglayer/primitive2d/bitmapprimitive2d.hxx>
#include <drawinglayer/primitive2d/pointarrayprimitive2d.hxx>
#include <drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx>
#include <drawinglayer/primitive2d/Tools.hxx>
@@ -37,6 +38,7 @@
#include <basegfx/polygon/b2dpolypolygontools.hxx>
#include <basegfx/polygon/b2dpolygontools.hxx>
#include <svx/sdr/primitive2d/svx_primitivetypes2d.hxx>
+#include <toolkit/helper/vclunohelper.hxx>
using namespace drawinglayer::primitive2d;
@@ -205,6 +207,32 @@ void Primitive2dXmlDump::decomposeAndWrite(
switch (nId)
{
+ case PRIMITIVE2D_ID_BITMAPPRIMITIVE2D:
+ {
+ const BitmapPrimitive2D& rBitmapPrimitive2D = dynamic_cast<const BitmapPrimitive2D&>(*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<const HiddenGeometryPrimitive2D&>(*pBasePrimitive);