diff options
author | Michael Stahl <mstahl@redhat.com> | 2013-04-22 13:49:26 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2013-04-22 13:50:54 +0200 |
commit | a504e7f289297f0acc21075080495996e677e020 (patch) | |
tree | b1ff68a9191440ac6d042bbe1cdfeef2d7cbd234 /unoxml | |
parent | 15f4c47f5bd9537979f970ad56b4a75f1a3fc9a3 (diff) |
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
Diffstat (limited to 'unoxml')
-rw-r--r-- | unoxml/source/rdf/librdf_repository.cxx | 12 |
1 files changed, 8 insertions, 4 deletions
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<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; |