From dc47a950eaf99b8abb2f7bd2f44243ec7e1bce72 Mon Sep 17 00:00:00 2001 From: Kevin Dubrulle Date: Mon, 9 Jul 2018 07:40:17 +0200 Subject: tdf117058 - Simplify calls to Menu::CheckItem Change pGearMenu->CheckItem( pGearMenu->GetItemId("gear_iconOnly") ) style to pGearMenu->CheckItem( "gear_iconOnly" ) style, where it is possible. Change-Id: I6ec77eac51be14a8e5d278bd3604cb65b3d1f006 Reviewed-on: https://gerrit.libreoffice.org/57172 Tested-by: Jenkins Reviewed-by: Noel Grandin --- svx/source/dialog/imapwnd.cxx | 2 +- svx/source/fmcomp/fmgridcl.cxx | 2 +- svx/source/form/datanavi.cxx | 2 +- svx/source/form/navigatortree.cxx | 4 ++-- svx/source/gallery2/galbrws2.cxx | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) (limited to 'svx') diff --git a/svx/source/dialog/imapwnd.cxx b/svx/source/dialog/imapwnd.cxx index 59223912a683..35daf17e8bb0 100644 --- a/svx/source/dialog/imapwnd.cxx +++ b/svx/source/dialog/imapwnd.cxx @@ -513,7 +513,7 @@ void IMapWindow::Command(const CommandEvent& rCEvt) aMenu->EnableItem(aMenu->GetItemId("url")); aMenu->EnableItem(aMenu->GetItemId("active")); aMenu->EnableItem(aMenu->GetItemId("macro")); - aMenu->CheckItem(aMenu->GetItemId("active"), GetIMapObj(pSdrObj)->IsActive()); + aMenu->CheckItem("active", GetIMapObj(pSdrObj)->IsActive()); } aMenu->EnableItem(aMenu->GetItemId("arrange")); diff --git a/svx/source/fmcomp/fmgridcl.cxx b/svx/source/fmcomp/fmgridcl.cxx index 74a9fb42f1bb..2d957ad19c5c 100644 --- a/svx/source/fmcomp/fmgridcl.cxx +++ b/svx/source/fmcomp/fmgridcl.cxx @@ -775,7 +775,7 @@ void FmGridHeader::PreExecuteColumnContextMenu(sal_uInt16 nColId, PopupMenu& rMe if (eState >= SfxItemState::DEFAULT && pItem.get() != nullptr ) { bool bChecked = dynamic_cast( pItem.get()) != nullptr && static_cast(pItem.get())->GetValue(); - rMenu.CheckItem(rMenu.GetItemId("column"), bChecked); + rMenu.CheckItem("column", bChecked); } } } diff --git a/svx/source/form/datanavi.cxx b/svx/source/form/datanavi.cxx index 2446606e373d..c7d65c0b0c91 100644 --- a/svx/source/form/datanavi.cxx +++ b/svx/source/form/datanavi.cxx @@ -1739,7 +1739,7 @@ namespace svxform { m_bShowDetails = !m_bShowDetails; PopupMenu* pMenu = m_pInstanceBtn->GetPopupMenu(); - pMenu->CheckItem(pMenu->GetItemId("instancesdetails"), m_bShowDetails ); + pMenu->CheckItem("instancesdetails", m_bShowDetails ); ModelSelectHdl(m_pModelsBox); } else diff --git a/svx/source/form/navigatortree.cxx b/svx/source/form/navigatortree.cxx index cd44e5f8c502..12a2425ce6a9 100644 --- a/svx/source/form/navigatortree.cxx +++ b/svx/source/form/navigatortree.cxx @@ -435,8 +435,8 @@ namespace svxform // set OpenReadOnly - aContextMenu->CheckItem(aContextMenu->GetItemId("designmode"), pFormModel->GetOpenInDesignMode()); - aContextMenu->CheckItem(aContextMenu->GetItemId("controlfocus"), pFormModel->GetAutoControlFocus()); + aContextMenu->CheckItem("designmode", pFormModel->GetOpenInDesignMode()); + aContextMenu->CheckItem("controlfocus", pFormModel->GetAutoControlFocus()); aContextMenu->Execute(this, ptWhere); OString sIdent; diff --git a/svx/source/gallery2/galbrws2.cxx b/svx/source/gallery2/galbrws2.cxx index 4760f19dc235..920057674fd8 100644 --- a/svx/source/gallery2/galbrws2.cxx +++ b/svx/source/gallery2/galbrws2.cxx @@ -238,7 +238,7 @@ void GalleryThemePopup::ExecutePopup( vcl::Window *pWindow, const ::Point &aPos mpPopupMenu->EnableItem(mpPopupMenu->GetItemId("add"), bValidURL && SgaObjKind::Sound != eObjKind); mpPopupMenu->EnableItem(mpPopupMenu->GetItemId("preview"), bValidURL); - mpPopupMenu->CheckItem(mpPopupMenu->GetItemId("preview"), mbPreview); + mpPopupMenu->CheckItem("preview", mbPreview); if( mpTheme->IsReadOnly() || !mpTheme->GetObjectCount() ) { -- cgit