diff options
Diffstat (limited to 'cui/source/customize')
-rw-r--r-- | cui/source/customize/SvxMenuConfigPage.cxx | 6 | ||||
-rw-r--r-- | cui/source/customize/SvxToolbarConfigPage.cxx | 4 | ||||
-rw-r--r-- | cui/source/customize/cfg.cxx | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/cui/source/customize/SvxMenuConfigPage.cxx b/cui/source/customize/SvxMenuConfigPage.cxx index a0c6d316a0e5..c40c07dd3ce6 100644 --- a/cui/source/customize/SvxMenuConfigPage.cxx +++ b/cui/source/customize/SvxMenuConfigPage.cxx @@ -172,7 +172,7 @@ void SvxMenuConfigPage::UpdateButtonStates() bool bIsSeparator = selection != -1 && reinterpret_cast<SvxConfigEntry*>(m_xContentsListBox->get_id(selection).toInt64())->IsSeparator(); bool bIsValidSelection = - !(m_xContentsListBox->n_children() == 0 || selection == -1); + (m_xContentsListBox->n_children() != 0 && selection != -1); m_xMoveUpButton->set_sensitive( bIsValidSelection && selection != 0 ); @@ -489,7 +489,7 @@ IMPL_LINK_NOARG(SvxMenuConfigPage, ResetMenuHdl, weld::Button&, void) // Resetting individual top-level menus is not possible at the moment. // So we are resetting only if it is a context menu - if (!(!m_bIsMenuBar && xQueryBox->run() == RET_YES)) + if (m_bIsMenuBar || xQueryBox->run() != RET_YES) return; sal_Int32 nPos = m_xTopLevelListBox->get_active(); @@ -538,7 +538,7 @@ IMPL_LINK( SvxMenuConfigPage, ContentContextMenuHdl, const CommandEvent&, rCEvt, bool bIsSeparator = nSelectIndex != -1 && reinterpret_cast<SvxConfigEntry*>(m_xContentsListBox->get_id(nSelectIndex).toInt64())->IsSeparator(); bool bIsValidSelection = - !( m_xContentsListBox->n_children() == 0 || nSelectIndex == -1 ); + ( m_xContentsListBox->n_children() != 0 && nSelectIndex != -1 ); std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder( &rTreeView, "cui/ui/entrycontextmenu.ui" ) ); auto xContextMenu = xBuilder->weld_menu("menu"); diff --git a/cui/source/customize/SvxToolbarConfigPage.cxx b/cui/source/customize/SvxToolbarConfigPage.cxx index dfe66d4e3721..7bc2115b36fa 100644 --- a/cui/source/customize/SvxToolbarConfigPage.cxx +++ b/cui/source/customize/SvxToolbarConfigPage.cxx @@ -717,7 +717,7 @@ void SvxToolbarConfigPage::UpdateButtonStates() bool bIsSeparator = selection != -1 && reinterpret_cast<SvxConfigEntry*>(m_xContentsListBox->get_id(selection).toInt64())->IsSeparator(); bool bIsValidSelection = - !(m_xContentsListBox->n_children() == 0 || selection == -1); + (m_xContentsListBox->n_children() != 0 && selection != -1); m_xMoveUpButton->set_sensitive( bIsValidSelection ); m_xMoveDownButton->set_sensitive( bIsValidSelection ); @@ -905,7 +905,7 @@ IMPL_LINK( SvxToolbarConfigPage, ContentContextMenuHdl, const CommandEvent&, rCE bool bIsSeparator = nSelectIndex != -1 && reinterpret_cast<SvxConfigEntry*>(m_xContentsListBox->get_id(nSelectIndex).toInt64())->IsSeparator(); bool bIsValidSelection = - !( m_xContentsListBox->n_children() == 0 || nSelectIndex == -1 ); + ( m_xContentsListBox->n_children() != 0 && nSelectIndex != -1 ); std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder( &rTreeView, "cui/ui/entrycontextmenu.ui" ) ); auto xContextMenu = xBuilder->weld_menu("menu"); diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx index 6b2a83d38dc3..d581a95e9ec0 100644 --- a/cui/source/customize/cfg.cxx +++ b/cui/source/customize/cfg.cxx @@ -1974,7 +1974,7 @@ void ToolbarSaveInData::SetSystemStyle( window = VCLUnoHelper::GetWindow( xWindow ).get(); } - if ( !(window != nullptr && window->GetType() == WindowType::TOOLBOX) ) + if ( window == nullptr || window->GetType() != WindowType::TOOLBOX ) return; ToolBox* toolbox = static_cast<ToolBox*>(window); |