sd/qa/unit/layout-tests.cxx | 4 +- sw/qa/extras/uiwriter/uiwriter3.cxx | 50 ++++++++++++++---------------------- 2 files changed, 22 insertions(+), 32 deletions(-)
New commits: commit 66e93c7a74af4d7078762ef4f2071e2f8ae15c27 Author: Mike Kaganski <mike.kagan...@collabora.com> AuthorDate: Fri Nov 25 19:25:23 2022 +0300 Commit: Mike Kaganski <mike.kagan...@collabora.com> CommitDate: Fri Nov 25 18:59:02 2022 +0100 Simplification Change-Id: Ib72d4eb95879f94efad3834b1334099990e76f1b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143303 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> diff --git a/sd/qa/unit/layout-tests.cxx b/sd/qa/unit/layout-tests.cxx index d2bf22622885..36293f2dcfe2 100644 --- a/sd/qa/unit/layout-tests.cxx +++ b/sd/qa/unit/layout-tests.cxx @@ -72,8 +72,8 @@ CPPUNIT_TEST_FIXTURE(SdLayoutTest, testTdf146876) { const OString xPath = "/metafile/push[1]/push[1]/push[" + OString::number(i) + "]/polyline/point[" + OString::number(j) + "]"; - const sal_Int32 nX = getXPath(pXmlDoc, xPath.getStr(), "x").toInt32(); - const sal_Int32 nY = getXPath(pXmlDoc, xPath.getStr(), "y").toInt32(); + const sal_Int32 nX = getXPath(pXmlDoc, xPath, "x").toInt32(); + const sal_Int32 nY = getXPath(pXmlDoc, xPath, "y").toInt32(); // Without the fix in place, this test would have failed with // - Expected greater or equal than: 5000 diff --git a/sw/qa/extras/uiwriter/uiwriter3.cxx b/sw/qa/extras/uiwriter/uiwriter3.cxx index ebdce194e9cd..f1b50f047234 100644 --- a/sw/qa/extras/uiwriter/uiwriter3.cxx +++ b/sw/qa/extras/uiwriter/uiwriter3.cxx @@ -401,35 +401,30 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf147126) for (auto nFly = 1; nFly < 8; ++nFly) { const auto nFlyLeft = getXPath(pLayoutXML1, - OString::Concat("/root/page/body/txt[2]/anchored/fly[") - + OString::Concat(OString::number(nFly)) - + OString::Concat("]/infos/bounds"), + "/root/page/body/txt[2]/anchored/fly[" + + OString::number(nFly) + "]/infos/bounds", "left") .toInt64(); const auto nFlyRight = getXPath(pLayoutXML1, - OString::Concat("/root/page/body/txt[2]/anchored/fly[") - + OString::Concat(OString::number(nFly)) - + OString::Concat("]/infos/bounds"), + "/root/page/body/txt[2]/anchored/fly[" + + OString::number(nFly) + "]/infos/bounds", "width") .toInt64(); const auto nFlyTop = getXPath(pLayoutXML1, - OString::Concat("/root/page/body/txt[2]/anchored/fly[") - + OString::Concat(OString::number(nFly)) - + OString::Concat("]/infos/bounds"), + "/root/page/body/txt[2]/anchored/fly[" + OString::number(nFly) + + "]/infos/bounds", "top") .toInt64(); const auto nFlyBottom = getXPath(pLayoutXML1, - OString::Concat("/root/page/body/txt[2]/anchored/fly[") - + OString::Concat(OString::number(nFly)) - + OString::Concat("]/infos/bounds"), + "/root/page/body/txt[2]/anchored/fly[" + + OString::number(nFly) + "]/infos/bounds", "height") .toInt64(); const auto sDrawRect = getXPath( pLayoutXML1, - OString::Concat("/root/page/body/txt[2]/anchored/SwAnchoredDrawObject/SdrObjGroup/" - "SdrObjList/SdrObject[") - + OString::Concat(OString::number(nFly)) + OString::Concat("]"), + "/root/page/body/txt[2]/anchored/SwAnchoredDrawObject/SdrObjGroup/SdrObjList/SdrObject[" + + OString::number(nFly) + "]", "aOutRect"); const auto nComaPos1 = sDrawRect.indexOf(',', 0); @@ -465,35 +460,30 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf147126) for (auto nFly = 1; nFly < 8; ++nFly) { const auto nFlyLeft = getXPath(pLayoutXML2, - OString::Concat("/root/page/body/txt[6]/anchored/fly[") - + OString::Concat(OString::number(nFly)) - + OString::Concat("]/infos/bounds"), + "/root/page/body/txt[6]/anchored/fly[" + + OString::number(nFly) + "]/infos/bounds", "left") .toInt64(); const auto nFlyRight = getXPath(pLayoutXML2, - OString::Concat("/root/page/body/txt[6]/anchored/fly[") - + OString::Concat(OString::number(nFly)) - + OString::Concat("]/infos/bounds"), + "/root/page/body/txt[6]/anchored/fly[" + + OString::number(nFly) + "]/infos/bounds", "width") .toInt64(); const auto nFlyTop = getXPath(pLayoutXML2, - OString::Concat("/root/page/body/txt[6]/anchored/fly[") - + OString::Concat(OString::number(nFly)) - + OString::Concat("]/infos/bounds"), + "/root/page/body/txt[6]/anchored/fly[" + OString::number(nFly) + + "]/infos/bounds", "top") .toInt64(); const auto nFlyBottom = getXPath(pLayoutXML2, - OString::Concat("/root/page/body/txt[6]/anchored/fly[") - + OString::Concat(OString::number(nFly)) - + OString::Concat("]/infos/bounds"), + "/root/page/body/txt[6]/anchored/fly[" + + OString::number(nFly) + "]/infos/bounds", "height") .toInt64(); const auto sDrawRect = getXPath( pLayoutXML2, - OString::Concat("/root/page/body/txt[6]/anchored/SwAnchoredDrawObject/SdrObjGroup/" - "SdrObjList/SdrObject[") - + OString::Concat(OString::number(nFly)) + OString::Concat("]"), + "/root/page/body/txt[6]/anchored/SwAnchoredDrawObject/SdrObjGroup/SdrObjList/SdrObject[" + + OString::number(nFly) + "]", "aOutRect"); const auto nComaPos1 = sDrawRect.indexOf(',', 0);