34 explicit ListTemplatesEnumWrapper(
SwVbaListTemplates* pTemplates ) : m_pListTemplates( pTemplates ), m_nIndex( 1 ) {}
35 virtual sal_Bool SAL_CALL hasMoreElements( )
override
37 return ( m_nIndex <= m_pListTemplates->getCount() );
40 virtual uno::Any SAL_CALL nextElement( )
override
42 if ( m_nIndex <= m_pListTemplates->getCount() )
44 throw container::NoSuchElementException();
63 if( !( Index1 >>=
nIndex ) )
64 throw uno::RuntimeException();
65 if( nIndex <=0 || nIndex >
getCount() )
66 throw uno::RuntimeException(
"Index out of bounds" );
78uno::Reference< container::XEnumeration >
81 return new ListTemplatesEnumWrapper(
this );
93 return "SwVbaListTemplates";
96css::uno::Sequence<OUString>
99 static uno::Sequence< OUString >
const sNames
101 "ooo.vba.word.ListTemplates"
css::uno::Reference< css::uno::XComponentContext > mxContext
virtual css::uno::Any SAL_CALL Item(const css::uno::Any &Index1, const css::uno::Any &) override
css::uno::Reference< css::text::XTextDocument > mxTextDocument
SwVbaListTemplates(const css::uno::Reference< ov::XHelperInterface > &xParent, const css::uno::Reference< css::uno::XComponentContext > &xContext, css::uno::Reference< css::text::XTextDocument > xTextDoc, sal_Int32 nType)
virtual css::uno::Any createCollectionObject(const css::uno::Any &aSource) override
virtual ::sal_Int32 SAL_CALL getCount() override
virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() override
virtual css::uno::Type SAL_CALL getElementType() override
virtual OUString getServiceImplName() override
virtual css::uno::Sequence< OUString > getServiceNames() override
css::uno::Type const & get()
::cppu::WeakImplHelper< css::container::XEnumeration > EnumerationHelper_BASE