diff options
author | Vladimir Glazounov <vg@openoffice.org> | 2006-03-14 10:22:55 +0000 |
---|---|---|
committer | Vladimir Glazounov <vg@openoffice.org> | 2006-03-14 10:22:55 +0000 |
commit | 932f8ba410963216dea0f86411cf1ac8420657c5 (patch) | |
tree | ffea90012068fb8843a484a161ae269957b2b265 /extensions/source/propctrlr/formbrowsertools.hxx | |
parent | d312bfc779d7c17d65ace5e0ea3457a5e4b4d697 (diff) |
INTEGRATION: CWS pbrwuno (1.3.158); FILE MERGED
2005/10/31 11:13:06 fs 1.3.158.3: teach the ComposedPropertyUIUpdate to handle missing properties
2005/10/05 06:56:08 fs 1.3.158.2: RESYNC: (1.3-1.4); FILE MERGED
2005/08/09 13:59:58 fs 1.3.158.1: #i53095# phase 1:
- don't use strings to transver values between controls and introspectee, but Anys
- first version of a dedicated property handler for form-component-related properties
(not yet completed)
known regressions over previous phase:
- handlers for events not yet implemented, thus some assertions
- click handlers for form-component-related properties do not yet work,
thus the browse buttons mostly do not work
Diffstat (limited to 'extensions/source/propctrlr/formbrowsertools.hxx')
-rw-r--r-- | extensions/source/propctrlr/formbrowsertools.hxx | 48 |
1 files changed, 42 insertions, 6 deletions
diff --git a/extensions/source/propctrlr/formbrowsertools.hxx b/extensions/source/propctrlr/formbrowsertools.hxx index 5596cd1aa20f..49e2bc0359b4 100644 --- a/extensions/source/propctrlr/formbrowsertools.hxx +++ b/extensions/source/propctrlr/formbrowsertools.hxx @@ -4,9 +4,9 @@ * * $RCSfile: formbrowsertools.hxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: rt $ $Date: 2005-09-08 20:11:49 $ + * last change: $Author: vg $ $Date: 2006-03-14 11:22:55 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -47,6 +47,7 @@ #endif #include <functional> +#include <set> //............................................................................ namespace pcr @@ -55,7 +56,7 @@ namespace pcr ::rtl::OUString GetUIHeadlineName(sal_Int16 _nClassId, const ::com::sun::star::uno::Any& _rUnoObject); - + //======================================================================== struct FindPropertyByHandle : public ::std::unary_function< ::com::sun::star::beans::Property, bool > { private: @@ -69,14 +70,49 @@ namespace pcr } }; - struct LessPropertyByHandle : public ::std::binary_function< ::com::sun::star::beans::Property, ::com::sun::star::beans::Property, bool > + //======================================================================== + struct FindPropertyByName : public ::std::unary_function< ::com::sun::star::beans::Property, bool > + { + private: + ::rtl::OUString m_sName; + + public: + FindPropertyByName( const ::rtl::OUString& _rName ) : m_sName( _rName ) { } + bool operator()( const ::com::sun::star::beans::Property& _rProp ) const + { + return m_sName == _rProp.Name; + } + }; + + //======================================================================== + struct PropertyLessByName + :public ::std::binary_function < ::com::sun::star::beans::Property, + ::com::sun::star::beans::Property, + bool + > + { + bool operator() (::com::sun::star::beans::Property _rLhs, ::com::sun::star::beans::Property _rRhs) const + { + return _rLhs.Name < _rRhs.Name ? true : false; + } + }; + + //======================================================================== + struct TypeLessByName + :public ::std::binary_function < ::com::sun::star::uno::Type, + ::com::sun::star::uno::Type, + bool + > { - bool operator()( const ::com::sun::star::beans::Property& _rLHS, const ::com::sun::star::beans::Property& _rRHS ) const + bool operator() (::com::sun::star::uno::Type _rLhs, ::com::sun::star::uno::Type _rRhs) const { - return _rLHS.Handle < _rRHS.Handle; + return _rLhs.getTypeName() < _rRhs.getTypeName() ? true : false; } }; + //======================================================================== + typedef ::std::set< ::com::sun::star::beans::Property, PropertyLessByName > PropertyBag; + //............................................................................ } // namespace pcr //............................................................................ |