tdf#158302 fix build against system-libxml-2.12

Seen in a fedora:40 container, using --with-system-libcmis,
--with-system-liblangtag and --with-system-xmlsec.

Change-Id: I9d748d3dc0b70dbfdfcb6b99c9ce8440bda6f326
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159980
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
This commit is contained in:
Miklos Vajna
2023-11-27 16:09:13 +01:00
parent 53de98b295
commit c8f7408db7
18 changed files with 28 additions and 11 deletions
@@ -15,6 +15,7 @@
#include <math.h>
#include <memory>
#include <libxml/parser.h>
#include <sal/log.hxx>
#include <drawinglayer/primitive2d/bitmapprimitive2d.hxx>
@@ -333,7 +333,7 @@ namespace XSLT
}
else
{
xmlErrorPtr lastErr = xmlGetLastError();
const xmlError* lastErr = xmlGetLastError();
OUString msg;
if (lastErr)
msg = OStringToOUString(lastErr->message, RTL_TEXTENCODING_UTF8);
+4
View File
@@ -815,7 +815,11 @@ static const HelpProcessingException* GpXMLParsingException = nullptr;
extern "C" {
#if LIBXML_VERSION >= 21200
static void StructuredXMLErrorFunction(SAL_UNUSED_PARAMETER void *, const xmlError* error)
#else
static void StructuredXMLErrorFunction(SAL_UNUSED_PARAMETER void *, xmlErrorPtr error)
#endif
{
std::string aErrorMsg = error->message;
std::string aXMLParsingFile;
+1 -1
View File
@@ -744,7 +744,7 @@ namespace xmloff::token {
XML_EMBEDDED_VISIBLE_AREA,
XML_EMBOSSED,
XML_EMISSIVE_COLOR,
XML_EMPTY,
XML_TOKEN_EMPTY,
XML_EMPTY_LINE_REFRESH,
XML_ENABLE_NUMBERING,
XML_ENABLED,
+1 -1
View File
@@ -578,7 +578,7 @@ Event& Entity::getEvent( CallbackType aType )
OUString lclGetErrorMessage( xmlParserCtxtPtr ctxt, std::u16string_view sSystemId, sal_Int32 nLine )
{
const char* pMessage;
xmlErrorPtr error = xmlCtxtGetLastError( ctxt );
const xmlError* error = xmlCtxtGetLastError( ctxt );
if( error && error->message )
pMessage = error->message;
else
+1
View File
@@ -31,6 +31,7 @@
#include <cstring>
#include <memory>
#include <string_view>
#include <libxml/parser.h>
using namespace com::sun::star;
+1 -1
View File
@@ -123,7 +123,7 @@ void ScXMLExportDataPilot::WriteDPCondition(const ScQueryEntry& aQueryEntry, boo
if (aQueryEntry.IsQueryByEmpty())
{
rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_OPERATOR, GetXMLToken(XML_EMPTY));
rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_OPERATOR, GetXMLToken(XML_TOKEN_EMPTY));
}
else if (aQueryEntry.IsQueryByNonEmpty())
{
@@ -376,7 +376,7 @@ private:
case SC_EQUAL:
{
if (rEntry.IsQueryByEmpty())
return GetXMLToken(XML_EMPTY);
return GetXMLToken(XML_TOKEN_EMPTY);
else if (rEntry.IsQueryByNonEmpty())
return GetXMLToken(XML_NOEMPTY);
+3 -3
View File
@@ -370,7 +370,7 @@ void ScXMLConditionContext::GetOperator(
rEntry.eOp = SC_BOTPERC;
else if (IsXMLToken(aOpStr, XML_BOTTOM_VALUES))
rEntry.eOp = SC_BOTVAL;
else if (IsXMLToken(aOpStr, XML_EMPTY))
else if (IsXMLToken(aOpStr, XML_TOKEN_EMPTY))
rEntry.SetQueryByEmpty();
else if (aOpStr == u">")
rEntry.eOp = SC_GREATER;
@@ -422,7 +422,7 @@ void SAL_CALL ScXMLConditionContext::endFastElement( sal_Int32 /*nElement*/ )
if (maQueryItems.empty())
{
ScQueryEntry::Item& rItem = rEntry.GetQueryItem();
if (IsXMLToken(sOperator, XML_EMPTY))
if (IsXMLToken(sOperator, XML_TOKEN_EMPTY))
return;
if (IsXMLToken(sDataType, XML_NUMBER))
{
@@ -753,7 +753,7 @@ void SAL_CALL ScXMLDPConditionContext::endFastElement( sal_Int32 /*nElement*/ )
else
aFilterField.eConnect = SC_AND;
pFilterContext->SetIsCaseSensitive(bIsCaseSensitive);
if (IsXMLToken(sOperator, XML_EMPTY))
if (IsXMLToken(sOperator, XML_TOKEN_EMPTY))
aFilterField.SetQueryByEmpty();
else if (IsXMLToken(sOperator, XML_NOEMPTY))
aFilterField.SetQueryByNonEmpty();
+1
View File
@@ -22,6 +22,7 @@
#include <string.h>
#include <memory>
#include <libxml/entities.h>
#include <osl/diagnose.h>
#include <sal/log.hxx>
+1
View File
@@ -41,6 +41,7 @@
#include <eventdispatcher.hxx>
#include <string.h>
#include <libxml/xmlIO.h>
#include <osl/diagnose.h>
+1
View File
@@ -22,6 +22,7 @@
#include <string.h>
#include <libxml/xmlerror.h>
#include <libxml/parser.h>
#include <memory>
+1
View File
@@ -22,6 +22,7 @@
#include <osl/diagnose.h>
#include <string.h>
#include <libxml/entities.h>
using namespace css::uno;
using namespace css::xml::dom;
+6 -1
View File
@@ -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) {
@@ -259,7 +260,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));
}
+1 -1
View File
@@ -756,7 +756,7 @@ namespace xmloff::token {
TOKEN( "embedded-visible-area", XML_EMBEDDED_VISIBLE_AREA ),
TOKEN( "embossed", XML_EMBOSSED ),
TOKEN( "emissive-color", XML_EMISSIVE_COLOR ),
TOKEN( "empty", XML_EMPTY ),
TOKEN( "empty", XML_TOKEN_EMPTY ),
TOKEN( "empty-line-refresh", XML_EMPTY_LINE_REFRESH ),
TOKEN( "enable-numbering", XML_ENABLE_NUMBERING ),
TOKEN( "enabled", XML_ENABLED ),
+1 -1
View File
@@ -157,7 +157,7 @@ const XMLPropertyMapEntry aXMLPageMasterStyleMap[] =
PLMAP( PROP_FootnoteLineRelativeWidth, XML_NAMESPACE_STYLE, XML__EMPTY, XML_TYPE_PERCENT8|MID_FLAG_SPECIAL_ITEM, CTF_PM_FTN_LINE_WIDTH ),
PLMAP( PROP_FootnoteLineTextDistance, XML_NAMESPACE_STYLE, XML__EMPTY, XML_TYPE_MEASURE|MID_FLAG_SPECIAL_ITEM, CTF_PM_FTN_LINE_DISTANCE ),
PLMAP( PROP_FootnoteLineWeight, XML_NAMESPACE_STYLE, XML_FOOTNOTE_SEP, XML_TYPE_MEASURE16|MID_FLAG_ELEMENT_ITEM, CTF_PM_FTN_LINE_WEIGHT ),
PLMAP( PROP_FootnoteLineStyle, XML_NAMESPACE_STYLE, XML_EMPTY, XML_TYPE_STRING|MID_FLAG_ELEMENT_ITEM, CTF_PM_FTN_LINE_STYLE ),
PLMAP( PROP_FootnoteLineStyle, XML_NAMESPACE_STYLE, XML_TOKEN_EMPTY, XML_TYPE_STRING|MID_FLAG_ELEMENT_ITEM, CTF_PM_FTN_LINE_STYLE ),
PLMAP_EXT(PROP_GutterMargin, XML_NAMESPACE_LO_EXT, XML_MARGIN_GUTTER, XML_TYPE_MEASURE, CTF_PM_MARGINGUTTER),
//////////////////////////////////////////////////////////////////////////
+1
View File
@@ -23,6 +23,7 @@
#include <sal/types.h>
#include <libxml/parser.h>
#include <xmlsec/base64.h>
#include <xmlsec/bn.h>
#include <xmlsec/errors.h>
+1
View File
@@ -23,6 +23,7 @@
#include <string_view>
#include <libxml/parser.h>
#include <libxml/tree.h>
#include <rtl/ustring.hxx>