[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - sc/source

Tünde Tóth (via logerrit) logerrit at kemper.freedesktop.org
Tue Jul 13 17:17:42 UTC 2021


 sc/source/ui/view/gridwin4.cxx |   26 ++++++++++++--------------
 1 file changed, 12 insertions(+), 14 deletions(-)

New commits:
commit 7f9fde0132b326d5ff3335aae6985e71a8ccaf6d
Author:     Tünde Tóth <toth.tunde at nisz.hu>
AuthorDate: Fri Jul 2 09:51:53 2021 +0200
Commit:     László Németh <nemeth at numbertext.org>
CommitDate: Tue Jul 13 19:17:07 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 <nemeth at numbertext.org>
    Reviewed-by: László Németh <nemeth at numbertext.org>
    (cherry picked from commit 1115d4d5ac63394ca0f3f1b75dc81916cdbeebe9)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118805
    Tested-by: Jenkins

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;


More information about the Libreoffice-commits mailing list