summaryrefslogtreecommitdiff
path: root/sfx2/source/doc
diff options
context:
space:
mode:
authorArmin Le Grand (allotropia) <armin.le.grand.extern@allotropia.de>2023-12-28 13:18:23 +0100
committerArmin Le Grand <Armin.Le.Grand@me.com>2023-12-28 15:23:48 +0100
commit2ddec231d513cf317f9fb2c2a82c7e3a0a2d7ef3 (patch)
treeb05b5b166ae135f63990c4200c058a98027d6b7a /sfx2/source/doc
parent249fb2c6b1b8163bfa4bd6c1fcff000a42d2e967 (diff)
Added boolean op's to SfxPoolItemHolder
...and adapted code to make use of it. This makes checking if the SfxPoolItemHolder instance contains an Item or not simpler and thus more readable, no need to access the Item* every time using getItem() - is okay, but not intuitive. Change-Id: I8042267cce670aca2641a91cd36285058f17ffbb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161380 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
Diffstat (limited to 'sfx2/source/doc')
-rw-r--r--sfx2/source/doc/objserv.cxx2
-rw-r--r--sfx2/source/doc/objxtor.cxx2
2 files changed, 2 insertions, 2 deletions
diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx
index 8340e4808fb8..5de217fd6a6d 100644
--- a/sfx2/source/doc/objserv.cxx
+++ b/sfx2/source/doc/objserv.cxx
@@ -667,7 +667,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
SfxDocumentInfoItem aDocInfoItem( aURL, getDocProperties(), aCmisProperties,
IsUseUserData(), IsUseThumbnailSave() );
const SfxPoolItemHolder aSlotState(GetSlotState(SID_DOCTEMPLATE));
- if (nullptr == aSlotState.getItem())
+ if (!aSlotState)
// templates not supported
aDocInfoItem.SetTemplate(false);
diff --git a/sfx2/source/doc/objxtor.cxx b/sfx2/source/doc/objxtor.cxx
index 11b38ced10a0..03a12f68ab8f 100644
--- a/sfx2/source/doc/objxtor.cxx
+++ b/sfx2/source/doc/objxtor.cxx
@@ -589,7 +589,7 @@ bool SfxObjectShell::PrepareClose
aPoolItem = pFrame->GetBindings().ExecuteSynchron( SID_SAVEDOC, ppArgs );
}
- if ( nullptr == aPoolItem.getItem() || aPoolItem.getItem()->isVoidItem() )
+ if (!aPoolItem || aPoolItem.getItem()->isVoidItem() )
return false;
if ( auto pBoolItem = dynamic_cast< const SfxBoolItem *>( aPoolItem.getItem() ) )
if ( !pBoolItem->GetValue() )