summaryrefslogtreecommitdiff
path: root/comphelper/source
diff options
context:
space:
mode:
authorIvo Hinkelmann <ihi@openoffice.org>2007-04-16 15:58:57 +0000
committerIvo Hinkelmann <ihi@openoffice.org>2007-04-16 15:58:57 +0000
commit7bf9480cdda6510297ea5b60e35957ee43440e25 (patch)
tree26397dd823e3b1f26798829d22ae6f8cc4ee1745 /comphelper/source
parentd061807d0ebe5f7d2db0db8ecdb8de68070847ee (diff)
INTEGRATION: CWS fwkdbdesign01 (1.5.44); FILE MERGED
2007/03/07 08:47:32 as 1.5.44.1: #i45663# new helper method to match two sets of properties
Diffstat (limited to 'comphelper/source')
-rw-r--r--comphelper/source/misc/sequenceashashmap.cxx29
1 files changed, 27 insertions, 2 deletions
diff --git a/comphelper/source/misc/sequenceashashmap.cxx b/comphelper/source/misc/sequenceashashmap.cxx
index 42f39d2589ec..0900945908d9 100644
--- a/comphelper/source/misc/sequenceashashmap.cxx
+++ b/comphelper/source/misc/sequenceashashmap.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: sequenceashashmap.cxx,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: obo $ $Date: 2006-09-17 17:14:29 $
+ * last change: $Author: ihi $ $Date: 2007-04-16 16:58:57 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -262,6 +262,31 @@ const css::uno::Sequence< css::beans::PropertyValue > SequenceAsHashMap::getAsCo
}
/*-----------------------------------------------
+ 07.03.2007 12:45
+-----------------------------------------------*/
+sal_Bool SequenceAsHashMap::match(const SequenceAsHashMap& rCheck) const
+{
+ const_iterator pCheck;
+ for ( pCheck = rCheck.begin();
+ pCheck != rCheck.end() ;
+ ++pCheck )
+ {
+ const ::rtl::OUString& sCheckName = pCheck->first;
+ const css::uno::Any& aCheckValue = pCheck->second;
+ const_iterator pFound = find(sCheckName);
+
+ if (pFound == end())
+ return sal_False;
+
+ const css::uno::Any& aFoundValue = pFound->second;
+ if (aFoundValue != aCheckValue)
+ return sal_False;
+ }
+
+ return sal_True;
+}
+
+/*-----------------------------------------------
04.11.2003 08:30
-----------------------------------------------*/
#if OSL_DEBUG_LEVEL > 1