diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2022-11-25 19:26:46 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2022-11-25 20:57:39 +0100 |
commit | c802c5f390a30a66118f56a01e47772a54743a6a (patch) | |
tree | 10294873ba14d82ab801ae5dc5e1d3ca95718cc8 /sw | |
parent | 66e93c7a74af4d7078762ef4f2071e2f8ae15c27 (diff) |
Require valid attribute in getXPath
The reason for accepting empty attribute was eliminated in commit
2f91ab025de850fe5af8114565755a8deed55911 (Merge two assertXPath
overloads that both check number of nodes, Nov 25 16:36:57 2022)
Change-Id: I6cd77eb0f73650dfdafd55946b5269ffe3f0bde5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143304
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport17.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport17.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport17.cxx index e294a51feabb..87e7d0c68b21 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport17.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport17.cxx @@ -873,7 +873,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf81507, "tdf81507.docx") CPPUNIT_ASSERT_EQUAL(OUString("0"), getXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:sdt/w:sdtPr/w:text", "multiLine")); // Ensure that we have <w:text/> - getXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:sdt/w:sdtPr/w:text", ""); + assertXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:sdt/w:sdtPr/w:text"); // Ensure that we have no <w:text/> (not quite correct case, but to ensure import/export are okay) xmlXPathObjectPtr pXmlObj = getXPathNode(pXmlDoc, "/w:document/w:body/w:p[4]/w:sdt/w:sdtPr/w:text"); @@ -974,8 +974,8 @@ DECLARE_OOXMLEXPORT_TEST(testTdf148455_2, "tdf148455_2.docx") xmlDocUniquePtr pNumberingDoc = parseExport("word/numbering.xml"); // Ensure we have empty lvlOverride for levels 0 - 1 - getXPath(pNumberingDoc, "/w:numbering/w:num[@w:numId='" + OString::number(nListId) +"']/w:lvlOverride[@w:ilvl='0']", ""); - getXPath(pNumberingDoc, "/w:numbering/w:num[@w:numId='" + OString::number(nListId) +"']/w:lvlOverride[@w:ilvl='1']", ""); + assertXPath(pNumberingDoc, "/w:numbering/w:num[@w:numId='" + OString::number(nListId) +"']/w:lvlOverride[@w:ilvl='0']"); + assertXPath(pNumberingDoc, "/w:numbering/w:num[@w:numId='" + OString::number(nListId) +"']/w:lvlOverride[@w:ilvl='1']"); // And normal override for level 2 getXPath(pNumberingDoc, "/w:numbering/w:num[@w:numId='" + OString::number(nListId) +"']/w:lvlOverride[@w:ilvl='2']/w:startOverride", "val"); } |