summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2014-01-20 11:19:01 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-01-20 12:15:29 +0100
commit106c82706edc1adc2df8d39d332fd3a3452c5d78 (patch)
tree74921ba3b1104219be9f54126b48a4c3c2ceb688 /sw
parent2d4f0a7d0dd3da34d054ff444e69b10ef015e260 (diff)
drawingML export: write TextShape outline properties
Change-Id: I3742c960016bbe1d82b58a16d464b329d2612c10
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/ooxmlexport/data/dml-textshape.docxbin0 -> 16129 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport.cxx16
2 files changed, 16 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/dml-textshape.docx b/sw/qa/extras/ooxmlexport/data/dml-textshape.docx
new file mode 100644
index 000000000000..e5be42cd8c5a
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/dml-textshape.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index 56d6acb22048..8d019306601b 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
@@ -2469,6 +2469,22 @@ DECLARE_OOXMLEXPORT_TEST(testMsoSpt180, "mso-spt180.docx")
CPPUNIT_ASSERT_EQUAL(OUString("ooxml-borderCallout1"), aType);
}
+DECLARE_OOXMLEXPORT_TEST(testDmlTextshape, "dml-textshape.docx")
+{
+ uno::Reference<container::XIndexAccess> xGroup(getShape(1), uno::UNO_QUERY);
+ uno::Reference<drawing::XShape> xShape(xGroup->getByIndex(1), uno::UNO_QUERY);
+ // This was drawing::FillStyle_NONE.
+ CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_SOLID, getProperty<drawing::FillStyle>(xShape, "FillStyle"));
+ // This was drawing::LineStyle_NONE.
+ CPPUNIT_ASSERT_EQUAL(drawing::LineStyle_SOLID, getProperty<drawing::LineStyle>(xShape, "LineStyle"));
+
+ xmlDocPtr pXmlDocument = parseExport("word/document.xml");
+ if (!pXmlDocument)
+ return;
+ // This was wrap="none".
+ assertXPath(pXmlDocument, "/w:document/w:body/w:p[2]/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:inline/a:graphic/a:graphicData/wpg:wgp/wps:wsp[2]/wps:bodyPr", "wrap", "square");
+}
+
DECLARE_OOXMLEXPORT_TEST(testShapeThemePreservation, "shape-theme-preservation.docx")
{
xmlDocPtr pXmlDocument = parseExport("word/document.xml");