sc/source/ui/condformat/condformateasydlg.cxx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)
New commits: commit 5690f62d3226d6a91dfdc79489b74c726870f683 Author: Pranam Lashkari <lpra...@collabora.com> AuthorDate: Tue Oct 29 07:05:55 2024 +0530 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Tue Oct 29 09:26:32 2024 +0100 sc: fixed incorrect conditional format list usage problem: incorrect list was fetched caused problem when edited the condition Change-Id: Idd277074b94bed13327fd1e58f80a5ab7697c7b3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175766 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> diff --git a/sc/source/ui/condformat/condformateasydlg.cxx b/sc/source/ui/condformat/condformateasydlg.cxx index 0ef49f6a0e59..267ead5c5878 100644 --- a/sc/source/ui/condformat/condformateasydlg.cxx +++ b/sc/source/ui/condformat/condformateasydlg.cxx @@ -253,11 +253,11 @@ ConditionalFormatEasyDialog::ConditionalFormatEasyDialog(SfxBindings* pBindings, ScRangeList aRange; mpViewData->GetMarkData().FillRangeListWithMarks(&aRange, false); + ScConditionalFormat* format + = mpDocument->GetCondFormList(mpViewData->GetTabNo())->GetFormat(mnFormatKey); if (aRange.empty() && mnFormatKey != -1 && mnEntryIndex != -1) { - aRange = mpDocument->GetCondFormList(mpViewData->GetTabNo()) - ->GetFormat(mnFormatKey) - ->GetRangeList(); + aRange = format->GetRangeList(); } else if (aRange.empty()) { @@ -273,8 +273,6 @@ ConditionalFormatEasyDialog::ConditionalFormatEasyDialog(SfxBindings* pBindings, aRange.Format(sRangeString, ScRefFlags::VALID, *mpDocument, mpDocument->GetAddressConvention()); mxRangeEntry->SetText(sRangeString); - ScConditionalFormat* format = mpViewData->GetDocument().GetCondFormat( - maPosition.Col(), maPosition.Row(), maPosition.Tab()); OUString sStyleName; if (format) {