summaryrefslogtreecommitdiff
path: root/vcl/qa/cppunit/svm/svmtest.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/qa/cppunit/svm/svmtest.cxx')
-rw-r--r--vcl/qa/cppunit/svm/svmtest.cxx32
1 files changed, 30 insertions, 2 deletions
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()
{}