diff options
Diffstat (limited to 'sc/source/ui/vba/vbawindows.cxx')
-rw-r--r-- | sc/source/ui/vba/vbawindows.cxx | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/sc/source/ui/vba/vbawindows.cxx b/sc/source/ui/vba/vbawindows.cxx index d7202344c12e..324df72297ee 100644 --- a/sc/source/ui/vba/vbawindows.cxx +++ b/sc/source/ui/vba/vbawindows.cxx @@ -60,13 +60,13 @@ protected: public: /// @throws uno::RuntimeException - WindowComponentEnumImpl( const uno::Reference< uno::XComponentContext >& xContext, const Components& components ) throw ( uno::RuntimeException ) : m_xContext( xContext ), m_components( components ) + WindowComponentEnumImpl( const uno::Reference< uno::XComponentContext >& xContext, const Components& components ) : m_xContext( xContext ), m_components( components ) { m_it = m_components.begin(); } /// @throws uno::RuntimeException - explicit WindowComponentEnumImpl( const uno::Reference< uno::XComponentContext >& xContext ) throw ( uno::RuntimeException ) : m_xContext( xContext ) + explicit WindowComponentEnumImpl( const uno::Reference< uno::XComponentContext >& xContext ) : m_xContext( xContext ) { uno::Reference< frame::XDesktop2 > xDesktop = frame::Desktop::create(m_xContext); uno::Reference< container::XEnumeration > xComponents = xDesktop->getComponents()->createEnumeration(); @@ -79,12 +79,12 @@ public: m_it = m_components.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_components.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() ) { @@ -99,7 +99,7 @@ class WindowEnumImpl : public WindowComponentEnumImpl uno::Any m_aApplication; public: WindowEnumImpl( const uno::Reference< uno::XComponentContext >& xContext, const uno::Any& aApplication ): WindowComponentEnumImpl( xContext ), m_aApplication( aApplication ) {} - virtual uno::Any SAL_CALL nextElement( ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException, std::exception) override + virtual uno::Any SAL_CALL nextElement( ) override { return ComponentToWindow( WindowComponentEnumImpl::nextElement(), m_xContext, m_aApplication ); } @@ -140,16 +140,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 WindowComponentEnumImpl( m_xContext, m_windows ); } // XIndexAccess - virtual ::sal_Int32 SAL_CALL getCount( ) throw (uno::RuntimeException, std::exception) override + virtual ::sal_Int32 SAL_CALL getCount( ) override { return m_windows.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< Components::size_type >( Index ) >= m_windows.size() ) @@ -158,18 +158,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<sheet::XSpreadsheetDocument>::get(); } - virtual sal_Bool SAL_CALL hasElements( ) throw (uno::RuntimeException, std::exception) override + virtual sal_Bool SAL_CALL hasElements( ) override { return ( !m_windows.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() ) @@ -178,12 +178,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()); @@ -195,7 +195,7 @@ ScVbaWindows::ScVbaWindows( const uno::Reference< ov::XHelperInterface >& xParen { } uno::Reference< container::XEnumeration > -ScVbaWindows::createEnumeration() throw (uno::RuntimeException) +ScVbaWindows::createEnumeration() { return new WindowEnumImpl( mxContext, Application() ); } @@ -207,13 +207,13 @@ ScVbaWindows::createCollectionObject( const css::uno::Any& aSource ) } uno::Type -ScVbaWindows::getElementType() throw (uno::RuntimeException) +ScVbaWindows::getElementType() { return cppu::UnoType<excel::XWindows>::get(); } void SAL_CALL -ScVbaWindows::Arrange( ::sal_Int32 /*ArrangeStyle*/, const uno::Any& /*ActiveWorkbook*/, const uno::Any& /*SyncHorizontal*/, const uno::Any& /*SyncVertical*/ ) throw (uno::RuntimeException, std::exception) +ScVbaWindows::Arrange( ::sal_Int32 /*ArrangeStyle*/, const uno::Any& /*ActiveWorkbook*/, const uno::Any& /*SyncHorizontal*/, const uno::Any& /*SyncVertical*/ ) { //#TODO #FIXME see what can be done for an implementation here } |