From 2ddec231d513cf317f9fb2c2a82c7e3a0a2d7ef3 Mon Sep 17 00:00:00 2001 From: "Armin Le Grand (allotropia)" Date: Thu, 28 Dec 2023 13:18:23 +0100 Subject: 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 --- sfx2/source/control/request.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sfx2/source/control/request.cxx') diff --git a/sfx2/source/control/request.cxx b/sfx2/source/control/request.cxx index c838ddfdfc77..c44ebef2eb55 100644 --- a/sfx2/source/control/request.cxx +++ b/sfx2/source/control/request.cxx @@ -418,7 +418,7 @@ void SfxRequest::RemoveItem( sal_uInt16 nID ) void SfxRequest::SetReturnValue(const SfxPoolItem &rItem) { - DBG_ASSERT(nullptr == pImpl->aRetVal.getItem(), "Set Return value multiple times?"); + DBG_ASSERT(!pImpl, "Set Return value multiple times?"); DBG_ASSERT(nullptr != pImpl->pPool, "Missing SfxItemPool (!)"); if (nullptr != pImpl->pPool) pImpl->aRetVal = SfxPoolItemHolder(*pImpl->pPool, &rItem); -- cgit