summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-02-28 14:59:00 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-03-01 07:46:32 +0100
commite13a8c7df2d11814a0a4669aad88e68e27835934 (patch)
treee1669f58faa656da59261b7a24329ae368e43475 /desktop
parent5a64b618d84edb65465950d54e3b4afc952a301c (diff)
use SfxItemSet::GetItemIfSet in desktop..reportdesign
Change-Id: Iaa0ddf4e97866d537a478e668e3c651a9eabc465 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130708 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/app/app.cxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index f7e9a8ec8930..9c272314dadf 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -286,12 +286,11 @@ bool shouldLaunchQuickstart()
bool bQuickstart = Desktop::GetCommandLineArgs().IsQuickstart();
if (!bQuickstart)
{
- const SfxPoolItem* pItem=nullptr;
SfxItemSetFixed<SID_ATTR_QUICKLAUNCHER, SID_ATTR_QUICKLAUNCHER> aQLSet(SfxGetpApp()->GetPool());
SfxApplication::GetOptions(aQLSet);
- SfxItemState eState = aQLSet.GetItemState(SID_ATTR_QUICKLAUNCHER, false, &pItem);
- if (SfxItemState::SET == eState)
- bQuickstart = static_cast<const SfxBoolItem*>(pItem)->GetValue();
+ const SfxBoolItem* pLauncherItem = aQLSet.GetItemIfSet(SID_ATTR_QUICKLAUNCHER, false);
+ if (pLauncherItem)
+ bQuickstart = pLauncherItem->GetValue();
}
return bQuickstart;
}