summaryrefslogtreecommitdiff
path: root/forms/source/inc/InterfaceContainer.hxx
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2010-01-29 15:26:37 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2010-01-29 15:26:37 +0000
commitfb9f2b25462585f6c18087b681f0b5d029b01113 (patch)
tree3a0eaf9e40aa247387d666998aaf7411f0225308 /forms/source/inc/InterfaceContainer.hxx
parent51a09373ea2bccf70994cc48449d18fb5a9b7820 (diff)
parent3e2f5ba7b8f50e009ea6e457b97447af2e090a80 (diff)
ab71: merge with DEV300_m54
Diffstat (limited to 'forms/source/inc/InterfaceContainer.hxx')
-rw-r--r--forms/source/inc/InterfaceContainer.hxx50
1 files changed, 34 insertions, 16 deletions
diff --git a/forms/source/inc/InterfaceContainer.hxx b/forms/source/inc/InterfaceContainer.hxx
index 6d7c6d422efe..ec237fc0aa1b 100644
--- a/forms/source/inc/InterfaceContainer.hxx
+++ b/forms/source/inc/InterfaceContainer.hxx
@@ -53,10 +53,11 @@
#include <com/sun/star/container/XIndexContainer.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/form/XFormComponent.hpp>
+#include <com/sun/star/util/XCloneable.hpp>
#include <osl/mutex.hxx>
#include <cppuhelper/interfacecontainer.hxx>
#include <cppuhelper/component.hxx>
-#include <cppuhelper/implbase7.hxx>
+#include <cppuhelper/implbase8.hxx>
using namespace comphelper;
@@ -91,13 +92,15 @@ typedef ::std::hash_multimap< ::rtl::OUString, InterfaceRef, ::comphelper::UStri
// OInterfaceContainer
// implements a container for form components
//==================================================================
-typedef ::cppu::ImplHelper7< ::com::sun::star::container::XNameContainer,
- ::com::sun::star::container::XIndexContainer,
- ::com::sun::star::container::XContainer,
- ::com::sun::star::container::XEnumerationAccess,
- ::com::sun::star::script::XEventAttacherManager,
- ::com::sun::star::beans::XPropertyChangeListener,
- ::com::sun::star::io::XPersistObject > OInterfaceContainer_BASE;
+typedef ::cppu::ImplHelper8 < ::com::sun::star::container::XNameContainer
+ , ::com::sun::star::container::XIndexContainer
+ , ::com::sun::star::container::XContainer
+ , ::com::sun::star::container::XEnumerationAccess
+ , ::com::sun::star::script::XEventAttacherManager
+ , ::com::sun::star::beans::XPropertyChangeListener
+ , ::com::sun::star::io::XPersistObject
+ , ::com::sun::star::util::XCloneable
+ > OInterfaceContainer_BASE;
class OInterfaceContainer : public OInterfaceContainer_BASE
{
@@ -108,7 +111,7 @@ protected:
OInterfaceMap m_aMap;
::cppu::OInterfaceContainerHelper m_aContainerListeners;
- ::com::sun::star::uno::Type m_aElementType;
+ const ::com::sun::star::uno::Type m_aElementType;
::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory> m_xServiceFactory;
@@ -122,6 +125,12 @@ public:
::osl::Mutex& _rMutex,
const ::com::sun::star::uno::Type& _rElementType);
+ OInterfaceContainer( ::osl::Mutex& _rMutex, const OInterfaceContainer& _cloneSource );
+
+ // late constructor for cloning
+ void clonedFrom( const OInterfaceContainer& _cloneSource );
+
+protected:
virtual ~OInterfaceContainer();
public:
@@ -221,11 +230,17 @@ protected:
) throw(::com::sun::star::lang::IllegalArgumentException);
// called after the object is inserted, but before the "real listeners" are notified
- virtual void implInserted( const ElementDescription* /*_pElement*/ ) { }
+ virtual void implInserted( const ElementDescription* _pElement );
// called after the object is removed, but before the "real listeners" are notified
- virtual void implRemoved(const InterfaceRef& /*_rxObject*/) { }
- // called after an object was replaced, but before the "real listeners" are notified
- virtual void implReplaced( const InterfaceRef& /*_rxReplacedObject*/, const ElementDescription* /*_pElement*/ ) { }
+ virtual void implRemoved(const InterfaceRef& _rxObject);
+
+ /** called after an object was replaced. The default implementation notifies our listeners, after releasing
+ the instance lock.
+ */
+ virtual void impl_replacedElement(
+ const ::com::sun::star::container::ContainerEvent& _rEvent,
+ ::osl::ClearableMutexGuard& _rInstanceLock
+ );
void SAL_CALL writeEvents(const ::com::sun::star::uno::Reference< ::com::sun::star::io::XObjectOutputStream>& _rxOutStream);
void SAL_CALL readEvents(const ::com::sun::star::uno::Reference< ::com::sun::star::io::XObjectInputStream>& _rxInStream);
@@ -270,6 +285,8 @@ private:
efVersionSO6x
};
void transformEvents( const EventFormat _eTargetFormat );
+
+ void impl_createEventAttacher_nothrow();
};
//==================================================================
@@ -278,9 +295,9 @@ private:
typedef ::cppu::ImplHelper1< ::com::sun::star::form::XFormComponent> OFormComponents_BASE;
typedef ::cppu::OComponentHelper FormComponentsBase;
// else MSVC kills itself on some statements
-class OFormComponents : public FormComponentsBase,
- public OInterfaceContainer,
- public OFormComponents_BASE
+class OFormComponents :public FormComponentsBase
+ ,public OInterfaceContainer
+ ,public OFormComponents_BASE
{
protected:
::osl::Mutex m_aMutex;
@@ -288,6 +305,7 @@ protected:
public:
OFormComponents(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory);
+ OFormComponents( const OFormComponents& _cloneSource );
virtual ~OFormComponents();
DECLARE_UNO3_AGG_DEFAULTS(OFormComponents, FormComponentsBase);