diff options
author | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-07-12 21:46:13 -0400 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2014-07-22 11:42:28 +0200 |
commit | 677c9e0fda0937f6d625b9789042c147633b5226 (patch) | |
tree | 176fb2b589cda43e0ef0044d87bf4c5fb084d96c /sc | |
parent | 9a7364955d268ea21b1353a17068627aed91d8c4 (diff) |
fdo#80462: Don't always increment the start row position.
Sometimes someone might attempt to sort only a single row.
Change-Id: Ie29d4cf7ec0bd3a5c945997083368b6ef6074268
(cherry picked from commit 5902dcf0995cdd0a6c1dbd1f9c21b0b2b3f5609f)
Reviewed-on: https://gerrit.libreoffice.org/10260
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/docshell/dbdocfun.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sc/source/ui/docshell/dbdocfun.cxx b/sc/source/ui/docshell/dbdocfun.cxx index dab91f44eacf..900bf3e27fd8 100644 --- a/sc/source/ui/docshell/dbdocfun.cxx +++ b/sc/source/ui/docshell/dbdocfun.cxx @@ -489,7 +489,9 @@ sal_Bool ScDBDocFunc::Sort( SCTAB nTab, const ScSortParam& rSortParam, WaitObject aWait( rDocShell.GetActiveDialogParent() ); - SCROW nStartRow = aLocalParam.nRow1 + (aLocalParam.bHasHeader ? 1 : 0); + SCROW nStartRow = aLocalParam.nRow1; + if (aLocalParam.bByRow && aLocalParam.bHasHeader && nStartRow < aLocalParam.nRow2) + ++nStartRow; // Calculate the script types for all cells in the sort range beforehand. // This will speed up the row height adjustment that takes place after the |