Some simplifications, using UNO_QUERY_THROW

Change-Id: Iab702a5ad9697f1c71cc12c7dea954ca620cfdbe
Reviewed-on: https://gerrit.libreoffice.org/34260
Tested-by: Stephan Bergmann <sbergman@redhat.com>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
This commit is contained in:
Stephan Bergmann 2017-02-14 16:10:15 +01:00
parent c27586115d
commit 9a22e96917
2 changed files with 2 additions and 6 deletions

View File

@ -52,9 +52,7 @@ private:
void SAL_CALL CoinMPSolver::solve()
{
uno::Reference<frame::XModel> xModel( mxDoc, uno::UNO_QUERY );
if ( !xModel.is() )
throw uno::RuntimeException();
uno::Reference<frame::XModel> xModel( mxDoc, uno::UNO_QUERY_THROW );
maStatus.clear();
mbSuccess = false;

View File

@ -83,9 +83,7 @@ private:
void SAL_CALL LpsolveSolver::solve()
{
uno::Reference<frame::XModel> xModel( mxDoc, uno::UNO_QUERY );
if ( !xModel.is() )
throw uno::RuntimeException();
uno::Reference<frame::XModel> xModel( mxDoc, uno::UNO_QUERY_THROW );
maStatus.clear();
mbSuccess = false;