summaryrefslogtreecommitdiff
path: root/unoxml
diff options
context:
space:
mode:
authorMichael Stahl <mst@openoffice.org>2010-04-26 12:34:39 +0200
committerMichael Stahl <mst@openoffice.org>2010-04-26 12:34:39 +0200
commite9345d741859149df169907cea1aeec99e1b8e22 (patch)
treea7bc06ca7ae42e2e2898c2e18a11cc9fdadbc9df /unoxml
parentd1e7561aa828518dcbbbf78226877b4d564af2dd (diff)
sw33bf03: #i110523#: work around raptor messing up libxslt (patch by cmc)
Diffstat (limited to 'unoxml')
-rw-r--r--unoxml/source/rdf/librdf_repository.cxx9
-rw-r--r--unoxml/source/rdf/makefile.mk8
2 files changed, 17 insertions, 0 deletions
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 <rtl/ustring.hxx>
#include <librdf.h>
+#include <libxslt/security.h>
#include <boost/utility.hpp>
#include <boost/shared_ptr.hpp>
@@ -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) \