summaryrefslogtreecommitdiff
path: root/emfio
diff options
context:
space:
mode:
Diffstat (limited to 'emfio')
-rw-r--r--emfio/qa/cppunit/emf/EmfImportTest.cxx28
-rw-r--r--emfio/qa/cppunit/emf/data/TestEmfPlusDrawBeziers.emfbin0 -> 9836 bytes
2 files changed, 28 insertions, 0 deletions
diff --git a/emfio/qa/cppunit/emf/EmfImportTest.cxx b/emfio/qa/cppunit/emf/EmfImportTest.cxx
index b315a2f69ae4..5f8ad7e18044 100644
--- a/emfio/qa/cppunit/emf/EmfImportTest.cxx
+++ b/emfio/qa/cppunit/emf/EmfImportTest.cxx
@@ -283,6 +283,34 @@ CPPUNIT_TEST_FIXTURE(Test, testDrawStringWithBrush)
"TIMES NEW ROMAN");
}
+CPPUNIT_TEST_FIXTURE(Test, testEmfPlusDrawBeziers)
+{
+ // tdf#107019 tdf#154789 EMF+ records: DrawBeziers
+ // Check if DrawBeziers is displayed correctly and text is rotated
+ Primitive2DSequence aSequence
+ = parseEmf(u"emfio/qa/cppunit/emf/data/TestEmfPlusDrawBeziers.emf");
+ CPPUNIT_ASSERT_EQUAL(1, static_cast<int>(aSequence.getLength()));
+ drawinglayer::Primitive2dXmlDump dumper;
+ xmlDocUniquePtr pDocument = dumper.dumpAndParse(Primitive2DContainer(aSequence));
+ CPPUNIT_ASSERT(pDocument);
+
+ assertXPath(pDocument, aXPathPrefix + "polypolygoncolor", 4);
+ assertXPath(pDocument, aXPathPrefix + "polypolygoncolor[1]", "color", "#000000");
+
+ assertXPath(pDocument, aXPathPrefix + "polygonstrokearrow", 9);
+ assertXPath(pDocument, aXPathPrefix + "polygonstrokearrow[9]/line", "color", "#00ff00");
+
+ assertXPath(pDocument, aXPathPrefix + "transform", 5);
+ assertXPath(pDocument, aXPathPrefix + "transform[1]/textsimpleportion", "fontcolor", "#000000");
+ assertXPath(pDocument, aXPathPrefix + "transform[1]/textsimpleportion", "text", "% Efficiency");
+ assertXPath(pDocument, aXPathPrefix + "transform[1]", "xy11", "0");
+ assertXPath(pDocument, aXPathPrefix + "transform[1]", "xy12", "4");
+ assertXPath(pDocument, aXPathPrefix + "transform[1]", "xy13", "800");
+ assertXPath(pDocument, aXPathPrefix + "transform[1]", "xy21", "-4");
+ assertXPath(pDocument, aXPathPrefix + "transform[1]", "xy22", "0");
+ assertXPath(pDocument, aXPathPrefix + "transform[1]", "xy23", "3195");
+}
+
CPPUNIT_TEST_FIXTURE(Test, testDrawLine)
{
// EMF+ with records: DrawLine
diff --git a/emfio/qa/cppunit/emf/data/TestEmfPlusDrawBeziers.emf b/emfio/qa/cppunit/emf/data/TestEmfPlusDrawBeziers.emf
new file mode 100644
index 000000000000..11f07412168d
--- /dev/null
+++ b/emfio/qa/cppunit/emf/data/TestEmfPlusDrawBeziers.emf
Binary files differ