diff options
author | offtkp <parisoplop@gmail.com> | 2023-11-01 18:52:35 +0200 |
---|---|---|
committer | Paris Oplopoios <parisoplop@gmail.com> | 2023-11-01 20:17:01 +0100 |
commit | edbc3a09edcf58a4738b4648811a065f3f55bc7c (patch) | |
tree | f795b2a6d553c76026125cf4bf2b4075e0d774a6 /sc | |
parent | c1c1fb5e1d6055459a8b393114ecfbc31f822d45 (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/+/158702
Tested-by: Jenkins
Reviewed-by: Paris Oplopoios <parisoplop@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 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; } |