From 6113c68c7653f545f762b22f70adc518cf8d660d Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Tue, 14 Feb 2017 16:10:19 +0100 Subject: Some simplifications, using UNO_QUERY_THROW Change-Id: If7a8abbf739aca98616ecb5cc3546ced192361d9 Reviewed-on: https://gerrit.libreoffice.org/34261 Tested-by: Stephan Bergmann Reviewed-by: Stephan Bergmann --- sc/source/ui/vba/vbarange.cxx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'sc/source/ui/vba/vbarange.cxx') diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx index 4d444f2aaebc..e11234142647 100644 --- a/sc/source/ui/vba/vbarange.cxx +++ b/sc/source/ui/vba/vbarange.cxx @@ -3174,9 +3174,7 @@ ScVbaRange::Find( const uno::Any& What, const uno::Any& After, const uno::Any& L // After must be a single cell in the range if( xAfterRange->getCount() > 1 ) throw uno::RuntimeException("After must be a single cell." ); - uno::Reference< excel::XRange > xCell( Cells( uno::makeAny( xAfterRange->getRow() ), uno::makeAny( xAfterRange->getColumn() ) ), uno::UNO_QUERY ); - if( !xCell.is() ) - throw uno::RuntimeException("After must be in range." ); + uno::Reference< excel::XRange > xCell( Cells( uno::makeAny( xAfterRange->getRow() ), uno::makeAny( xAfterRange->getColumn() ) ), uno::UNO_QUERY_THROW ); xStartCell.set( xAfterRange->getCellRange(), uno::UNO_QUERY_THROW ); } -- cgit