sc/source/ui/condformat/condformatdlgentry.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
New commits: commit 90fbbecb2e80d47106d48c308af5addb3d8db57e Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Mon Sep 14 10:58:13 2020 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Tue Sep 15 09:46:21 2020 +0200 ScIconSetFrmtDataEntry::CreateEntry always dereferences it ScDocument* arg Change-Id: I4adee5f3632d4c9a9846f38828c85e39c1f3218d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102663 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/sc/source/ui/condformat/condformatdlgentry.cxx b/sc/source/ui/condformat/condformatdlgentry.cxx index 1bd243ff235e..5836221cba22 100644 --- a/sc/source/ui/condformat/condformatdlgentry.cxx +++ b/sc/source/ui/condformat/condformatdlgentry.cxx @@ -1323,7 +1323,7 @@ public: mxGrid->set_grid_top_attach(nTop); } - ScColorScaleEntry* CreateEntry(ScDocument* pDoc, const ScAddress& rPos) const; + ScColorScaleEntry* CreateEntry(ScDocument& rDoc, const ScAddress& rPos) const; void SetFirstEntry(); }; @@ -1373,7 +1373,7 @@ ScIconSetFrmtDataEntry::~ScIconSetFrmtDataEntry() mpContainer->move(mxGrid.get(), nullptr); } -ScColorScaleEntry* ScIconSetFrmtDataEntry::CreateEntry(ScDocument* pDoc, const ScAddress& rPos) const +ScColorScaleEntry* ScIconSetFrmtDataEntry::CreateEntry(ScDocument& rDoc, const ScAddress& rPos) const { sal_Int32 nPos = mxLbEntryType->get_active(); OUString aText = mxEdEntry->get_text(); @@ -1381,7 +1381,7 @@ ScColorScaleEntry* ScIconSetFrmtDataEntry::CreateEntry(ScDocument* pDoc, const S sal_uInt32 nIndex = 0; double nVal = 0; - SvNumberFormatter* pNumberFormatter = pDoc->GetFormatTable(); + SvNumberFormatter* pNumberFormatter = rDoc.GetFormatTable(); (void)pNumberFormatter->IsNumberFormat(aText, nIndex, nVal); pEntry->SetValue(nVal); @@ -1398,7 +1398,7 @@ ScColorScaleEntry* ScIconSetFrmtDataEntry::CreateEntry(ScDocument* pDoc, const S break; case 3: pEntry->SetType(COLORSCALE_FORMULA); - pEntry->SetFormula(aText, *pDoc, rPos, pDoc->GetGrammar()); + pEntry->SetFormula(aText, rDoc, rPos, rDoc.GetGrammar()); break; default: assert(false); @@ -1516,7 +1516,7 @@ ScFormatEntry* ScIconSetFrmtEntry::GetEntry() const pData->eIconSetType = static_cast<ScIconSetType>(mxLbIconSetType->get_active()); for(const auto& rxEntry : maEntries) { - pData->m_Entries.emplace_back(rxEntry->CreateEntry(mpDoc, maPos)); + pData->m_Entries.emplace_back(rxEntry->CreateEntry(*mpDoc, maPos)); } pFormat->SetIconSetData(pData); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits