diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2017-02-14 16:11:01 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-02-15 14:18:54 +0000 |
commit | 93732de5c1648215690854a573058d1a299796dd (patch) | |
tree | 95a530753d4b71e922c4912430fdb63dc3155cb7 /cpputools | |
parent | 5ce42c21654db41544d831ac18c1388dde64d122 (diff) |
Some simplifications, using UNO_QUERY_THROW
Change-Id: Icefafed29c9702730181f61bb03296b5b474bfa6
Reviewed-on: https://gerrit.libreoffice.org/34269
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'cpputools')
-rw-r--r-- | cpputools/source/unoexe/unoexe.cxx | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/cpputools/source/unoexe/unoexe.cxx b/cpputools/source/unoexe/unoexe.cxx index ca9aaa85d171..bed17183dfd7 100644 --- a/cpputools/source/unoexe/unoexe.cxx +++ b/cpputools/source/unoexe/unoexe.cxx @@ -155,15 +155,7 @@ void createInstance( throw RuntimeException( "cannot get service instance \"" + rServiceName + "\"!" ); } - rxOut.set( x, UNO_QUERY ); - if (! rxOut.is()) - { - const Type & rType = cppu::UnoType<T>::get(); - throw RuntimeException( - "service instance \"" + rServiceName + - "\" does not support demanded interface \"" + - rType.getTypeName() + "\"!" ); - } + rxOut.set( x, UNO_QUERY_THROW ); } /// @throws Exception @@ -490,9 +482,7 @@ SAL_IMPLEMENT_MAIN() if (bSingleAccept) { - Reference< XComponent > xComp( xBridge, UNO_QUERY ); - if (! xComp.is()) - throw RuntimeException( "bridge factory does not export interface \"com.sun.star.lang.XComponent\"!" ); + Reference< XComponent > xComp( xBridge, UNO_QUERY_THROW ); ODisposingListener::waitFor( xComp ); xComp->dispose(); // explicitly dispose the remote bridge so that it joins |