LibreOffice Module forms (master) 1
|
#include <entrylisthelper.hxx>
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 | |
OEntryListHelper & | operator= (const OEntryListHelper &)=delete |
Private Attributes | |
OControlModel & | m_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 |
Definition at line 45 of file entrylisthelper.hxx.
|
explicitprotected |
Definition at line 40 of file entrylisthelper.cxx.
|
protected |
Definition at line 47 of file entrylisthelper.cxx.
|
protectedvirtual |
Definition at line 56 of file entrylisthelper.cxx.
|
privatedelete |
|
overrideprivatevirtual |
Definition at line 183 of file entrylisthelper.cxx.
References comphelper::OInterfaceContainerHelper3< class ListenerT >::addInterface(), and m_aRefreshListeners.
|
overrideprivatevirtual |
Definition at line 168 of file entrylisthelper.cxx.
References impl_lock_refreshList(), m_rControlModel, and m_xListSource.
|
private |
connects to a new external list source
_rxSource | the new list source. Must not be <NULL> |
Definition at line 248 of file entrylisthelper.cxx.
References hasExternalListSource(), m_xListSource, and obtainListSourceEntries().
Referenced by setListEntrySource().
|
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().
|
private |
disconnects from the active external list source, if present
Definition at line 239 of file entrylisthelper.cxx.
References m_xListSource.
Referenced by disposing(), handleDisposing(), and setListEntrySource().
|
protected |
to be called by derived classes' instances when they're being disposed
Definition at line 229 of file entrylisthelper.cxx.
References disconnectExternalListSource(), comphelper::OInterfaceContainerHelper3< class ListenerT >::disposeAndClear(), hasExternalListSource(), and m_aRefreshListeners.
Referenced by frm::OComboBoxModel::disposing(), and frm::OListBoxModel::disposing().
|
overrideprotectedpure virtual |
Implemented in frm::OComboBoxModel, and frm::OListBoxModel.
|
overrideprivatevirtual |
Definition at line 80 of file entrylisthelper.cxx.
References m_aStringItems, m_aTypedItems, m_rControlModel, m_xListSource, o3tl::make_unsigned(), and stringItemListChanged().
|
overrideprivatevirtual |
Definition at line 104 of file entrylisthelper.cxx.
References m_aStringItems, m_aTypedItems, m_rControlModel, m_xListSource, o3tl::make_unsigned(), and stringItemListChanged().
|
overrideprivatevirtual |
Definition at line 126 of file entrylisthelper.cxx.
References i, m_aStringItems, m_aTypedItems, m_rControlModel, m_xListSource, and stringItemListChanged().
|
overrideprivatevirtual |
Definition at line 74 of file entrylisthelper.cxx.
References m_xListSource.
|
inlineprotected |
returns the current string item list
Definition at line 67 of file entrylisthelper.hxx.
References m_aStringItems.
Referenced by frm::OComboBoxModel::getFastPropertyValue(), frm::OListBoxModel::getFastPropertyValue(), frm::OListBoxModel::impl_getValues(), frm::OComboBoxModel::stringItemListChanged(), frm::OListBoxModel::stringItemListChanged(), frm::OListBoxModel::translateControlValueToExternalValue(), and frm::OListBoxModel::translateExternalValueToControlValue().
|
inlineprotected |
returns the current typed item list
Definition at line 71 of file entrylisthelper.hxx.
References m_aTypedItems.
Referenced by frm::OComboBoxModel::convertFastPropertyValue(), frm::OListBoxModel::convertFastPropertyValue(), frm::OComboBoxModel::getFastPropertyValue(), frm::OListBoxModel::getFastPropertyValue(), frm::OComboBoxModel::stringItemListChanged(), frm::OListBoxModel::stringItemListChanged(), and frm::OListBoxModel::translateControlValueToExternalValue().
|
protected |
handling the XEventListener::disposing call for the case where our list source is being disposed
Definition at line 218 of file entrylisthelper.cxx.
References disconnectExternalListSource(), and m_xListSource.
|
inlineprotected |
determines whether we actually have an external list source
Definition at line 74 of file entrylisthelper.hxx.
References m_xListSource.
Referenced by connectExternalListSource(), frm::OComboBoxModel::convertFastPropertyValue(), frm::OListBoxModel::convertFastPropertyValue(), convertNewListSourceProperty(), disposing(), impl_lock_refreshList(), frm::OListBoxModel::impl_refreshDbEntryList(), frm::OComboBoxModel::loadData(), frm::OListBoxModel::loadData(), frm::OComboBoxModel::onConnectedDbColumn(), frm::OListBoxModel::onConnectedDbColumn(), frm::OComboBoxModel::onDisconnectedDbColumn(), frm::OListBoxModel::onDisconnectedDbColumn(), frm::OComboBoxModel::read(), frm::OListBoxModel::read(), frm::OComboBoxModel::refreshInternalEntryList(), frm::OComboBoxModel::reloaded(), frm::OComboBoxModel::setFastPropertyValue_NoBroadcast(), frm::OListBoxModel::setFastPropertyValue_NoBroadcast(), setNewStringItemList(), and setNewTypedItemList().
|
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().
|
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().
|
privatedelete |
|
overrideprivatevirtual |
Definition at line 197 of file entrylisthelper.cxx.
References impl_lock_refreshList(), m_aRefreshListeners, m_rControlModel, and comphelper::OInterfaceContainerHelper3< class ListenerT >::notifyEach().
|
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().
|
overrideprivatevirtual |
Definition at line 190 of file entrylisthelper.cxx.
References m_aRefreshListeners, and comphelper::OInterfaceContainerHelper3< class ListenerT >::removeInterface().
|
overrideprivatevirtual |
Definition at line 61 of file entrylisthelper.cxx.
References connectExternalListSource(), disconnectExternalListSource(), and m_rControlModel.
|
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
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().
|
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
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().
|
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.
Implemented in frm::OComboBoxModel, and frm::OListBoxModel.
Referenced by entryChanged(), entryRangeInserted(), entryRangeRemoved(), obtainListSourceEntries(), setNewStringItemList(), and setNewTypedItemList().
|
private |
"overridden" TypedItemList property value
Definition at line 57 of file entrylisthelper.hxx.
Referenced by addRefreshListener(), disposing(), refresh(), and removeRefreshListener().
|
private |
our external list source
Definition at line 53 of file entrylisthelper.hxx.
Referenced by convertNewListSourceProperty(), entryChanged(), entryRangeInserted(), entryRangeRemoved(), getStringItemList(), obtainListSourceEntries(), and setNewStringItemList().
|
private |
"overridden" StringItemList property value
Definition at line 55 of file entrylisthelper.hxx.
Referenced by entryChanged(), entryRangeInserted(), entryRangeRemoved(), getTypedItemList(), obtainListSourceEntries(), setNewStringItemList(), and setNewTypedItemList().
|
private |
Definition at line 48 of file entrylisthelper.hxx.
Referenced by allEntriesChanged(), entryChanged(), entryRangeInserted(), entryRangeRemoved(), refresh(), and setListEntrySource().
|
private |
Definition at line 51 of file entrylisthelper.hxx.
Referenced by allEntriesChanged(), connectExternalListSource(), disconnectExternalListSource(), entryChanged(), entryRangeInserted(), entryRangeRemoved(), getListEntrySource(), handleDisposing(), hasExternalListSource(), and obtainListSourceEntries().