diff options
Diffstat (limited to 'emfio/qa/cppunit/emf/EmfImportTest.cxx')
-rw-r--r-- | emfio/qa/cppunit/emf/EmfImportTest.cxx | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/emfio/qa/cppunit/emf/EmfImportTest.cxx b/emfio/qa/cppunit/emf/EmfImportTest.cxx index e8db00e21fcc..5891799dd607 100644 --- a/emfio/qa/cppunit/emf/EmfImportTest.cxx +++ b/emfio/qa/cppunit/emf/EmfImportTest.cxx @@ -74,6 +74,7 @@ class Test : public test::BootstrapFixture, public XmlTestTools, public unotest: void TestRestoreDCWMF(); void TestRoundrectWMF(); void TestStretchDIBWMF(); + void TestMoveToLineToWMF(); void TestPolylinetoCloseStroke(); void TestPolyLineWidth(); @@ -120,6 +121,7 @@ public: CPPUNIT_TEST(TestRestoreDCWMF); CPPUNIT_TEST(TestRoundrectWMF); CPPUNIT_TEST(TestStretchDIBWMF); + CPPUNIT_TEST(TestMoveToLineToWMF); CPPUNIT_TEST(TestPolylinetoCloseStroke); CPPUNIT_TEST(TestPolyLineWidth); CPPUNIT_TEST(TestRestoreDC); @@ -1206,6 +1208,23 @@ void Test::TestStretchDIBWMF() "720000,721c1c,723838,725555,727171,72728d,55728d,39728d,1d728d,00728d"); } +void Test::TestMoveToLineToWMF() +{ + // tdf#89331 WMF records: MOTETO, LINETO, CREATEPENINDIRECT. + Primitive2DSequence aSequence = parseEmf(u"/emfio/qa/cppunit/wmf/data/TestLineTo.wmf"); + CPPUNIT_ASSERT_EQUAL(1, static_cast<int>(aSequence.getLength())); + drawinglayer::Primitive2dXmlDump dumper; + xmlDocUniquePtr pDocument = dumper.dumpAndParse(Primitive2DContainer(aSequence)); + CPPUNIT_ASSERT(pDocument); + + assertXPathContent(pDocument, aXPathPrefix + "polygonstroke/polygon", + "5856,3586 7167,621 8625,3586"); + assertXPath(pDocument, aXPathPrefix + "polygonstroke/line", "color", "#800000"); + assertXPath(pDocument, aXPathPrefix + "polygonstroke/line", "width", "310"); + assertXPath(pDocument, aXPathPrefix + "polygonstroke/line", "linejoin", "Bevel"); + assertXPath(pDocument, aXPathPrefix + "polygonstroke/line", "linecap", "ROUND"); +} + void Test::TestPolyLineWidth() { // EMF import with records: CREATEPEN, ROUNDRECT. |