diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-01-10 20:05:56 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-01-11 10:17:11 +0100 |
commit | d4bfbf53341a46fab9324d0399c2518c7a622c21 (patch) | |
tree | 71c0ba48bb27fa93c4ec0b2dbd29662dfb7a5ecf /sc | |
parent | b61385c57efdd8c9e709f5bbcf8c388273c5a714 (diff) |
CreateScAutoFormatDlg always passed a non-null ScViewData*
Change-Id: I0b9568df6fdc571b5fa6cbf75a7473ac588442da
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109066
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/inc/scabstdlg.hxx | 2 | ||||
-rw-r--r-- | sc/source/ui/attrdlg/scdlgfact.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/attrdlg/scdlgfact.hxx | 2 | ||||
-rw-r--r-- | sc/source/ui/inc/autofmt.hxx | 2 | ||||
-rw-r--r-- | sc/source/ui/inc/scuiautofmt.hxx | 2 | ||||
-rw-r--r-- | sc/source/ui/miscdlgs/autofmt.cxx | 6 | ||||
-rw-r--r-- | sc/source/ui/miscdlgs/scuiautofmt.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/view/cellsh3.cxx | 2 |
8 files changed, 12 insertions, 12 deletions
diff --git a/sc/inc/scabstdlg.hxx b/sc/inc/scabstdlg.hxx index 7feb1eaafbac..1dc22aa88fea 100644 --- a/sc/inc/scabstdlg.hxx +++ b/sc/inc/scabstdlg.hxx @@ -410,7 +410,7 @@ public: virtual VclPtr<AbstractScAutoFormatDlg> CreateScAutoFormatDlg(weld::Window* pParent, ScAutoFormat* pAutoFormat, const ScAutoFormatData* pSelFormatData, - ScViewData *pViewData) = 0; + ScViewData& rViewData) = 0; virtual VclPtr<AbstractScColRowLabelDlg> CreateScColRowLabelDlg (weld::Window* pParent, bool bCol, bool bRow) = 0; diff --git a/sc/source/ui/attrdlg/scdlgfact.cxx b/sc/source/ui/attrdlg/scdlgfact.cxx index 43a1e46ba2e9..8eebc78003a4 100644 --- a/sc/source/ui/attrdlg/scdlgfact.cxx +++ b/sc/source/ui/attrdlg/scdlgfact.cxx @@ -974,9 +974,9 @@ VclPtr<AbstractScTextImportOptionsDlg> ScAbstractDialogFactory_Impl::CreateScTex VclPtr<AbstractScAutoFormatDlg> ScAbstractDialogFactory_Impl::CreateScAutoFormatDlg(weld::Window* pParent, ScAutoFormat* pAutoFormat, const ScAutoFormatData* pSelFormatData, - ScViewData *pViewData) + ScViewData& rViewData) { - return VclPtr<AbstractScAutoFormatDlg_Impl>::Create(std::make_unique<ScAutoFormatDlg>(pParent, pAutoFormat, pSelFormatData, pViewData)); + return VclPtr<AbstractScAutoFormatDlg_Impl>::Create(std::make_unique<ScAutoFormatDlg>(pParent, pAutoFormat, pSelFormatData, rViewData)); } VclPtr<AbstractScColRowLabelDlg> ScAbstractDialogFactory_Impl::CreateScColRowLabelDlg(weld::Window* pParent, diff --git a/sc/source/ui/attrdlg/scdlgfact.hxx b/sc/source/ui/attrdlg/scdlgfact.hxx index 0364e904c6eb..6bf001f25919 100644 --- a/sc/source/ui/attrdlg/scdlgfact.hxx +++ b/sc/source/ui/attrdlg/scdlgfact.hxx @@ -685,7 +685,7 @@ public: virtual VclPtr<AbstractScAutoFormatDlg> CreateScAutoFormatDlg(weld::Window* pParent, ScAutoFormat* pAutoFormat, const ScAutoFormatData* pSelFormatData, - ScViewData *pViewData) override; + ScViewData& rViewData) override; virtual VclPtr<AbstractScColRowLabelDlg> CreateScColRowLabelDlg (weld::Window* pParent, bool bCol, bool bRow) override; diff --git a/sc/source/ui/inc/autofmt.hxx b/sc/source/ui/inc/autofmt.hxx index 37de70ac9d3b..8757cef47f53 100644 --- a/sc/source/ui/inc/autofmt.hxx +++ b/sc/source/ui/inc/autofmt.hxx @@ -37,7 +37,7 @@ class SC_DLLPUBLIC ScAutoFmtPreview : public weld::CustomWidgetController { public: ScAutoFmtPreview(); - void DetectRTL(const ScViewData *pViewData); + void DetectRTL(const ScViewData& rViewData); virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override; virtual ~ScAutoFmtPreview() override; diff --git a/sc/source/ui/inc/scuiautofmt.hxx b/sc/source/ui/inc/scuiautofmt.hxx index 24f9f696247a..1695a79b0424 100644 --- a/sc/source/ui/inc/scuiautofmt.hxx +++ b/sc/source/ui/inc/scuiautofmt.hxx @@ -29,7 +29,7 @@ public: ScAutoFormatDlg(weld::Window* pParent, ScAutoFormat* pAutoFormat, const ScAutoFormatData* pSelFormatData, - const ScViewData *pViewData); + const ScViewData& rViewData); virtual ~ScAutoFormatDlg() override; sal_uInt16 GetIndex() const { return nIndex; } diff --git a/sc/source/ui/miscdlgs/autofmt.cxx b/sc/source/ui/miscdlgs/autofmt.cxx index 1dddf426b60e..72bd0ad7f0e4 100644 --- a/sc/source/ui/miscdlgs/autofmt.cxx +++ b/sc/source/ui/miscdlgs/autofmt.cxx @@ -421,10 +421,10 @@ void ScAutoFmtPreview::Init() CalcLineMap(); } -void ScAutoFmtPreview::DetectRTL(const ScViewData *pViewData) +void ScAutoFmtPreview::DetectRTL(const ScViewData& rViewData) { - SCTAB nCurrentTab = pViewData->GetTabNo(); - ScDocument& rDoc = pViewData->GetDocument(); + SCTAB nCurrentTab = rViewData.GetTabNo(); + ScDocument& rDoc = rViewData.GetDocument(); mbRTL = rDoc.IsLayoutRTL(nCurrentTab); xBreakIter = rDoc.GetBreakIterator(); } diff --git a/sc/source/ui/miscdlgs/scuiautofmt.cxx b/sc/source/ui/miscdlgs/scuiautofmt.cxx index 274a819fe15a..53cb8b7094ff 100644 --- a/sc/source/ui/miscdlgs/scuiautofmt.cxx +++ b/sc/source/ui/miscdlgs/scuiautofmt.cxx @@ -37,7 +37,7 @@ ScAutoFormatDlg::ScAutoFormatDlg(weld::Window* pParent, ScAutoFormat* pAutoFormat, const ScAutoFormatData* pSelFormatData, - const ScViewData *pViewData) + const ScViewData& rViewData) : GenericDialogController(pParent, "modules/scalc/ui/autoformattable.ui", "AutoFormatTableDialog") , aStrTitle(ScResId(STR_ADD_AUTOFORMAT_TITLE)) , aStrLabel(ScResId(STR_ADD_AUTOFORMAT_LABEL)) @@ -63,7 +63,7 @@ ScAutoFormatDlg::ScAutoFormatDlg(weld::Window* pParent, , m_xBtnAdjust(m_xBuilder->weld_check_button("autofitcb")) , m_xWndPreview(new weld::CustomWeld(*m_xBuilder, "preview", m_aWndPreview)) { - m_aWndPreview.DetectRTL(pViewData); + m_aWndPreview.DetectRTL(rViewData); const int nWidth = m_xLbFormat->get_approximate_digit_width() * 32; const int nHeight = m_xLbFormat->get_height_rows(8); diff --git a/sc/source/ui/view/cellsh3.cxx b/sc/source/ui/view/cellsh3.cxx index c371d2adf102..b9442a3ce98b 100644 --- a/sc/source/ui/view/cellsh3.cxx +++ b/sc/source/ui/view/cellsh3.cxx @@ -978,7 +978,7 @@ void ScCellShell::Execute( SfxRequest& rReq ) std::unique_ptr<ScAutoFormatData> pNewEntry(pTabViewShell->CreateAutoFormatData()); ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); - ScopedVclPtr<AbstractScAutoFormatDlg> pDlg(pFact->CreateScAutoFormatDlg(pDlgParent, ScGlobal::GetOrCreateAutoFormat(), pNewEntry.get(), &GetViewData())); + ScopedVclPtr<AbstractScAutoFormatDlg> pDlg(pFact->CreateScAutoFormatDlg(pDlgParent, ScGlobal::GetOrCreateAutoFormat(), pNewEntry.get(), GetViewData())); if ( pDlg->Execute() == RET_OK ) { |