cui/source/options/optgdlg.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
New commits: commit 98c8077893044453ca76ad2a34c6d86d9be0c2c7 Author: Balazs Varga <balazs.varga.ext...@allotropia.de> AuthorDate: Mon Mar 17 19:31:33 2025 +0100 Commit: Balazs Varga <balazs.varga.ext...@allotropia.de> CommitDate: Wed Mar 19 11:05:36 2025 +0100 tdf#165808 fix always visible Quickstarter UI frame Better to check SID_ATTR_QUICKLAUNCHER is set at all with GetItemIfSet, then with GetItemState, because if ShutdownIcon::IsQuickstarterInstalled is false we simple disable the item with rSet.DisableItem( SID_ATTR_QUICKLAUNCHER ); and later the disabled item is removed from the itemset therefore the original SfxItemState will be SfxItemState::DEFAULT. regression from commit: b8e393686c4ab6a69b091240065f440eadfff230 Change-Id: I6ce85798100d93dd3f712abc8ede2087b912b867 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183041 Reviewed-by: Armin Le Grand <armin.le.gr...@me.com> Tested-by: Jenkins diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx index 9d9d5f072bcb..235f07074e17 100644 --- a/cui/source/options/optgdlg.cxx +++ b/cui/source/options/optgdlg.cxx @@ -375,11 +375,11 @@ void OfaMiscTabPage::Reset( const SfxItemSet* rSet ) #endif #if defined(_WIN32) - const SfxPoolItem* pItem = nullptr; - SfxItemState eState = rSet->GetItemState( SID_ATTR_QUICKLAUNCHER, false, &pItem ); - if ( SfxItemState::SET == eState ) - m_xQuickLaunchCB->set_active( static_cast<const SfxBoolItem*>(pItem)->GetValue() ); - else if ( SfxItemState::DISABLED == eState ) + if (const SfxBoolItem* pItem = rSet->GetItemIfSet( SID_ATTR_QUICKLAUNCHER, false )) + { + m_xQuickLaunchCB->set_active( pItem->GetValue() ); + } + else { // quickstart not installed m_xQuickStarterFrame->hide();