Kaydet (Commit) 93732de5 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Some simplifications, using UNO_QUERY_THROW

Change-Id: Icefafed29c9702730181f61bb03296b5b474bfa6
Reviewed-on: https://gerrit.libreoffice.org/34269Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarStephan Bergmann <sbergman@redhat.com>
üst 5ce42c21
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment