From a504e7f289297f0acc21075080495996e677e020 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Mon, 22 Apr 2013 13:49:26 +0200 Subject: 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 --- unoxml/source/rdf/librdf_repository.cxx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'unoxml') diff --git a/unoxml/source/rdf/librdf_repository.cxx b/unoxml/source/rdf/librdf_repository.cxx index eb1bb94c7b1a..ab202d15d015 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 +#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 +#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; -- cgit