sc/source/core/data/fillinfo.cxx | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-)
New commits: commit edbc3a09edcf58a4738b4648811a065f3f55bc7c Author: offtkp <parisop...@gmail.com> AuthorDate: Wed Nov 1 18:52:35 2023 +0200 Commit: Paris Oplopoios <parisop...@gmail.com> CommitDate: Wed Nov 1 20:17:01 2023 +0100 sc: Don't end handleConditionalFormat early handleConditionalFormat would exit the conditional format searching loop which meant that cells with overlapping conditional formatting rules would not get properly rendered Change-Id: I98664c758cc2c8f844994e6dcecdc57df2213a01 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158702 Tested-by: Jenkins Reviewed-by: Paris Oplopoios <parisop...@gmail.com> diff --git a/sc/source/core/data/fillinfo.cxx b/sc/source/core/data/fillinfo.cxx index 2e268239b048..9a8675fcd190 100644 --- a/sc/source/core/data/fillinfo.cxx +++ b/sc/source/core/data/fillinfo.cxx @@ -287,7 +287,6 @@ bool handleConditionalFormat(ScConditionalFormatList& rCondFormList, const ScCon ScCellInfo* pInfo, ScTableInfo* pTableInfo, ScStyleSheetPool* pStlPool, const ScAddress& rAddr, bool& bHidden, bool& bHideFormula, bool bTabProtect) { - bool bFound = false; bool bAnyCondition = false; for(const auto& rCondFormat : rCondFormats) { @@ -317,33 +316,28 @@ bool handleConditionalFormat(ScConditionalFormatList& rCondFormList, const ScCon bHideFormula = pProtAttr->GetHideFormula(); } - bFound = true; - } // if style is not there, treat like no condition } - if(aData.mxColorScale) + if(aData.mxColorScale && !pInfo->mxColorScale) { pInfo->mxColorScale = aData.mxColorScale; - bFound = true; } - if(aData.pDataBar) + if(aData.pDataBar && !pInfo->pDataBar) { pInfo->pDataBar = aData.pDataBar.get(); pTableInfo->addDataBarInfo(std::move(aData.pDataBar)); - bFound = true; } - if(aData.pIconSet) + if(aData.pIconSet && !pInfo->pIconSet) { pInfo->pIconSet = aData.pIconSet.get(); pTableInfo->addIconSetInfo(std::move(aData.pIconSet)); - bFound = true; } - if (bFound) + if (pInfo->mxColorScale && pInfo->pIconSet && pInfo->pDataBar) break; }