[Libreoffice-commits] core.git: sw/qa
Caolán McNamara
caolanm at redhat.com
Mon Sep 4 12:42:24 UTC 2017
sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 4 ++--
sw/qa/extras/uiwriter/uiwriter.cxx | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
New commits:
commit 1620a97e1d5d6d8cec2c9ff12918a9ddaa9fd27f
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Sep 4 12:21:55 2017 +0100
just blow through the hierarchy to find the polylines
Change-Id: I080243911e07d46a1ecc3f935df8ec86b54931e9
Reviewed-on: https://gerrit.libreoffice.org/41889
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
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);
More information about the Libreoffice-commits
mailing list