diff options
author | Kohei Yoshida <kohei.yoshida@gmail.com> | 2012-09-14 23:17:23 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@gmail.com> | 2012-09-18 00:40:32 -0400 |
commit | 123206d00227c102a4bee0444acdeb34bcb92802 (patch) | |
tree | ed97ce81d70b9da56e1fd506b5be39e4d93207ab /sc | |
parent | 01e63352677242ca6915cc37601c4f8b0a49881c (diff) |
Reduce indentation by early bailout.
Change-Id: I8cbf348289acb98d30d8e295f296c43655b00a08
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/data/dpcachetable.cxx | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/sc/source/core/data/dpcachetable.cxx b/sc/source/core/data/dpcachetable.cxx index dc7a63a8b637..6afb9c5ca08c 100644 --- a/sc/source/core/data/dpcachetable.cxx +++ b/sc/source/core/data/dpcachetable.cxx @@ -163,37 +163,37 @@ void ScDPCacheTable::fillTable( { maFieldEntries.push_back( vector<SCROW>() ); SCROW nMemCount = getCache()->GetDimMemberCount( nCol ); - if ( nMemCount ) + if (!nMemCount) + continue; + + std::vector<SCROW> aAdded(nMemCount, -1); + + for (SCROW nRow = 0; nRow < nRowCount; ++nRow) { - std::vector<SCROW> aAdded( nMemCount, -1 ); + SCROW nIndex = getCache()->GetItemDataId(nCol, nRow, bRepeatIfEmpty); + SCROW nOrder = getOrder(nCol, nIndex); - for (SCROW nRow = 0; nRow < nRowCount; ++nRow ) + if (nCol == 0) { - SCROW nIndex = getCache()->GetItemDataId( nCol, nRow, bRepeatIfEmpty ); - SCROW nOrder = getOrder( nCol, nIndex ); - - if ( nCol == 0 ) - { - maRowFlags.push_back(RowFlag()); - maRowFlags.back().mbShowByFilter = false; - } + maRowFlags.push_back(RowFlag()); + maRowFlags.back().mbShowByFilter = false; + } - if (!getCache()->ValidQuery(nRow, rQuery)) - continue; + if (!getCache()->ValidQuery(nRow, rQuery)) + continue; - if ( bIgnoreEmptyRows && getCache()->IsRowEmpty( nRow ) ) - continue; + if (bIgnoreEmptyRows && getCache()->IsRowEmpty(nRow)) + continue; - if ( nCol == 0 ) - maRowFlags.back().mbShowByFilter = true; + if (nCol == 0) + maRowFlags.back().mbShowByFilter = true; - aAdded[nOrder] = nIndex; - } - for ( SCROW nRow = 0; nRow < nMemCount; nRow++ ) - { - if ( aAdded[nRow] != -1 ) - maFieldEntries.back().push_back( aAdded[nRow] ); - } + aAdded[nOrder] = nIndex; + } + for (SCROW nRow = 0; nRow < nMemCount; ++nRow) + { + if (aAdded[nRow] != -1) + maFieldEntries.back().push_back(aAdded[nRow]); } } } |