[Libreoffice-commits] core.git: sc/source
scito
info at scito.ch
Thu Apr 30 05:19:18 PDT 2015
sc/source/ui/view/gridwin.cxx | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
New commits:
commit 00836605a441b8b1d548d8c32f63535f3240ac61
Author: scito <info at scito.ch>
Date: Mon Apr 13 10:33:37 2015 +0200
tdf#63416 Do not sort header in autofilter if user has chosen one in dialog
This patch fixes only a part of the issue. It respects the header if
chosen by the user in the autofilter dialog showing when the first row
contains empty cells or numbers. With minimal effort a lot is fixed
(80-20-rule). With headers, the autofilter sorting works with empty or
number cells in the header row. (The main part of the issue.)
What this patch does not solve: If there is no header row, but only data
rows. If the user's choice in the dialog is no header for the autofilter,
then the first row is sorted too. The autofilter buttons will move
toghether with the first row. The autofilter buttons should stay at the
first row, even if the data of the first row changes.
In conclusion, this patch improves the autofilter sorting code, though it
does not address everything of the issue.
Change-Id: I9cc56577a90586bf8575c9630e5c03871198c04c
Reviewed-on: https://gerrit.libreoffice.org/15277
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 8703ae4..69fd520 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -812,7 +812,6 @@ void ScGridWindow::UpdateAutoFilterFromMenu(AutoFilterMode eMode)
case SortAscending:
case SortDescending:
{
- SCTAB nTab = pViewData->GetTabNo();
SCCOL nCol = rPos.Col();
ScSortParam aSortParam;
pDBData->GetSortParam(aSortParam);
@@ -820,8 +819,7 @@ void ScGridWindow::UpdateAutoFilterFromMenu(AutoFilterMode eMode)
// out of bound
return;
- bool bHasHeader = pDoc->HasColHeader(
- aSortParam.nCol1, aSortParam.nRow1, aSortParam.nCol2, aSortParam.nRow2, nTab);
+ bool bHasHeader = pDBData->HasHeader();
aSortParam.bHasHeader = bHasHeader;
aSortParam.bByRow = true;
More information about the Libreoffice-commits
mailing list