30class PanesIndexAccess :
public ::cppu::WeakImplHelper<container::XIndexAccess >
33 uno::Reference< XHelperInterface >
mxParent;
34 uno::Reference< uno::XComponentContext >
mxContext;
35 uno::Reference< frame::XModel >
mxModel;
38 PanesIndexAccess( uno::Reference< XHelperInterface > xParent, uno::Reference< uno::XComponentContext > xContext, uno::Reference< frame::XModel > xModel ) :
mxParent(
std::move( xParent )),
mxContext(
std::move( xContext )),
mxModel(
std::move(
xModel )) {}
41 virtual sal_Int32 SAL_CALL getCount( )
override
45 virtual uno::Any SAL_CALL getByIndex( sal_Int32
Index )
override
48 throw lang::IndexOutOfBoundsException();
49 return uno::Any( uno::Reference< word::XPane >(
new SwVbaPane( mxParent, mxContext, mxModel ) ) );
51 virtual uno::Type SAL_CALL getElementType( )
override
55 virtual sal_Bool SAL_CALL hasElements( )
override
63 uno::Reference<container::XIndexAccess > m_xIndexAccess;
66 explicit PanesEnumWrapper( uno::Reference< container::XIndexAccess > xIndexAccess ) : m_xIndexAccess(
std::move( xIndexAccess )), m_nIndex( 0 ) {}
67 virtual sal_Bool SAL_CALL hasMoreElements( )
override
69 return ( m_nIndex < m_xIndexAccess->getCount() );
72 virtual uno::Any SAL_CALL nextElement( )
override
74 if ( m_nIndex < m_xIndexAccess->getCount() )
75 return m_xIndexAccess->getByIndex( m_nIndex++ );
76 throw container::NoSuchElementException();
82SwVbaPanes::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 ) )
91uno::Reference< container::XEnumeration >
109css::uno::Sequence<OUString>
112 static uno::Sequence< OUString >
const sNames
css::uno::Reference< css::frame::XModel2 > mxModel
unotools::WeakReference< AnimationNode > mxParent
css::uno::Reference< css::container::XIndexAccess > m_xIndexAccess
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 css::uno::Type SAL_CALL getElementType() override
virtual css::uno::Any createCollectionObject(const css::uno::Any &aSource) override
virtual OUString getServiceImplName() override
virtual css::uno::Sequence< OUString > getServiceNames() override
css::uno::Type const & get()
Reference< XModel > xModel
::cppu::WeakImplHelper< css::container::XEnumeration > EnumerationHelper_BASE