sc/source/ui/docshell/dbdocfun.cxx |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit ee5895488c43954b25b26076ec9241e7c741cffd
Author: Kohei Yoshida <kohei.yosh...@collabora.com>
Date:   Sat Jul 12 21:46:13 2014 -0400

    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/10259
    Reviewed-by: Eike Rathke <er...@redhat.com>
    Tested-by: Eike Rathke <er...@redhat.com>

diff --git a/sc/source/ui/docshell/dbdocfun.cxx 
b/sc/source/ui/docshell/dbdocfun.cxx
index deaf244..8238b9a 100644
--- a/sc/source/ui/docshell/dbdocfun.cxx
+++ b/sc/source/ui/docshell/dbdocfun.cxx
@@ -490,7 +490,9 @@ 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
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to