[Libreoffice-commits] core.git: unoxml/source
Michael Stahl
mstahl at redhat.com
Mon Apr 22 04:53:46 PDT 2013
unoxml/source/rdf/librdf_repository.cxx | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
New commits:
commit a504e7f289297f0acc21075080495996e677e020
Author: Michael Stahl <mstahl at redhat.com>
Date: Mon Apr 22 13:49:26 2013 +0200
unordf: put in a version check for librdf_stream_get_context2
Strangely Apple llvm-g++ 4.2.1 ignores the warning-disabling macro here
and gives a deprecation warning, so use a version check instead.
Change-Id: Ibc09930a907baea8665828529332d40de156b70e
diff --git a/unoxml/source/rdf/librdf_repository.cxx b/unoxml/source/rdf/librdf_repository.cxx
index eb1bb94..ab202d1 100644
--- a/unoxml/source/rdf/librdf_repository.cxx
+++ b/unoxml/source/rdf/librdf_repository.cxx
@@ -454,10 +454,12 @@ librdf_node* librdf_GraphResult::getContext() const
{
if (!m_pStream.get() || librdf_stream_end(m_pStream.get()))
return NULL;
- SAL_WNODEPRECATED_DECLARATIONS_PUSH;
librdf_node *pCtxt( static_cast<librdf_node *>
+#if LIBRDF_VERSION >= 10012
+ (librdf_stream_get_context2(m_pStream.get())) );
+#else
(librdf_stream_get_context(m_pStream.get())) );
- SAL_WNODEPRECATED_DECLARATIONS_POP;
+#endif
if (pCtxt)
return pCtxt;
return m_pContext.get();
@@ -1585,10 +1587,12 @@ librdf_statement *rdfa_context_stream_map_handler(
{
OSL_ENSURE(i_pStream, "rdfa_context_stream_map_handler: stream null");
if (i_pStream) {
- SAL_WNODEPRECATED_DECLARATIONS_PUSH;
librdf_node *pCtxt( static_cast<librdf_node *>
+#if LIBRDF_VERSION >= 10012
+ (librdf_stream_get_context2(i_pStream)) );
+#else
(librdf_stream_get_context(i_pStream)) );
- SAL_WNODEPRECATED_DECLARATIONS_POP;
+#endif
OSL_ENSURE(pCtxt, "rdfa_context_stream_map_handler: context null");
if (pCtxt && isInternalContext(pCtxt)) {
return i_pStatement;
More information about the Libreoffice-commits
mailing list