[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - RepositoryExternal.mk unoxml/source
Michael Stahl
mstahl at redhat.com
Wed Jun 26 14:50:39 PDT 2013
RepositoryExternal.mk | 1 +
unoxml/source/rdf/librdf_repository.cxx | 11 +++++++++++
2 files changed, 12 insertions(+)
New commits:
commit ae11e5501c9cf436a3f8b956e9b3fba6d1cb67cf
Author: Michael Stahl <mstahl at redhat.com>
Date: Wed Jun 26 21:57:03 2013 +0200
fdo#64672 prevent raptor from setting global libxml2 error handlers
Raptor already sets up all 4 error handlers in xmlSAXHandler so why it
would need the global ones in addition to that is a mystery anyway.
Messing with libxml2's globals can only cause trouble.
Change-Id: I2935efe5c4cd75d48cc4ecdeaa8437e91b48349e
(cherry picked from commit 246a78b1d2a88ff1937b09b22325d160739ef47e)
Reviewed-on: https://gerrit.libreoffice.org/4552
Reviewed-by: Fridrich Strba <fridrich at documentfoundation.org>
Tested-by: Fridrich Strba <fridrich at documentfoundation.org>
diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index 2a1b2b3..f4e3f1c 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -921,6 +921,7 @@ $(eval $(call gb_Helper_register_libraries,PLAINLIBS_OOO, \
define gb_LinkTarget__use_librdf
$(call gb_LinkTarget_use_packages,$(1),raptor rasqal redland)
$(call gb_LinkTarget_use_libraries,$(1),\
+ raptor2 \
rdf \
)
diff --git a/unoxml/source/rdf/librdf_repository.cxx b/unoxml/source/rdf/librdf_repository.cxx
index ab202d1..477b592 100644
--- a/unoxml/source/rdf/librdf_repository.cxx
+++ b/unoxml/source/rdf/librdf_repository.cxx
@@ -1897,6 +1897,16 @@ librdf_Repository::getStatementsGraph(
return new librdf_GraphResult(this, m_aMutex, pStream, pContext);
}
+extern "C"
+void librdf_raptor_init(void* /*user_data*/, raptor_world* pRaptorWorld)
+{
+ // fdo#64672 prevent raptor from setting global libxml2 error handlers
+ raptor_world_set_flag(pRaptorWorld,
+ RAPTOR_WORLD_FLAG_LIBXML_STRUCTURED_ERROR_SAVE, 0);
+ raptor_world_set_flag(pRaptorWorld,
+ RAPTOR_WORLD_FLAG_LIBXML_GENERIC_ERROR_SAVE, 0);
+}
+
librdf_world *librdf_TypeConverter::createWorld() const
{
// create and initialize world
@@ -1906,6 +1916,7 @@ librdf_world *librdf_TypeConverter::createWorld() const
"librdf_TypeConverter::createWorld: librdf_new_world failed",
m_rRep);
}
+ librdf_world_set_raptor_init_handler(pWorld, 0, &librdf_raptor_init);
//FIXME logger, digest, features?
xsltSecurityPrefsPtr origprefs = xsltGetDefaultSecurityPrefs();
librdf_world_open(pWorld);
More information about the Libreoffice-commits
mailing list