summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@collabora.co.uk>2015-03-30 01:03:37 +0200
committerMarkus Mohrhard <markus.mohrhard@collabora.co.uk>2015-03-30 04:34:30 +0200
commit8b3137c9460aec7873001d5bbdf1b6f29d7646a4 (patch)
tree320b813744efa1bcb12aa98736d6cc61f2e72b86 /sc
parent3dce04a789f076c73f6fbcfadc86903be114020c (diff)
first icon set entry always is minimum
Change-Id: Iddeced617ec6248601a3636a84abab6c1d4bb015
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/unoobj/condformatuno.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/sc/source/ui/unoobj/condformatuno.cxx b/sc/source/ui/unoobj/condformatuno.cxx
index 6bbbe2e2385c..10a2e7869f42 100644
--- a/sc/source/ui/unoobj/condformatuno.cxx
+++ b/sc/source/ui/unoobj/condformatuno.cxx
@@ -1404,6 +1404,10 @@ sal_Int32 ScIconSetEntryObj::getType()
throw(uno::RuntimeException, std::exception)
{
ScColorScaleEntry* pEntry = getCoreObject();
+ // the first entry always is minimum
+ if (mnPos == 0)
+ return sheet::IconSetFormatEntry::ICONSET_MIN;
+
for (size_t i = 0; i < SAL_N_ELEMENTS(aIconSetEntryTypeMap); ++i)
{
if (aIconSetEntryTypeMap[i].eType == pEntry->GetType())
@@ -1418,6 +1422,10 @@ sal_Int32 ScIconSetEntryObj::getType()
void ScIconSetEntryObj::setType(sal_Int32 nType)
throw(uno::RuntimeException, std::exception)
{
+ // first entry is always MIN
+ if (mnPos == 0)
+ return;
+
ScColorScaleEntry* pEntry = getCoreObject();
for (size_t i = 0; i < SAL_N_ELEMENTS(aIconSetEntryTypeMap); ++i)
{