diff options
Diffstat (limited to 'include/vbahelper/vbacollectionimpl.hxx')
-rw-r--r-- | include/vbahelper/vbacollectionimpl.hxx | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/include/vbahelper/vbacollectionimpl.hxx b/include/vbahelper/vbacollectionimpl.hxx index 587479d125dd..e59a298f2e9d 100644 --- a/include/vbahelper/vbacollectionimpl.hxx +++ b/include/vbahelper/vbacollectionimpl.hxx @@ -58,12 +58,12 @@ public: const css::uno::Reference< css::container::XIndexAccess >& rxIndexAccess ) throw (css::uno::RuntimeException) : mxIndexAccess( rxIndexAccess ), mnIndex( 0 ) {} - virtual sal_Bool SAL_CALL hasMoreElements() throw (css::uno::RuntimeException, std::exception) + virtual sal_Bool SAL_CALL hasMoreElements() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return mnIndex < mxIndexAccess->getCount(); } - virtual css::uno::Any SAL_CALL nextElement() throw (css::container::NoSuchElementException, css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception) + virtual css::uno::Any SAL_CALL nextElement() throw (css::container::NoSuchElementException, css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE { if( !hasMoreElements() ) throw css::container::NoSuchElementException(); @@ -99,12 +99,12 @@ public: const css::uno::Reference< css::container::XIndexAccess >& rxIndexAccess ) throw (css::uno::RuntimeException) : mxParent( rxParent ), mxContext( rxContext ), mxEnumeration( new SimpleIndexAccessToEnumeration( rxIndexAccess ) ) {} - virtual sal_Bool SAL_CALL hasMoreElements() throw (css::uno::RuntimeException, std::exception) + virtual sal_Bool SAL_CALL hasMoreElements() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return mxEnumeration->hasMoreElements(); } - virtual css::uno::Any SAL_CALL nextElement() throw (css::container::NoSuchElementException, css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception) + virtual css::uno::Any SAL_CALL nextElement() throw (css::container::NoSuchElementException, css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return createCollectionObject( mxEnumeration->nextElement() ); } @@ -131,7 +131,7 @@ protected: public: EnumerationHelperImpl( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::container::XEnumeration >& xEnumeration ) throw ( css::uno::RuntimeException ) : m_xParent( xParent ), m_xContext( xContext ), m_xEnumeration( xEnumeration ) { } - virtual ::sal_Bool SAL_CALL hasMoreElements( ) throw (css::uno::RuntimeException, std::exception) { return m_xEnumeration->hasMoreElements(); } + virtual ::sal_Bool SAL_CALL hasMoreElements( ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return m_xEnumeration->hasMoreElements(); } }; // a wrapper class for a providing a XIndexAccess, XNameAccess, XEnumerationAccess impl based on providing a vector of interfaces @@ -155,12 +155,12 @@ private: public: XNamedEnumerationHelper( const XNamedVec& sMap ) : mXNamedVec( sMap ), mIt( mXNamedVec.begin() ) {} - virtual ::sal_Bool SAL_CALL hasMoreElements( ) throw (css::uno::RuntimeException, std::exception) + virtual ::sal_Bool SAL_CALL hasMoreElements( ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return ( mIt != mXNamedVec.end() ); } - virtual css::uno::Any SAL_CALL nextElement( ) throw (css::container::NoSuchElementException, css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception) + virtual css::uno::Any SAL_CALL nextElement( ) throw (css::container::NoSuchElementException, css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE { if ( hasMoreElements() ) return css::uno::makeAny( *mIt++ ); @@ -174,16 +174,16 @@ protected: public: XNamedObjectCollectionHelper( const XNamedVec& sMap ) : mXNamedVec( sMap ), cachePos(mXNamedVec.begin()) {} // XElementAccess - virtual css::uno::Type SAL_CALL getElementType( ) throw (css::uno::RuntimeException, std::exception) { return cppu::UnoType<Ifc1>::get(); } - virtual ::sal_Bool SAL_CALL hasElements( ) throw (css::uno::RuntimeException, std::exception) { return ( mXNamedVec.size() > 0 ); } + virtual css::uno::Type SAL_CALL getElementType( ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return cppu::UnoType<Ifc1>::get(); } + virtual ::sal_Bool SAL_CALL hasElements( ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return ( mXNamedVec.size() > 0 ); } // XNameAcess - virtual css::uno::Any SAL_CALL getByName( const OUString& aName ) throw (css::container::NoSuchElementException, css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception) + virtual css::uno::Any SAL_CALL getByName( const OUString& aName ) throw (css::container::NoSuchElementException, css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE { if ( !hasByName(aName) ) throw css::container::NoSuchElementException(); return css::uno::makeAny( *cachePos ); } - virtual css::uno::Sequence< OUString > SAL_CALL getElementNames( ) throw (css::uno::RuntimeException, std::exception) + virtual css::uno::Sequence< OUString > SAL_CALL getElementNames( ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { css::uno::Sequence< OUString > sNames( mXNamedVec.size() ); OUString* pString = sNames.getArray(); @@ -197,7 +197,7 @@ public: } return sNames; } - virtual ::sal_Bool SAL_CALL hasByName( const OUString& aName ) throw (css::uno::RuntimeException, std::exception) + virtual ::sal_Bool SAL_CALL hasByName( const OUString& aName ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { cachePos = mXNamedVec.begin(); typename XNamedVec::iterator it_end = mXNamedVec.end(); @@ -211,8 +211,8 @@ public: } // XElementAccess - virtual ::sal_Int32 SAL_CALL getCount( ) throw (css::uno::RuntimeException, std::exception) { return mXNamedVec.size(); } - virtual css::uno::Any SAL_CALL getByIndex( ::sal_Int32 Index ) throw (css::lang::IndexOutOfBoundsException, css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception ) + virtual ::sal_Int32 SAL_CALL getCount( ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return mXNamedVec.size(); } + virtual css::uno::Any SAL_CALL getByIndex( ::sal_Int32 Index ) throw (css::lang::IndexOutOfBoundsException, css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception ) SAL_OVERRIDE { if ( Index < 0 || Index >= getCount() ) throw css::lang::IndexOutOfBoundsException(); @@ -221,7 +221,7 @@ public: } // XEnumerationAccess - virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration( ) throw (css::uno::RuntimeException, std::exception) + virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration( ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return new XNamedEnumerationHelper( mXNamedVec ); } |