diff options
Diffstat (limited to 'sc/source/ui/vba/vbarange.cxx')
-rw-r--r-- | sc/source/ui/vba/vbarange.cxx | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx index dbcc2a2f1a7a..42b3ea9300d6 100644 --- a/sc/source/ui/vba/vbarange.cxx +++ b/sc/source/ui/vba/vbarange.cxx @@ -547,7 +547,7 @@ public: return OUString(); } - uno::Reference< beans::XPropertySet > xNumberProps( getNumberProps(), uno::UNO_QUERY_THROW ); + uno::Reference< beans::XPropertySet > xNumberProps( getNumberProps(), uno::UNO_SET_THROW ); OUString aFormatString; uno::Any aString = xNumberProps->getPropertyValue( "FormatString" ); aString >>= aFormatString; @@ -1126,7 +1126,7 @@ public: /// @throws uno::RuntimeException uno::Reference< sheet::XSheetCellCursor > getSheetCellCursor() { - return uno::Reference< sheet::XSheetCellCursor >( getSpreadSheet()->createCursorByRange( getSheetCellRange() ), uno::UNO_QUERY_THROW ); + return uno::Reference< sheet::XSheetCellCursor >( getSpreadSheet()->createCursorByRange( getSheetCellRange() ), uno::UNO_SET_THROW ); } static uno::Reference< excel::XRange > createRangeFromRange( const uno::Reference< XHelperInterface >& xParent, const uno::Reference<uno::XComponentContext >& xContext, @@ -1482,7 +1482,7 @@ ScVbaRange::visitArray( ArrayVisitor& visitor ) { for ( sal_Int32 j=0; j<nColCount; ++j ) { - uno::Reference< table::XCell > xCell( mxRange->getCellByPosition( j, i ), uno::UNO_QUERY_THROW ); + uno::Reference< table::XCell > xCell( mxRange->getCellByPosition( j, i ), uno::UNO_SET_THROW ); visitor.visitNode( i, j, xCell ); } @@ -1516,7 +1516,7 @@ ScVbaRange::getValue() // the implementations for each method are being updated ) if ( m_Areas->getCount() > 1 ) { - uno::Reference< excel::XRange > xRange( getArea( 0 ), uno::UNO_QUERY_THROW ); + uno::Reference< excel::XRange > xRange( getArea( 0 ), uno::UNO_SET_THROW ); return xRange->getValue(); } @@ -1660,7 +1660,7 @@ ScVbaRange::getFormulaValue( formula::FormulaGrammar::Grammar eGram ) // the implementations for each method are being updated ) if ( m_Areas->getCount() > 1 ) { - uno::Reference< excel::XRange > xRange( getArea( 0 ), uno::UNO_QUERY_THROW ); + uno::Reference< excel::XRange > xRange( getArea( 0 ), uno::UNO_SET_THROW ); return xRange->getFormula(); } CellFormulaValueGetter valueGetter( &getScDocument(), eGram ); @@ -1726,7 +1726,7 @@ ScVbaRange::getRow() // the implementations for each method are being updated ) if ( m_Areas->getCount() > 1 ) { - uno::Reference< excel::XRange > xRange( getArea( 0 ), uno::UNO_QUERY_THROW ); + uno::Reference< excel::XRange > xRange( getArea( 0 ), uno::UNO_SET_THROW ); return xRange->getRow(); } uno::Reference< sheet::XCellAddressable > xCellAddressable(mxRange->getCellByPosition(0, 0), uno::UNO_QUERY_THROW ); @@ -1742,7 +1742,7 @@ ScVbaRange::getColumn() // the implementations for each method are being updated ) if ( m_Areas->getCount() > 1 ) { - uno::Reference< excel::XRange > xRange( getArea( 0 ), uno::UNO_QUERY_THROW ); + uno::Reference< excel::XRange > xRange( getArea( 0 ), uno::UNO_SET_THROW ); return xRange->getColumn(); } uno::Reference< sheet::XCellAddressable > xCellAddressable(mxRange->getCellByPosition(0, 0), uno::UNO_QUERY_THROW ); @@ -1797,7 +1797,7 @@ ScVbaRange::fillSeries( sheet::FillDirection nFillDirection, sheet::FillMode nFi if ( m_Areas->getCount() > 1 ) { // Multi-Area Range - uno::Reference< XCollection > xCollection( m_Areas, uno::UNO_QUERY_THROW ); + uno::Reference< XCollection > xCollection( m_Areas, uno::UNO_SET_THROW ); for ( sal_Int32 index = 1; index <= xCollection->getCount(); ++index ) { uno::Reference< excel::XRange > xRange( xCollection->Item( uno::makeAny( index ), uno::Any() ), uno::UNO_QUERY_THROW ); @@ -1850,7 +1850,7 @@ ScVbaRange::getText() // the implementations for each method are being updated ) if ( m_Areas->getCount() > 1 ) { - uno::Reference< excel::XRange > xRange( getArea( 0 ), uno::UNO_QUERY_THROW ); + uno::Reference< excel::XRange > xRange( getArea( 0 ), uno::UNO_SET_THROW ); return xRange->getText(); } uno::Reference< text::XTextRange > xTextRange(mxRange->getCellByPosition(0,0), uno::UNO_QUERY_THROW ); @@ -1902,7 +1902,7 @@ ScVbaRange::CurrentRegion() // the implementations for each method are being updated ) if ( m_Areas->getCount() > 1 ) { - uno::Reference< excel::XRange > xRange( getArea( 0 ), uno::UNO_QUERY_THROW ); + uno::Reference< excel::XRange > xRange( getArea( 0 ), uno::UNO_SET_THROW ); return xRange->CurrentRegion(); } @@ -1923,7 +1923,7 @@ ScVbaRange::CurrentArray() // the implementations for each method are being updated ) if ( m_Areas->getCount() > 1 ) { - uno::Reference< excel::XRange > xRange( getArea( 0 ), uno::UNO_QUERY_THROW ); + uno::Reference< excel::XRange > xRange( getArea( 0 ), uno::UNO_SET_THROW ); return xRange->CurrentArray(); } RangeHelper helper( mxRange ); @@ -1943,7 +1943,7 @@ ScVbaRange::getFormulaArray() // the implementations for each method are being updated ) if ( m_Areas->getCount() > 1 ) { - uno::Reference< excel::XRange > xRange( getArea( 0 ), uno::UNO_QUERY_THROW ); + uno::Reference< excel::XRange > xRange( getArea( 0 ), uno::UNO_SET_THROW ); return xRange->getFormulaArray(); } @@ -1981,7 +1981,7 @@ ScVbaRange::setFormulaArray(const uno::Any& rFormula) // the implementations for each method are being updated ) if ( m_Areas->getCount() > 1 ) { - uno::Reference< excel::XRange > xRange( getArea( 0 ), uno::UNO_QUERY_THROW ); + uno::Reference< excel::XRange > xRange( getArea( 0 ), uno::UNO_SET_THROW ); return xRange->setFormulaArray( rFormula ); } // #TODO need to distinguish between getFormula and getFormulaArray e.g. (R1C1) @@ -2017,7 +2017,7 @@ ScVbaRange::Characters(const uno::Any& Start, const uno::Any& Length) // the implementations for each method are being updated ) if ( m_Areas->getCount() > 1 ) { - uno::Reference< excel::XRange > xRange( getArea( 0 ), uno::UNO_QUERY_THROW ); + uno::Reference< excel::XRange > xRange( getArea( 0 ), uno::UNO_SET_THROW ); return xRange->Characters( Start, Length ); } @@ -2041,7 +2041,7 @@ ScVbaRange::Address( const uno::Any& RowAbsolute, const uno::Any& ColumnAbsolut { // Multi-Area Range OUStringBuffer sAddress; - uno::Reference< XCollection > xCollection( m_Areas, uno::UNO_QUERY_THROW ); + uno::Reference< XCollection > xCollection( m_Areas, uno::UNO_SET_THROW ); uno::Any aExternalCopy = External; for ( sal_Int32 index = 1; index <= xCollection->getCount(); ++index ) { @@ -2140,7 +2140,7 @@ ScVbaRange::Cells( const uno::Any &nRowIndex, const uno::Any &nColumnIndex ) // the implementations for each method are being updated ) if ( m_Areas->getCount() > 1 ) { - uno::Reference< excel::XRange > xRange( getArea( 0 ), uno::UNO_QUERY_THROW ); + uno::Reference< excel::XRange > xRange( getArea( 0 ), uno::UNO_SET_THROW ); return xRange->Cells( nRowIndex, nColumnIndex ); } @@ -2240,7 +2240,7 @@ ScVbaRange::Select() ScDocShell* pShell = pUnoRangesBase->GetDocShell(); if ( pShell ) { - uno::Reference< frame::XModel > xModel( pShell->GetModel(), uno::UNO_QUERY_THROW ); + uno::Reference< frame::XModel > xModel( pShell->GetModel(), uno::UNO_SET_THROW ); uno::Reference< view::XSelectionSupplier > xSelection( xModel->getCurrentController(), uno::UNO_QUERY_THROW ); if ( mxRanges.is() ) xSelection->select( uno::Any( lclExpandToMerged( mxRanges ) ) ); @@ -2250,9 +2250,9 @@ ScVbaRange::Select() // ThisComponent.CurrentController.Frame.getContainerWindow.SetFocus try { - uno::Reference< frame::XController > xController( xModel->getCurrentController(), uno::UNO_QUERY_THROW ); - uno::Reference< frame::XFrame > xFrame( xController->getFrame(), uno::UNO_QUERY_THROW ); - uno::Reference< awt::XWindow > xWin( xFrame->getContainerWindow(), uno::UNO_QUERY_THROW ); + uno::Reference< frame::XController > xController( xModel->getCurrentController(), uno::UNO_SET_THROW ); + uno::Reference< frame::XFrame > xFrame( xController->getFrame(), uno::UNO_SET_THROW ); + uno::Reference< awt::XWindow > xWin( xFrame->getContainerWindow(), uno::UNO_SET_THROW ); xWin->setFocus(); } catch( uno::Exception& ) @@ -2290,7 +2290,7 @@ ScVbaRange::Activate() xCellRange.set( xIndex->getByIndex( 0 ), uno::UNO_QUERY_THROW ); } else - xCellRange.set( mxRange, uno::UNO_QUERY_THROW ); + xCellRange.set( mxRange, uno::UNO_SET_THROW ); RangeHelper thisRange( xCellRange ); uno::Reference< sheet::XCellRangeAddressable > xThisRangeAddress = thisRange.getCellRangeAddressable(); @@ -2596,7 +2596,7 @@ ScVbaRange::Resize( const uno::Any &RowSize, const uno::Any &ColumnSize ) bool bIsRowChanged = ( RowSize >>= nRowSize ), bIsColumnChanged = ( ColumnSize >>= nColumnSize ); uno::Reference< table::XColumnRowRange > xColumnRowRange(mxRange, ::uno::UNO_QUERY_THROW); uno::Reference< sheet::XSheetCellRange > xSheetRange(mxRange, ::uno::UNO_QUERY_THROW); - uno::Reference< sheet::XSheetCellCursor > xCursor( xSheetRange->getSpreadsheet()->createCursorByRange(xSheetRange), ::uno::UNO_QUERY_THROW ); + uno::Reference< sheet::XSheetCellCursor > xCursor( xSheetRange->getSpreadsheet()->createCursorByRange(xSheetRange), ::uno::UNO_SET_THROW ); if( !bIsRowChanged ) nRowSize = xColumnRowRange->getRows()->getCount(); @@ -2848,7 +2848,7 @@ ScVbaRange::PasteSpecial( const uno::Any& Paste, const uno::Any& Operation, cons if (!pShell) throw uno::RuntimeException("That command cannot be used with no ScDocShell" ); - uno::Reference< frame::XModel > xModel(pShell->GetModel(), uno::UNO_QUERY_THROW); + uno::Reference< frame::XModel > xModel(pShell->GetModel(), uno::UNO_SET_THROW); uno::Reference< view::XSelectionSupplier > xSelection( xModel->getCurrentController(), uno::UNO_QUERY_THROW ); // select this range xSelection->select( uno::makeAny( mxRange ) ); @@ -3161,7 +3161,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_THROW ); + uno::Reference< excel::XRange > xCell( Cells( uno::makeAny( xAfterRange->getRow() ), uno::makeAny( xAfterRange->getColumn() ) ), uno::UNO_SET_THROW ); xStartCell.set( xAfterRange->getCellRange(), uno::UNO_QUERY_THROW ); } @@ -3538,7 +3538,7 @@ ScVbaRange::End( ::sal_Int32 Direction ) { if ( m_Areas->getCount() > 1 ) { - uno::Reference< excel::XRange > xRange( getArea( 0 ), uno::UNO_QUERY_THROW ); + uno::Reference< excel::XRange > xRange( getArea( 0 ), uno::UNO_SET_THROW ); return xRange->End( Direction ); } @@ -3601,10 +3601,10 @@ ScVbaRange::End( ::sal_Int32 Direction ) uno::Any aVoid; uno::Reference< excel::XRange > resultCell; - resultCell.set( xApplication->getActiveSheet()->Range( uno::makeAny( sMoved ), aVoid ), uno::UNO_QUERY_THROW ); + resultCell.set( xApplication->getActiveSheet()->Range( uno::makeAny( sMoved ), aVoid ), uno::UNO_SET_THROW ); // restore old ActiveCell - uno::Reference< excel::XRange > xOldActiveCell( sActiveSheet->Range( uno::makeAny( sActiveCell ), aVoid ), uno::UNO_QUERY_THROW ); + uno::Reference< excel::XRange > xOldActiveCell( sActiveSheet->Range( uno::makeAny( sActiveCell ), aVoid ), uno::UNO_SET_THROW ); xOldActiveCell->Select(); @@ -4932,7 +4932,7 @@ uno::Reference< excel::XRange > SAL_CALL ScVbaRange::MergeArea() { uno::Reference< sheet::XSheetCellRange > xMergeShellCellRange(mxRange->getCellRangeByPosition(0,0,0,0), uno::UNO_QUERY_THROW); - uno::Reference< sheet::XSheetCellCursor > xMergeSheetCursor(xMergeShellCellRange->getSpreadsheet()->createCursorByRange( xMergeShellCellRange ), uno::UNO_QUERY_THROW); + uno::Reference< sheet::XSheetCellCursor > xMergeSheetCursor(xMergeShellCellRange->getSpreadsheet()->createCursorByRange( xMergeShellCellRange ), uno::UNO_SET_THROW); if( xMergeSheetCursor.is() ) { xMergeSheetCursor->collapseToMergedArea(); @@ -4988,7 +4988,7 @@ ScVbaRange::PrintOut( const uno::Any& From, const uno::Any& To, const uno::Any& void SAL_CALL ScVbaRange::AutoFill( const uno::Reference< excel::XRange >& Destination, const uno::Any& Type ) { - uno::Reference< excel::XRange > xDest( Destination, uno::UNO_QUERY_THROW ); + uno::Reference< excel::XRange > xDest( Destination, uno::UNO_SET_THROW ); ScVbaRange* pRange = getImplementation( xDest ); RangeHelper destRangeHelper( pRange->mxRange ); table::CellRangeAddress destAddress = destRangeHelper.getCellRangeAddressable()->getRangeAddress(); |