diff options
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/qa/cppunit/svm/data/refpoint.svm | bin | 0 -> 247 bytes | |||
-rw-r--r-- | vcl/qa/cppunit/svm/svmtest.cxx | 32 |
2 files changed, 30 insertions, 2 deletions
diff --git a/vcl/qa/cppunit/svm/data/refpoint.svm b/vcl/qa/cppunit/svm/data/refpoint.svm Binary files differnew file mode 100644 index 000000000000..e6412f9083b2 --- /dev/null +++ b/vcl/qa/cppunit/svm/data/refpoint.svm diff --git a/vcl/qa/cppunit/svm/svmtest.cxx b/vcl/qa/cppunit/svm/svmtest.cxx index 06ec5841f8f6..0331502d1041 100644 --- a/vcl/qa/cppunit/svm/svmtest.cxx +++ b/vcl/qa/cppunit/svm/svmtest.cxx @@ -179,7 +179,7 @@ class SvmTest : public test::BootstrapFixture, public XmlTestTools //void checkEPS(const GDIMetaFile& rMetaFile); void testEPS(); - //void checkRefPoint(const GDIMetaFile& rMetaFile); + void checkRefPoint(const GDIMetaFile& rMetaFile); void testRefPoint(); //void checkComment(const GDIMetaFile& rMetaFile); @@ -1636,8 +1636,36 @@ void SvmTest::testFloatTransparent() void SvmTest::testEPS() {} +void SvmTest::checkRefPoint(const GDIMetaFile& rMetaFile) +{ + xmlDocUniquePtr pDoc = dumpMeta(rMetaFile); + + assertXPathAttrs(pDoc, "/metafile/refpoint[1]", { + {"x", "0"}, + {"y", "0"}, + {"set", "false"} + }); + + assertXPathAttrs(pDoc, "/metafile/refpoint[2]", { + {"x", "1"}, + {"y", "2"}, + {"set", "true"} + }); +} + void SvmTest::testRefPoint() -{} +{ + GDIMetaFile aGDIMetaFile; + ScopedVclPtrInstance<VirtualDevice> pVirtualDev; + setupBaseVirtualDevice(*pVirtualDev, aGDIMetaFile); + + pVirtualDev->SetRefPoint(); + + pVirtualDev->SetRefPoint(Point(1,2)); + + checkRefPoint(writeAndReadStream(aGDIMetaFile)); + checkRefPoint(readFile(u"refpoint.svm")); +} void SvmTest::testComment() {} |