summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2015-04-03 16:51:36 +0200
committerJan Holesovsky <kendy@collabora.com>2015-04-09 14:34:02 +0200
commit879a20e9b915103bf5e6403a0775bd979df78079 (patch)
treedbfeae45fcddbb815128c53ce077573bc5dcb131
parentfirst part for correct handling of new cond format entries (diff)
downloadcore-879a20e9b915103bf5e6403a0775bd979df78079.tar.gz
core-879a20e9b915103bf5e6403a0775bd979df78079.zip
document a few missing pieces
Change-Id: I88a48ada4f9e261e425127bc1b0d3db83f1fabba
-rw-r--r--sc/source/ui/unoobj/condformatuno.cxx7
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)
{