summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-09-04 12:21:55 +0100
committerCaolán McNamara <caolanm@redhat.com>2017-09-04 14:42:02 +0200
commit1620a97e1d5d6d8cec2c9ff12918a9ddaa9fd27f (patch)
treea546446015671cd794c3c2ce85a8b1bc0f4f1b36 /sw
parenta40d37b4d61f70a51a739732bcf7ad94c2ca4f0a (diff)
just blow through the hierarchy to find the polylines
Change-Id: I080243911e07d46a1ecc3f935df8ec86b54931e9 Reviewed-on: https://gerrit.libreoffice.org/41889 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/ooxmlimport/ooxmlimport.cxx4
-rw-r--r--sw/qa/extras/uiwriter/uiwriter.cxx4
2 files changed, 4 insertions, 4 deletions
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index 475f29017104..d6c55f7d5ca1 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -1281,10 +1281,10 @@ DECLARE_OOXMLIMPORT_TEST(testTdf100072, "tdf100072.docx")
xmlDocPtr pXmlDoc = dumper.dumpAndParse(rMetaFile);
// Get first polyline rightside x coordinate
- sal_Int32 nFirstEnd = getXPath(pXmlDoc, "/metafile/push[1]/polyline[1]/point[2]", "x").toInt32();
+ sal_Int32 nFirstEnd = getXPath(pXmlDoc, "(//polyline)[1]/point[2]", "x").toInt32();
// Get last stroke x coordinate
- sal_Int32 nSecondEnd = getXPath(pXmlDoc, "/metafile/push[last()]/polyline[last()]/point[2]", "x").toInt32();
+ sal_Int32 nSecondEnd = getXPath(pXmlDoc, "(//polyline)[last()]/point[2]", "x").toInt32();
// Assert that the difference is less than half point.
CPPUNIT_ASSERT_MESSAGE("Shape line width does not match", abs(nFirstEnd - nSecondEnd) < 10);
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx
index dba77fca30f0..c3ef16b82558 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -1494,10 +1494,10 @@ void SwUiWriterTest::testFdo87448()
// The first polyline in the document has a number of points to draw arcs,
// the last one jumps back to the start, so we call "end" the last but one.
- sal_Int32 nFirstEnd = getXPath(pXmlDoc, "/metafile/push[2]/polyline[1]/point[last()-1]", "x").toInt32();
+ sal_Int32 nFirstEnd = getXPath(pXmlDoc, "(//polyline)[1]/point[last()-1]", "x").toInt32();
// The second polyline has a different start point, but the arc it draws
// should end at the ~same position as the first polyline.
- sal_Int32 nSecondEnd = getXPath(pXmlDoc, "/metafile/push[5]/polyline[1]/point[last()]", "x").toInt32();
+ sal_Int32 nSecondEnd = getXPath(pXmlDoc, "(//polyline)[2]/point[last()]", "x").toInt32();
// nFirstEnd was 6023 and nSecondEnd was 6648, now they should be much closer, e.g. nFirstEnd = 6550, nSecondEnd = 6548
OString aMsg = "nFirstEnd is " + OString::number(nFirstEnd) + ", nSecondEnd is " + OString::number(nSecondEnd);