sc/source/core/data/fillinfo.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 194f5afb0b080df677527d6766b93d3e752cb1f1
Author:     Mike Kaganski <mike.kagan...@collabora.com>
AuthorDate: Tue Mar 12 14:16:14 2024 +0100
Commit:     Miklos Vajna <vmik...@collabora.com>
CommitDate: Wed Mar 13 08:49:19 2024 +0100

    tdf#160117: check bAnyCondition
    
    Commit edbc3a09edcf58a4738b4648811a065f3f55bc7c (sc: Don't end
    handleConditionalFormat early, 2023-11-02) intended to allow to apply
    several different categories of conditions to the same cell: e.g.,
    color scale or databar, in addition to the normal style application
    depending on a condition.
    
    This change fixes a regression, when the found matching condition did
    not stop search for the matching conditions to apply a style.
    
    Change-Id: Ia4cf1dd35a964c6ca523050dc727184ca22a8dfd
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164687
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>
    (cherry picked from commit 61580fcbd10bad2e0aab663d4c8fe43c1e01f92c)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164732
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Miklos Vajna <vmik...@collabora.com>

diff --git a/sc/source/core/data/fillinfo.cxx b/sc/source/core/data/fillinfo.cxx
index 4f643a04dae3..81186147a33e 100644
--- a/sc/source/core/data/fillinfo.cxx
+++ b/sc/source/core/data/fillinfo.cxx
@@ -296,7 +296,7 @@ bool handleConditionalFormat(ScConditionalFormatList& 
rCondFormList, const ScCon
 
         ScCondFormatData aData = pCondForm->GetData(
                 pInfo->maCell, rAddr);
-        if (!aData.aStyleName.isEmpty())
+        if (!bAnyCondition && !aData.aStyleName.isEmpty())
         {
             SfxStyleSheetBase* pStyleSheet =
                 pStlPool->Find( aData.aStyleName, SfxStyleFamily::Para );
@@ -337,7 +337,7 @@ bool handleConditionalFormat(ScConditionalFormatList& 
rCondFormList, const ScCon
             pTableInfo->addIconSetInfo(std::move(aData.pIconSet));
         }
 
-        if (pInfo->mxColorScale && pInfo->pIconSet && pInfo->pDataBar)
+        if (bAnyCondition && pInfo->mxColorScale && pInfo->pIconSet && 
pInfo->pDataBar)
             break;
     }
 

Reply via email to