23#include <com/sun/star/container/NoSuchElementException.hpp>
24#include <com/sun/star/office/XAnnotationEnumeration.hpp>
38class AnnotationEnumeration:
public ::cppu::WeakImplHelper< css::office::XAnnotationEnumeration >
42 AnnotationEnumeration(
const AnnotationEnumeration&) =
delete;
43 AnnotationEnumeration& operator=(
const AnnotationEnumeration&) =
delete;
46 virtual sal_Bool SAL_CALL hasMoreElements()
override;
47 virtual css::uno::Reference< css::office::XAnnotation > SAL_CALL nextElement()
override;
53 AnnotationVector::iterator
maIter;
60 return new AnnotationEnumeration( std::move(rAnnotations) );
63AnnotationEnumeration::AnnotationEnumeration(
AnnotationVector&& rAnnotations )
64: maAnnotations(
std::move(rAnnotations))
66 maIter = maAnnotations.begin();
70sal_Bool SAL_CALL AnnotationEnumeration::hasMoreElements()
72 return maIter != maAnnotations.end();
75css::uno::Reference< css::office::XAnnotation > SAL_CALL AnnotationEnumeration::nextElement()
77 if( maIter == maAnnotations.end() )
78 throw css::container::NoSuchElementException();
std::vector< Reference< XAnimationNode > >::iterator maIter
Reference< XAnnotationEnumeration > createAnnotationEnumeration(sd::AnnotationVector &&rAnnotations)
std::vector< css::uno::Reference< css::office::XAnnotation > > AnnotationVector