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

trim also empty leading column ranges, fdo#81501 follow-up

Change-Id: Ieaeea85149e4b6d263b112205bb17c155e2d12be
üst 1e4235f8
......@@ -1541,7 +1541,10 @@ void ScTable::Sort(
pUndo->mbUpdateRefs = bUpdateRefs;
}
while (aSortParam.nCol2 > aSortParam.nCol1 && aCol[aSortParam.nCol2].IsEmptyBlock(aSortParam.nRow1, aSortParam.nRow2))
// Trim empty leading and trailing column ranges.
while (aSortParam.nCol1 < aSortParam.nCol2 && aCol[aSortParam.nCol1].IsEmptyBlock(aSortParam.nRow1, aSortParam.nRow2))
++aSortParam.nCol1;
while (aSortParam.nCol1 < aSortParam.nCol2 && aCol[aSortParam.nCol2].IsEmptyBlock(aSortParam.nRow1, aSortParam.nRow2))
--aSortParam.nCol2;
if (rSortParam.bByRow)
......
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