summaryrefslogtreecommitdiff
path: root/comphelper/inc
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2008-06-24 11:15:40 +0000
committerKurt Zenker <kz@openoffice.org>2008-06-24 11:15:40 +0000
commit67e438c4137e4c8d7c21dfcf9d452f7196e5d591 (patch)
treef093c1bbb0286819c0ce6873af38d94e1dd731ea /comphelper/inc
parent93c588d8fbd77d9cf372cc3875d089fe2424b118 (diff)
INTEGRATION: CWS canvas05 (1.8.164); FILE MERGED
2008/04/21 07:56:07 thb 1.8.164.2: RESYNC: (1.8-1.9); FILE MERGED 2007/10/01 13:50:39 thb 1.8.164.1: #i80285# Merge from CWS picom
Diffstat (limited to 'comphelper/inc')
-rw-r--r--comphelper/inc/comphelper/property.hxx40
1 files changed, 39 insertions, 1 deletions
diff --git a/comphelper/inc/comphelper/property.hxx b/comphelper/inc/comphelper/property.hxx
index fe7d649c473a..d1315db48748 100644
--- a/comphelper/inc/comphelper/property.hxx
+++ b/comphelper/inc/comphelper/property.hxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: property.hxx,v $
- * $Revision: 1.9 $
+ * $Revision: 1.10 $
*
* This file is part of OpenOffice.org.
*
@@ -76,6 +76,44 @@ namespace comphelper
}
};
+ //--------------------------------------------------------------------------
+ /** compare two properties by name
+ */
+ struct PropertyStringEqualFunctor : ::std::binary_function< ::com::sun::star::beans::Property, ::rtl::OUString, bool >
+ {
+ // ................................................................
+ inline bool operator()( const ::com::sun::star::beans::Property& lhs, const ::rtl::OUString& rhs ) const
+ {
+ return lhs.Name.compareTo(rhs) == 0;
+ }
+ // ................................................................
+ inline bool operator()( const ::rtl::OUString& lhs, const ::com::sun::star::beans::Property& rhs ) const
+ {
+ return lhs.compareTo(rhs.Name) == 0;
+ }
+ };
+ //--------------------------------------------------------------------------
+ // comparing two property instances
+ struct PropertyEqualByName : public ::std::binary_function< ::com::sun::star::beans::Property, ::com::sun::star::beans::Property, bool >
+ {
+ bool operator() (const ::com::sun::star::beans::Property& x, const ::com::sun::star::beans::Property& y) const
+ {
+ return x.Name.compareTo(y.Name) == 0;
+ }
+ };
+
+//------------------------------------------------------------------
+/** find property with given name
+
+ @param o_rProp
+ Output parameter receiving the property, if found
+
+ @param i_rPropName
+ Name of the property to find
+
+ @return false, if property was not found
+ */
+COMPHELPER_DLLPUBLIC bool findProperty(starbeans::Property& o_rProp, staruno::Sequence<starbeans::Property>& i_seqProps, const ::rtl::OUString& i_rPropName);
//------------------------------------------------------------------
/// remove the property with the given name from the given sequence