diff options
author | Tibor Nagy <nagy.tibor2@nisz.hu> | 2023-07-12 17:17:10 +0200 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2023-07-25 10:28:32 +0200 |
commit | ee4bd745be5dee15b68ca483f7f7771957ae3b3e (patch) | |
tree | f3ae9da24cf4cd28ad49a3d8f5efe76307862476 /sc/source/core/data/fillinfo.cxx | |
parent | 8bf6b877c6c4ee53611569a28114e7bbae000479 (diff) |
tdf#155322 sc: fix conditional format color scale in merged cells
Only first cell of a merged range got coloring, now all of them.
See also commit f142b3e84f97ae678bd0a94614e867d369680458
"tdf#131471 sc: fix background color of conditional formatting style".
Change-Id: I0e95bf49369de219e659295643aaf2659dd3de48
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154362
Tested-by: László Németh <nemeth@numbertext.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'sc/source/core/data/fillinfo.cxx')
-rw-r--r-- | sc/source/core/data/fillinfo.cxx | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/sc/source/core/data/fillinfo.cxx b/sc/source/core/data/fillinfo.cxx index 94d79da68031..2e268239b048 100644 --- a/sc/source/core/data/fillinfo.cxx +++ b/sc/source/core/data/fillinfo.cxx @@ -743,6 +743,26 @@ void ScDocument::FillInfo( pInfo->pShadowAttr = pShadowItem; if (pInfo->pShadowAttr != pDefShadow) bAnyShadow = true; + + const ScCondFormatIndexes& rCondFormatIndex + = pStartPattern->GetItem(ATTR_CONDITIONAL).GetCondFormatData(); + + if (pCondFormList && !pStartCond && !rCondFormatIndex.empty()) + { + for (const auto& rItem : rCondFormatIndex) + { + const ScConditionalFormat* pCondForm = pCondFormList->GetFormat(rItem); + if (pCondForm) + { + ScCondFormatData aData = pCondForm->GetData( + pInfo->maCell, ScAddress(nStartX, nStartY, nTab)); + + // Color scale + if (aData.mxColorScale && !pInfo->mxColorScale) + pInfo->mxColorScale = aData.mxColorScale; + } + } + } } } } |