diff options
author | offtkp <parisoplop@gmail.com> | 2023-11-01 18:52:35 +0200 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2023-11-10 18:35:49 +0100 |
commit | aaeede41ba5cea1a47887de021cf65134bf20508 (patch) | |
tree | 5046c07a8481a274315cec6799a90fef4abf4897 /sc | |
parent | 962659ea0c816957f57d040f8233051d0d1fee54 (diff) |
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/+/158767
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/data/fillinfo.cxx | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/sc/source/core/data/fillinfo.cxx b/sc/source/core/data/fillinfo.cxx index 7c95701e9705..2dc9d5960128 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; } |