summaryrefslogtreecommitdiff
path: root/comphelper/source/property/propagg.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'comphelper/source/property/propagg.cxx')
-rw-r--r--comphelper/source/property/propagg.cxx21
1 files changed, 19 insertions, 2 deletions
diff --git a/comphelper/source/property/propagg.cxx b/comphelper/source/property/propagg.cxx
index 75ae26f8438e..adc4f0a3c6fc 100644
--- a/comphelper/source/property/propagg.cxx
+++ b/comphelper/source/property/propagg.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: propagg.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: fs $ $Date: 2000-11-03 15:14:10 $
+ * last change: $Author: fs $ $Date: 2000-12-07 09:19:05 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -234,6 +234,23 @@ sal_Int32 OPropertyArrayAggregationHelper::fillHandles(
const ::rtl::OUString* pReqProps = _rPropNames.getConstArray();
sal_Int32 nReqLen = _rPropNames.getLength();
+#ifdef _DEBUG
+ // assure that the sequence is sorted
+ {
+ const ::rtl::OUString* pLookup = _rPropNames.getConstArray();
+ const ::rtl::OUString* pEnd = _rPropNames.getConstArray() + _rPropNames.getLength() - 1;
+ for (; pLookup < pEnd; ++pLookup)
+ {
+ const ::rtl::OUString* pCompare = pLookup + 1;
+ const ::rtl::OUString* pCompareEnd = pEnd + 1;
+ for (; pCompare < pCompareEnd; ++pCompare)
+ {
+ OSL_ENSURE(pLookup->compareTo(*pCompare) < 0, "OPropertyArrayAggregationHelper::fillHandles : property names are not sorted!");
+ }
+ }
+ }
+#endif
+
const ::com::sun::star::beans::Property* pCur = m_aProperties.getConstArray();
const ::com::sun::star::beans::Property* pEnd = m_aProperties.getConstArray() + m_aProperties.getLength();