21#include <ooo/vba/word/WdListGalleryType.hpp>
34 explicit ListGalleriesEnumWrapper(
SwVbaListGalleries* pGalleries ) : m_pListGalleries( pGalleries ), m_nIndex( 1 ) {}
35 virtual sal_Bool SAL_CALL hasMoreElements( )
override
37 return ( m_nIndex <= m_pListGalleries->getCount() );
40 virtual uno::Any SAL_CALL nextElement( )
override
42 if ( m_nIndex <= m_pListGalleries->getCount() )
44 throw container::NoSuchElementException();
65 if(
nIndex == word::WdListGalleryType::wdBulletGallery
66 ||
nIndex == word::WdListGalleryType::wdNumberGallery
67 ||
nIndex == word::WdListGalleryType::wdOutlineNumberGallery )
70 throw uno::RuntimeException(
"Index out of bounds" );
80uno::Reference< container::XEnumeration >
83 return new ListGalleriesEnumWrapper(
this );
95 return "SwVbaListGalleries";
98css::uno::Sequence<OUString>
101 static uno::Sequence< OUString >
const sNames
103 "ooo.vba.word.ListGalleries"
css::uno::Reference< css::uno::XComponentContext > mxContext
virtual OUString getServiceImplName() override
virtual ::sal_Int32 SAL_CALL getCount() override
SwVbaListGalleries(const css::uno::Reference< ov::XHelperInterface > &xParent, const css::uno::Reference< css::uno::XComponentContext > &xContext, css::uno::Reference< css::text::XTextDocument > xTextDoc)
virtual css::uno::Any SAL_CALL Item(const css::uno::Any &Index1, const css::uno::Any &) override
css::uno::Reference< css::text::XTextDocument > mxTextDocument
virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() override
virtual css::uno::Any createCollectionObject(const css::uno::Any &aSource) override
virtual css::uno::Sequence< OUString > getServiceNames() override
virtual css::uno::Type SAL_CALL getElementType() override
css::uno::Type const & get()
::cppu::WeakImplHelper< css::container::XEnumeration > EnumerationHelper_BASE