sc/inc/scabstdlg.hxx | 2 +- sc/source/ui/attrdlg/scdlgfact.cxx | 4 ++-- sc/source/ui/attrdlg/scdlgfact.hxx | 2 +- sc/source/ui/inc/autofmt.hxx | 2 +- sc/source/ui/inc/scuiautofmt.hxx | 2 +- sc/source/ui/miscdlgs/autofmt.cxx | 6 +++--- sc/source/ui/miscdlgs/scuiautofmt.cxx | 4 ++-- sc/source/ui/view/cellsh3.cxx | 2 +- 8 files changed, 12 insertions(+), 12 deletions(-)
New commits: commit d4bfbf53341a46fab9324d0399c2518c7a622c21 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Sun Jan 10 20:05:56 2021 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Mon Jan 11 10:17:11 2021 +0100 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 <caol...@redhat.com> 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 ) { _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits