21#include <ooo/vba/word/WdListGalleryType.hpp>
34 explicit ListLevelsEnumWrapper(
SwVbaListLevels* pLevels ) : m_pListLevels( pLevels ), m_nIndex( 1 ) {}
35 virtual sal_Bool SAL_CALL hasMoreElements( )
override
37 return ( m_nIndex <= m_pListLevels->getCount() );
40 virtual uno::Any SAL_CALL nextElement( )
override
42 if ( m_nIndex <= m_pListLevels->getCount() )
44 throw container::NoSuchElementException();
57 if( nGalleryType == word::WdListGalleryType::wdBulletGallery
58 || nGalleryType == word::WdListGalleryType::wdNumberGallery )
60 else if( nGalleryType == word::WdListGalleryType::wdOutlineNumberGallery )
68 if( !( Index1 >>=
nIndex ) )
69 throw uno::RuntimeException();
70 if( nIndex <=0 || nIndex >
getCount() )
71 throw uno::RuntimeException(
"Index out of bounds" );
83uno::Reference< container::XEnumeration >
86 return new ListLevelsEnumWrapper(
this );
98 return "SwVbaListLevels";
101css::uno::Sequence<OUString>
104 static uno::Sequence< OUString >
const sNames
106 "ooo.vba.word.ListLevels"
css::uno::Reference< css::uno::XComponentContext > mxContext
virtual css::uno::Any SAL_CALL Item(const css::uno::Any &Index1, const css::uno::Any &) override
virtual ::sal_Int32 SAL_CALL getCount() override
SwVbaListHelperRef m_pListHelper
virtual css::uno::Sequence< OUString > getServiceNames() override
SwVbaListLevels(const css::uno::Reference< ooo::vba::XHelperInterface > &rParent, const css::uno::Reference< css::uno::XComponentContext > &rContext, SwVbaListHelperRef pHelper)
virtual OUString getServiceImplName() override
virtual css::uno::Any createCollectionObject(const css::uno::Any &aSource) override
virtual css::uno::Type SAL_CALL getElementType() override
virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() override
css::uno::Type const & get()
::cppu::WeakImplHelper< css::container::XEnumeration > EnumerationHelper_BASE
std::shared_ptr< SwVbaListHelper > SwVbaListHelperRef