Some simplifications, using UNO_QUERY_THROW
Change-Id: Iaf7b4695e7930b8e7fa5dd3736d19744afb52fa3 Reviewed-on: https://gerrit.libreoffice.org/34254 Tested-by: Stephan Bergmann <sbergman@redhat.com> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
This commit is contained in:
parent
223bb798f6
commit
c68b5c36cd
@ -1155,11 +1155,7 @@ sal_Int32 TestBridgeImpl::run( const Sequence< OUString > & rArgs )
|
||||
{
|
||||
throw RuntimeException( "cannot get test object!" );
|
||||
}
|
||||
Reference< XBridgeTest > xTest( xOriginal, UNO_QUERY );
|
||||
if (! xTest.is())
|
||||
{
|
||||
throw RuntimeException( "test object does not implement XBridgeTest!" );
|
||||
}
|
||||
Reference< XBridgeTest > xTest( xOriginal, UNO_QUERY_THROW );
|
||||
|
||||
Reference<XBridgeTest > xLBT;
|
||||
bRet = check( makeSurrogate( xLBT, xTest ), "makeSurrogate" );
|
||||
|
@ -554,9 +554,7 @@ static void benchmark(
|
||||
TimingSheet & rSheet, const Reference< XInterface > & xInstance, sal_Int64 nLoop )
|
||||
throw (Exception)
|
||||
{
|
||||
Reference< XPerformanceTest > xBench( xInstance, UNO_QUERY );
|
||||
if (! xBench.is())
|
||||
throw RuntimeException("illegal test object!" );
|
||||
Reference< XPerformanceTest > xBench( xInstance, UNO_QUERY_THROW );
|
||||
|
||||
sal_Int64 i;
|
||||
sal_uInt32 tStart, tEnd;
|
||||
|
Loading…
x
Reference in New Issue
Block a user