sw/inc/gotodlg.hxx | 4 ++-- sw/source/uibase/uiview/view2.cxx | 2 +- sw/source/uibase/utlui/gotodlg.cxx | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-)
New commits: commit fc1c9d7ce98a5405785907d8d18db9354b32b824 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Fri Feb 17 12:40:54 2023 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Fri Feb 17 19:38:53 2023 +0000 use a reference here to flag its never null Change-Id: I92b3c71458b2d65711ea30a3e14b9e387c973a73 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147216 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/sw/inc/gotodlg.hxx b/sw/inc/gotodlg.hxx index 0007bc2788cc..0d10da367f68 100644 --- a/sw/inc/gotodlg.hxx +++ b/sw/inc/gotodlg.hxx @@ -28,7 +28,7 @@ class SwView; class SwGotoPageDlg final : public weld::GenericDialogController { public: - SwGotoPageDlg(weld::Window *parent, SfxBindings* _pBindings); + SwGotoPageDlg(weld::Window *parent, SfxBindings& rBindings); sal_uInt16 GetPageSelection() const { @@ -37,7 +37,7 @@ public: private: SwView *m_pCreateView; - SfxBindings *m_rBindings; + SfxBindings& m_rBindings; sal_uInt16 mnMaxPageCnt; std::unique_ptr<weld::SpinButton> mxMtrPageCtrl; diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx index a4458aaf5b21..fea09391a051 100644 --- a/sw/source/uibase/uiview/view2.cxx +++ b/sw/source/uibase/uiview/view2.cxx @@ -1195,7 +1195,7 @@ void SwView::Execute(SfxRequest &rReq) break; case FN_GOTO_PAGE: { - SwGotoPageDlg aDlg(GetViewFrame().GetFrameWeld(), &GetViewFrame().GetBindings()); + SwGotoPageDlg aDlg(GetViewFrame().GetFrameWeld(), GetViewFrame().GetBindings()); if (aDlg.run() == RET_OK) GetWrtShell().GotoPage(aDlg.GetPageSelection(), true); } diff --git a/sw/source/uibase/utlui/gotodlg.cxx b/sw/source/uibase/utlui/gotodlg.cxx index 666164495f63..711717ee44c1 100644 --- a/sw/source/uibase/utlui/gotodlg.cxx +++ b/sw/source/uibase/utlui/gotodlg.cxx @@ -26,10 +26,10 @@ using namespace com::sun::star; -SwGotoPageDlg::SwGotoPageDlg(weld::Window* pParent, SfxBindings* _pBindings) +SwGotoPageDlg::SwGotoPageDlg(weld::Window* pParent, SfxBindings& rBindings) : GenericDialogController(pParent, "modules/swriter/ui/gotopagedialog.ui", "GotoPageDialog") , m_pCreateView(nullptr) - , m_rBindings(_pBindings) + , m_rBindings(rBindings) , mnMaxPageCnt(1) , mxMtrPageCtrl(m_xBuilder->weld_spin_button("page")) , mxPageNumberLbl(m_xBuilder->weld_label("page_count")) @@ -71,7 +71,7 @@ SwView* SwGotoPageDlg::GetCreateView() const SwView* pView = SwModule::GetFirstView(); while (pView) { - if (&pView->GetViewFrame().GetBindings() == m_rBindings) + if (&pView->GetViewFrame().GetBindings() == &m_rBindings) { const_cast<SwGotoPageDlg*>(this)->m_pCreateView = pView; break;