[Libreoffice-commits] core.git: sc/source
Michael Meeks
michael.meeks at collabora.com
Tue Dec 22 09:31:57 PST 2015
sc/source/core/data/dpfilteredcache.cxx | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
New commits:
commit cd945a000623838e96b7dd534ca618071c44995d
Author: Michael Meeks <michael.meeks at collabora.com>
Date: Mon Dec 21 14:57:27 2015 +0000
tdf#96588 - avoid redundant pivot cache filter on import.
No need to do a duplicate ~million calls to isRowQualified for trailing
empty data.
Change-Id: Id2840e1b5a9aae825aa67af9b4cedb32c3fcf527
Reviewed-on: https://gerrit.libreoffice.org/20851
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Kohei Yoshida <libreoffice at kohei.us>
diff --git a/sc/source/core/data/dpfilteredcache.cxx b/sc/source/core/data/dpfilteredcache.cxx
index 5714ad2..f9ea8f2 100644
--- a/sc/source/core/data/dpfilteredcache.cxx
+++ b/sc/source/core/data/dpfilteredcache.cxx
@@ -265,15 +265,23 @@ bool ScDPFilteredCache::isRowActive(sal_Int32 nRow, sal_Int32* pLastRow) const
void ScDPFilteredCache::filterByPageDimension(const vector<Criterion>& rCriteria, const std::unordered_set<sal_Int32>& rRepeatIfEmptyDims)
{
SCROW nRowSize = getRowSize();
+ SCROW nDataSize = mrCache.GetDataSize();
maShowByPage.clear();
- for (SCROW nRow = 0; nRow < nRowSize; ++nRow)
+ for (SCROW nRow = 0; nRow < nDataSize; ++nRow)
{
bool bShow = isRowQualified(nRow, rCriteria, rRepeatIfEmptyDims);
maShowByPage.insert_back(nRow, nRow+1, bShow);
}
+ // tdf#96588 - rapidly extend for blank rows with identical data
+ if (nDataSize < nRowSize)
+ {
+ bool bBlankShow = isRowQualified(nDataSize, rCriteria, rRepeatIfEmptyDims);
+ maShowByPage.insert_back(nDataSize, nRowSize, bBlankShow);
+ }
+
maShowByPage.build_tree();
}
More information about the Libreoffice-commits
mailing list