summaryrefslogtreecommitdiff
path: root/emfio/qa
diff options
context:
space:
mode:
authorBartosz Kosiorek <gang65@poczta.onet.pl>2018-11-06 00:43:53 +0100
committerBartosz Kosiorek <gang65@poczta.onet.pl>2018-11-08 20:59:41 +0100
commit1873ba08d82efdc228462d839e16c802ffb6cfa3 (patch)
tree7f32fae72ba2cec04c8042f6158d4c9cda234f4d /emfio/qa
parent97abda34fa0e3501f291cceb8b03ccc98e2b9845 (diff)
tdf#113624 EMF+ Fix shift of DrawString without StringFormat
While we are drawing DrawString record, in most cases optional StringFormat information is available. If StringFromat information is available then we should use default values. For LeadingMargin for String the default value is 1/6 inch. Change-Id: I4a0a68df5ebe74e810f8b5864232b477b3aac255 Reviewed-on: https://gerrit.libreoffice.org/62927 Tested-by: Jenkins Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
Diffstat (limited to 'emfio/qa')
-rw-r--r--emfio/qa/cppunit/emf/EmfImportTest.cxx19
1 files changed, 8 insertions, 11 deletions
diff --git a/emfio/qa/cppunit/emf/EmfImportTest.cxx b/emfio/qa/cppunit/emf/EmfImportTest.cxx
index 4eb34e308227..88cd0ea65925 100644
--- a/emfio/qa/cppunit/emf/EmfImportTest.cxx
+++ b/emfio/qa/cppunit/emf/EmfImportTest.cxx
@@ -125,17 +125,14 @@ void Test::TestDrawStringTransparent()
xmlDocPtr pDocument = dumper.dumpAndParse(comphelper::sequenceToContainer<Primitive2DContainer>(aSequence));
CPPUNIT_ASSERT (pDocument);
- //TODO Strange that transparency is set to 0 even if it is not fully transparent
- // check correct import of the DrawString: transparency, height, position, text, color and font
- assertXPath(pDocument, "/primitive2D/metafile/transform/transform/unifiedtransparence", "transparence", "0");
-
- //TODO Where was textsimpleportion gone?
- //assertXPath(pDocument, "/primitive2D/metafile/transform/transform/textsimpleportion", "height", "276");
- //assertXPath(pDocument, "/primitive2D/metafile/transform/transform/textsimpleportion", "x", "25");
- //assertXPath(pDocument, "/primitive2D/metafile/transform/transform/textsimpleportion", "y", "323");
- //assertXPath(pDocument, "/primitive2D/metafile/transform/transform/textsimpleportion", "text", "Transparent Text");
- //assertXPath(pDocument, "/primitive2D/metafile/transform/transform/textsimpleportion", "fontcolor", "#000000");
- //assertXPath(pDocument, "/primitive2D/metafile/transform/transform/textsimpleportion", "familyname", "CALIBRI");
+ assertXPath(pDocument, "/primitive2D/metafile/transform/mask/transform/unifiedtransparence", "transparence", "0.498039215686275");
+
+ assertXPath(pDocument, "/primitive2D/metafile/transform/mask/transform/unifiedtransparence/textsimpleportion", "height", "24");
+ assertXPath(pDocument, "/primitive2D/metafile/transform/mask/transform/unifiedtransparence/textsimpleportion", "x", "66");
+ assertXPath(pDocument, "/primitive2D/metafile/transform/mask/transform/unifiedtransparence/textsimpleportion", "y", "74");
+ assertXPath(pDocument, "/primitive2D/metafile/transform/mask/transform/unifiedtransparence/textsimpleportion", "text", "Transparent Text");
+ assertXPath(pDocument, "/primitive2D/metafile/transform/mask/transform/unifiedtransparence/textsimpleportion", "fontcolor", "#0000ff");
+ assertXPath(pDocument, "/primitive2D/metafile/transform/mask/transform/unifiedtransparence/textsimpleportion", "familyname", "ARIAL");
}
void Test::TestDrawLine()