diff options
Diffstat (limited to 'sc/source/ui/vba/vbawindow.cxx')
-rw-r--r-- | sc/source/ui/vba/vbawindow.cxx | 141 |
1 files changed, 70 insertions, 71 deletions
diff --git a/sc/source/ui/vba/vbawindow.cxx b/sc/source/ui/vba/vbawindow.cxx index 2a7ef9c729d9..fae68abba1b3 100644 --- a/sc/source/ui/vba/vbawindow.cxx +++ b/sc/source/ui/vba/vbawindow.cxx @@ -70,16 +70,16 @@ public: Sheets::const_iterator m_it; /// @throws uno::RuntimeException - SelectedSheetsEnum( const uno::Reference< uno::XComponentContext >& xContext, const Sheets& sheets, const uno::Reference< frame::XModel >& xModel ) throw ( uno::RuntimeException ) : m_xContext( xContext ), m_sheets( sheets ), m_xModel( xModel ) + SelectedSheetsEnum( const uno::Reference< uno::XComponentContext >& xContext, const Sheets& sheets, const uno::Reference< frame::XModel >& xModel ) : m_xContext( xContext ), m_sheets( sheets ), m_xModel( xModel ) { m_it = m_sheets.begin(); } // XEnumeration - virtual sal_Bool SAL_CALL hasMoreElements( ) throw (uno::RuntimeException, std::exception) override + virtual sal_Bool SAL_CALL hasMoreElements( ) override { return m_it != m_sheets.end(); } - virtual uno::Any SAL_CALL nextElement( ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException, std::exception) override + virtual uno::Any SAL_CALL nextElement( ) override { if ( !hasMoreElements() ) { @@ -128,16 +128,16 @@ public: } //XEnumerationAccess - virtual uno::Reference< container::XEnumeration > SAL_CALL createEnumeration( ) throw (uno::RuntimeException, std::exception) override + virtual uno::Reference< container::XEnumeration > SAL_CALL createEnumeration( ) override { return new SelectedSheetsEnum( m_xContext, sheets, m_xModel ); } // XIndexAccess - virtual ::sal_Int32 SAL_CALL getCount( ) throw (uno::RuntimeException, std::exception) override + virtual ::sal_Int32 SAL_CALL getCount( ) override { return sheets.size(); } - virtual uno::Any SAL_CALL getByIndex( ::sal_Int32 Index ) throw ( lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException, std::exception) override + virtual uno::Any SAL_CALL getByIndex( ::sal_Int32 Index ) override { if ( Index < 0 || static_cast< Sheets::size_type >( Index ) >= sheets.size() ) @@ -147,18 +147,18 @@ public: } //XElementAccess - virtual uno::Type SAL_CALL getElementType( ) throw (uno::RuntimeException, std::exception) override + virtual uno::Type SAL_CALL getElementType( ) override { return cppu::UnoType<excel::XWorksheet>::get(); } - virtual sal_Bool SAL_CALL hasElements( ) throw (uno::RuntimeException, std::exception) override + virtual sal_Bool SAL_CALL hasElements( ) override { return ( !sheets.empty() ); } //XNameAccess - virtual uno::Any SAL_CALL getByName( const OUString& aName ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException, std::exception) override + virtual uno::Any SAL_CALL getByName( const OUString& aName ) override { NameIndexHash::const_iterator it = namesToIndices.find( aName ); if ( it == namesToIndices.end() ) @@ -167,12 +167,12 @@ public: } - virtual uno::Sequence< OUString > SAL_CALL getElementNames( ) throw (uno::RuntimeException, std::exception) override + virtual uno::Sequence< OUString > SAL_CALL getElementNames( ) override { return comphelper::mapKeysToSequence( namesToIndices ); } - virtual sal_Bool SAL_CALL hasByName( const OUString& aName ) throw (uno::RuntimeException, std::exception) override + virtual sal_Bool SAL_CALL hasByName( const OUString& aName ) override { NameIndexHash::const_iterator it = namesToIndices.find( aName ); return (it != namesToIndices.end()); @@ -184,7 +184,7 @@ ScVbaWindow::ScVbaWindow( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< frame::XModel >& xModel, - const uno::Reference< frame::XController >& xController ) throw (uno::RuntimeException) : + const uno::Reference< frame::XController >& xController ) : WindowImpl_BASE( xParent, xContext, xModel, xController ) { init(); @@ -192,7 +192,7 @@ ScVbaWindow::ScVbaWindow( ScVbaWindow::ScVbaWindow( const uno::Sequence< uno::Any >& args, - const uno::Reference< uno::XComponentContext >& xContext ) throw (uno::RuntimeException) : + const uno::Reference< uno::XComponentContext >& xContext ) : WindowImpl_BASE( args, xContext ) { init(); @@ -219,25 +219,25 @@ ScVbaWindow::init() } uno::Reference< beans::XPropertySet > -ScVbaWindow::getControllerProps() throw (uno::RuntimeException) +ScVbaWindow::getControllerProps() { return uno::Reference< beans::XPropertySet >( getController(), uno::UNO_QUERY_THROW ); } uno::Reference< beans::XPropertySet > -ScVbaWindow::getFrameProps() throw (uno::RuntimeException) +ScVbaWindow::getFrameProps() { return uno::Reference< beans::XPropertySet >( getController()->getFrame(), uno::UNO_QUERY_THROW ); } uno::Reference< awt::XDevice > -ScVbaWindow::getDevice() throw (uno::RuntimeException) +ScVbaWindow::getDevice() { return uno::Reference< awt::XDevice >( getWindow(), uno::UNO_QUERY_THROW ); } void -ScVbaWindow::Scroll( const uno::Any& Down, const uno::Any& Up, const uno::Any& ToRight, const uno::Any& ToLeft, bool bLargeScroll ) throw (uno::RuntimeException) +ScVbaWindow::Scroll( const uno::Any& Down, const uno::Any& Up, const uno::Any& ToRight, const uno::Any& ToLeft, bool bLargeScroll ) { if( !m_xPane.is() ) throw uno::RuntimeException(); @@ -248,19 +248,19 @@ ScVbaWindow::Scroll( const uno::Any& Down, const uno::Any& Up, const uno::Any& T } void SAL_CALL -ScVbaWindow::SmallScroll( const uno::Any& Down, const uno::Any& Up, const uno::Any& ToRight, const uno::Any& ToLeft ) throw (uno::RuntimeException, std::exception) +ScVbaWindow::SmallScroll( const uno::Any& Down, const uno::Any& Up, const uno::Any& ToRight, const uno::Any& ToLeft ) { Scroll( Down, Up, ToRight, ToLeft, false ); } void SAL_CALL -ScVbaWindow::LargeScroll( const uno::Any& Down, const uno::Any& Up, const uno::Any& ToRight, const uno::Any& ToLeft ) throw (uno::RuntimeException, std::exception) +ScVbaWindow::LargeScroll( const uno::Any& Down, const uno::Any& Up, const uno::Any& ToRight, const uno::Any& ToLeft ) { Scroll( Down, Up, ToRight, ToLeft, true ); } uno::Any SAL_CALL -ScVbaWindow::SelectedSheets( const uno::Any& aIndex ) throw (uno::RuntimeException, std::exception) +ScVbaWindow::SelectedSheets( const uno::Any& aIndex ) { uno::Reference< container::XEnumerationAccess > xEnumAccess( new SelectedSheetsEnumAccess( mxContext, m_xModel ) ); // #FIXME needs a workbook as a parent @@ -274,7 +274,7 @@ ScVbaWindow::SelectedSheets( const uno::Any& aIndex ) throw (uno::RuntimeExcepti } void SAL_CALL -ScVbaWindow::ScrollWorkbookTabs( const uno::Any& /*Sheets*/, const uno::Any& /*Position*/ ) throw (uno::RuntimeException, std::exception) +ScVbaWindow::ScrollWorkbookTabs( const uno::Any& /*Sheets*/, const uno::Any& /*Position*/ ) { // #TODO #FIXME need some implementation to scroll through the tabs // but where is this done? @@ -294,7 +294,7 @@ ScVbaWindow::ScrollWorkbookTabs( const uno::Any& /*Sheets*/, const uno::Any& /*P } uno::Any SAL_CALL -ScVbaWindow::getCaption() throw (uno::RuntimeException, std::exception) +ScVbaWindow::getCaption() { static const char sCrud[] = " - OpenOffice.org Calc"; static const sal_Int32 nCrudLen = strlen(sCrud); @@ -333,13 +333,13 @@ ScVbaWindow::getCaption() throw (uno::RuntimeException, std::exception) } void SAL_CALL -ScVbaWindow::setCaption( const uno::Any& _caption ) throw (uno::RuntimeException, std::exception) +ScVbaWindow::setCaption( const uno::Any& _caption ) { getFrameProps()->setPropertyValue( SC_UNONAME_TITLE, _caption ); } uno::Any SAL_CALL -ScVbaWindow::getScrollRow() throw (uno::RuntimeException, std::exception) +ScVbaWindow::getScrollRow() { sal_Int32 nValue = 0; // !! TODO !! get view shell from controller @@ -354,7 +354,7 @@ ScVbaWindow::getScrollRow() throw (uno::RuntimeException, std::exception) } void SAL_CALL -ScVbaWindow::setScrollRow( const uno::Any& _scrollrow ) throw (uno::RuntimeException, std::exception) +ScVbaWindow::setScrollRow( const uno::Any& _scrollrow ) { // !! TODO !! get view shell from controller ScTabViewShell* pViewShell = excel::getBestViewShell( m_xModel ); @@ -369,7 +369,7 @@ ScVbaWindow::setScrollRow( const uno::Any& _scrollrow ) throw (uno::RuntimeExcep } uno::Any SAL_CALL -ScVbaWindow::getScrollColumn() throw (uno::RuntimeException, std::exception) +ScVbaWindow::getScrollColumn() { sal_Int32 nValue = 0; // !! TODO !! get view shell from controller @@ -384,7 +384,7 @@ ScVbaWindow::getScrollColumn() throw (uno::RuntimeException, std::exception) } void SAL_CALL -ScVbaWindow::setScrollColumn( const uno::Any& _scrollcolumn ) throw (uno::RuntimeException, std::exception) +ScVbaWindow::setScrollColumn( const uno::Any& _scrollcolumn ) { // !! TODO !! get view shell from controller ScTabViewShell* pViewShell = excel::getBestViewShell( m_xModel ); @@ -399,7 +399,7 @@ ScVbaWindow::setScrollColumn( const uno::Any& _scrollcolumn ) throw (uno::Runtim } uno::Any SAL_CALL -ScVbaWindow::getWindowState() throw (uno::RuntimeException, std::exception) +ScVbaWindow::getWindowState() { sal_Int32 nwindowState = xlNormal; // !! TODO !! get view shell from controller @@ -417,7 +417,7 @@ ScVbaWindow::getWindowState() throw (uno::RuntimeException, std::exception) } void SAL_CALL -ScVbaWindow::setWindowState( const uno::Any& _windowstate ) throw (uno::RuntimeException, std::exception) +ScVbaWindow::setWindowState( const uno::Any& _windowstate ) { sal_Int32 nwindowState = xlMaximized; _windowstate >>= nwindowState; @@ -439,7 +439,7 @@ ScVbaWindow::setWindowState( const uno::Any& _windowstate ) throw (uno::RuntimeE } void -ScVbaWindow::Activate() throw (css::uno::RuntimeException, std::exception) +ScVbaWindow::Activate() { rtl::Reference<ScVbaWorkbook> workbook( new ScVbaWorkbook( uno::Reference< XHelperInterface >( Application(), uno::UNO_QUERY_THROW ), mxContext, m_xModel ) ); @@ -447,35 +447,35 @@ ScVbaWindow::Activate() throw (css::uno::RuntimeException, std::exception) } void -ScVbaWindow::Close( const uno::Any& SaveChanges, const uno::Any& FileName, const uno::Any& RouteWorkBook ) throw (uno::RuntimeException, std::exception) +ScVbaWindow::Close( const uno::Any& SaveChanges, const uno::Any& FileName, const uno::Any& RouteWorkBook ) { rtl::Reference< ScVbaWorkbook > workbook( new ScVbaWorkbook( uno::Reference< XHelperInterface >( Application(), uno::UNO_QUERY_THROW ), mxContext, m_xModel ) ); workbook->Close(SaveChanges, FileName, RouteWorkBook ); } uno::Reference< excel::XPane > SAL_CALL -ScVbaWindow::ActivePane() throw (script::BasicErrorException, uno::RuntimeException, std::exception) +ScVbaWindow::ActivePane() { uno::Reference< sheet::XViewPane > xViewPane( getController(), uno::UNO_QUERY_THROW ); return new ScVbaPane( this, mxContext, m_xModel, xViewPane ); } uno::Reference< excel::XRange > SAL_CALL -ScVbaWindow::ActiveCell( ) throw (script::BasicErrorException, uno::RuntimeException, std::exception) +ScVbaWindow::ActiveCell( ) { uno::Reference< excel::XApplication > xApplication( Application(), uno::UNO_QUERY_THROW ); return xApplication->getActiveCell(); } uno::Any SAL_CALL -ScVbaWindow::Selection( ) throw (script::BasicErrorException, uno::RuntimeException, std::exception) +ScVbaWindow::Selection( ) { uno::Reference< excel::XApplication > xApplication( Application(), uno::UNO_QUERY_THROW ); return xApplication->getSelection(); } uno::Reference< excel::XRange > SAL_CALL -ScVbaWindow::RangeSelection() throw (script::BasicErrorException, uno::RuntimeException, std::exception) +ScVbaWindow::RangeSelection() { /* TODO / FIXME: According to documentation, this method returns the range selection even if shapes are selected. */ @@ -483,7 +483,7 @@ ScVbaWindow::RangeSelection() throw (script::BasicErrorException, uno::RuntimeEx } sal_Bool SAL_CALL -ScVbaWindow::getDisplayGridlines() throw (uno::RuntimeException, std::exception) +ScVbaWindow::getDisplayGridlines() { OUString sName( SC_UNO_SHOWGRID ); bool bGrid = true; @@ -492,14 +492,14 @@ ScVbaWindow::getDisplayGridlines() throw (uno::RuntimeException, std::exception) } void SAL_CALL -ScVbaWindow::setDisplayGridlines( sal_Bool _displaygridlines ) throw (uno::RuntimeException, std::exception) +ScVbaWindow::setDisplayGridlines( sal_Bool _displaygridlines ) { OUString sName( SC_UNO_SHOWGRID ); getControllerProps()->setPropertyValue( sName, uno::makeAny( _displaygridlines )); } sal_Bool SAL_CALL -ScVbaWindow::getDisplayHeadings() throw (uno::RuntimeException, std::exception) +ScVbaWindow::getDisplayHeadings() { OUString sName( SC_UNO_COLROWHDR ); bool bHeading = true; @@ -508,14 +508,14 @@ ScVbaWindow::getDisplayHeadings() throw (uno::RuntimeException, std::exception) } void SAL_CALL -ScVbaWindow::setDisplayHeadings( sal_Bool _bDisplayHeadings ) throw (uno::RuntimeException, std::exception) +ScVbaWindow::setDisplayHeadings( sal_Bool _bDisplayHeadings ) { OUString sName( SC_UNO_COLROWHDR ); getControllerProps()->setPropertyValue( sName, uno::makeAny( _bDisplayHeadings )); } sal_Bool SAL_CALL -ScVbaWindow::getDisplayHorizontalScrollBar() throw (uno::RuntimeException, std::exception) +ScVbaWindow::getDisplayHorizontalScrollBar() { OUString sName( SC_UNO_HORSCROLL ); bool bHorizontalScrollBar = true; @@ -524,14 +524,14 @@ ScVbaWindow::getDisplayHorizontalScrollBar() throw (uno::RuntimeException, std:: } void SAL_CALL -ScVbaWindow::setDisplayHorizontalScrollBar( sal_Bool _bDisplayHorizontalScrollBar ) throw (uno::RuntimeException, std::exception) +ScVbaWindow::setDisplayHorizontalScrollBar( sal_Bool _bDisplayHorizontalScrollBar ) { OUString sName( SC_UNO_HORSCROLL ); getControllerProps()->setPropertyValue( sName, uno::makeAny( _bDisplayHorizontalScrollBar )); } sal_Bool SAL_CALL -ScVbaWindow::getDisplayOutline() throw (uno::RuntimeException, std::exception) +ScVbaWindow::getDisplayOutline() { OUString sName( SC_UNO_OUTLSYMB ); bool bOutline = true; @@ -540,14 +540,14 @@ ScVbaWindow::getDisplayOutline() throw (uno::RuntimeException, std::exception) } void SAL_CALL -ScVbaWindow::setDisplayOutline( sal_Bool _bDisplayOutline ) throw (uno::RuntimeException, std::exception) +ScVbaWindow::setDisplayOutline( sal_Bool _bDisplayOutline ) { OUString sName( SC_UNO_OUTLSYMB ); getControllerProps()->setPropertyValue( sName, uno::makeAny( _bDisplayOutline )); } sal_Bool SAL_CALL -ScVbaWindow::getDisplayVerticalScrollBar() throw (uno::RuntimeException, std::exception) +ScVbaWindow::getDisplayVerticalScrollBar() { OUString sName( SC_UNO_VERTSCROLL ); bool bVerticalScrollBar = true; @@ -556,14 +556,14 @@ ScVbaWindow::getDisplayVerticalScrollBar() throw (uno::RuntimeException, std::ex } void SAL_CALL -ScVbaWindow::setDisplayVerticalScrollBar( sal_Bool _bDisplayVerticalScrollBar ) throw (uno::RuntimeException, std::exception) +ScVbaWindow::setDisplayVerticalScrollBar( sal_Bool _bDisplayVerticalScrollBar ) { OUString sName( SC_UNO_VERTSCROLL ); getControllerProps()->setPropertyValue( sName, uno::makeAny( _bDisplayVerticalScrollBar )); } sal_Bool SAL_CALL -ScVbaWindow::getDisplayWorkbookTabs() throw (uno::RuntimeException, std::exception) +ScVbaWindow::getDisplayWorkbookTabs() { OUString sName( SC_UNO_SHEETTABS ); bool bWorkbookTabs = true; @@ -572,21 +572,21 @@ ScVbaWindow::getDisplayWorkbookTabs() throw (uno::RuntimeException, std::excepti } void SAL_CALL -ScVbaWindow::setDisplayWorkbookTabs( sal_Bool _bDisplayWorkbookTabs ) throw (uno::RuntimeException, std::exception) +ScVbaWindow::setDisplayWorkbookTabs( sal_Bool _bDisplayWorkbookTabs ) { OUString sName( SC_UNO_SHEETTABS ); getControllerProps()->setPropertyValue( sName, uno::makeAny( _bDisplayWorkbookTabs )); } sal_Bool SAL_CALL -ScVbaWindow::getFreezePanes() throw (uno::RuntimeException, std::exception) +ScVbaWindow::getFreezePanes() { uno::Reference< sheet::XViewFreezable > xViewFreezable( getController(), uno::UNO_QUERY_THROW ); return xViewFreezable->hasFrozenPanes(); } void SAL_CALL -ScVbaWindow::setFreezePanes( sal_Bool _bFreezePanes ) throw (uno::RuntimeException, std::exception) +ScVbaWindow::setFreezePanes( sal_Bool _bFreezePanes ) { uno::Reference< sheet::XViewPane > xViewPane( getController(), uno::UNO_QUERY_THROW ); uno::Reference< sheet::XViewSplitable > xViewSplitable( xViewPane, uno::UNO_QUERY_THROW ); @@ -617,14 +617,14 @@ ScVbaWindow::setFreezePanes( sal_Bool _bFreezePanes ) throw (uno::RuntimeExcepti } sal_Bool SAL_CALL -ScVbaWindow::getSplit() throw (uno::RuntimeException, std::exception) +ScVbaWindow::getSplit() { uno::Reference< sheet::XViewSplitable > xViewSplitable( getController(), uno::UNO_QUERY_THROW ); return xViewSplitable->getIsWindowSplit(); } void SAL_CALL -ScVbaWindow::setSplit( sal_Bool _bSplit ) throw (uno::RuntimeException, std::exception) +ScVbaWindow::setSplit( sal_Bool _bSplit ) { if( !_bSplit ) { @@ -642,14 +642,14 @@ ScVbaWindow::setSplit( sal_Bool _bSplit ) throw (uno::RuntimeException, std::exc } sal_Int32 SAL_CALL -ScVbaWindow::getSplitColumn() throw (uno::RuntimeException, std::exception) +ScVbaWindow::getSplitColumn() { uno::Reference< sheet::XViewSplitable > xViewSplitable( getController(), uno::UNO_QUERY_THROW ); return xViewSplitable->getSplitColumn(); } void SAL_CALL -ScVbaWindow::setSplitColumn( sal_Int32 _splitcolumn ) throw (uno::RuntimeException, std::exception) +ScVbaWindow::setSplitColumn( sal_Int32 _splitcolumn ) { if( getSplitColumn() != _splitcolumn ) { @@ -660,14 +660,14 @@ ScVbaWindow::setSplitColumn( sal_Int32 _splitcolumn ) throw (uno::RuntimeExcepti } double SAL_CALL -ScVbaWindow::getSplitHorizontal() throw (uno::RuntimeException, std::exception) +ScVbaWindow::getSplitHorizontal() { uno::Reference< sheet::XViewSplitable > xViewSplitable( getController(), uno::UNO_QUERY_THROW ); return PixelsToPoints( getDevice(), xViewSplitable->getSplitHorizontal(), true ); } void SAL_CALL -ScVbaWindow::setSplitHorizontal( double _splithorizontal ) throw (uno::RuntimeException, std::exception) +ScVbaWindow::setSplitHorizontal( double _splithorizontal ) { uno::Reference< sheet::XViewSplitable > xViewSplitable( getController(), uno::UNO_QUERY_THROW ); double fHoriPixels = PointsToPixels( getDevice(), _splithorizontal, true ); @@ -675,14 +675,14 @@ ScVbaWindow::setSplitHorizontal( double _splithorizontal ) throw (uno::RuntimeEx } sal_Int32 SAL_CALL -ScVbaWindow::getSplitRow() throw (uno::RuntimeException, std::exception) +ScVbaWindow::getSplitRow() { uno::Reference< sheet::XViewSplitable > xViewSplitable( getController(), uno::UNO_QUERY_THROW ); return xViewSplitable->getSplitRow(); } void SAL_CALL -ScVbaWindow::setSplitRow( sal_Int32 _splitrow ) throw (uno::RuntimeException, std::exception) +ScVbaWindow::setSplitRow( sal_Int32 _splitrow ) { if( getSplitRow() != _splitrow ) { @@ -693,14 +693,14 @@ ScVbaWindow::setSplitRow( sal_Int32 _splitrow ) throw (uno::RuntimeException, st } double SAL_CALL -ScVbaWindow::getSplitVertical() throw (uno::RuntimeException, std::exception) +ScVbaWindow::getSplitVertical() { uno::Reference< sheet::XViewSplitable > xViewSplitable( getController(), uno::UNO_QUERY_THROW ); return PixelsToPoints( getDevice(), xViewSplitable->getSplitVertical(), false ); } void SAL_CALL -ScVbaWindow::setSplitVertical(double _splitvertical ) throw (uno::RuntimeException, std::exception) +ScVbaWindow::setSplitVertical(double _splitvertical ) { uno::Reference< sheet::XViewSplitable > xViewSplitable( getController(), uno::UNO_QUERY_THROW ); double fVertiPixels = PointsToPixels( getDevice(), _splitvertical, false ); @@ -734,7 +734,7 @@ void ScVbaWindow::SplitAtDefinedPosition( sal_Int32 nColumns, sal_Int32 nRows ) } uno::Any SAL_CALL -ScVbaWindow::getZoom() throw (uno::RuntimeException, std::exception) +ScVbaWindow::getZoom() { uno::Reference< beans::XPropertySet > xProps = getControllerProps(); OUString sName( SC_UNO_ZOOMTYPE ); @@ -755,7 +755,6 @@ ScVbaWindow::getZoom() throw (uno::RuntimeException, std::exception) } void SAL_CALL ScVbaWindow::setZoom(const uno::Any& _zoom) - throw (uno::RuntimeException, std::exception) { sal_Int16 nZoom = 100; _zoom >>= nZoom; @@ -770,14 +769,14 @@ void SAL_CALL ScVbaWindow::setZoom(const uno::Any& _zoom) } uno::Reference< excel::XWorksheet > SAL_CALL -ScVbaWindow::ActiveSheet( ) throw (script::BasicErrorException, uno::RuntimeException, std::exception) +ScVbaWindow::ActiveSheet( ) { uno::Reference< excel::XApplication > xApplication( Application(), uno::UNO_QUERY_THROW ); return xApplication->getActiveSheet(); } uno::Any SAL_CALL -ScVbaWindow::getView() throw (uno::RuntimeException, std::exception) +ScVbaWindow::getView() { bool bPageBreak = false; sal_Int32 nWindowView = excel::XlWindowView::xlNormalView; @@ -795,7 +794,7 @@ ScVbaWindow::getView() throw (uno::RuntimeException, std::exception) } void SAL_CALL -ScVbaWindow::setView( const uno::Any& _view) throw (uno::RuntimeException, std::exception) +ScVbaWindow::setView( const uno::Any& _view) { sal_Int32 nWindowView = excel::XlWindowView::xlNormalView; _view >>= nWindowView; @@ -818,7 +817,7 @@ ScVbaWindow::setView( const uno::Any& _view) throw (uno::RuntimeException, std:: } uno::Reference< excel::XRange > SAL_CALL -ScVbaWindow::getVisibleRange() throw (uno::RuntimeException, std::exception) +ScVbaWindow::getVisibleRange() { uno::Reference< container::XIndexAccess > xPanesIA( getController(), uno::UNO_QUERY_THROW ); uno::Reference< sheet::XViewPane > xTopLeftPane( xPanesIA->getByIndex( 0 ), uno::UNO_QUERY_THROW ); @@ -827,7 +826,7 @@ ScVbaWindow::getVisibleRange() throw (uno::RuntimeException, std::exception) } sal_Int32 SAL_CALL -ScVbaWindow::PointsToScreenPixelsX(sal_Int32 _points) throw (css::script::BasicErrorException, css::uno::RuntimeException, std::exception) +ScVbaWindow::PointsToScreenPixelsX(sal_Int32 _points) { sal_Int32 nHundredthsofOneMillimeters = Millimeter::getInHundredthsOfOneMillimeter( _points ); double fConvertFactor = (getDevice()->getInfo().PixelPerMeterX/100000); @@ -835,7 +834,7 @@ ScVbaWindow::PointsToScreenPixelsX(sal_Int32 _points) throw (css::script::BasicE } sal_Int32 SAL_CALL -ScVbaWindow::PointsToScreenPixelsY(sal_Int32 _points) throw (css::script::BasicErrorException, css::uno::RuntimeException, std::exception) +ScVbaWindow::PointsToScreenPixelsY(sal_Int32 _points) { sal_Int32 nHundredthsofOneMillimeters = Millimeter::getInHundredthsOfOneMillimeter( _points ); double fConvertFactor = (getDevice()->getInfo().PixelPerMeterY/100000); @@ -843,7 +842,7 @@ ScVbaWindow::PointsToScreenPixelsY(sal_Int32 _points) throw (css::script::BasicE } void SAL_CALL -ScVbaWindow::PrintOut( const css::uno::Any& From, const css::uno::Any&To, const css::uno::Any& Copies, const css::uno::Any& Preview, const css::uno::Any& ActivePrinter, const css::uno::Any& PrintToFile, const css::uno::Any& Collate, const css::uno::Any& PrToFileName ) throw (css::script::BasicErrorException, css::uno::RuntimeException, std::exception) +ScVbaWindow::PrintOut( const css::uno::Any& From, const css::uno::Any&To, const css::uno::Any& Copies, const css::uno::Any& Preview, const css::uno::Any& ActivePrinter, const css::uno::Any& PrintToFile, const css::uno::Any& Collate, const css::uno::Any& PrToFileName ) { // need test, print current active sheet // !! TODO !! get view shell from controller @@ -851,14 +850,14 @@ ScVbaWindow::PrintOut( const css::uno::Any& From, const css::uno::Any&To, const } void SAL_CALL -ScVbaWindow::PrintPreview( const css::uno::Any& EnableChanges ) throw (css::script::BasicErrorException, css::uno::RuntimeException, std::exception) +ScVbaWindow::PrintPreview( const css::uno::Any& EnableChanges ) { // need test, print preview current active sheet // !! TODO !! get view shell from controller PrintPreviewHelper( EnableChanges, excel::getBestViewShell( m_xModel ) ); } -double SAL_CALL ScVbaWindow::getTabRatio() throw (css::uno::RuntimeException, std::exception) +double SAL_CALL ScVbaWindow::getTabRatio() { ScTabViewShell* pViewShell = excel::getBestViewShell( m_xModel ); if ( pViewShell && pViewShell->GetViewData().GetView() ) @@ -870,7 +869,7 @@ double SAL_CALL ScVbaWindow::getTabRatio() throw (css::uno::RuntimeException, st return 0.0; } -void SAL_CALL ScVbaWindow::setTabRatio( double fRatio ) throw (css::uno::RuntimeException, std::exception) +void SAL_CALL ScVbaWindow::setTabRatio( double fRatio ) { ScTabViewShell* pViewShell = excel::getBestViewShell( m_xModel ); if ( pViewShell && pViewShell->GetViewData().GetView() ) |