diff options
-rw-r--r-- | sc/source/ui/unoobj/condformatuno.cxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sc/source/ui/unoobj/condformatuno.cxx b/sc/source/ui/unoobj/condformatuno.cxx index aba489801259..e69c3e93b780 100644 --- a/sc/source/ui/unoobj/condformatuno.cxx +++ b/sc/source/ui/unoobj/condformatuno.cxx @@ -958,6 +958,10 @@ void SAL_CALL ScColorScaleFormatObj::setPropertyValue( uno::Sequence<uno::Reference<sheet::XColorScaleEntry> > aEntries; if (aValue >>= aEntries) { + if (aEntries.getLength() < 2) + throw lang::IllegalArgumentException(); + + // TODO: we need to make sure that there are enough entries size_t n = size_t(aEntries.getLength()); for (size_t i = 0; i < n; ++i) { @@ -1639,6 +1643,7 @@ void SAL_CALL ScIconSetFormatObj::setPropertyValue( throw lang::IllegalArgumentException(); } + // TODO: we need to make sure that there are enough entries getCoreObject()->GetIconSetData()->eIconSetType = eType; } break; @@ -1647,6 +1652,8 @@ void SAL_CALL ScIconSetFormatObj::setPropertyValue( uno::Sequence<uno::Reference<sheet::XIconSetEntry> > aEntries; if (aValue >>= aEntries) { + // TODO: we need to check that the number of entries + // corresponds to the icon type sal_Int32 nLength = aEntries.getLength(); for (size_t i = 0; i < size_t(nLength); ++i) { |