[Libreoffice-commits] core.git: 2 commits - cui/source vcl/source

Maxim Monastirsky momonasmon at gmail.com
Sun Dec 6 14:48:59 PST 2015


 cui/source/customize/cfg.cxx |    3 +++
 vcl/source/window/menu.cxx   |    3 ++-
 2 files changed, 5 insertions(+), 1 deletion(-)

New commits:
commit 2cd9ecd8644d16780443cdb6b52e208af9066105
Author: Maxim Monastirsky <momonasmon at gmail.com>
Date:   Sun Dec 6 23:51:56 2015 +0200

    SvxMenuConfigPage: Disable controls when no menus found
    
    We reuse this page for context menus, but not all modules
    have context menus. This is the same behavior now as in
    the toolbars page (but ideally we shouldn't show those
    pages at all in such case).
    
    Change-Id: I66e308400d50934044179f07709c371578db8c39

diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index c7d4a01..4d50289 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -2635,6 +2635,9 @@ IMPL_LINK_NOARG_TYPED( SvxMenuConfigPage, SelectMenu, ListBox&, void )
     m_pContentsListBox->Clear();
 
     SvxConfigEntry* pMenuData = GetTopLevelSelection();
+    m_pModifyTopLevelButton->Enable( pMenuData != nullptr );
+    m_pModifyCommandButton->Enable( pMenuData != nullptr );
+    m_pAddCommandsButton->Enable( pMenuData != nullptr );
 
     PopupMenu* pPopup = m_pModifyTopLevelButton->GetPopupMenu();
     if ( pMenuData )
commit 8ca76fc12e088a95247cb8e47ba8252db59e7ea6
Author: Maxim Monastirsky <momonasmon at gmail.com>
Date:   Sun Dec 6 22:30:35 2015 +0200

    tdf#93837 Never hide clipboard functions in context menus
    
    This updates the hack made for tdf#86850 for the new
    implementation. We're going to use .uno command names,
    instead of sfx2 SIDs.
    
    While touching this, I removed the check for the Paste
    Special menu. It's not backed by a real sfx2 slot, so
    never disabled.
    
    Change-Id: I1e2078e98987ad1f5f46e3964d878cb967ac00ef

diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index 3a6e54c..a06962d 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -1346,7 +1346,8 @@ bool Menu::ImplIsVisible( sal_uInt16 nPos ) const
         else if ( pData->eType != MenuItemType::SEPARATOR ) // separators handled above
         {
             // tdf#86850 Always display clipboard functions
-            if ( pData->nId == SID_CUT || pData->nId == SID_COPY || pData->nId == SID_PASTE || pData->nId == SID_MENU_PASTE_SPECIAL )
+            if ( pData->nId == SID_CUT || pData->nId == SID_COPY || pData->nId == SID_PASTE ||
+                 pData->aCommandStr == ".uno:Cut" || pData->aCommandStr == ".uno:Copy" || pData->aCommandStr == ".uno:Paste" )
                 bVisible = true;
             else
                 // bVisible = pData->bEnabled && ( !pData->pSubMenu || pData->pSubMenu->HasValidEntries( true ) );


More information about the Libreoffice-commits mailing list