summaryrefslogtreecommitdiff
path: root/sfx2/source/doc/objxtor.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolan.mcnamara@collabora.com>2024-04-29 20:45:05 +0100
committerCaolán McNamara <caolan.mcnamara@collabora.com>2024-05-17 17:37:58 +0200
commit1148d6ad13b444c179aacdb693bd82e37d0ed32d (patch)
treefb681cad40c00163230b11b349282181a647d080 /sfx2/source/doc/objxtor.cxx
parent30d376fb7ded4c96c85ad1112a0e44b5929657c9 (diff)
introduce SAL_RET_MAYBENULL
which for debug builds and MSVC uses _Ret_maybenull_ and -analyze to enforce null checking Change-Id: Id7f0ad854be7841819fdbdcd56c862d1a2df86c3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166734 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'sfx2/source/doc/objxtor.cxx')
-rw-r--r--sfx2/source/doc/objxtor.cxx8
1 files changed, 3 insertions, 5 deletions
diff --git a/sfx2/source/doc/objxtor.cxx b/sfx2/source/doc/objxtor.cxx
index e726f9a55cb9..deb64e6186ac 100644
--- a/sfx2/source/doc/objxtor.cxx
+++ b/sfx2/source/doc/objxtor.cxx
@@ -458,7 +458,7 @@ OUString SfxObjectShell::CreateShellID( const SfxObjectShell* pShell )
// returns a pointer the first SfxDocument of specified type
-SfxObjectShell* SfxObjectShell::GetFirst
+SAL_RET_MAYBENULL SfxObjectShell* SfxObjectShell::GetFirst
(
const std::function<bool ( const SfxObjectShell* )>& isObjectShell,
bool bOnlyVisible
@@ -483,7 +483,7 @@ SfxObjectShell* SfxObjectShell::GetFirst
// returns a pointer to the next SfxDocument of specified type behind *pDoc
-SfxObjectShell* SfxObjectShell::GetNext
+SAL_RET_MAYBENULL SfxObjectShell* SfxObjectShell::GetNext
(
const SfxObjectShell& rPrev,
const std::function<bool ( const SfxObjectShell* )>& isObjectShell,
@@ -512,14 +512,12 @@ SfxObjectShell* SfxObjectShell::GetNext
return nullptr;
}
-
-SfxObjectShell* SfxObjectShell::Current()
+SAL_RET_MAYBENULL SfxObjectShell* SfxObjectShell::Current()
{
SfxViewFrame *pFrame = SfxViewFrame::Current();
return pFrame ? pFrame->GetObjectShell() : nullptr;
}
-
bool SfxObjectShell::IsInPrepareClose() const
{
return pImpl->bInPrepareClose;