[Libreoffice-commits] core.git: basctl/source svx/source

Kevin Dubrulle kevin.dubrulle at gmail.com
Mon Jul 9 07:43:25 UTC 2018


 basctl/source/basicide/baside2b.cxx |    2 +-
 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 +-
 6 files changed, 7 insertions(+), 7 deletions(-)

New commits:
commit dc47a950eaf99b8abb2f7bd2f44243ec7e1bce72
Author: Kevin Dubrulle <kevin.dubrulle at gmail.com>
Date:   Mon Jul 9 07:40:17 2018 +0200

    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 <noel.grandin at collabora.co.uk>

diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx
index ae2fb1086d7f..f32885c1292d 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -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")
             {
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<const SfxBoolItem*>( pItem.get()) != nullptr && static_cast<SfxBoolItem*>(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() )
     {


More information about the Libreoffice-commits mailing list