diff options
author | Caolán McNamara <caolanm@redhat.com> | 2023-02-15 19:52:01 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2023-02-16 09:24:57 +0000 |
commit | dc214bcff335024f21c208e239cc36232d611145 (patch) | |
tree | 3bc0fe3cdb032a0f195469da70a75ddb444704a8 /sd | |
parent | 2f0b16a6a9bfff1646b14412e5918b6d483b9cdc (diff) |
SfxViewShell never takes a null SfxViewFrame*
Change-Id: I36f3a5c77a7fb2d3cf267184e403e6cd24dbd70b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147112
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/inc/GraphicViewShellBase.hxx | 2 | ||||
-rw-r--r-- | sd/source/ui/inc/ImpressViewShellBase.hxx | 2 | ||||
-rw-r--r-- | sd/source/ui/inc/OutlineViewShellBase.hxx | 2 | ||||
-rw-r--r-- | sd/source/ui/inc/PresentationViewShellBase.hxx | 2 | ||||
-rw-r--r-- | sd/source/ui/inc/SlideSorterViewShellBase.hxx | 2 | ||||
-rw-r--r-- | sd/source/ui/inc/ViewShellBase.hxx | 2 | ||||
-rw-r--r-- | sd/source/ui/view/GraphicViewShellBase.cxx | 8 | ||||
-rw-r--r-- | sd/source/ui/view/ImpressViewShellBase.cxx | 8 | ||||
-rw-r--r-- | sd/source/ui/view/OutlineViewShellBase.cxx | 8 | ||||
-rw-r--r-- | sd/source/ui/view/PresentationViewShellBase.cxx | 10 | ||||
-rw-r--r-- | sd/source/ui/view/SlideSorterViewShellBase.cxx | 8 | ||||
-rw-r--r-- | sd/source/ui/view/ViewShellBase.cxx | 10 |
12 files changed, 32 insertions, 32 deletions
diff --git a/sd/source/ui/inc/GraphicViewShellBase.hxx b/sd/source/ui/inc/GraphicViewShellBase.hxx index 89a96cf51887..ffec962fc844 100644 --- a/sd/source/ui/inc/GraphicViewShellBase.hxx +++ b/sd/source/ui/inc/GraphicViewShellBase.hxx @@ -34,7 +34,7 @@ public: /** This constructor is used by the view factory of the SFX macros. */ - GraphicViewShellBase(SfxViewFrame* pFrame, SfxViewShell* pOldShell); + GraphicViewShellBase(SfxViewFrame& rFrame, SfxViewShell* pOldShell); virtual ~GraphicViewShellBase() override; /** Callback function for general slot calls. diff --git a/sd/source/ui/inc/ImpressViewShellBase.hxx b/sd/source/ui/inc/ImpressViewShellBase.hxx index 80070e7c8022..402013fa7ff9 100644 --- a/sd/source/ui/inc/ImpressViewShellBase.hxx +++ b/sd/source/ui/inc/ImpressViewShellBase.hxx @@ -34,7 +34,7 @@ public: /** This constructor is used by the view factory of the SFX macros. */ - ImpressViewShellBase(SfxViewFrame* pFrame, SfxViewShell* pOldShell); + ImpressViewShellBase(SfxViewFrame& rFrame, SfxViewShell* pOldShell); virtual ~ImpressViewShellBase() override; /** Callback function for general slot calls. diff --git a/sd/source/ui/inc/OutlineViewShellBase.hxx b/sd/source/ui/inc/OutlineViewShellBase.hxx index 13527d80dc7d..96458bba1b87 100644 --- a/sd/source/ui/inc/OutlineViewShellBase.hxx +++ b/sd/source/ui/inc/OutlineViewShellBase.hxx @@ -34,7 +34,7 @@ public: /** This constructor is used by the view factory of the SFX macros. */ - OutlineViewShellBase(SfxViewFrame* pFrame, SfxViewShell* pOldShell); + OutlineViewShellBase(SfxViewFrame& rFrame, SfxViewShell* pOldShell); virtual ~OutlineViewShellBase() override; }; diff --git a/sd/source/ui/inc/PresentationViewShellBase.hxx b/sd/source/ui/inc/PresentationViewShellBase.hxx index 684e5ee6166e..d8779c4a5029 100644 --- a/sd/source/ui/inc/PresentationViewShellBase.hxx +++ b/sd/source/ui/inc/PresentationViewShellBase.hxx @@ -34,7 +34,7 @@ public: /** This constructor is used by the view factory of the SFX macros. */ - PresentationViewShellBase(SfxViewFrame* pFrame, SfxViewShell* pOldShell); + PresentationViewShellBase(SfxViewFrame& rFrame, SfxViewShell* pOldShell); virtual ~PresentationViewShellBase() override; protected: diff --git a/sd/source/ui/inc/SlideSorterViewShellBase.hxx b/sd/source/ui/inc/SlideSorterViewShellBase.hxx index e1ca1b57b9d2..38bf64919881 100644 --- a/sd/source/ui/inc/SlideSorterViewShellBase.hxx +++ b/sd/source/ui/inc/SlideSorterViewShellBase.hxx @@ -34,7 +34,7 @@ public: /** This constructor is used by the view factory of the SFX macros. */ - SlideSorterViewShellBase(SfxViewFrame* pFrame, SfxViewShell* pOldShell); + SlideSorterViewShellBase(SfxViewFrame& rFrame, SfxViewShell* pOldShell); virtual ~SlideSorterViewShellBase() override; }; diff --git a/sd/source/ui/inc/ViewShellBase.hxx b/sd/source/ui/inc/ViewShellBase.hxx index 06b46514a487..ed80658d096c 100644 --- a/sd/source/ui/inc/ViewShellBase.hxx +++ b/sd/source/ui/inc/ViewShellBase.hxx @@ -67,7 +67,7 @@ public: terminates and before doing anything else. */ ViewShellBase ( - SfxViewFrame *pFrame, + SfxViewFrame& rFrame, SfxViewShell* pOldShell); virtual ~ViewShellBase() override; diff --git a/sd/source/ui/view/GraphicViewShellBase.cxx b/sd/source/ui/view/GraphicViewShellBase.cxx index 98706271ebf9..a3f8ece26c11 100644 --- a/sd/source/ui/view/GraphicViewShellBase.cxx +++ b/sd/source/ui/view/GraphicViewShellBase.cxx @@ -35,9 +35,9 @@ namespace sd // new GraphicViewShellBase object has been constructed. SfxViewFactory* GraphicViewShellBase::s_pFactory; -SfxViewShell* GraphicViewShellBase::CreateInstance(SfxViewFrame* pFrame, SfxViewShell* pOldView) +SfxViewShell* GraphicViewShellBase::CreateInstance(SfxViewFrame& rFrame, SfxViewShell* pOldView) { - GraphicViewShellBase* pBase = new GraphicViewShellBase(pFrame, pOldView); + GraphicViewShellBase* pBase = new GraphicViewShellBase(rFrame, pOldView); pBase->LateInit(framework::FrameworkHelper::msDrawViewURL); return pBase; } @@ -48,8 +48,8 @@ void GraphicViewShellBase::RegisterFactory(SfxInterfaceId nPrio) } void GraphicViewShellBase::InitFactory() { SFX_VIEW_REGISTRATION(GraphicDocShell); } -GraphicViewShellBase::GraphicViewShellBase(SfxViewFrame* _pFrame, SfxViewShell* pOldShell) - : ViewShellBase(_pFrame, pOldShell) +GraphicViewShellBase::GraphicViewShellBase(SfxViewFrame& _rFrame, SfxViewShell* pOldShell) + : ViewShellBase(_rFrame, pOldShell) { } diff --git a/sd/source/ui/view/ImpressViewShellBase.cxx b/sd/source/ui/view/ImpressViewShellBase.cxx index c28a00e7989d..929b607dbbdd 100644 --- a/sd/source/ui/view/ImpressViewShellBase.cxx +++ b/sd/source/ui/view/ImpressViewShellBase.cxx @@ -39,9 +39,9 @@ namespace sd { SfxViewFactory* ImpressViewShellBase::s_pFactory; SfxViewShell* ImpressViewShellBase::CreateInstance ( - SfxViewFrame *pFrame, SfxViewShell *pOldView) + SfxViewFrame& rFrame, SfxViewShell *pOldView) { - ImpressViewShellBase* pBase = new ImpressViewShellBase(pFrame, pOldView); + ImpressViewShellBase* pBase = new ImpressViewShellBase(rFrame, pOldView); pBase->LateInit(comphelper::LibreOfficeKit::isActive() ? framework::FrameworkHelper::msImpressViewURL : ""); return pBase; } @@ -56,9 +56,9 @@ void ImpressViewShellBase::InitFactory() } ImpressViewShellBase::ImpressViewShellBase ( - SfxViewFrame* _pFrame, + SfxViewFrame& _rFrame, SfxViewShell* pOldShell) - : ViewShellBase (_pFrame, pOldShell) + : ViewShellBase (_rFrame, pOldShell) { MasterPageObserver::Instance().RegisterDocument (*GetDocShell()->GetDoc()); } diff --git a/sd/source/ui/view/OutlineViewShellBase.cxx b/sd/source/ui/view/OutlineViewShellBase.cxx index 8da1bcbcae08..e3efb3ed59d5 100644 --- a/sd/source/ui/view/OutlineViewShellBase.cxx +++ b/sd/source/ui/view/OutlineViewShellBase.cxx @@ -34,9 +34,9 @@ class DrawDocShell; SfxViewFactory* OutlineViewShellBase::s_pFactory; SfxViewShell* OutlineViewShellBase::CreateInstance ( - SfxViewFrame *pFrame, SfxViewShell *pOldView) + SfxViewFrame& rFrame, SfxViewShell *pOldView) { - OutlineViewShellBase* pBase = new OutlineViewShellBase(pFrame, pOldView); + OutlineViewShellBase* pBase = new OutlineViewShellBase(rFrame, pOldView); pBase->LateInit(framework::FrameworkHelper::msOutlineViewURL); return pBase; } @@ -51,9 +51,9 @@ void OutlineViewShellBase::InitFactory() } OutlineViewShellBase::OutlineViewShellBase ( - SfxViewFrame* _pFrame, + SfxViewFrame& _rFrame, SfxViewShell* pOldShell) - : ImpressViewShellBase (_pFrame, pOldShell) + : ImpressViewShellBase (_rFrame, pOldShell) { } diff --git a/sd/source/ui/view/PresentationViewShellBase.cxx b/sd/source/ui/view/PresentationViewShellBase.cxx index 5a0f13d75881..525c0813d9d6 100644 --- a/sd/source/ui/view/PresentationViewShellBase.cxx +++ b/sd/source/ui/view/PresentationViewShellBase.cxx @@ -42,10 +42,10 @@ class DrawDocShell; SfxViewFactory* PresentationViewShellBase::s_pFactory; SfxViewShell* PresentationViewShellBase::CreateInstance ( - SfxViewFrame *_pFrame, SfxViewShell *pOldView) + SfxViewFrame& _rFrame, SfxViewShell *pOldView) { PresentationViewShellBase* pBase = - new PresentationViewShellBase(_pFrame, pOldView); + new PresentationViewShellBase(_rFrame, pOldView); pBase->LateInit(framework::FrameworkHelper::msPresentationViewURL); return pBase; } @@ -61,13 +61,13 @@ void PresentationViewShellBase::InitFactory() } PresentationViewShellBase::PresentationViewShellBase ( - SfxViewFrame* _pFrame, + SfxViewFrame& _rFrame, SfxViewShell* pOldShell) - : ViewShellBase (_pFrame, pOldShell) + : ViewShellBase (_rFrame, pOldShell) { // Hide the automatic (non-context sensitive) tool bars. Reference<beans::XPropertySet> xFrameSet ( - _pFrame->GetFrame().GetFrameInterface(), + _rFrame.GetFrame().GetFrameInterface(), UNO_QUERY); if (xFrameSet.is()) { diff --git a/sd/source/ui/view/SlideSorterViewShellBase.cxx b/sd/source/ui/view/SlideSorterViewShellBase.cxx index ecf679c981f2..3c5578e8a191 100644 --- a/sd/source/ui/view/SlideSorterViewShellBase.cxx +++ b/sd/source/ui/view/SlideSorterViewShellBase.cxx @@ -34,9 +34,9 @@ class DrawDocShell; SfxViewFactory* SlideSorterViewShellBase::s_pFactory; SfxViewShell* SlideSorterViewShellBase::CreateInstance ( - SfxViewFrame *pFrame, SfxViewShell *pOldView) + SfxViewFrame& rFrame, SfxViewShell *pOldView) { - SlideSorterViewShellBase* pBase = new SlideSorterViewShellBase(pFrame, pOldView); + SlideSorterViewShellBase* pBase = new SlideSorterViewShellBase(rFrame, pOldView); pBase->LateInit(framework::FrameworkHelper::msSlideSorterURL); return pBase; } @@ -53,9 +53,9 @@ void SlideSorterViewShellBase::InitFactory() } SlideSorterViewShellBase::SlideSorterViewShellBase ( - SfxViewFrame* _pFrame, + SfxViewFrame& _rFrame, SfxViewShell* pOldShell) - : ImpressViewShellBase (_pFrame, pOldShell) + : ImpressViewShellBase (_rFrame, pOldShell) { } diff --git a/sd/source/ui/view/ViewShellBase.cxx b/sd/source/ui/view/ViewShellBase.cxx index a3a154ce0ee6..a4af703afb38 100644 --- a/sd/source/ui/view/ViewShellBase.cxx +++ b/sd/source/ui/view/ViewShellBase.cxx @@ -220,17 +220,17 @@ void ViewShellBase::InitInterface_Impl() } ViewShellBase::ViewShellBase ( - SfxViewFrame* _pFrame, + SfxViewFrame& _rFrame, SfxViewShell*) - : SfxViewShell (_pFrame, SfxViewShellFlags::HAS_PRINTOPTIONS), + : SfxViewShell(_rFrame, SfxViewShellFlags::HAS_PRINTOPTIONS), mpDocShell (nullptr), mpDocument (nullptr) { mpImpl.reset(new Implementation(*this)); - mpImpl->mpViewWindow = VclPtr<FocusForwardingWindow>::Create(_pFrame->GetWindow(),*this); + mpImpl->mpViewWindow = VclPtr<FocusForwardingWindow>::Create(_rFrame.GetWindow(),*this); mpImpl->mpViewWindow->SetBackground(Wallpaper()); - _pFrame->GetWindow().SetBackground(Application::GetSettings().GetStyleSettings().GetLightColor()); + _rFrame.GetWindow().SetBackground(Application::GetSettings().GetStyleSettings().GetLightColor()); // Set up the members in the correct order. if (auto pDrawDocShell = dynamic_cast< DrawDocShell *>( GetViewFrame()->GetObjectShell() )) @@ -242,7 +242,7 @@ ViewShellBase::ViewShellBase ( SetWindow(mpImpl->mpViewWindow.get()); // Hide the window to avoid complaints from Sfx...SwitchViewShell... - _pFrame->GetWindow().Hide(); + _rFrame.GetWindow().Hide(); } /** In this destructor the order in which some of the members are destroyed |