LibreOffice Module forms (master) 1
Protected Member Functions | Private Member Functions | Private Attributes | List of all members
frm::OEntryListHelper Class Referenceabstract

#include <entrylisthelper.hxx>

Inheritance diagram for frm::OEntryListHelper:
[legend]
Collaboration diagram for frm::OEntryListHelper:
[legend]

Protected Member Functions

 OEntryListHelper (OControlModel &_rControlModel)
 
 OEntryListHelper (const OEntryListHelper &_rSource, OControlModel &_rControlModel)
 
virtual ~OEntryListHelper ()
 
const std::vector< OUString > & getStringItemList () const
 returns the current string item list More...
 
const css::uno::Sequence< css::uno::Any > & getTypedItemList () const
 returns the current typed item list More...
 
bool hasExternalListSource () const
 determines whether we actually have an external list source More...
 
bool handleDisposing (const css::lang::EventObject &_rEvent)
 handling the XEventListener::disposing call for the case where our list source is being disposed More...
 
void disposing ()
 to be called by derived classes' instances when they're being disposed More...
 
virtual void SAL_CALL disposing (const css::lang::EventObject &Source) override=0
 
bool convertNewListSourceProperty (css::uno::Any &_rConvertedValue, css::uno::Any &_rOldValue, const css::uno::Any &_rValue)
 helper for implementing convertFastPropertyValue( StringItemList ) More...
 
void setNewStringItemList (const css::uno::Any &_rValue, ControlModelLock &_rInstanceLock)
 helper for implementing setFastPropertyValueNoBroadcast More...
 
void setNewTypedItemList (const css::uno::Any &_rValue, ControlModelLock &_rInstanceLock)
 helper for implementing setFastPropertyValueNoBroadcast More...
 
virtual void stringItemListChanged (ControlModelLock &_rInstanceLock)=0
 announces that the list of entries has changed. More...
 
virtual void refreshInternalEntryList ()=0
 called when XRefreshable::refresh has been called, and we do not have an external list source More...
 
- Protected Member Functions inherited from cppu::ImplHelper3< class Ifc1, class Ifc2, class Ifc3 >
 ~ImplHelper3 () SAL_NOEXCEPT
 

Private Member Functions

virtual void SAL_CALL setListEntrySource (const css::uno::Reference< css::form::binding::XListEntrySource > &_rxSource) override
 
virtual css::uno::Reference< css::form::binding::XListEntrySource > SAL_CALL getListEntrySource () override
 
virtual void SAL_CALL entryChanged (const css::form::binding::ListEntryEvent &_rSource) override
 
virtual void SAL_CALL entryRangeInserted (const css::form::binding::ListEntryEvent &_rSource) override
 
virtual void SAL_CALL entryRangeRemoved (const css::form::binding::ListEntryEvent &_rSource) override
 
virtual void SAL_CALL allEntriesChanged (const css::lang::EventObject &_rSource) override
 
virtual void SAL_CALL refresh () override
 
virtual void SAL_CALL addRefreshListener (const css::uno::Reference< css::util::XRefreshListener > &_rxListener) override
 
virtual void SAL_CALL removeRefreshListener (const css::uno::Reference< css::util::XRefreshListener > &_rxListener) override
 
void disconnectExternalListSource ()
 disconnects from the active external list source, if present More...
 
void connectExternalListSource (const css::uno::Reference< css::form::binding::XListEntrySource > &_rxSource, ControlModelLock &_rInstanceLock)
 connects to a new external list source More...
 
void obtainListSourceEntries (ControlModelLock &_rInstanceLock)
 obtains list entries and possibly data values from list source More...
 
void impl_lock_refreshList (ControlModelLock &_rInstanceLock)
 refreshes our list entries More...
 
 OEntryListHelper (const OEntryListHelper &)=delete
 
OEntryListHelperoperator= (const OEntryListHelper &)=delete
 

Private Attributes

OControlModelm_rControlModel
 
css::uno::Reference< css::form::binding::XListEntrySource > m_xListSource
 
std::vector< OUString > m_aStringItems
 our external list source More...
 
css::uno::Sequence< css::uno::Any > m_aTypedItems
 "overridden" StringItemList property value More...
 
::comphelper::OInterfaceContainerHelper3< css::util::XRefreshListener > m_aRefreshListeners
 "overridden" TypedItemList property value More...
 

Additional Inherited Members

- Public Member Functions inherited from cppu::ImplHelper3< class Ifc1, class Ifc2, class Ifc3 >
virtual css::uno::Any SAL_CALL queryInterface (css::uno::Type const &rType) SAL_OVERRIDE
 
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes () SAL_OVERRIDE
 
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId () SAL_OVERRIDE
 

Detailed Description

Definition at line 45 of file entrylisthelper.hxx.

Constructor & Destructor Documentation

◆ OEntryListHelper() [1/3]

frm::OEntryListHelper::OEntryListHelper ( OControlModel _rControlModel)
explicitprotected

Definition at line 40 of file entrylisthelper.cxx.

◆ OEntryListHelper() [2/3]

frm::OEntryListHelper::OEntryListHelper ( const OEntryListHelper _rSource,
OControlModel _rControlModel 
)
protected

Definition at line 47 of file entrylisthelper.cxx.

◆ ~OEntryListHelper()

frm::OEntryListHelper::~OEntryListHelper ( )
protectedvirtual

Definition at line 56 of file entrylisthelper.cxx.

◆ OEntryListHelper() [3/3]

frm::OEntryListHelper::OEntryListHelper ( const OEntryListHelper )
privatedelete

Member Function Documentation

◆ addRefreshListener()

void SAL_CALL frm::OEntryListHelper::addRefreshListener ( const css::uno::Reference< css::util::XRefreshListener > &  _rxListener)
overrideprivatevirtual

◆ allEntriesChanged()

void SAL_CALL frm::OEntryListHelper::allEntriesChanged ( const css::lang::EventObject &  _rSource)
overrideprivatevirtual

Definition at line 168 of file entrylisthelper.cxx.

References impl_lock_refreshList(), m_rControlModel, and m_xListSource.

◆ connectExternalListSource()

void frm::OEntryListHelper::connectExternalListSource ( const css::uno::Reference< css::form::binding::XListEntrySource > &  _rxSource,
ControlModelLock _rInstanceLock 
)
private

connects to a new external list source

Parameters
_rxSourcethe new list source. Must not be <NULL>
See also
disconnectExternalListSource

Definition at line 248 of file entrylisthelper.cxx.

References hasExternalListSource(), m_xListSource, and obtainListSourceEntries().

Referenced by setListEntrySource().

◆ convertNewListSourceProperty()

bool frm::OEntryListHelper::convertNewListSourceProperty ( css::uno::Any &  _rConvertedValue,
css::uno::Any &  _rOldValue,
const css::uno::Any &  _rValue 
)
protected

helper for implementing convertFastPropertyValue( StringItemList )

The signature of this method and the return type have the same semantics as convertFastPropertyValue.

Definition at line 285 of file entrylisthelper.cxx.

References comphelper::containerToSequence(), hasExternalListSource(), and m_aStringItems.

Referenced by frm::OComboBoxModel::convertFastPropertyValue(), and frm::OListBoxModel::convertFastPropertyValue().

◆ disconnectExternalListSource()

void frm::OEntryListHelper::disconnectExternalListSource ( )
private

disconnects from the active external list source, if present

See also
connectExternalListSource

Definition at line 239 of file entrylisthelper.cxx.

References m_xListSource.

Referenced by disposing(), handleDisposing(), and setListEntrySource().

◆ disposing() [1/2]

void frm::OEntryListHelper::disposing ( )
protected

◆ disposing() [2/2]

virtual void SAL_CALL frm::OEntryListHelper::disposing ( const css::lang::EventObject &  Source)
overrideprotectedpure virtual

◆ entryChanged()

void SAL_CALL frm::OEntryListHelper::entryChanged ( const css::form::binding::ListEntryEvent &  _rSource)
overrideprivatevirtual

◆ entryRangeInserted()

void SAL_CALL frm::OEntryListHelper::entryRangeInserted ( const css::form::binding::ListEntryEvent &  _rSource)
overrideprivatevirtual

◆ entryRangeRemoved()

void SAL_CALL frm::OEntryListHelper::entryRangeRemoved ( const css::form::binding::ListEntryEvent &  _rSource)
overrideprivatevirtual

◆ getListEntrySource()

Reference< XListEntrySource > SAL_CALL frm::OEntryListHelper::getListEntrySource ( )
overrideprivatevirtual

Definition at line 74 of file entrylisthelper.cxx.

References m_xListSource.

◆ getStringItemList()

const std::vector< OUString > & frm::OEntryListHelper::getStringItemList ( ) const
inlineprotected

◆ getTypedItemList()

const css::uno::Sequence< css::uno::Any > & frm::OEntryListHelper::getTypedItemList ( ) const
inlineprotected

◆ handleDisposing()

bool frm::OEntryListHelper::handleDisposing ( const css::lang::EventObject &  _rEvent)
protected

handling the XEventListener::disposing call for the case where our list source is being disposed

Returns
<TRUE> if and only if the disposed object was our list source, and so the event was handled

Definition at line 218 of file entrylisthelper.cxx.

References disconnectExternalListSource(), and m_xListSource.

◆ hasExternalListSource()

bool frm::OEntryListHelper::hasExternalListSource ( ) const
inlineprotected

◆ impl_lock_refreshList()

void frm::OEntryListHelper::impl_lock_refreshList ( ControlModelLock _rInstanceLock)
private

refreshes our list entries

In case we have an external list source, it's used to obtain the new entries, and then stringItemListChanged is called to give the derived class the possibility to react on this.

In case we do not have an external list source, refreshInternalEntryList is called.

Definition at line 209 of file entrylisthelper.cxx.

References hasExternalListSource(), obtainListSourceEntries(), and refreshInternalEntryList().

Referenced by allEntriesChanged(), and refresh().

◆ obtainListSourceEntries()

void frm::OEntryListHelper::obtainListSourceEntries ( ControlModelLock _rInstanceLock)
private

obtains list entries and possibly data values from list source

@precond m_xListSource has to hold an external list source

Definition at line 267 of file entrylisthelper.cxx.

References m_aStringItems, m_aTypedItems, m_xListSource, comphelper::sequenceToContainer(), and stringItemListChanged().

Referenced by connectExternalListSource(), and impl_lock_refreshList().

◆ operator=()

OEntryListHelper & frm::OEntryListHelper::operator= ( const OEntryListHelper )
privatedelete

◆ refresh()

void SAL_CALL frm::OEntryListHelper::refresh ( )
overrideprivatevirtual

◆ refreshInternalEntryList()

virtual void frm::OEntryListHelper::refreshInternalEntryList ( )
protectedpure virtual

called when XRefreshable::refresh has been called, and we do not have an external list source

Implemented in frm::OComboBoxModel, and frm::OListBoxModel.

Referenced by impl_lock_refreshList().

◆ removeRefreshListener()

void SAL_CALL frm::OEntryListHelper::removeRefreshListener ( const css::uno::Reference< css::util::XRefreshListener > &  _rxListener)
overrideprivatevirtual

◆ setListEntrySource()

void SAL_CALL frm::OEntryListHelper::setListEntrySource ( const css::uno::Reference< css::form::binding::XListEntrySource > &  _rxSource)
overrideprivatevirtual

◆ setNewStringItemList()

void frm::OEntryListHelper::setNewStringItemList ( const css::uno::Any &  _rValue,
ControlModelLock _rInstanceLock 
)
protected

helper for implementing setFastPropertyValueNoBroadcast

Will internally call stringItemListChanged after the new item list has been set.

@precond not to be called when we have an external list source

See also
hasExternalListSource

Definition at line 296 of file entrylisthelper.cxx.

References hasExternalListSource(), m_aStringItems, m_aTypedItems, comphelper::sequenceToContainer(), and stringItemListChanged().

Referenced by frm::OListBoxModel::_propertyChanged(), frm::OComboBoxModel::read(), frm::OListBoxModel::read(), frm::OComboBoxModel::setFastPropertyValue_NoBroadcast(), and frm::OListBoxModel::setFastPropertyValue_NoBroadcast().

◆ setNewTypedItemList()

void frm::OEntryListHelper::setNewTypedItemList ( const css::uno::Any &  _rValue,
ControlModelLock _rInstanceLock 
)
protected

helper for implementing setFastPropertyValueNoBroadcast

Will internally call stringItemListChanged after the new item list has been set.

@precond not to be called when we have an external list source

See also
hasExternalListSource

Definition at line 308 of file entrylisthelper.cxx.

References hasExternalListSource(), m_aTypedItems, and stringItemListChanged().

Referenced by frm::OListBoxModel::_propertyChanged(), frm::OComboBoxModel::setFastPropertyValue_NoBroadcast(), and frm::OListBoxModel::setFastPropertyValue_NoBroadcast().

◆ stringItemListChanged()

virtual void frm::OEntryListHelper::stringItemListChanged ( ControlModelLock _rInstanceLock)
protectedpure virtual

announces that the list of entries has changed.

Derived classes have to override this. Most probably, they'll set the new as model property.

See also
getStringItemList

Implemented in frm::OComboBoxModel, and frm::OListBoxModel.

Referenced by entryChanged(), entryRangeInserted(), entryRangeRemoved(), obtainListSourceEntries(), setNewStringItemList(), and setNewTypedItemList().

Member Data Documentation

◆ m_aRefreshListeners

::comphelper::OInterfaceContainerHelper3<css::util::XRefreshListener> frm::OEntryListHelper::m_aRefreshListeners
private

"overridden" TypedItemList property value

Definition at line 57 of file entrylisthelper.hxx.

Referenced by addRefreshListener(), disposing(), refresh(), and removeRefreshListener().

◆ m_aStringItems

std::vector< OUString > frm::OEntryListHelper::m_aStringItems
private

◆ m_aTypedItems

css::uno::Sequence< css::uno::Any > frm::OEntryListHelper::m_aTypedItems
private

◆ m_rControlModel

OControlModel& frm::OEntryListHelper::m_rControlModel
private

◆ m_xListSource

css::uno::Reference< css::form::binding::XListEntrySource > frm::OEntryListHelper::m_xListSource
private

The documentation for this class was generated from the following files: