sc/source/ui/view/gridwin4.cxx | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-)
New commits: commit 1115d4d5ac63394ca0f3f1b75dc81916cdbeebe9 Author: Tünde Tóth <toth.tu...@nisz.hu> AuthorDate: Fri Jul 2 09:51:53 2021 +0200 Commit: László Németh <nem...@numbertext.org> CommitDate: Tue Jul 13 17:32:11 2021 +0200 tdf#143101 sc UI: fix highlight of standard filter with logical OR The autofilter dropdown button didn't indicate that a standard filter in effect, when the criteria connected by a logical OR. Change-Id: I8f802ee3d0d03d654278693f0dcd06d7c3b67ba9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118274 Tested-by: László Németh <nem...@numbertext.org> Reviewed-by: László Németh <nem...@numbertext.org> diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx index f1e53ed61cb8..b17e34c8586c 100644 --- a/sc/source/ui/view/gridwin4.cxx +++ b/sc/source/ui/view/gridwin4.cxx @@ -1922,25 +1922,23 @@ void ScGridWindow::DrawButtons(SCCOL nX1, SCCOL nX2, const ScTableInfo& rTabInfo // pQueryParam can only include MAXQUERY entries - bool bSimpleQuery = true; - bool bColumnFound = false; - if (!pQueryParam->bInplace) - bSimpleQuery = false; - SCSIZE nCount = pQueryParam->GetEntryCount(); - for (nQuery = 0; nQuery < nCount && bSimpleQuery; ++nQuery) - if (pQueryParam->GetEntry(nQuery).bDoQuery) + bool bArrowState = false; + if (pQueryParam->bInplace) + { + SCSIZE nCount = pQueryParam->GetEntryCount(); + for (nQuery = 0; nQuery < nCount; ++nQuery) { // Do no restrict to EQUAL here // (Column head should become blue also when ">1") - - if (pQueryParam->GetEntry(nQuery).nField == nCol) - bColumnFound = true; - if (nQuery > 0) - if (pQueryParam->GetEntry(nQuery).eConnect != SC_AND) - bSimpleQuery = false; + const ScQueryEntry& rEntry = pQueryParam->GetEntry(nQuery); + if (rEntry.bDoQuery && rEntry.nField == nCol) + { + bArrowState = true; + break; + } } + } - bool bArrowState = bSimpleQuery && bColumnFound; tools::Long nSizeX; tools::Long nSizeY; SCCOL nStartCol= nCol; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits