28#include <com/sun/star/beans/XPropertySet.hpp>
29#include <com/sun/star/io/WrongFormatException.hpp>
30#include <com/sun/star/io/XMarkableStream.hpp>
31#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
32#include <com/sun/star/lang/XMultiServiceFactory.hpp>
33#include <com/sun/star/lang/ServiceNotRegisteredException.hpp>
34#include <com/sun/star/lang/WrappedTargetRuntimeException.hpp>
35#include <com/sun/star/lang/XComponent.hpp>
36#include <com/sun/star/uno/XComponentContext.hpp>
37#include <com/sun/star/util/XCloneable.hpp>
38#include <com/sun/star/form/XForm.hpp>
55#include <com/sun/star/frame/XModel.hpp>
56#include <com/sun/star/document/XCodeNameQuery.hpp>
57#include <ooo/vba/XVBAToOOEventDescGen.hpp>
77 void lcl_throwIllegalArgumentException()
79 throw IllegalArgumentException();
86 for (
auto const& rDesc : sEvents )
88 if ( rDesc.ScriptType ==
"VBAInterop" )
94static Sequence< ScriptEventDescriptor >
97 Sequence< ScriptEventDescriptor > sStripped( sEvents.getLength() );
98 ScriptEventDescriptor* pStripped = sStripped.getArray();
100 sal_Int32 nCopied = 0;
101 for (
auto const& rDesc : sEvents )
103 if ( rDesc.ScriptType !=
"VBAInterop" )
105 pStripped[ nCopied++ ] = rDesc;
108 sStripped.realloc( nCopied );
119 Reference< XModel > xDoc(
getXModel(
static_cast< XContainer *
> (
this ) ) );
123 Reference< XMultiServiceFactory > xDocFac( xDoc, UNO_QUERY_THROW );
124 Reference< XCodeNameQuery > xNameQuery( xDocFac->createInstance(
"ooo.vba.VBACodeNameProvider"), UNO_QUERY );
125 if ( !xNameQuery.is() )
128 ::osl::MutexGuard aGuard(
m_rMutex );
130 if ( hasVBABindings )
133 Reference< XInterface > xElement(
getByIndex( i_nIndex ) , UNO_QUERY_THROW );
134 Reference< XForm > xElementAsForm( xElement, UNO_QUERY );
135 if ( xElementAsForm.is() )
140 Reference<XInterface> xThis =
static_cast<XContainer*
>(
this);
141 OUString sCodeName = xNameQuery->getCodeNameForContainer(xThis);
142 if (sCodeName.isEmpty())
143 sCodeName = xNameQuery->getCodeNameForObject(xElement);
145 Reference< XPropertySet > xProps( xElement, UNO_QUERY_THROW );
147 xProps->getPropertyValue(
"DefaultControl") >>=
sServiceName;
149 Reference< ooo::vba::XVBAToOOEventDescGen > xDescSupplier(
m_xContext->getServiceManager()->createInstanceWithContext(
"ooo.vba.VBAToOOEventDesc",
m_xContext), UNO_QUERY_THROW );
150 Sequence< ScriptEventDescriptor > vbaEvents = xDescSupplier->getEventDescriptions( sServiceName , sCodeName );
157 catch (
const ServiceNotRegisteredException& )
161 catch(
const Exception& )
174 const Reference<XComponentContext>& _rxContext,
175 ::osl::Mutex& _rMutex,
176 const Type& _rElementType)
179 ,m_aContainerListeners(_rMutex)
180 ,m_aElementType(_rElementType)
183 impl_createEventAttacher_nothrow();
190 ,m_aContainerListeners( _rMutex )
191 ,m_aElementType( _cloneSource.m_aElementType )
201 const Reference< XIndexAccess > xSourceHierarchy(
const_cast< OInterfaceContainer*
>( &_cloneSource ) );
202 const sal_Int32
nCount = xSourceHierarchy->getCount();
205 Reference< XCloneable > xCloneable( xSourceHierarchy->getByIndex(
i ), UNO_QUERY_THROW );
206 Reference< XInterface > xClone( xCloneable->createClone() );
210 catch (
const RuntimeException&)
216 throw WrappedTargetRuntimeException(
217 "Could not clone the given interface hierarchy.",
219 ::cppu::getCaughtException()
247 Reference<XPropertySet> xSet(
m_aItems[
i - 1], UNO_QUERY);
258 Reference<XComponent> xComponent(xSet, UNO_QUERY);
260 xComponent->dispose();
265 css::lang::EventObject aEvt(
static_cast<XContainer*
>(
this));
274 void lcl_saveEvents( ::std::vector< Sequence< ScriptEventDescriptor > >& _rSave,
275 const Reference< XEventAttacherManager >& _rxManager,
const sal_Int32 _nItemCount )
277 OSL_ENSURE( _rxManager.is(),
"lcl_saveEvents: invalid event attacher manager!" );
278 if ( !_rxManager.is() )
282 _rSave.reserve( _nItemCount );
285 for (sal_Int32 i=0;
i<_nItemCount; ++
i)
286 _rSave.push_back(_rxManager->getScriptEvents( i ));
290 void lcl_restoreEvents( const ::std::vector< Sequence< ScriptEventDescriptor > >& _rSave,
291 const Reference< XEventAttacherManager >& _rxManager )
293 OSL_ENSURE( _rxManager.is(),
"lcl_restoreEvents: invalid event attacher manager!" );
294 if ( !_rxManager.is() )
298 for (
auto const& elem : _rSave)
300 _rxManager->revokeScriptEvents( i );
301 _rxManager->registerScriptEvents(i, elem);
313 ::std::vector< Sequence< ScriptEventDescriptor > > aSave;
321 Reference<XMarkableStream> xMark(_rxOutStream, UNO_QUERY);
322 sal_Int32 nMark = xMark->createMark();
324 sal_Int32 nObjLen = 0;
325 _rxOutStream->writeLong(nObjLen);
329 xScripts->write(_rxOutStream);
332 nObjLen = xMark->offsetToMark(nMark) - 4;
333 xMark->jumpToMark(nMark);
334 _rxOutStream->writeLong(nObjLen);
335 xMark->jumpToFurthest();
336 xMark->deleteMark(nMark);
353struct TransformEventTo52Format
355 void operator()( ScriptEventDescriptor& _rDescriptor )
357 if ( _rDescriptor.ScriptType !=
"StarBasic" )
361 sal_Int32 nPrefixLength = _rDescriptor.ScriptCode.indexOf(
':' );
362 if ( 0 <= nPrefixLength )
365 const OUString
sPrefix = _rDescriptor.ScriptCode.copy( 0, nPrefixLength );
368 "TransformEventTo52Format: invalid (unknown) prefix!" );
371 _rDescriptor.ScriptCode = _rDescriptor.ScriptCode.copy( nPrefixLength + 1 );
380 OSL_ENSURE(
m_xEventAttacher.is(),
"OInterfaceContainer::transformEvents: no event attacher manager!" );
388 Sequence< ScriptEventDescriptor > aChildEvents;
390 for (sal_Int32
i=0;
i<nItems; ++
i)
395 if ( aChildEvents.hasElements() )
398 auto [
begin,
end] = asNonConstRange(aChildEvents);
399 ::std::for_each(
begin,
end, TransformEventTo52Format() );
417 ::osl::MutexGuard aGuard(
m_rMutex );
420 Reference<XMarkableStream> xMark(_rxInStream, UNO_QUERY);
421 sal_Int32 nObjLen = _rxInStream->readLong();
424 sal_Int32 nMark = xMark->createMark();
427 xObj->read(_rxInStream);
428 xMark->jumpToMark(nMark);
429 _rxInStream->skipBytes(nObjLen);
430 xMark->deleteMark(nMark);
439 Reference< XInterface > xAsIFace( item, UNO_QUERY );
440 Reference< XPropertySet > xAsSet( xAsIFace, UNO_QUERY );
449 ::osl::MutexGuard aGuard(
m_rMutex );
453 _rxOutStream->writeLong(nLen);
459 _rxOutStream->writeShort(0x0001);
462 for (sal_Int32
i = 0;
i < nLen;
i++)
464 Reference<XPersistObject> xObj(
m_aItems[
i], UNO_QUERY);
466 _rxOutStream->writeObject(xObj);
480 Reference< XPersistObject > lcl_createPlaceHolder(
const Reference< XComponentContext >& _rxORB )
482 Reference< XPersistObject > xObject( _rxORB->getServiceManager()->createInstanceWithContext(
FRM_COMPONENT_HIDDENCONTROL, _rxORB), UNO_QUERY );
483 DBG_ASSERT( xObject.is(),
"lcl_createPlaceHolder: could not create a substitute for the unknown object!" );
487 Reference< XPropertySet > xObjProps( xObject, UNO_QUERY );
495 catch(
const Exception&)
507 ::osl::MutexGuard aGuard(
m_rMutex );
515 sal_Int32 nLen = _rxInStream->readLong();
520 _rxInStream->readShort();
523 for (sal_Int32
i = 0;
i < nLen;
i++)
525 Reference<XPersistObject> xObj;
528 xObj = _rxInStream->readObject();
530 catch(
const WrongFormatException&)
551 Reference< XPropertySet > xElement( xObj, UNO_QUERY );
564 SAL_WARN(
"forms.misc",
"OInterfaceContainerHelper3::read: reading succeeded, but not inserting!" );
566 xElement.set(lcl_createPlaceHolder(
m_xContext ), css::uno::UNO_QUERY);
567 if ( !xElement.is() )
583 OSL_ENSURE(
m_xEventAttacher.is(),
"OInterfaceContainer::read: could not create an event attacher manager!" );
609 ::osl::MutexGuard aGuard(
m_rMutex );
611 Reference< XInterface > xSource( _rSource.Source, UNO_QUERY );
614 OInterfaceArray::iterator j;
617 DBG_ASSERT( j->get() == Reference< XInterface >( *j, UNO_QUERY ).get(),
618 "OInterfaceContainer::disposing: vector element not normalized!" );
620 if ( xSource.get() == j->get() )
631 OInterfaceMap::iterator
i =
m_aMap.begin();
634 DBG_ASSERT(
i->second.get() == Reference< XInterface >(
i->second, UNO_QUERY ).get(),
635 "OInterfaceContainer::disposing: map element not normalized!" );
637 if (
i->second.get() == xSource.get() )
646 DBG_ASSERT(
i !=
m_aMap.end(),
"OInterfaceContainer::disposing: inconsistency: the element was in m_aItems, but not in m_aMap!" );
656 ::osl::MutexGuard aGuard(
m_rMutex );
657 auto range =
m_aMap.equal_range(::comphelper::getString(evt.OldValue));
658 for (
auto it = range.first; it != range.second; ++it)
659 if (it->second == evt.Source)
661 css::uno::Reference<css::uno::XInterface> xCorrectType(it->second);
663 m_aMap.insert(::std::pair<
const OUString, css::uno::Reference<css::uno::XInterface> >(::comphelper::getString(evt.NewValue),xCorrectType));
685 ::osl::MutexGuard aGuard(
m_rMutex );
686 return new ::comphelper::OEnumerationByIndex(
static_cast<XIndexAccess*
>(
this));
693 ::std::pair <OInterfaceMap::iterator,
694 OInterfaceMap::iterator> aPair =
m_aMap.equal_range(_rName);
696 if (aPair.first == aPair.second)
697 throw NoSuchElementException();
711 ::std::pair <OInterfaceMap::iterator,
712 OInterfaceMap::iterator> aPair =
m_aMap.equal_range(_rName);
713 return aPair.first != aPair.second;
727 throw IndexOutOfBoundsException();
736 if ( !_rxObject.is() )
741 if ( !aCorrectType.hasValue() )
742 lcl_throwIllegalArgumentException();
746 lcl_throwIllegalArgumentException();
749 Reference< XChild > xChild( _rxObject, UNO_QUERY );
750 if ( !xChild.is() || xChild->getParent().is() )
752 lcl_throwIllegalArgumentException();
756 DBG_ASSERT( _pElement,
"OInterfaceContainer::approveNewElement: invalid event descriptor!" );
760 _pElement->
xChild = xChild;
762 _pElement->
xInterface = Reference< XInterface >( _rxObject, UNO_QUERY );
773 ::osl::ClearableMutexGuard aGuard(
m_rMutex );
775 std::unique_ptr< ElementDescription > aAutoDeleteMetaData;
777 if ( !pElementMetaData )
780 DBG_ASSERT( pElementMetaData,
"OInterfaceContainer::implInsert: createElementMetaData returned nonsense!" );
783 aAutoDeleteMetaData.reset( pElementMetaData );
799 if (_nIndex >
static_cast<sal_Int32
>(
m_aItems.size()))
807 m_aMap.insert( ::std::pair<
const OUString, css::uno::Reference<css::uno::XInterface> >(
sName, pElementMetaData->
xInterface ) );
810 pElementMetaData->
xChild->setParent(
static_cast<XContainer*
>(
this));
826 bool bHandleVbaEvents =
false;
829 _rxElement->getPropertyValue(
"GenerateVbaEvents") >>= bHandleVbaEvents;
834 if ( bHandleVbaEvents )
836 Reference< XEventAttacherManager > xMgr ( pElementMetaData->
xInterface, UNO_QUERY );
840 sal_Int32 nLen = pIfcMgr->
getCount();
841 for (sal_Int32
i = 0;
i < nLen; ++
i)
859 aEvt.Source =
static_cast<XContainer*
>(
this);
860 aEvt.Accessor <<= _nIndex;
870 OInterfaceArray::iterator
i =
m_aItems.begin();
871 css::uno::Reference<css::uno::XInterface> xElement(*
i);
873 OInterfaceMap::iterator j = std::find_if(
m_aMap.begin(),
m_aMap.end(),
874 [&xElement](
const OInterfaceMap::value_type& rEntry) { return rEntry.second == xElement; });
879 Reference<XPropertySet> xSet(xElement, UNO_QUERY);
883 Reference<XChild> xChild(xElement, UNO_QUERY);
885 xChild->setParent(css::uno::Reference<css::uno::XInterface> ());
903 _rInstanceLock.clear();
911 Reference< XPropertySet > xElement;
912 _rElement >>= xElement;
913 implInsert( _nIndex, xElement,
true ,
nullptr ,
true );
919 OSL_PRECOND( ( _nIndex >= 0 ) && (
o3tl::make_unsigned(_nIndex) <
m_aItems.size() ),
"OInterfaceContainer::implReplaceByIndex: precondition not met (index)!" );
924 "OInterfaceContainer::implReplaceByIndex: createElementMetaData returned nonsense!");
926 Reference< XPropertySet > xElementProps;
927 _rNewElement >>= xElementProps;
932 css::uno::Reference<css::uno::XInterface> xOldElement(
m_aItems[ _nIndex ] );
933 DBG_ASSERT( xOldElement.get() == Reference< XInterface >( xOldElement, UNO_QUERY ).get(),
934 "OInterfaceContainer::implReplaceByIndex: elements should be held normalized!" );
937 OInterfaceMap::iterator j = std::find_if(
m_aMap.begin(),
m_aMap.end(),
938 [&xOldElement](
const OInterfaceMap::value_type& rEntry) { return rEntry.second.get() == xOldElement.get(); });
943 css::uno::Reference<css::uno::XInterface> xNormalized( xOldElement, UNO_QUERY );
949 Reference<XPropertySet> xSet( xOldElement, UNO_QUERY );
954 Reference<XChild> xChild(xOldElement, UNO_QUERY);
956 xChild->setParent(css::uno::Reference<css::uno::XInterface> ());
963 DBG_ASSERT(aElementMetaData->xPropertySet.is(),
964 "OInterfaceContainer::implReplaceByIndex: what did approveNewElement do?");
967 aElementMetaData->xPropertySet->addPropertyChangeListener(
PROPERTY_NAME,
this);
970 m_aMap.insert(::std::pair<
const OUString, css::uno::Reference<css::uno::XInterface>>(
971 sName, aElementMetaData->xInterface));
972 m_aItems[_nIndex] = aElementMetaData->xInterface;
974 aElementMetaData->xChild->setParent(
static_cast<XContainer*
>(
this));
980 Any(aElementMetaData->xPropertySet));
983 ContainerEvent aReplaceEvent;
984 aReplaceEvent.Source =
static_cast< XContainer*
>( this );
985 aReplaceEvent.Accessor <<= _nIndex;
986 aReplaceEvent.Element = aElementMetaData->xInterface->queryInterface(
m_aElementType);
987 aReplaceEvent.ReplacedElement = xOldElement->queryInterface(
m_aElementType );
996 throw IndexOutOfBoundsException();
1002 ::osl::ClearableMutexGuard aGuard(
m_rMutex );
1012 OSL_PRECOND( ( _nIndex >= 0 ) && (
o3tl::make_unsigned(_nIndex) <
m_aItems.size() ),
"OInterfaceContainer::implRemoveByIndex: precondition not met (index)!" );
1014 OInterfaceArray::iterator
i =
m_aItems.begin() + _nIndex;
1015 css::uno::Reference<css::uno::XInterface> xElement(*
i);
1017 OInterfaceMap::iterator j = std::find_if(
m_aMap.begin(),
m_aMap.end(),
1018 [&xElement](
const OInterfaceMap::value_type& rEntry) { return rEntry.second == xElement; });
1026 css::uno::Reference<css::uno::XInterface> xNormalized( xElement, UNO_QUERY );
1031 Reference<XPropertySet> xSet(xElement, UNO_QUERY);
1035 Reference<XChild> xChild(xElement, UNO_QUERY);
1037 xChild->setParent(css::uno::Reference<css::uno::XInterface> ());
1043 ContainerEvent aEvt;
1044 aEvt.Source =
static_cast<XContainer*
>(
this);
1046 aEvt.Accessor <<= _nIndex;
1048 _rClearBeforeNotify.clear();
1055 ::osl::ClearableMutexGuard aGuard(
m_rMutex );
1071 Reference< XPropertySet > xElementProps;
1075 "OInterfaceContainer::insertByName: createElementMetaData returned nonsense!");
1080 _rElement >>= xElementProps;
1085 catch(
const IllegalArgumentException& )
1089 catch(
const ElementExistException& )
1103 ::osl::ClearableMutexGuard aGuard(
m_rMutex );
1104 ::std::pair <OInterfaceMap::iterator,
1105 OInterfaceMap::iterator> aPair =
m_aMap.equal_range(
Name);
1106 if (aPair.first == aPair.second)
1107 throw NoSuchElementException();
1109 if (Element.getValueType().getTypeClass() != TypeClass_INTERFACE)
1110 lcl_throwIllegalArgumentException();
1112 Reference<XPropertySet> xSet;
1117 lcl_throwIllegalArgumentException();
1131 ::osl::MutexGuard aGuard(
m_rMutex );
1132 ::std::pair <OInterfaceMap::iterator,
1133 OInterfaceMap::iterator> aPair =
m_aMap.equal_range(
Name);
1134 if (aPair.first == aPair.second)
1135 throw NoSuchElementException();
1146 ::osl::ClearableMutexGuard aGuard(
m_rMutex );
1158 ::osl::ClearableMutexGuard aGuard(
m_rMutex );
1198 Sequence< ScriptEventDescriptor > aReturn;
1245 if (!aReturn.hasValue())
1249 if (!aReturn.hasValue())
1281 if (! ::cppu::OComponentHelper::rBHelper.bDisposed)
1301 ::osl::MutexGuard aGuard(
m_aMutex );
Reference< XComponentContext > m_xContext
constexpr OUStringLiteral sServiceName
sal_Int32 addInterface(const css::uno::Reference< ListenerT > &rxIFace)
void disposeAndClear(const css::lang::EventObject &rEvt)
sal_Int32 removeInterface(const css::uno::Reference< ListenerT > &rxIFace)
void notifyEach(void(SAL_CALL ListenerT::*NotificationMethod)(const EventT &), const EventT &Event)
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< css::uno::Type > SAL_CALL getTypes() SAL_OVERRIDE
virtual css::uno::Any SAL_CALL queryInterface(css::uno::Type const &rType) SAL_OVERRIDE
virtual void SAL_CALL acquire() SAL_NOEXCEPT SAL_OVERRIDE
virtual void SAL_CALL disposing()
virtual void SAL_CALL dispose() SAL_OVERRIDE
virtual css::uno::Any SAL_CALL queryAggregation(css::uno::Type const &rType) SAL_OVERRIDE
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() SAL_OVERRIDE
void implCheckIndex(const sal_Int32 _nIndex)
validates the given index
virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() override
const css::uno::Type m_aElementType
virtual css::uno::Any SAL_CALL getByName(const OUString &aName) override
virtual void SAL_CALL registerScriptEvent(sal_Int32 nIndex, const css::script::ScriptEventDescriptor &aScriptEvent) override
virtual css::uno::Any SAL_CALL getByIndex(sal_Int32 _nIndex) override
virtual void SAL_CALL removeByName(const OUString &Name) override
virtual void SAL_CALL detach(sal_Int32 nIndex, const css::uno::Reference< css::uno::XInterface > &xObject) override
virtual void SAL_CALL revokeScriptEvents(sal_Int32 nIndex) override
void impl_addVbEvents_nolck_nothrow(const sal_Int32 i_nIndex)
virtual css::uno::Sequence< OUString > SAL_CALL getElementNames() override
void implReplaceByIndex(const sal_Int32 _nIndex, const css::uno::Any &_rNewElement, ::osl::ClearableMutexGuard &_rClearBeforeNotify)
replace an element, specified by position
void SAL_CALL writeEvents(const css::uno::Reference< css::io::XObjectOutputStream > &_rxOutStream)
virtual void SAL_CALL insertByIndex(sal_Int32 _nIndex, const css::uno::Any &Element) override
virtual void SAL_CALL insertEntry(sal_Int32 nIndex) override
virtual void SAL_CALL revokeScriptEvent(sal_Int32 nIndex, const OUString &aListenerType, const OUString &aEventMethod, const OUString &aRemoveListenerParam) override
virtual ElementDescription * createElementMetaData()
virtual ~OInterfaceContainer()
virtual void SAL_CALL attach(sal_Int32 nIndex, const css::uno::Reference< css::uno::XInterface > &xObject, const css::uno::Any &aHelper) override
virtual sal_Bool SAL_CALL hasByName(const OUString &aName) override
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
OInterfaceContainer(const css::uno::Reference< css::uno::XComponentContext > &_rxFactory, ::osl::Mutex &_rMutex, const css::uno::Type &_rElementType)
virtual void SAL_CALL disposing()
virtual void SAL_CALL replaceByIndex(sal_Int32 _nIndex, const css::uno::Any &_rElement) override
virtual void SAL_CALL removeByIndex(sal_Int32 _nIndex) override
virtual void SAL_CALL propertyChange(const css::beans::PropertyChangeEvent &evt) override
virtual void SAL_CALL insertByName(const OUString &Name, const css::uno::Any &_rElement) override
virtual void SAL_CALL addContainerListener(const css::uno::Reference< css::container::XContainerListener > &_rxListener) override
virtual sal_Bool SAL_CALL hasElements() override
css::uno::Reference< css::uno::XComponentContext > m_xContext
void impl_createEventAttacher_nothrow()
virtual void SAL_CALL registerScriptEvents(sal_Int32 nIndex, const css::uno::Sequence< css::script::ScriptEventDescriptor > &aScriptEvents) override
void SAL_CALL readEvents(const css::uno::Reference< css::io::XObjectInputStream > &_rxInStream)
void removeElementsNoEvents()
virtual void SAL_CALL replaceByName(const OUString &Name, const css::uno::Any &_rElement) override
virtual css::uno::Sequence< css::script::ScriptEventDescriptor > SAL_CALL getScriptEvents(sal_Int32 Index) override
virtual void SAL_CALL removeScriptListener(const css::uno::Reference< css::script::XScriptListener > &Listener) override
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
void implRemoveByIndex(const sal_Int32 _nIndex, ::osl::ClearableMutexGuard &_rClearBeforeNotify)
removes an element, specified by position
virtual void SAL_CALL write(const css::uno::Reference< css::io::XObjectOutputStream > &OutStream) override
::comphelper::OInterfaceContainerHelper3< css::container::XContainerListener > m_aContainerListeners
virtual void implRemoved(const css::uno::Reference< css::uno::XInterface > &_rxObject)
virtual void SAL_CALL addScriptListener(const css::uno::Reference< css::script::XScriptListener > &xListener) override
virtual void implInserted(const ElementDescription *_pElement)
virtual void SAL_CALL read(const css::uno::Reference< css::io::XObjectInputStream > &InStream) override
virtual void impl_replacedElement(const css::container::ContainerEvent &_rEvent, ::osl::ClearableMutexGuard &_rInstanceLock)
called after an object was replaced.
void clonedFrom(const OInterfaceContainer &_cloneSource)
virtual void SAL_CALL removeEntry(sal_Int32 nIndex) override
css::uno::Reference< css::script::XEventAttacherManager > m_xEventAttacher
virtual sal_Int32 SAL_CALL getCount() override
virtual css::uno::Type SAL_CALL getElementType() override
virtual void SAL_CALL removeContainerListener(const css::uno::Reference< css::container::XContainerListener > &_rxListener) override
#define DBG_ASSERT(sCon, aError)
#define TOOLS_WARN_EXCEPTION(area, stream)
#define DBG_UNHANDLED_EXCEPTION(...)
constexpr OUStringLiteral PROPERTY_NAME
constexpr OUStringLiteral PROPERTY_TAG
#define SAL_WARN(area, stream)
bool hasProperty(const OUString &_rName, const Reference< XPropertySet > &_rxSet)
css::uno::Sequence< typename M::key_type > mapKeysToSequence(M const &map)
OUString loadString(TranslateId aResId)
loads the string with the specified resource id from the FormLayer mo file
ListBox is a bit confusing / different from other form components, so here are a few notes:
static Sequence< ScriptEventDescriptor > lcl_stripVbaEvents(const Sequence< ScriptEventDescriptor > &sEvents)
static bool lcl_hasVbaEvents(const Sequence< ScriptEventDescriptor > &sEvents)
css::uno::Reference< css::frame::XModel > getXModel(const css::uno::Reference< css::uno::XInterface > &_rxComponent)
constexpr std::enable_if_t< std::is_signed_v< T >, std::make_unsigned_t< T > > make_unsigned(T value)
enumrange< T >::Iterator begin(enumrange< T >)
css::uno::Reference< css::linguistic2::XProofreadingIterator > get(css::uno::Reference< css::uno::XComponentContext > const &context)
constexpr OUStringLiteral FRM_COMPONENT_HIDDENCONTROL
css::uno::Reference< css::beans::XPropertySet > xPropertySet
css::uno::Any aElementTypeInterface
css::uno::Reference< css::uno::XInterface > xInterface
css::uno::Reference< css::container::XChild > xChild