Kaydet (Commit) e4390585 authored tarafından Eike Rathke's avatar Eike Rathke

sc-perf: avoid second call to ScAttrArray::Search(), tdf#87101 related

In that scenario, of 36791233 calls only 9217 were necessary as most times
nRow2 equals nRow1.

Change-Id: I14228d065175addee76b9142c98110efe59701e7
üst a995e219
......@@ -1199,7 +1199,10 @@ bool ScAttrArray::HasAttrib( SCROW nRow1, SCROW nRow2, HasAttrFlags nMask ) cons
SCSIZE nStartIndex;
SCSIZE nEndIndex;
Search( nRow1, nStartIndex );
Search( nRow2, nEndIndex );
if (nRow1 != nRow2)
Search( nRow2, nEndIndex );
else
nEndIndex = nStartIndex;
bool bFound = false;
for (SCSIZE i=nStartIndex; i<=nEndIndex && !bFound; i++)
......
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