diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2015-04-03 16:51:36 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2015-04-09 14:34:02 +0200 |
commit | 879a20e9b915103bf5e6403a0775bd979df78079 (patch) | |
tree | dbfeae45fcddbb815128c53ce077573bc5dcb131 | |
parent | first part for correct handling of new cond format entries (diff) | |
download | core-879a20e9b915103bf5e6403a0775bd979df78079.tar.gz core-879a20e9b915103bf5e6403a0775bd979df78079.zip |
document a few missing pieces
Change-Id: I88a48ada4f9e261e425127bc1b0d3db83f1fabba
-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) { |