summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;
}