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

Maxim Monastirsky momonasmon at gmail.com
Wed Dec 20 16:14:06 UTC 2017


 framework/source/uielement/toolbarmanager.cxx |    1 -
 vcl/source/window/toolbox2.cxx                |    2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

New commits:
commit 861086a21449acb168e52e4eab606692200d2622
Author: Maxim Monastirsky <momonasmon at gmail.com>
Date:   Mon Oct 9 21:13:25 2017 +0300

    Related: tdf#79657 Different approach to disable the context menu
    
    ... in the overflow toolbar. Using ToolBoxMenuType::NONE
    is wrong as it might affect the layout. Can be easily triggered
    here by adding FloatWinPopupFlags::GrabFocus to StartPopupMode
    (which likely will be needed to fully solve tdf#79657).
    
    Another case was fixed in 91053763a7189c8ac03a59dc996e6333404f846e
    ("Fix sub-toolbar tearoff for .uno:ChooseControls"), but without
    providing a solution for the context menu.
    
    Change-Id: I4a0b4560fe49106613fa2337b5dd83eb7fa29f47
    Reviewed-on: https://gerrit.libreoffice.org/46837
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Maxim Monastirsky <momonasmon at gmail.com>

diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx
index 842e1f06d067..5c69e7f0dac8 100644
--- a/framework/source/uielement/toolbarmanager.cxx
+++ b/framework/source/uielement/toolbarmanager.cxx
@@ -1560,7 +1560,6 @@ IMPL_LINK( ToolBarManager, MenuButton, ToolBox*, pToolBar, void )
     pOverflowToolBar->SetOutStyle( pToolBar->GetOutStyle() );
     m_aOverflowManager.set( new ToolBarManager( m_xContext, m_xFrame, OUString(), pOverflowToolBar ) );
     m_aOverflowManager->FillOverflowToolbar( pToolBar );
-    pOverflowToolBar->SetMenuType( ToolBoxMenuType::NONE );
 
     ::Size aActSize( pOverflowToolBar->GetSizePixel() );
     ::Size aSize( pOverflowToolBar->CalcWindowSizePixel() );
diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx
index c636b4023be0..f181da0a99d9 100644
--- a/vcl/source/window/toolbox2.cxx
+++ b/vcl/source/window/toolbox2.cxx
@@ -1718,7 +1718,7 @@ IMPL_LINK_NOARG(ToolBox, ImplCallExecuteCustomMenu, void*, void)
 
 void ToolBox::ExecuteCustomMenu( const tools::Rectangle& rRect )
 {
-    if( IsMenuEnabled() )
+    if ( IsMenuEnabled() && !ImplIsInPopupMode() )
     {
         UpdateCustomMenu();
         // handle custom menu asynchronously


More information about the Libreoffice-commits mailing list