diff options
Diffstat (limited to 'emfio/qa/cppunit/emf/EmfImportTest.cxx')
-rw-r--r-- | emfio/qa/cppunit/emf/EmfImportTest.cxx | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/emfio/qa/cppunit/emf/EmfImportTest.cxx b/emfio/qa/cppunit/emf/EmfImportTest.cxx index 52fab033941a..4629005984ed 100644 --- a/emfio/qa/cppunit/emf/EmfImportTest.cxx +++ b/emfio/qa/cppunit/emf/EmfImportTest.cxx @@ -56,6 +56,7 @@ class Test : public test::BootstrapFixture, public XmlTestTools, public unotest: void TestEllipseXformIntersectClipRect(); void TestDrawPolyLine16WithClip(); void TestFillRegion(); + void TestPolyLineWidth(); void TestRoundRect(); void TestCreatePen(); void TestPdfInEmf(); @@ -81,6 +82,7 @@ public: CPPUNIT_TEST(TestEllipseXformIntersectClipRect); CPPUNIT_TEST(TestDrawPolyLine16WithClip); CPPUNIT_TEST(TestFillRegion); + CPPUNIT_TEST(TestPolyLineWidth); CPPUNIT_TEST(TestRoundRect); CPPUNIT_TEST(TestCreatePen); CPPUNIT_TEST(TestPdfInEmf); @@ -436,6 +438,28 @@ void Test::TestFillRegion() assertXPath(pDocument, "/primitive2D/metafile/transform/mask/polygonhairline[1]", "color", "#000000"); } +void Test::TestPolyLineWidth() +{ + // EMF import with records: CREATEPEN, ROUNDRECT. + Primitive2DSequence aSequence = parseEmf(u"/emfio/qa/cppunit/emf/data/TestPolyLineWidth.emf"); + CPPUNIT_ASSERT_EQUAL(1, static_cast<int>(aSequence.getLength())); + drawinglayer::Primitive2dXmlDump dumper; + xmlDocUniquePtr pDocument = dumper.dumpAndParse(comphelper::sequenceToContainer<Primitive2DContainer>(aSequence)); + CPPUNIT_ASSERT (pDocument); + + assertXPath(pDocument, "/primitive2D/metafile/transform/polypolygoncolor/polypolygon", + "path", "m530 529 1236-176-707 352z"); + assertXPath(pDocument, "/primitive2D/metafile/transform/polypolygoncolor", + "color", "#ffff00"); + + assertXPathContent(pDocument, "/primitive2D/metafile/transform/polygonstroke/polygon", + "530,529 530,529 1766,353 1059,705"); + assertXPath(pDocument, "/primitive2D/metafile/transform/polygonstroke/line", + "color", "#000000"); + assertXPath(pDocument, "/primitive2D/metafile/transform/polygonstroke/line", + "width", "71"); +} + void Test::TestRoundRect() { // EMF import with records: CREATEPEN, ROUNDRECT. |