LibreOffice Module forms (master) 1
|
#include <InterfaceContainer.hxx>
Public Member Functions | |
OInterfaceContainer (const css::uno::Reference< css::uno::XComponentContext > &_rxFactory, ::osl::Mutex &_rMutex, const css::uno::Type &_rElementType) | |
OInterfaceContainer (::osl::Mutex &_rMutex, const OInterfaceContainer &_cloneSource) | |
void | clonedFrom (const OInterfaceContainer &_cloneSource) |
virtual OUString SAL_CALL | getServiceName () override=0 |
virtual void SAL_CALL | write (const css::uno::Reference< css::io::XObjectOutputStream > &OutStream) override |
virtual void SAL_CALL | read (const css::uno::Reference< css::io::XObjectInputStream > &InStream) override |
virtual void SAL_CALL | disposing (const css::lang::EventObject &_rSource) override |
virtual void SAL_CALL | propertyChange (const css::beans::PropertyChangeEvent &evt) override |
virtual css::uno::Type SAL_CALL | getElementType () override |
virtual sal_Bool SAL_CALL | hasElements () override |
virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL | createEnumeration () override |
virtual css::uno::Any SAL_CALL | getByName (const OUString &aName) override |
virtual css::uno::Sequence< OUString > SAL_CALL | getElementNames () override |
virtual sal_Bool SAL_CALL | hasByName (const OUString &aName) override |
virtual void SAL_CALL | replaceByName (const OUString &Name, const css::uno::Any &_rElement) override |
virtual void SAL_CALL | insertByName (const OUString &Name, const css::uno::Any &_rElement) override |
virtual void SAL_CALL | removeByName (const OUString &Name) override |
virtual sal_Int32 SAL_CALL | getCount () override |
virtual css::uno::Any SAL_CALL | getByIndex (sal_Int32 _nIndex) override |
virtual void SAL_CALL | replaceByIndex (sal_Int32 _nIndex, const css::uno::Any &_rElement) override |
virtual void SAL_CALL | insertByIndex (sal_Int32 _nIndex, const css::uno::Any &Element) override |
virtual void SAL_CALL | removeByIndex (sal_Int32 _nIndex) override |
virtual void SAL_CALL | addContainerListener (const css::uno::Reference< css::container::XContainerListener > &_rxListener) override |
virtual void SAL_CALL | removeContainerListener (const css::uno::Reference< css::container::XContainerListener > &_rxListener) override |
virtual void SAL_CALL | registerScriptEvent (sal_Int32 nIndex, const css::script::ScriptEventDescriptor &aScriptEvent) override |
virtual void SAL_CALL | registerScriptEvents (sal_Int32 nIndex, const css::uno::Sequence< css::script::ScriptEventDescriptor > &aScriptEvents) override |
virtual void SAL_CALL | revokeScriptEvent (sal_Int32 nIndex, const OUString &aListenerType, const OUString &aEventMethod, const OUString &aRemoveListenerParam) override |
virtual void SAL_CALL | revokeScriptEvents (sal_Int32 nIndex) override |
virtual void SAL_CALL | insertEntry (sal_Int32 nIndex) override |
virtual void SAL_CALL | removeEntry (sal_Int32 nIndex) override |
virtual css::uno::Sequence< css::script::ScriptEventDescriptor > SAL_CALL | getScriptEvents (sal_Int32 Index) override |
virtual void SAL_CALL | attach (sal_Int32 nIndex, const css::uno::Reference< css::uno::XInterface > &xObject, const css::uno::Any &aHelper) override |
virtual void SAL_CALL | detach (sal_Int32 nIndex, const css::uno::Reference< css::uno::XInterface > &xObject) override |
virtual void SAL_CALL | addScriptListener (const css::uno::Reference< css::script::XScriptListener > &xListener) override |
virtual void SAL_CALL | removeScriptListener (const css::uno::Reference< css::script::XScriptListener > &Listener) override |
Public Member Functions inherited from cppu::ImplHelper8< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8 > | |
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 |
Protected Member Functions | |
virtual | ~OInterfaceContainer () |
virtual void SAL_CALL | disposing () |
void | removeElementsNoEvents () |
virtual void | approveNewElement (const css::uno::Reference< css::beans::XPropertySet > &_rxObject, ElementDescription *_pElement) |
to be overridden if elements which are to be inserted into the container shall be checked More... | |
virtual ElementDescription * | createElementMetaData () |
void | implInsert (sal_Int32 _nIndex, const css::uno::Reference< css::beans::XPropertySet > &_rxObject, bool _bEvents, ElementDescription *_pApprovalResult, bool _bFire) |
inserts an object into our internal structures More... | |
virtual void | implInserted (const ElementDescription *_pElement) |
virtual void | implRemoved (const css::uno::Reference< css::uno::XInterface > &_rxObject) |
virtual void | impl_replacedElement (const css::container::ContainerEvent &_rEvent, ::osl::ClearableMutexGuard &_rInstanceLock) |
called after an object was replaced. More... | |
void SAL_CALL | writeEvents (const css::uno::Reference< css::io::XObjectOutputStream > &_rxOutStream) |
void SAL_CALL | readEvents (const css::uno::Reference< css::io::XObjectInputStream > &_rxInStream) |
void | implReplaceByIndex (const sal_Int32 _nIndex, const css::uno::Any &_rNewElement, ::osl::ClearableMutexGuard &_rClearBeforeNotify) |
replace an element, specified by position More... | |
void | implRemoveByIndex (const sal_Int32 _nIndex, ::osl::ClearableMutexGuard &_rClearBeforeNotify) |
removes an element, specified by position More... | |
void | implCheckIndex (const sal_Int32 _nIndex) |
validates the given index More... | |
Protected Member Functions inherited from cppu::ImplHelper8< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8 > | |
~ImplHelper8 () SAL_NOEXCEPT | |
Protected Attributes | |
::osl::Mutex & | m_rMutex |
OInterfaceArray | m_aItems |
OInterfaceMap | m_aMap |
::comphelper::OInterfaceContainerHelper3< css::container::XContainerListener > | m_aContainerListeners |
const css::uno::Type | m_aElementType |
css::uno::Reference< css::uno::XComponentContext > | m_xContext |
css::uno::Reference< css::script::XEventAttacherManager > | m_xEventAttacher |
Private Member Functions | |
void | impl_addVbEvents_nolck_nothrow (const sal_Int32 i_nIndex) |
void | transformEvents () |
void | impl_createEventAttacher_nothrow () |
Definition at line 85 of file InterfaceContainer.hxx.
frm::OInterfaceContainer::OInterfaceContainer | ( | const css::uno::Reference< css::uno::XComponentContext > & | _rxFactory, |
::osl::Mutex & | _rMutex, | ||
const css::uno::Type & | _rElementType | ||
) |
frm::OInterfaceContainer::OInterfaceContainer | ( | ::osl::Mutex & | _rMutex, |
const OInterfaceContainer & | _cloneSource | ||
) |
Definition at line 187 of file InterfaceContainer.cxx.
References impl_createEventAttacher_nothrow(), m_rMutex, and m_xContext.
|
protectedvirtual |
Definition at line 237 of file InterfaceContainer.cxx.
|
overridevirtual |
Reimplemented in frm::OFormsCollection.
Definition at line 594 of file InterfaceContainer.cxx.
References comphelper::OInterfaceContainerHelper3< class ListenerT >::addInterface(), and m_aContainerListeners.
Referenced by frm::OFormsCollection::addContainerListener().
|
overridevirtual |
Reimplemented in frm::OFormsCollection.
Definition at line 1225 of file InterfaceContainer.cxx.
References m_xEventAttacher.
Referenced by frm::OFormsCollection::addScriptListener().
|
protectedvirtual |
to be overridden if elements which are to be inserted into the container shall be checked
the ElementDescription given can be used to cache information about the object - it will be passed later on to implInserted/implReplaced.
Reimplemented in frm::OGridControlModel.
Definition at line 733 of file InterfaceContainer.cxx.
References frm::ElementDescription::aElementTypeInterface, Any, DBG_ASSERT, hasProperty(), frm::ResourceManager::loadString(), m_aElementType, PROPERTY_NAME, frm::ElementDescription::xChild, frm::ElementDescription::xInterface, and frm::ElementDescription::xPropertySet.
Referenced by implInsert(), implReplaceByIndex(), and insertByName().
|
overridevirtual |
Reimplemented in frm::OFormsCollection.
Definition at line 1211 of file InterfaceContainer.cxx.
References aHelper, m_xEventAttacher, and nIndex.
Referenced by frm::OFormsCollection::attach().
void frm::OInterfaceContainer::clonedFrom | ( | const OInterfaceContainer & | _cloneSource | ) |
css::uno::RuntimeException |
Definition at line 197 of file InterfaceContainer.cxx.
References Any, Exception, i, insertByIndex(), and nCount.
|
protectedvirtual |
Reimplemented in frm::OGridControlModel.
Definition at line 1063 of file InterfaceContainer.cxx.
Referenced by implInsert(), implReplaceByIndex(), and insertByName().
|
overridevirtual |
Reimplemented in frm::OFormsCollection.
Definition at line 683 of file InterfaceContainer.cxx.
References m_rMutex.
Referenced by frm::OFormsCollection::createEnumeration(), and frm::ODatabaseForm::reset_impl().
|
overridevirtual |
Reimplemented in frm::OFormsCollection.
Definition at line 1218 of file InterfaceContainer.cxx.
References m_xEventAttacher, and nIndex.
Referenced by frm::OFormsCollection::detach().
|
protectedvirtual |
Reimplemented in frm::OFormsCollection, frm::OFormComponents, frm::ODatabaseForm, frm::OFormsCollection, frm::OGridControlModel, frm::OGridControlModel, and frm::OFormComponents.
Definition at line 242 of file InterfaceContainer.cxx.
References comphelper::OInterfaceContainerHelper3< class ListenerT >::disposeAndClear(), i, m_aContainerListeners, m_aItems, m_aMap, m_xEventAttacher, and PROPERTY_NAME.
Referenced by frm::OFormsCollection::disposing(), and frm::OFormComponents::disposing().
|
overridevirtual |
Reimplemented in frm::ODatabaseForm, frm::OFormsCollection, frm::OGridControlModel, frm::OFormComponents, and frm::OGridControlModel.
Definition at line 607 of file InterfaceContainer.cxx.
References DBG_ASSERT, i, m_aItems, m_aMap, and m_rMutex.
|
overridevirtual |
Reimplemented in frm::OFormsCollection.
Definition at line 724 of file InterfaceContainer.cxx.
References Any, m_aElementType, m_aItems, and o3tl::make_unsigned().
Referenced by frm::ODatabaseForm::FillSuccessfulList(), frm::OFormsCollection::getByIndex(), and frm::ODatabaseForm::setControlModels().
|
overridevirtual |
Reimplemented in frm::OFormsCollection.
Definition at line 691 of file InterfaceContainer.cxx.
References Any, m_aElementType, and m_aMap.
Referenced by frm::OFormsCollection::getByName().
|
overridevirtual |
Reimplemented in frm::OFormsCollection.
Definition at line 718 of file InterfaceContainer.cxx.
References m_aItems.
Referenced by frm::ODatabaseForm::FillSuccessfulList(), frm::OFormsCollection::getCount(), implInsert(), read(), frm::ODatabaseForm::setControlModels(), and frm::ODatabaseForm::submit().
|
overridevirtual |
Reimplemented in frm::OFormsCollection.
Definition at line 703 of file InterfaceContainer.cxx.
References m_aMap, and comphelper::mapKeysToSequence().
Referenced by frm::OFormsCollection::getElementNames().
|
overridevirtual |
Reimplemented in frm::OFormsCollection.
Definition at line 676 of file InterfaceContainer.cxx.
References m_aElementType.
Referenced by frm::OFormsCollection::getElementType().
|
overridevirtual |
Reimplemented in frm::OFormsCollection.
Definition at line 1196 of file InterfaceContainer.cxx.
References frm::lcl_hasVbaEvents(), frm::lcl_stripVbaEvents(), m_xEventAttacher, and nIndex.
Referenced by frm::OFormsCollection::getScriptEvents().
|
overridepure virtual |
Implemented in frm::ODatabaseForm, frm::OFormsCollection, and frm::OGridControlModel.
|
overridevirtual |
Reimplemented in frm::OFormsCollection.
Definition at line 709 of file InterfaceContainer.cxx.
References m_aMap.
Referenced by frm::OFormsCollection::hasByName().
|
overridevirtual |
Reimplemented in frm::OFormsCollection.
Definition at line 670 of file InterfaceContainer.cxx.
References m_aMap.
Referenced by frm::OFormsCollection::hasElements().
|
private |
Definition at line 112 of file InterfaceContainer.cxx.
References frm::getXModel().
Referenced by implInsert(), registerScriptEvent(), and registerScriptEvents().
|
private |
Definition at line 224 of file InterfaceContainer.cxx.
References DBG_UNHANDLED_EXCEPTION, Exception, m_xContext, and m_xEventAttacher.
Referenced by OInterfaceContainer().
|
protectedvirtual |
called after an object was replaced.
The default implementation notifies our listeners, after releasing the instance lock.
Reimplemented in frm::OGridControlModel.
Definition at line 901 of file InterfaceContainer.cxx.
References m_aContainerListeners, and comphelper::OInterfaceContainerHelper3< class ListenerT >::notifyEach().
Referenced by implReplaceByIndex().
|
protected |
validates the given index
css::lang::IndexOutOfBoundsException | if the given index does not denote a valid position in our children array |
Definition at line 993 of file InterfaceContainer.cxx.
References m_aItems, and o3tl::make_unsigned().
Referenced by removeByIndex(), and replaceByIndex().
|
protected |
inserts an object into our internal structures
_nIndex | the index at which position it should be inserted |
_bEvents | if <TRUE>, event knittings will be done |
_pApprovalResult | must contain the result of an approveNewElement call. Can be <NULL>, in this case, the approval is done within implInsert. |
_bFire | if <TRUE>, a notification about the insertion will be fired |
css::lang::IllegalArgumentException |
Definition at line 767 of file InterfaceContainer.cxx.
References frm::ElementDescription::aElementTypeInterface, Any, approveNewElement(), createElementMetaData(), DBG_ASSERT, Exception, getCount(), i, impl_addVbEvents_nolck_nothrow(), implInserted(), m_aContainerListeners, m_aItems, m_aMap, m_rMutex, m_xEventAttacher, comphelper::OInterfaceContainerHelper3< class ListenerT >::notifyEach(), PROPERTY_NAME, sName, frm::ElementDescription::xChild, and frm::ElementDescription::xInterface.
Referenced by insertByIndex(), insertByName(), and read().
|
protectedvirtual |
Reimplemented in frm::ODatabaseForm, and frm::OGridControlModel.
Definition at line 889 of file InterfaceContainer.cxx.
Referenced by implInsert(), and frm::ODatabaseForm::implInserted().
|
protected |
removes an element, specified by position
@precond <arg>_nIndex</arg> is a valid index @precond our mutex is locked exactly once, by the guard specified with <arg>_rClearBeforeNotify</arg>
Definition at line 1010 of file InterfaceContainer.cxx.
References i, implRemoved(), m_aContainerListeners, m_aElementType, m_aItems, m_aMap, m_xEventAttacher, o3tl::make_unsigned(), comphelper::OInterfaceContainerHelper3< class ListenerT >::notifyEach(), and PROPERTY_NAME.
Referenced by removeByIndex().
|
protectedvirtual |
Reimplemented in frm::ODatabaseForm, and frm::OGridControlModel.
Definition at line 895 of file InterfaceContainer.cxx.
Referenced by implRemoveByIndex(), and frm::ODatabaseForm::implRemoved().
|
protected |
replace an element, specified by position
@precond <arg>_nIndex</arg> is a valid index @precond our mutex is locked exactly once, by the guard specified with <arg>_rClearBeforeNotify</arg>
Definition at line 917 of file InterfaceContainer.cxx.
References Any, approveNewElement(), createElementMetaData(), DBG_ASSERT, impl_replacedElement(), m_aElementType, m_aItems, m_aMap, m_xEventAttacher, o3tl::make_unsigned(), PROPERTY_NAME, and sName.
Referenced by replaceByIndex(), and replaceByName().
|
overridevirtual |
Reimplemented in frm::OFormsCollection.
Definition at line 909 of file InterfaceContainer.cxx.
References implInsert().
Referenced by clonedFrom(), and frm::OFormsCollection::insertByIndex().
|
overridevirtual |
Reimplemented in frm::OFormsCollection.
Definition at line 1069 of file InterfaceContainer.cxx.
References Any, approveNewElement(), createElementMetaData(), DBG_ASSERT, Exception, implInsert(), m_aItems, PROPERTY_NAME, and TOOLS_WARN_EXCEPTION.
Referenced by frm::OFormsCollection::insertByName().
|
overridevirtual |
Reimplemented in frm::OFormsCollection.
Definition at line 1182 of file InterfaceContainer.cxx.
References m_xEventAttacher, and nIndex.
Referenced by frm::OFormsCollection::insertEntry().
|
overridevirtual |
Reimplemented in frm::ODatabaseForm.
Definition at line 652 of file InterfaceContainer.cxx.
References m_aMap, m_rMutex, and PROPERTY_NAME.
Referenced by frm::ODatabaseForm::propertyChange().
|
overridevirtual |
Reimplemented in frm::ODatabaseForm, and frm::OGridControlModel.
Definition at line 505 of file InterfaceContainer.cxx.
References DBG_UNHANDLED_EXCEPTION, Exception, getCount(), i, implInsert(), m_aItems, m_rMutex, m_xContext, m_xEventAttacher, readEvents(), removeByIndex(), removeElementsNoEvents(), and SAL_WARN.
Referenced by frm::ODatabaseForm::read().
|
protected |
Definition at line 415 of file InterfaceContainer.cxx.
References Any, i, m_aItems, m_rMutex, and m_xEventAttacher.
Referenced by read().
|
overridevirtual |
Reimplemented in frm::OFormsCollection.
Definition at line 1144 of file InterfaceContainer.cxx.
References impl_addVbEvents_nolck_nothrow(), m_rMutex, m_xEventAttacher, and nIndex.
Referenced by frm::OFormsCollection::registerScriptEvent().
|
overridevirtual |
Reimplemented in frm::OFormsCollection.
Definition at line 1156 of file InterfaceContainer.cxx.
References impl_addVbEvents_nolck_nothrow(), m_rMutex, m_xEventAttacher, and nIndex.
Referenced by frm::OFormsCollection::registerScriptEvents().
|
overridevirtual |
Reimplemented in frm::OFormsCollection.
Definition at line 1053 of file InterfaceContainer.cxx.
References implCheckIndex(), implRemoveByIndex(), and m_rMutex.
Referenced by read(), frm::OFormsCollection::removeByIndex(), and removeByName().
|
overridevirtual |
Reimplemented in frm::OFormsCollection.
Definition at line 1129 of file InterfaceContainer.cxx.
References m_aItems, m_aMap, m_rMutex, Name, nPos, and removeByIndex().
Referenced by frm::OFormsCollection::removeByName().
|
overridevirtual |
Reimplemented in frm::OFormsCollection.
Definition at line 600 of file InterfaceContainer.cxx.
References m_aContainerListeners, and comphelper::OInterfaceContainerHelper3< class ListenerT >::removeInterface().
Referenced by frm::OFormsCollection::removeContainerListener().
|
protected |
Definition at line 868 of file InterfaceContainer.cxx.
References i, m_aItems, m_aMap, and PROPERTY_NAME.
Referenced by read().
|
overridevirtual |
Reimplemented in frm::OFormsCollection.
Definition at line 1189 of file InterfaceContainer.cxx.
References m_xEventAttacher, and nIndex.
Referenced by frm::OFormsCollection::removeEntry().
|
overridevirtual |
Reimplemented in frm::OFormsCollection.
Definition at line 1232 of file InterfaceContainer.cxx.
References m_xEventAttacher.
Referenced by frm::OFormsCollection::removeScriptListener().
|
overridevirtual |
Reimplemented in frm::OFormsCollection.
Definition at line 1000 of file InterfaceContainer.cxx.
References implCheckIndex(), implReplaceByIndex(), and m_rMutex.
Referenced by frm::OFormsCollection::replaceByIndex().
|
overridevirtual |
Reimplemented in frm::OFormsCollection.
Definition at line 1101 of file InterfaceContainer.cxx.
References Any, hasProperty(), implReplaceByIndex(), m_aItems, m_aMap, m_rMutex, Name, nPos, and PROPERTY_NAME.
Referenced by frm::OFormsCollection::replaceByName().
|
overridevirtual |
Reimplemented in frm::OFormsCollection.
Definition at line 1168 of file InterfaceContainer.cxx.
References m_xEventAttacher, and nIndex.
Referenced by frm::OFormsCollection::revokeScriptEvent().
|
overridevirtual |
Reimplemented in frm::OFormsCollection.
Definition at line 1175 of file InterfaceContainer.cxx.
References m_xEventAttacher, and nIndex.
Referenced by frm::OFormsCollection::revokeScriptEvents().
|
private |
Definition at line 378 of file InterfaceContainer.cxx.
References begin, DBG_UNHANDLED_EXCEPTION, end, Exception, i, m_aItems, and m_xEventAttacher.
Referenced by writeEvents().
|
overridevirtual |
Reimplemented in frm::ODatabaseForm, and frm::OGridControlModel.
Definition at line 447 of file InterfaceContainer.cxx.
References i, m_aItems, m_rMutex, and writeEvents().
Referenced by frm::ODatabaseForm::write().
|
protected |
Definition at line 308 of file InterfaceContainer.cxx.
References Exception, m_aItems, m_xEventAttacher, and transformEvents().
Referenced by write().
|
protected |
Definition at line 92 of file InterfaceContainer.hxx.
Referenced by addContainerListener(), disposing(), impl_replacedElement(), implInsert(), implRemoveByIndex(), and removeContainerListener().
|
protected |
Definition at line 94 of file InterfaceContainer.hxx.
Referenced by approveNewElement(), getByIndex(), getByName(), getElementType(), implRemoveByIndex(), and implReplaceByIndex().
|
protected |
Definition at line 90 of file InterfaceContainer.hxx.
Referenced by frm::OGridControlModel::cloneColumns(), disposing(), getByIndex(), getCount(), implCheckIndex(), implInsert(), implRemoveByIndex(), implReplaceByIndex(), insertByName(), read(), readEvents(), removeByName(), removeElementsNoEvents(), replaceByName(), transformEvents(), write(), and writeEvents().
|
protected |
Definition at line 91 of file InterfaceContainer.hxx.
Referenced by disposing(), getByName(), getElementNames(), hasByName(), hasElements(), implInsert(), implRemoveByIndex(), implReplaceByIndex(), propertyChange(), removeByName(), removeElementsNoEvents(), and replaceByName().
|
protected |
Definition at line 88 of file InterfaceContainer.hxx.
Referenced by createEnumeration(), disposing(), implInsert(), propertyChange(), read(), readEvents(), registerScriptEvent(), registerScriptEvents(), removeByIndex(), removeByName(), replaceByIndex(), replaceByName(), and write().
|
protected |
Definition at line 96 of file InterfaceContainer.hxx.
Referenced by frm::ODatabaseForm::impl_construct(), impl_createEventAttacher_nothrow(), frm::ODatabaseForm::implEnsureConnection(), read(), and frm::ODatabaseForm::submit_impl().
|
protected |
Definition at line 100 of file InterfaceContainer.hxx.
Referenced by addScriptListener(), attach(), detach(), disposing(), getScriptEvents(), impl_createEventAttacher_nothrow(), implInsert(), implRemoveByIndex(), implReplaceByIndex(), insertEntry(), read(), readEvents(), registerScriptEvent(), registerScriptEvents(), removeEntry(), removeScriptListener(), revokeScriptEvent(), revokeScriptEvents(), transformEvents(), and writeEvents().