From e9345d741859149df169907cea1aeec99e1b8e22 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Mon, 26 Apr 2010 12:34:39 +0200 Subject: [PATCH] sw33bf03: #i110523#: work around raptor messing up libxslt (patch by cmc) --- unoxml/source/rdf/librdf_repository.cxx | 9 +++++++++ unoxml/source/rdf/makefile.mk | 8 ++++++++ 2 files changed, 17 insertions(+) diff --git a/unoxml/source/rdf/librdf_repository.cxx b/unoxml/source/rdf/librdf_repository.cxx index c42887a9cf9f..62caff524010 100644 --- a/unoxml/source/rdf/librdf_repository.cxx +++ b/unoxml/source/rdf/librdf_repository.cxx @@ -55,6 +55,7 @@ #include #include +#include #include #include @@ -1890,7 +1891,15 @@ librdf_world *librdf_TypeConverter::createWorld() const m_rRep); } //FIXME logger, digest, features? + xsltSecurityPrefsPtr origprefs = xsltGetDefaultSecurityPrefs(); librdf_world_open(pWorld); + xsltSecurityPrefsPtr newprefs = xsltGetDefaultSecurityPrefs(); + if (newprefs != origprefs) { + // #i110523# restore libxslt global configuration + // (gratuitously overwritten by raptor_init_parser_grddl_common) + // (this is the only reason unordf is linked against libxslt) + xsltSetDefaultSecurityPrefs(origprefs); + } return pWorld; } diff --git a/unoxml/source/rdf/makefile.mk b/unoxml/source/rdf/makefile.mk index 298c1dcdae25..b8593e52da46 100644 --- a/unoxml/source/rdf/makefile.mk +++ b/unoxml/source/rdf/makefile.mk @@ -45,6 +45,13 @@ ENABLE_EXCEPTIONS=TRUE CFLAGS+=-DSYSTEM_REDLAND $(REDLAND_CFLAGS) .ENDIF +.IF "$(SYSTEM_LIBXSLT)" == "YES" +CFLAGS+= $(LIBXSLT_CFLAGS) +.ELSE +LIBXSLTINCDIR=external$/libxslt +CFLAGS+= -I$(SOLARINCDIR)$/$(LIBXSLTINCDIR) +.ENDIF + # --- Files -------------------------------------------------------- .IF "$(L10N_framework)"=="" @@ -68,6 +75,7 @@ DEF1NAME=$(SHL1TARGET) SHL1STDLIBS= \ $(REDLANDLIB) \ + $(XSLTLIB) \ $(CPPUHELPERLIB) \ $(CPPULIB) \ $(SALLIB) \