diff options
Diffstat (limited to 'comphelper/source/property/propagg.cxx')
-rw-r--r-- | comphelper/source/property/propagg.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/comphelper/source/property/propagg.cxx b/comphelper/source/property/propagg.cxx index 0d8ea6a10bb9..5a0574460cf4 100644 --- a/comphelper/source/property/propagg.cxx +++ b/comphelper/source/property/propagg.cxx @@ -589,6 +589,9 @@ void SAL_CALL OPropertySetAggregationHelper::setPropertyValues( OPropertySetHelper::setPropertyValues(_rPropertyNames, _rValues); else if (_rPropertyNames.getLength() == 1) // use the more efficient way { + if (_rValues.getLength() != 1) + throw IllegalArgumentException("lengths do not match", static_cast<XPropertySet*>(this), + -1); try { setPropertyValue( _rPropertyNames[0], _rValues[0] ); @@ -631,6 +634,9 @@ void SAL_CALL OPropertySetAggregationHelper::setPropertyValues( // mixed else { + if (_rValues.getLength() != nLen) + throw IllegalArgumentException("lengths do not match", + static_cast<XPropertySet*>(this), -1); const css::uno::Any* pValues = _rValues.getConstArray(); // dividing the Names and _rValues |