From 9a22e9691773e7d16fbc8da1568e5d67d76fcf08 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Tue, 14 Feb 2017 16:10:15 +0100 Subject: Some simplifications, using UNO_QUERY_THROW Change-Id: Iab702a5ad9697f1c71cc12c7dea954ca620cfdbe Reviewed-on: https://gerrit.libreoffice.org/34260 Tested-by: Stephan Bergmann Reviewed-by: Stephan Bergmann --- sccomp/source/solver/CoinMPSolver.cxx | 4 +--- sccomp/source/solver/LpsolveSolver.cxx | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) (limited to 'sccomp') diff --git a/sccomp/source/solver/CoinMPSolver.cxx b/sccomp/source/solver/CoinMPSolver.cxx index d7f1751972c3..36cead8f116b 100644 --- a/sccomp/source/solver/CoinMPSolver.cxx +++ b/sccomp/source/solver/CoinMPSolver.cxx @@ -52,9 +52,7 @@ private: void SAL_CALL CoinMPSolver::solve() { - uno::Reference xModel( mxDoc, uno::UNO_QUERY ); - if ( !xModel.is() ) - throw uno::RuntimeException(); + uno::Reference xModel( mxDoc, uno::UNO_QUERY_THROW ); maStatus.clear(); mbSuccess = false; diff --git a/sccomp/source/solver/LpsolveSolver.cxx b/sccomp/source/solver/LpsolveSolver.cxx index 114a259dc304..a81883d57fca 100644 --- a/sccomp/source/solver/LpsolveSolver.cxx +++ b/sccomp/source/solver/LpsolveSolver.cxx @@ -83,9 +83,7 @@ private: void SAL_CALL LpsolveSolver::solve() { - uno::Reference xModel( mxDoc, uno::UNO_QUERY ); - if ( !xModel.is() ) - throw uno::RuntimeException(); + uno::Reference xModel( mxDoc, uno::UNO_QUERY_THROW ); maStatus.clear(); mbSuccess = false; -- cgit