Kaydet (Commit) dc47a950 authored tarafından Kevin Dubrulle's avatar Kevin Dubrulle Kaydeden (comit) Noel Grandin

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: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 49880529
......@@ -1459,7 +1459,7 @@ void BreakPointWindow::Command( const CommandEvent& rCEvt )
{
// test if break point is enabled...
VclPtr<PopupMenu> xBrkPropMenu = mpUIBuilder->get_menu("breakmenu");
xBrkPropMenu->CheckItem(xBrkPropMenu->GetItemId("active"), pBrk->bEnabled);
xBrkPropMenu->CheckItem("active", pBrk->bEnabled);
OString sCommand = xBrkPropMenu->GetItemIdent(xBrkPropMenu->Execute(this, aPos));
if (sCommand == "active")
{
......
......@@ -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"));
......
......@@ -775,7 +775,7 @@ void FmGridHeader::PreExecuteColumnContextMenu(sal_uInt16 nColId, PopupMenu& rMe
if (eState >= SfxItemState::DEFAULT && pItem.get() != nullptr )
{
bool bChecked = dynamic_cast<const SfxBoolItem*>( pItem.get()) != nullptr && static_cast<SfxBoolItem*>(pItem.get())->GetValue();
rMenu.CheckItem(rMenu.GetItemId("column"), bChecked);
rMenu.CheckItem("column", bChecked);
}
}
}
......
......@@ -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
......
......@@ -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;
......
......@@ -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() )
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment