21#include <com/sun/star/frame/XModel.hpp>
30class FramesEnumeration :
public ::cppu::WeakImplHelper< container::XEnumeration >
33 uno::Reference< XHelperInterface >
mxParent;
34 uno::Reference< uno::XComponentContext >
mxContext;
35 uno::Reference< container::XIndexAccess> mxIndexAccess;
36 uno::Reference< frame::XModel >
mxModel;
37 sal_Int32 mnCurrentPos;
40 FramesEnumeration( uno::Reference< XHelperInterface > xParent, uno::Reference< uno::XComponentContext > xContext, uno::Reference< container::XIndexAccess > xIndexAccess, uno::Reference< frame::XModel > xModel ) :
mxParent(
std::move( xParent )),
mxContext(
std::move( xContext)), mxIndexAccess(
std::move( xIndexAccess )),
mxModel(
std::move(
xModel )), mnCurrentPos(0)
43 virtual sal_Bool SAL_CALL hasMoreElements( )
override
45 return ( mnCurrentPos < mxIndexAccess->getCount() );
48 virtual uno::Any SAL_CALL nextElement( )
override
50 if ( !hasMoreElements() )
51 throw container::NoSuchElementException();
52 uno::Reference< text::XTextFrame > xTextFrame( mxIndexAccess->getByIndex( mnCurrentPos++ ), uno::UNO_QUERY_THROW );
53 return uno::Any( uno::Reference< word::XFrame > (
new SwVbaFrame( mxParent, mxContext, mxModel, xTextFrame ) ) );
60SwVbaFrames::SwVbaFrames(
const uno::Reference< XHelperInterface >& xParent,
const uno::Reference< uno::XComponentContext > & xContext,
const uno::Reference< container::XIndexAccess >& xFrames, uno::Reference< frame::XModel > xModel ):
SwVbaFrames_BASE( xParent, xContext, xFrames ),
mxModel(
std::move(
xModel ))
71uno::Reference< container::XEnumeration >
80 uno::Reference< text::XTextFrame > xTextFrame( aSource, uno::UNO_QUERY_THROW );
90css::uno::Sequence<OUString>
93 static uno::Sequence< OUString >
const sNames
css::uno::Reference< css::frame::XModel2 > mxModel
unotools::WeakReference< AnimationNode > mxParent
css::uno::Reference< css::uno::XComponentContext > mxContext
css::uno::Reference< css::container::XIndexAccess > m_xIndexAccess
virtual OUString getServiceImplName() override
virtual css::uno::Type SAL_CALL getElementType() override
css::uno::Reference< css::frame::XModel > mxModel
virtual css::uno::Any createCollectionObject(const css::uno::Any &aSource) override
SwVbaFrames(const css::uno::Reference< ov::XHelperInterface > &xParent, const css::uno::Reference< css::uno::XComponentContext > &xContext, const css::uno::Reference< css::container::XIndexAccess > &xFrames, css::uno::Reference< css::frame::XModel > xModel)
virtual css::uno::Sequence< OUString > getServiceNames() override
css::uno::Reference< css::text::XTextFramesSupplier > mxFramesSupplier
virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() override
css::uno::Type const & get()
Reference< XModel > xModel