Kaydet (Commit) cd945a00 authored tarafından Michael Meeks's avatar Michael Meeks Kaydeden (comit) Kohei Yoshida

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/20851Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarKohei Yoshida <libreoffice@kohei.us>
üst 53bf6ef8
...@@ -265,15 +265,23 @@ bool ScDPFilteredCache::isRowActive(sal_Int32 nRow, sal_Int32* pLastRow) const ...@@ -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) void ScDPFilteredCache::filterByPageDimension(const vector<Criterion>& rCriteria, const std::unordered_set<sal_Int32>& rRepeatIfEmptyDims)
{ {
SCROW nRowSize = getRowSize(); SCROW nRowSize = getRowSize();
SCROW nDataSize = mrCache.GetDataSize();
maShowByPage.clear(); maShowByPage.clear();
for (SCROW nRow = 0; nRow < nRowSize; ++nRow) for (SCROW nRow = 0; nRow < nDataSize; ++nRow)
{ {
bool bShow = isRowQualified(nRow, rCriteria, rRepeatIfEmptyDims); bool bShow = isRowQualified(nRow, rCriteria, rRepeatIfEmptyDims);
maShowByPage.insert_back(nRow, nRow+1, bShow); 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(); maShowByPage.build_tree();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment