summaryrefslogtreecommitdiff
path: root/sc/source/ui
diff options
context:
space:
mode:
authorPranam Lashkari <lpranam@collabora.com>2024-10-29 07:05:55 +0530
committerPranam Lashkari <lpranam@collabora.com>2024-11-01 23:21:43 +0100
commitdbf963f8995f3213b9c21b3893aa20c1cc5f0c27 (patch)
tree296d76d8c4ebc2fdf3fc3dfa3f7ededc8751f6f9 /sc/source/ui
parenta9235b93ff7d2751a5cd96f6299a0507aba96713 (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> (cherry picked from commit 5690f62d3226d6a91dfdc79489b74c726870f683) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175911 Reviewed-by: Pranam Lashkari <lpranam@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'sc/source/ui')
-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 eb16cb658d10..fe473ce80b96 100644
--- a/sc/source/ui/condformat/condformateasydlg.cxx
+++ b/sc/source/ui/condformat/condformateasydlg.cxx
@@ -263,11 +263,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())
{
@@ -283,8 +283,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)
{