summaryrefslogtreecommitdiff
path: root/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/qa/extras/ooxmlexport/ooxmlexport13.cxx')
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport13.cxx23
1 files changed, 23 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx
index 4da5d109324a..d377f9b14449 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx
@@ -409,6 +409,29 @@ DECLARE_OOXMLEXPORT_TEST(testTdf78657, "tdf78657_picture_hyperlink.docx")
assertXPath(pXmlRels, "/rels:Relationships/rels:Relationship[@Target='http://www.google.com']", "TargetMode", "External");
}
+DECLARE_OOXMLEXPORT_TEST(testTdf125518, "tdf125518.odt")
+{
+ xmlDocPtr pXmlDoc = parseExport("word/document.xml");
+ if (!pXmlDoc)
+ return;
+
+ // First diagram is anchored
+ OUString anchorName = getXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[2]/w:drawing/wp:anchor/wp:docPr", "name");
+ CPPUNIT_ASSERT_EQUAL(OUString("Object1"), anchorName);
+
+ // Second diagram has anchor
+ anchorName = getXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:r[1]/w:drawing/wp:anchor/wp:docPr", "name");
+ CPPUNIT_ASSERT_EQUAL(OUString("Objekt1"), anchorName);
+
+ // Third diagram has no anchor
+ anchorName = getXPath(pXmlDoc, "/w:document/w:body/w:p[12]/w:r[2]/w:drawing/wp:inline/wp:docPr", "name");
+ CPPUNIT_ASSERT_EQUAL(OUString("Object2"), anchorName);
+
+ // 4th diagram has anchor too
+ anchorName = getXPath(pXmlDoc, "/w:document/w:body/w:p[14]/w:r[3]/w:drawing/wp:anchor/wp:docPr", "name");
+ CPPUNIT_ASSERT_EQUAL(OUString("Object3"), anchorName);
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */