summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-12-17 23:53:38 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-12-17 23:57:24 +0100
commitf3df19b23d80a23e8f42cf766499b1a23ecfe923 (patch)
treec2715b0268491428cf5ebcb170e456bdcca842d0 /sc
parent92a8be9fb4877d43e099c99d067bd3f06397d212 (diff)
first check that the number of cells has not been reached yet, fdo#58346
Change-Id: I0fea5719f524584acdbbc560c47b3c427c174845
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/data/conditio.cxx16
1 files changed, 8 insertions, 8 deletions
diff --git a/sc/source/core/data/conditio.cxx b/sc/source/core/data/conditio.cxx
index 2b4fa0c49c56..2b58f333b196 100644
--- a/sc/source/core/data/conditio.cxx
+++ b/sc/source/core/data/conditio.cxx
@@ -865,10 +865,10 @@ bool ScConditionEntry::IsTopNElement( double nArg ) const
for(ScConditionEntryCache::ValueCacheType::const_reverse_iterator itr = mpCache->maValues.rbegin(),
itrEnd = mpCache->maValues.rend(); itr != itrEnd; ++itr)
{
- if(itr->first <= nArg)
- return true;
if(nCells >= nVal1)
return false;
+ if(itr->first <= nArg)
+ return true;
nCells += itr->second;
}
@@ -886,10 +886,10 @@ bool ScConditionEntry::IsBottomNElement( double nArg ) const
for(ScConditionEntryCache::ValueCacheType::const_iterator itr = mpCache->maValues.begin(),
itrEnd = mpCache->maValues.end(); itr != itrEnd; ++itr)
{
- if(itr->first >= nArg)
- return true;
if(nCells >= nVal1)
return false;
+ if(itr->first >= nArg)
+ return true;
nCells += itr->second;
}
@@ -905,10 +905,10 @@ bool ScConditionEntry::IsTopNPercent( double nArg ) const
for(ScConditionEntryCache::ValueCacheType::const_reverse_iterator itr = mpCache->maValues.rbegin(),
itrEnd = mpCache->maValues.rend(); itr != itrEnd; ++itr)
{
- if(itr->first <= nArg)
- return true;
if(nCells >= nLimitCells)
return false;
+ if(itr->first <= nArg)
+ return true;
nCells += itr->second;
}
@@ -924,10 +924,10 @@ bool ScConditionEntry::IsBottomNPercent( double nArg ) const
for(ScConditionEntryCache::ValueCacheType::const_iterator itr = mpCache->maValues.begin(),
itrEnd = mpCache->maValues.end(); itr != itrEnd; ++itr)
{
- if(itr->first >= nArg)
- return true;
if(nCells >= nLimitCells)
return false;
+ if(itr->first >= nArg)
+ return true;
nCells += itr->second;
}