29 class PanesIndexAccess :
public ::cppu::WeakImplHelper<container::XIndexAccess >
32 uno::Reference< XHelperInterface >
mxParent;
33 uno::Reference< uno::XComponentContext >
mxContext;
34 uno::Reference< frame::XModel >
mxModel;
37 PanesIndexAccess(
const uno::Reference< XHelperInterface >& xParent,
const uno::Reference< uno::XComponentContext >& xContext,
const uno::Reference< frame::XModel >& xModel ) : mxParent( xParent ), mxContext( xContext ), mxModel( xModel ) {}
40 virtual sal_Int32 SAL_CALL getCount( )
override
44 virtual uno::Any SAL_CALL getByIndex( sal_Int32
Index )
override
47 throw lang::IndexOutOfBoundsException();
48 return uno::Any( uno::Reference< word::XPane >(
new SwVbaPane( mxParent, mxContext, mxModel ) ) );
50 virtual uno::Type SAL_CALL getElementType( )
override
54 virtual sal_Bool SAL_CALL hasElements( )
override
62 uno::Reference<container::XIndexAccess > m_xIndexAccess;
65 explicit PanesEnumWrapper(
const uno::Reference< container::XIndexAccess >& xIndexAccess ) : m_xIndexAccess( xIndexAccess ), nIndex( 0 ) {}
66 virtual sal_Bool SAL_CALL hasMoreElements( )
override
68 return ( nIndex < m_xIndexAccess->getCount() );
71 virtual uno::Any SAL_CALL nextElement( )
override
73 if ( nIndex < m_xIndexAccess->getCount() )
74 return m_xIndexAccess->getByIndex( nIndex++ );
75 throw container::NoSuchElementException();
81 SwVbaPanes::SwVbaPanes(
const uno::Reference< XHelperInterface >& xParent,
const uno::Reference< uno::XComponentContext > & xContext,
const uno::Reference< frame::XModel >& xModel ):
SwVbaPanes_BASE( xParent, xContext, new PanesIndexAccess( xParent, xContext, xModel ) )
90 uno::Reference< container::XEnumeration >
93 return new PanesEnumWrapper( m_xIndexAccess );
108 css::uno::Sequence<OUString>
111 static uno::Sequence< OUString >
const sNames
WeakReference< XInterface > mxParent
css::uno::Reference< css::frame::XModel2 > mxModel
virtual css::uno::Type SAL_CALL getElementType() override
::cppu::WeakImplHelper< css::container::XEnumeration > EnumerationHelper_BASE
virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() override
SwVbaPanes(const css::uno::Reference< ov::XHelperInterface > &xParent, const css::uno::Reference< css::uno::XComponentContext > &xContext, const css::uno::Reference< css::frame::XModel > &xModel)
virtual OUString getServiceImplName() override
virtual css::uno::Sequence< OUString > getServiceNames() override
virtual css::uno::Any createCollectionObject(const css::uno::Any &aSource) override
css::uno::Type const & get()