test/source/xmltesttools.cxx | 6 ++++++ 1 file changed, 6 insertions(+)
New commits: commit ca4f1929ced3714c99acc7c7458277459158683a Author: Douglas Mencken <[email protected]> Date: Sun Jun 15 08:39:00 2014 -0400 xmlChildElementCount is only available in libxml2 >= 2.7.3 fixes build error Undefined symbols: _xmlChildElementCount Change-Id: I9687971912b4d0ae55bf1d9ad987fd339fcbec7e Reviewed-on: https://gerrit.libreoffice.org/9788 Reviewed-by: Caolán McNamara <[email protected]> Tested-by: Caolán McNamara <[email protected]> diff --git a/test/source/xmltesttools.cxx b/test/source/xmltesttools.cxx index 0cb89f7..129e286 100644 --- a/test/source/xmltesttools.cxx +++ b/test/source/xmltesttools.cxx @@ -98,6 +98,7 @@ void XmlTestTools::assertXPathContent(xmlDocPtr pXmlDoc, const OString& rXPath, void XmlTestTools::assertXPathChildren(xmlDocPtr pXmlDoc, const OString& rXPath, int nNumberOfChildNodes) { +#if LIBXML_VERSION >= 20703 /* xmlChildElementCount is only available in libxml2 >= 2.7.3 */ xmlXPathObjectPtr pXmlObj = getXPathNode(pXmlDoc, rXPath); xmlNodeSetPtr pXmlNodes = pXmlObj->nodesetval; CPPUNIT_ASSERT_EQUAL_MESSAGE(OString("XPath '" + rXPath + "' number of nodes is incorrect").getStr(), @@ -106,6 +107,11 @@ void XmlTestTools::assertXPathChildren(xmlDocPtr pXmlDoc, const OString& rXPath, CPPUNIT_ASSERT_EQUAL_MESSAGE(OString("XPath '" + rXPath + "' number of child-nodes is incorrect").getStr(), nNumberOfChildNodes, (int)xmlChildElementCount(pXmlNode)); xmlXPathFreeObject(pXmlObj); +#else + (void)pXmlDoc; + (void)rXPath; + (void)nNumberOfChildNodes; +#endif } int XmlTestTools::getXPathPosition(xmlDocPtr pXmlDoc, const OString& rXPath, const OUString& rChildName)
_______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
