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 /include | |
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 'include')
-rw-r--r-- | include/sfx2/viewfac.hxx | 4 | ||||
-rw-r--r-- | include/sfx2/viewsh.hxx | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/include/sfx2/viewfac.hxx b/include/sfx2/viewfac.hxx index efd511ea2b3d..c09791216f0e 100644 --- a/include/sfx2/viewfac.hxx +++ b/include/sfx2/viewfac.hxx @@ -27,7 +27,7 @@ class SfxViewFrame; class SfxViewShell; -typedef SfxViewShell* (*SfxViewCtor)(SfxViewFrame*, SfxViewShell*); +typedef SfxViewShell* (*SfxViewCtor)(SfxViewFrame&, SfxViewShell*); // CLASS ----------------------------------------------------------------- class SFX2_DLLPUBLIC SfxViewFactory @@ -36,7 +36,7 @@ public: SfxViewFactory( SfxViewCtor fnC, SfxInterfaceId nOrdinal, const char* asciiViewName ); - SfxViewShell* CreateInstance(SfxViewFrame *pViewFrame, SfxViewShell *pOldSh); + SfxViewShell* CreateInstance(SfxViewFrame& rViewFrame, SfxViewShell *pOldSh); SfxInterfaceId GetOrdinal() const { return nOrd; } /// returns a legacy view name. This is "view" with an appended ordinal/ID. diff --git a/include/sfx2/viewsh.hxx b/include/sfx2/viewsh.hxx index a948f0f5baea..1e70f8301bda 100644 --- a/include/sfx2/viewsh.hxx +++ b/include/sfx2/viewsh.hxx @@ -128,15 +128,15 @@ class SfxViewFactory; private: \ static SfxViewFactory *s_pFactory; \ public: \ - static SfxViewShell *CreateInstance(SfxViewFrame *pFrame, SfxViewShell *pOldView); \ + static SfxViewShell *CreateInstance(SfxViewFrame& rFrame, SfxViewShell *pOldView); \ static void RegisterFactory( SfxInterfaceId nPrio ); \ static SfxViewFactory*Factory() { return s_pFactory; } \ static void InitFactory() #define SFX_IMPL_NAMED_VIEWFACTORY(Class, AsciiViewName) \ SfxViewFactory* Class::s_pFactory; \ - SfxViewShell* Class::CreateInstance(SfxViewFrame *pFrame, SfxViewShell *pOldView) \ - { return new Class(pFrame, pOldView); } \ + SfxViewShell* Class::CreateInstance(SfxViewFrame& rFrame, SfxViewShell *pOldView) \ + { return new Class(rFrame, pOldView); } \ void Class::RegisterFactory( SfxInterfaceId nPrio ) \ { \ s_pFactory = new SfxViewFactory(&CreateInstance,nPrio,AsciiViewName);\ @@ -211,7 +211,7 @@ private: public: - SfxViewShell( SfxViewFrame *pFrame, SfxViewShellFlags nFlags ); + SfxViewShell( SfxViewFrame& rFrame, SfxViewShellFlags nFlags ); virtual ~SfxViewShell() override; SfxInPlaceClient* GetIPClient() const; |