summaryrefslogtreecommitdiff
path: root/sccomp
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-02-14 16:10:15 +0100
committerStephan Bergmann <sbergman@redhat.com>2017-02-15 14:17:49 +0000
commit9a22e9691773e7d16fbc8da1568e5d67d76fcf08 (patch)
tree424569268640221064394378c717ae7af1469483 /sccomp
parentc27586115d1df8b80cece6b03e333803c1a15b19 (diff)
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>
Diffstat (limited to 'sccomp')
-rw-r--r--sccomp/source/solver/CoinMPSolver.cxx4
-rw-r--r--sccomp/source/solver/LpsolveSolver.cxx4
2 files changed, 2 insertions, 6 deletions
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<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;
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<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;