From ddc363b2b2496dfe72775650d8929901ca8be5a2 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Wed, 2 Mar 2016 13:03:52 +0100 Subject: test: dump MetaPolyPolygonAction too Change-Id: I3ecafc104c91d7f4e93805b2e03359cf60d2db4b --- test/source/mtfxmldump.cxx | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'test/source/mtfxmldump.cxx') diff --git a/test/source/mtfxmldump.cxx b/test/source/mtfxmldump.cxx index 2aab2fa03726..c955fccd12bf 100644 --- a/test/source/mtfxmldump.cxx +++ b/test/source/mtfxmldump.cxx @@ -535,6 +535,30 @@ void MetafileXmlDump::writeXml(const GDIMetaFile& rMetaFile, XmlWriter& rWriter) } break; + case MetaActionType::POLYPOLYGON: + { + MetaPolyPolygonAction *const pMPPAction( + static_cast(pAction)); + rWriter.startElement(sCurrentElementTag); + + tools::PolyPolygon const& rPoly(pMPPAction->GetPolyPolygon()); + for (sal_uInt16 j = 0; j < rPoly.Count(); ++j) + { + rWriter.startElement("polygon"); + for (sal_uInt16 i = 0; i < rPoly[j].GetSize(); i++) + { + rWriter.startElement("point"); + rWriter.attribute("x", rPoly[j][i].X()); + rWriter.attribute("y", rPoly[j][i].Y()); + rWriter.endElement(); + } + rWriter.endElement(); + } + + rWriter.endElement(); + } + break; + case MetaActionType::COMMENT: { MetaCommentAction* pMetaCommentAction = static_cast(pAction); -- cgit