19 uno::Sequence<OUString>
aSeq;
28 uno::Reference<container::XIndexAccess> mxIndexAccess;
32 explicit ListEntriesEnumWrapper(uno::Reference<container::XIndexAccess> xIndexAccess)
33 : mxIndexAccess(xIndexAccess)
38 sal_Bool SAL_CALL hasMoreElements()
override {
return (mnIndex < mxIndexAccess->getCount()); }
40 uno::Any SAL_CALL nextElement()
override
42 if (mnIndex < mxIndexAccess->getCount())
44 return mxIndexAccess->getByIndex(mnIndex++);
46 throw container::NoSuchElementException();
50class ListEntryCollectionHelper
51 :
public ::cppu::WeakImplHelper<container::XIndexAccess, container::XEnumerationAccess>
54 uno::Reference<XHelperInterface>
mxParent;
55 uno::Reference<uno::XComponentContext>
mxContext;
60 ListEntryCollectionHelper(uno::Reference<ov::XHelperInterface> xParent,
61 uno::Reference<uno::XComponentContext> xContext,
65 , m_rDropDown(rFormField)
69 sal_Int32 SAL_CALL getCount()
override {
return lcl_getListEntries(m_rDropDown).getLength(); }
74 throw lang::IndexOutOfBoundsException();
76 return uno::Any(uno::Reference<word::XListEntry>(
82 sal_Bool SAL_CALL hasElements()
override {
return getCount() != 0; }
85 uno::Reference<container::XEnumeration> SAL_CALL createEnumeration()
override
87 return new ListEntriesEnumWrapper(
this);
93 const uno::Reference<XHelperInterface>& xParent,
94 const uno::Reference<uno::XComponentContext>& xContext,
99 new ListEntryCollectionHelper(xParent, xContext, rFormField)))
100 , m_rDropDown(rFormField)
108 sal_Int32 nZIndex = 0;
123 return uno::Reference<word::XListEntry>(
153 return "SwVbaFormFieldDropDownListEntries";
158 static uno::Sequence<OUString>
const sNames{
"ooo.vba.word.ListEntries" };
unotools::WeakReference< AnimationNode > mxParent
css::uno::Reference< css::uno::XComponentContext > mxContext
css::uno::WeakReference< ov::XHelperInterface > mxParent
css::uno::Reference< css::container::XIndexAccess > m_xIndexAccess
css::uno::Type const & get()
virtual void DelContent(sal_Int32 nDelIndex=-1)=0
virtual void ReplaceContent(const OUString *pText, sal_Int32 *pIndex)=0
virtual void AddContent(const OUString &rText, sal_Int32 *pIndex=nullptr)=0
Sequence< sal_Int8 > aSeq
constexpr OUStringLiteral ODF_FORMDROPDOWN_LISTENTRY
::cppu::WeakImplHelper< css::container::XEnumeration > EnumerationHelper_BASE