diff options
author | Armin Le Grand (allotropia) <armin.le.grand.extern@allotropia.de> | 2023-12-28 13:18:23 +0100 |
---|---|---|
committer | Armin Le Grand <Armin.Le.Grand@me.com> | 2023-12-28 15:23:48 +0100 |
commit | 2ddec231d513cf317f9fb2c2a82c7e3a0a2d7ef3 (patch) | |
tree | b05b5b166ae135f63990c4200c058a98027d6b7a /sw/source/ui | |
parent | 249fb2c6b1b8163bfa4bd6c1fcff000a42d2e967 (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 'sw/source/ui')
-rw-r--r-- | sw/source/ui/fldui/fldtdlg.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/source/ui/fldui/fldtdlg.cxx b/sw/source/ui/fldui/fldtdlg.cxx index 8c20586167e7..5691935136e3 100644 --- a/sw/source/ui/fldui/fldtdlg.cxx +++ b/sw/source/ui/fldui/fldtdlg.cxx @@ -116,7 +116,7 @@ void SwFieldDlg::Close() const SfxPoolItemHolder aResult(m_pBindings->GetDispatcher()-> Execute(m_bDataBaseMode ? FN_INSERT_FIELD_DATA_ONLY : FN_INSERT_FIELD, SfxCallMode::SYNCHRON|SfxCallMode::RECORD)); - if (nullptr == aResult.getItem()) + if (!aResult) { // If Execute action did fail for whatever reason, this means that request // to close did fail or wasn't delivered to SwTextShell::ExecField(). |