summaryrefslogtreecommitdiff
path: root/sc/source
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2020-09-24 21:16:05 +0200
committerXisco Fauli <xiscofauli@libreoffice.org>2020-09-25 13:14:33 +0200
commitfbcb6add21b889e20f67a7ef6e4e3c32ac1261d3 (patch)
treea9325af1a6d86426f5629de1fc5043d39a41f718 /sc/source
parent7b0746a2760b62c504236d8ff44d6e150c59abe9 (diff)
tdf#134351: do not apply autofilter if all entries are selected
Change-Id: I33cdfe07cc53b579bbe16486f302daf7bd3da841 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103352 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sc/source')
-rw-r--r--sc/source/ui/view/gridwin.cxx19
1 files changed, 12 insertions, 7 deletions
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index bb8cef1279f1..f6edb66554de 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -876,13 +876,18 @@ void ScGridWindow::UpdateAutoFilterFromMenu(AutoFilterMode eMode)
if (aResult == aSaveAutoFilterResult)
{
SAL_INFO("sc.ui", "Apply autofilter to data when entries are the same");
- // Apply autofilter to data
- ScQueryEntry* pEntry = aParam.FindEntryByField(rPos.Col(), true);
- pEntry->bDoQuery = true;
- pEntry->nField = rPos.Col();
- pEntry->eConnect = SC_AND;
- pEntry->eOp = SC_EQUAL;
- pViewData->GetView()->Query(aParam, nullptr, true);
+
+ if (!rControl.isAllSelected())
+ {
+ // Apply autofilter to data
+ ScQueryEntry* pEntry = aParam.FindEntryByField(rPos.Col(), true);
+ pEntry->bDoQuery = true;
+ pEntry->nField = rPos.Col();
+ pEntry->eConnect = SC_AND;
+ pEntry->eOp = SC_EQUAL;
+ pViewData->GetView()->Query(aParam, nullptr, true);
+ }
+
return;
}
}