diff options
author | Kohei Yoshida <kohei.yoshida@gmail.com> | 2012-03-15 23:40:12 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@gmail.com> | 2012-03-16 09:36:36 -0400 |
commit | 9776cc1503690e4ccb0dd1d8d6cf6c35d5c8f01d (patch) | |
tree | f675a39200c4ebde8513fbfa7cb4ec6b0e123d3a /sc/source | |
parent | efdb67ca924dc0072c6984a68c9b97db260464b6 (diff) |
Check all this in one place i.e. in ValidQuery().
Diffstat (limited to 'sc/source')
-rw-r--r-- | sc/source/core/data/dpcache.cxx | 4 | ||||
-rw-r--r-- | sc/source/core/data/dpcachetable.cxx | 13 |
2 files changed, 6 insertions, 11 deletions
diff --git a/sc/source/core/data/dpcache.cxx b/sc/source/core/data/dpcache.cxx index 40ca0395b2d3..111170cb9b35 100644 --- a/sc/source/core/data/dpcache.cxx +++ b/sc/source/core/data/dpcache.cxx @@ -471,8 +471,12 @@ bool ScDPCache::InitFromDataBase (const Reference<sdbc::XRowSet>& xRowSet, const bool ScDPCache::ValidQuery( SCROW nRow, const ScQueryParam &rParam) const { + if (!rParam.GetEntryCount()) + return true; + if (!rParam.GetEntry(0).bDoQuery) return true; + bool bMatchWholeCell = mpDoc->GetDocOptions().IsMatchWholeCell(); SCSIZE nEntryCount = rParam.GetEntryCount(); diff --git a/sc/source/core/data/dpcachetable.cxx b/sc/source/core/data/dpcachetable.cxx index c32d079cce1f..4b7338f6d6b4 100644 --- a/sc/source/core/data/dpcachetable.cxx +++ b/sc/source/core/data/dpcachetable.cxx @@ -64,15 +64,6 @@ using ::com::sun::star::uno::UNO_QUERY; using ::com::sun::star::uno::UNO_QUERY_THROW; using ::com::sun::star::sheet::DataPilotFieldFilter; - -static sal_Bool lcl_HasQueryEntry( const ScQueryParam& rParam ) -{ - return rParam.GetEntryCount() > 0 && - rParam.GetEntry(0).bDoQuery; -} - -// ---------------------------------------------------------------------------- - bool ScDPCacheTable::RowFlag::isActive() const { return mbShowByFilter && mbShowByPage; @@ -186,9 +177,9 @@ void ScDPCacheTable::fillTable( maRowFlags.back().mbShowByFilter = false; } - if ( lcl_HasQueryEntry(rQuery) && - !getCache()->ValidQuery(nRow , rQuery) ) + if (!getCache()->ValidQuery(nRow, rQuery)) continue; + if ( bIgnoreEmptyRows && getCache()->IsRowEmpty( nRow ) ) continue; |