summaryrefslogtreecommitdiff
path: root/unoxml/source/xpath/xpathapi.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'unoxml/source/xpath/xpathapi.cxx')
-rw-r--r--unoxml/source/xpath/xpathapi.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/unoxml/source/xpath/xpathapi.cxx b/unoxml/source/xpath/xpathapi.cxx
index f1968c208860..29450175ea08 100644
--- a/unoxml/source/xpath/xpathapi.cxx
+++ b/unoxml/source/xpath/xpathapi.cxx
@@ -26,6 +26,7 @@
#include <libxml/xmlerror.h>
#include <libxml/xpath.h>
#include <libxml/xpathInternals.h>
+#include <libxml/xmlIO.h>
#include <com/sun/star/xml/xpath/XPathException.hpp>
@@ -217,7 +218,7 @@ namespace XPath
return selectSingleNode(contextNode, expr);
}
- static OUString make_error_message(xmlErrorPtr pError)
+ static OUString make_error_message(const xmlError* pError)
{
OUStringBuffer buf;
if (pError) {
@@ -263,7 +264,11 @@ namespace XPath
SAL_WARN("unoxml", "libxml2 error: " << str);
}
+#if LIBXML_VERSION >= 21200
+ static void structured_error_func(void *, const xmlError* error)
+#else
static void structured_error_func(void *, xmlErrorPtr error)
+#endif
{
SAL_WARN("unoxml", "libxml2 error: " << make_error_message(error));
}