summaryrefslogtreecommitdiff
path: root/comphelper
diff options
context:
space:
mode:
authorVladimir Glazounov <vg@openoffice.org>2005-03-23 11:02:16 +0000
committerVladimir Glazounov <vg@openoffice.org>2005-03-23 11:02:16 +0000
commit52265fb5b782b824c02321a107637b1e0e6b9e07 (patch)
tree9d29427f012ea0255a1dcfbb4290843fcc0669f6 /comphelper
parentad23b1b934b4d4735ec4091dc284e8e19cd8c67c (diff)
INTEGRATION: CWS eforms4 (1.2.282); FILE MERGED
2005/03/10 10:30:55 dvo 1.2.282.3: #i10000# add EXPORT to class OStatefulPropertySet 2005/03/08 18:38:32 dvo 1.2.282.2: RESYNC: (1.2-1.3); FILE MERGED 2004/12/28 08:39:19 fs 1.2.282.1: #i39451# +OStatefulPropertySet
Diffstat (limited to 'comphelper')
-rw-r--r--comphelper/inc/comphelper/propstate.hxx84
1 files changed, 59 insertions, 25 deletions
diff --git a/comphelper/inc/comphelper/propstate.hxx b/comphelper/inc/comphelper/propstate.hxx
index 4f855e37d292..d98b3e09c7d8 100644
--- a/comphelper/inc/comphelper/propstate.hxx
+++ b/comphelper/inc/comphelper/propstate.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: propstate.hxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: vg $ $Date: 2005-02-16 16:00:26 $
+ * last change: $Author: vg $ $Date: 2005-03-23 12:02:16 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -76,6 +76,18 @@
#ifndef _CPPUHELPER_PROPTYPEHLP_HXX
#include <cppuhelper/proptypehlp.hxx>
#endif
+#ifndef _CPPUHELPER_WEAK_HXX_
+#include <cppuhelper/weak.hxx>
+#endif
+#ifndef _COMPHELPER_UNO3_HXX_
+#include <comphelper/uno3.hxx>
+#endif
+#ifndef _COMPHELPER_BROADCASTHELPER_HXX_
+#include <comphelper/broadcasthelper.hxx>
+#endif
+#ifndef _COM_SUN_STAR_LANG_XTYPEPROVIDER_HPP_
+#include <com/sun/star/lang/XTypeProvider.hpp>
+#endif
#ifndef INCLUDED_COMPHELPERDLLAPI_H
#include "comphelper/comphelperdllapi.h"
#endif
@@ -89,34 +101,56 @@ namespace comphelper
{
//.........................................................................
-//==================================================================
-//= OPropertyStateHelper
-//==================================================================
-/// helper class for implementing property states
-class COMPHELPER_DLLPUBLIC OPropertyStateHelper :public ::cppu::OPropertySetHelper
- ,public ::com::sun::star::beans::XPropertyState
-{
-public:
- OPropertyStateHelper(::cppu::OBroadcastHelper& rBHelper):OPropertySetHelper(rBHelper) { }
+ //==================================================================
+ //= OPropertyStateHelper
+ //==================================================================
+ /// helper class for implementing property states
+ class COMPHELPER_DLLPUBLIC OPropertyStateHelper :public ::cppu::OPropertySetHelper
+ ,public ::com::sun::star::beans::XPropertyState
+ {
+ public:
+ OPropertyStateHelper(::cppu::OBroadcastHelper& rBHelper):OPropertySetHelper(rBHelper) { }
+
+ virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(const ::com::sun::star::uno::Type& aType) throw(::com::sun::star::uno::RuntimeException);
+
+ // XPropertyState
+ virtual ::com::sun::star::beans::PropertyState SAL_CALL
+ getPropertyState(const ::rtl::OUString& PropertyName) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyState> SAL_CALL
+ getPropertyStates(const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyName) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL
+ setPropertyToDefault(const ::rtl::OUString& PropertyName) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL
+ getPropertyDefault(const ::rtl::OUString& aPropertyName) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(const ::com::sun::star::uno::Type& aType) throw(::com::sun::star::uno::RuntimeException);
+ // access via handle
+ virtual ::com::sun::star::beans::PropertyState getPropertyStateByHandle(sal_Int32 nHandle);
+ virtual void setPropertyToDefaultByHandle(sal_Int32 nHandle);
+ virtual ::com::sun::star::uno::Any getPropertyDefaultByHandle(sal_Int32 nHandle) const;
-// XPropertyState
- virtual ::com::sun::star::beans::PropertyState SAL_CALL getPropertyState(const ::rtl::OUString& PropertyName) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyState> SAL_CALL getPropertyStates(const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyName) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL setPropertyToDefault(const ::rtl::OUString& PropertyName) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Any SAL_CALL getPropertyDefault(const ::rtl::OUString& aPropertyName) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ protected:
+ void firePropertyChange(sal_Int32 nHandle, const ::com::sun::star::uno::Any& aNewValue, const ::com::sun::star::uno::Any& aOldValue);
-// access via handle
- virtual ::com::sun::star::beans::PropertyState getPropertyStateByHandle(sal_Int32 nHandle);
- virtual void setPropertyToDefaultByHandle(sal_Int32 nHandle);
- virtual ::com::sun::star::uno::Any getPropertyDefaultByHandle(sal_Int32 nHandle) const;
+ protected:
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type> SAL_CALL getTypes() throw(::com::sun::star::uno::RuntimeException);
+ };
-protected:
- void firePropertyChange(sal_Int32 nHandle, const ::com::sun::star::uno::Any& aNewValue, const ::com::sun::star::uno::Any& aOldValue);
+ //==================================================================
+ //= OPropertyStateHelper
+ //==================================================================
+ class COMPHELPER_DLLPUBLIC OStatefulPropertySet :public ::cppu::OWeakObject
+ ,public ::com::sun::star::lang::XTypeProvider
+ ,public OMutexAndBroadcastHelper // order matters: before OPropertyStateHelper/OPropertySetHelper
+ ,public OPropertyStateHelper
+ {
+ protected:
+ OStatefulPropertySet();
+ virtual ~OStatefulPropertySet();
- virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type> SAL_CALL getTypes() throw(::com::sun::star::uno::RuntimeException);
-};
+ protected:
+ DECLARE_XINTERFACE();
+ DECLARE_XTYPEPROVIDER();
+ };
//.........................................................................
} // namespace comphelper