diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-01-10 20:08:14 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-01-11 11:53:45 +0100 |
commit | 3e8574c959492b9d3b0129ba090be8c597cd2f13 (patch) | |
tree | c52e607d3333131fca63fea591962df1a56cf94e /sc | |
parent | 003b45624788610fba98e3f3334f99140017e472 (diff) |
MakeNumberInfoItem always passed a non-null ScViewData*
Change-Id: Ibf6c837f841749b7fb25fd448c954105ef78beeb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109067
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/qa/unit/screenshots/screenshots.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/inc/tabvwsh.hxx | 2 | ||||
-rw-r--r-- | sc/source/ui/view/formatsh.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/view/tabvwsh5.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/view/tabvwsha.cxx | 2 |
5 files changed, 6 insertions, 6 deletions
diff --git a/sc/qa/unit/screenshots/screenshots.cxx b/sc/qa/unit/screenshots/screenshots.cxx index 488b14e82c86..2286e0a86955 100644 --- a/sc/qa/unit/screenshots/screenshots.cxx +++ b/sc/qa/unit/screenshots/screenshots.cxx @@ -244,7 +244,7 @@ VclPtr<VclAbstractDialog> ScScreenshotTest::createDialogByID(sal_uInt32 nID) mpItemSet->Put(SfxUInt32Item(ATTR_VALUE_FORMAT, pAttr->GetNumberFormat( rDoc.GetFormatTable() ) ) ); - pNumberInfoItem = ScTabViewShell::MakeNumberInfoItem(rDoc, &rViewData); + pNumberInfoItem = ScTabViewShell::MakeNumberInfoItem(rDoc, rViewData); mpItemSet->MergeRange(SID_ATTR_NUMBERFORMAT_INFO, SID_ATTR_NUMBERFORMAT_INFO); mpItemSet->Put(*pNumberInfoItem); diff --git a/sc/source/ui/inc/tabvwsh.hxx b/sc/source/ui/inc/tabvwsh.hxx index 2500a8fabf9f..b5d6306e937e 100644 --- a/sc/source/ui/inc/tabvwsh.hxx +++ b/sc/source/ui/inc/tabvwsh.hxx @@ -347,7 +347,7 @@ public: void ForceMove() { Move(); } - static std::unique_ptr<SvxNumberInfoItem> MakeNumberInfoItem( ScDocument& rDoc, const ScViewData* pViewData ); + static std::unique_ptr<SvxNumberInfoItem> MakeNumberInfoItem( ScDocument& rDoc, const ScViewData& rViewData ); static void UpdateNumberFormatter( const SvxNumberInfoItem& rInfoItem ); diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx index 9ac8862d36af..9b38ac794412 100644 --- a/sc/source/ui/view/formatsh.cxx +++ b/sc/source/ui/view/formatsh.cxx @@ -817,7 +817,7 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq ) } std::unique_ptr<SvxNumberInfoItem> pNumberInfoItem( - ScTabViewShell::MakeNumberInfoItem(rDoc, &GetViewData())); + ScTabViewShell::MakeNumberInfoItem(rDoc, GetViewData())); pDocSh->PutItem( *pNumberInfoItem ); bPage = false; diff --git a/sc/source/ui/view/tabvwsh5.cxx b/sc/source/ui/view/tabvwsh5.cxx index e8a4c857ecc7..948cfd5d5328 100644 --- a/sc/source/ui/view/tabvwsh5.cxx +++ b/sc/source/ui/view/tabvwsh5.cxx @@ -310,7 +310,7 @@ void ScTabViewShell::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) SfxViewShell::Notify( rBC, rHint ); } -std::unique_ptr<SvxNumberInfoItem> ScTabViewShell::MakeNumberInfoItem( ScDocument& rDoc, const ScViewData* pViewData ) +std::unique_ptr<SvxNumberInfoItem> ScTabViewShell::MakeNumberInfoItem( ScDocument& rDoc, const ScViewData& rViewData ) { // construct NumberInfo item @@ -319,7 +319,7 @@ std::unique_ptr<SvxNumberInfoItem> ScTabViewShell::MakeNumberInfoItem( ScDocumen double nCellValue = 0; OUString aCellString; - ScRefCellValue aCell(rDoc, pViewData->GetCurPos()); + ScRefCellValue aCell(rDoc, rViewData.GetCurPos()); switch (aCell.meType) { diff --git a/sc/source/ui/view/tabvwsha.cxx b/sc/source/ui/view/tabvwsha.cxx index 500104e58d02..95eb9160f772 100644 --- a/sc/source/ui/view/tabvwsha.cxx +++ b/sc/source/ui/view/tabvwsha.cxx @@ -562,7 +562,7 @@ void ScTabViewShell::ExecuteCellFormatDlg(SfxRequest& rReq, const OString &rName pOldSet->Put( SfxUInt32Item( ATTR_VALUE_FORMAT, pOldAttrs->GetNumberFormat( rDoc.GetFormatTable() ) ) ); - pNumberInfoItem = MakeNumberInfoItem(rDoc, &GetViewData()); + pNumberInfoItem = MakeNumberInfoItem(rDoc, GetViewData()); pOldSet->MergeRange( SID_ATTR_NUMBERFORMAT_INFO, SID_ATTR_NUMBERFORMAT_INFO ); pOldSet->Put(*pNumberInfoItem ); |