summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorPranam Lashkari <lpranam@collabora.com>2024-10-29 07:05:55 +0530
committerCaolán McNamara <caolan.mcnamara@collabora.com>2024-10-29 09:26:32 +0100
commit5690f62d3226d6a91dfdc79489b74c726870f683 (patch)
tree34290005c0e9bc3aea95ae9d403967cb3e3989e2 /sc
parent69c6ce6d8c6c6a6f9e3f0ea1319dbdb2190ccaab (diff)
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 <jenkinscollaboraoffice@gmail.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/condformat/condformateasydlg.cxx8
1 files changed, 3 insertions, 5 deletions
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)
{