diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2014-05-20 23:29:28 +0200 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2014-05-20 23:29:53 +0200 |
commit | 227af32d8c6d5e3649c83fcdb274298bc7faa294 (patch) | |
tree | 8490a6c94094d1fbf5a190a911070c3142d3cca7 /svtools/source/java | |
parent | 0f836296ea3cdc10326ad54983b634168285b8e2 (diff) |
Prefer cppu::UnoType<T>::get() to ::getCppuType((T*)0) part18
Change-Id: Ibf958dbfbf7cdbe6ad31d390138be8d4d468c225
Diffstat (limited to 'svtools/source/java')
-rw-r--r-- | svtools/source/java/javacontext.cxx | 4 | ||||
-rw-r--r-- | svtools/source/java/javainteractionhandler.cxx | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/svtools/source/java/javacontext.cxx b/svtools/source/java/javacontext.cxx index f5be4776dcae..66c85d56edb1 100644 --- a/svtools/source/java/javacontext.cxx +++ b/svtools/source/java/javacontext.cxx @@ -43,9 +43,9 @@ JavaContext::~JavaContext() Any SAL_CALL JavaContext::queryInterface(const Type& aType ) throw (RuntimeException, std::exception) { - if (aType == getCppuType(reinterpret_cast<Reference<XInterface>*>(0))) + if (aType == cppu::UnoType<XInterface>::get()) return Any(Reference<XInterface>(static_cast<XInterface*>(this))); - else if (aType == getCppuType(reinterpret_cast<Reference<XCurrentContext>*>(0))) + else if (aType == cppu::UnoType<XCurrentContext>::get()) return Any(Reference<XCurrentContext>( static_cast<XCurrentContext*>(this))); return Any(); } diff --git a/svtools/source/java/javainteractionhandler.cxx b/svtools/source/java/javainteractionhandler.cxx index 943e4f6085f3..6d2e5494e914 100644 --- a/svtools/source/java/javainteractionhandler.cxx +++ b/svtools/source/java/javainteractionhandler.cxx @@ -64,9 +64,9 @@ JavaInteractionHandler::~JavaInteractionHandler() Any SAL_CALL JavaInteractionHandler::queryInterface(const Type& aType ) throw (RuntimeException, std::exception) { - if (aType == getCppuType(reinterpret_cast<Reference<XInterface>*>(0))) + if (aType == cppu::UnoType<XInterface>::get()) return Any( static_cast<XInterface*>(this), aType); - else if (aType == getCppuType(reinterpret_cast<Reference<XInteractionHandler>*>(0))) + else if (aType == cppu::UnoType<XInteractionHandler>::get()) return Any( static_cast<XInteractionHandler*>(this), aType); return Any(); } |