summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2024-05-27 20:04:31 +0200
committerXisco Fauli <xiscofauli@libreoffice.org>2024-05-28 11:18:02 +0200
commitb81ff51a8ccac942effdd309f014591604376ecc (patch)
treee054688b9de98dd11caca4a89802b7f99174a19f
parentf60fd89e3d4ee60d9b9d0a02ed96c36ff8667188 (diff)
sd: use SAL_RET_MAYBENULL in GetDrawView()
Directly return nullptr instead of calling SfxViewShell::GetDrawView() which return nullptr to make it obvious Change-Id: I5e81d23f541a73181bb6f7d9e7f1d6ec56ff57ad Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168116 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
-rw-r--r--sd/source/ui/inc/ViewShellBase.hxx2
-rw-r--r--sd/source/ui/view/ViewShellBase.cxx4
2 files changed, 3 insertions, 3 deletions
diff --git a/sd/source/ui/inc/ViewShellBase.hxx b/sd/source/ui/inc/ViewShellBase.hxx
index cdec6d8a6b02..1e1517eb6550 100644
--- a/sd/source/ui/inc/ViewShellBase.hxx
+++ b/sd/source/ui/inc/ViewShellBase.hxx
@@ -153,7 +153,7 @@ public:
virtual bool PrepareClose (bool bUI = true) override;
virtual void WriteUserData (OUString&, bool bBrowse = false) override;
virtual void ReadUserData (const OUString&, bool bBrowse = false) override;
- virtual SdrView* GetDrawView() const override;
+ SAL_RET_MAYBENULL virtual SdrView* GetDrawView() const override;
/** When <TRUE/> is given, then the mouse shape is set to hour glass (or
whatever the busy shape looks like on the system.)
diff --git a/sd/source/ui/view/ViewShellBase.cxx b/sd/source/ui/view/ViewShellBase.cxx
index bf125e126b0d..3672f5655bf6 100644
--- a/sd/source/ui/view/ViewShellBase.cxx
+++ b/sd/source/ui/view/ViewShellBase.cxx
@@ -816,8 +816,8 @@ SdrView* ViewShellBase::GetDrawView() const
ViewShell* pShell = GetMainViewShell().get();
if (pShell != nullptr)
return pShell->GetDrawView ();
- else
- return SfxViewShell::GetDrawView();
+
+ return nullptr;
}
void ViewShellBase::SetBusyState (bool bBusy)