summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--framework/inc/dispatch/menudispatcher.hxx2
-rw-r--r--framework/inc/services/layoutmanager.hxx8
-rw-r--r--framework/source/dispatch/menudispatcher.cxx32
-rw-r--r--framework/source/layoutmanager/layoutmanager.cxx5
-rw-r--r--framework/source/layoutmanager/toolbarlayoutmanager.cxx12
5 files changed, 13 insertions, 46 deletions
diff --git a/framework/inc/dispatch/menudispatcher.hxx b/framework/inc/dispatch/menudispatcher.hxx
index 3a8bcfbe9935..eab15e89618e 100644
--- a/framework/inc/dispatch/menudispatcher.hxx
+++ b/framework/inc/dispatch/menudispatcher.hxx
@@ -160,7 +160,7 @@ class MenuDispatcher : public ::cppu::WeakImplHelper<
/*-****************************************************************************************************
*//*-*****************************************************************************************************/
- bool impl_setMenuBar( MenuBar* pMenuBar );
+ bool impl_clearMenuBar();
/*-****************************************************************************************************
*//*-*****************************************************************************************************/
diff --git a/framework/inc/services/layoutmanager.hxx b/framework/inc/services/layoutmanager.hxx
index e55f7ae19309..873f067b52ff 100644
--- a/framework/inc/services/layoutmanager.hxx
+++ b/framework/inc/services/layoutmanager.hxx
@@ -78,12 +78,6 @@ namespace framework
public LayoutManager_PBase
{
public:
- enum Hint
- {
- HINT_NOT_SPECIFIED,
- HINT_TOOLBARSPACE_HAS_CHANGED,
- HINT_COUNT
- };
enum { DOCKINGAREAS_COUNT = 4 };
LayoutManager( const css::uno::Reference< css::uno::XComponentContext >& xContext );
@@ -176,7 +170,7 @@ namespace framework
DECL_LINK_TYPED( WindowEventListener, VclWindowEvent&, void );
// called from ToolbarLayoutManager
- void requestLayout( Hint eHint = HINT_NOT_SPECIFIED );
+ void requestLayout();
/// Reading of settings - shared with ToolbarLayoutManager.
static bool readWindowStateData( const OUString& rName, UIElement& rElementData,
diff --git a/framework/source/dispatch/menudispatcher.cxx b/framework/source/dispatch/menudispatcher.cxx
index 739b30cb336c..882e482a4df2 100644
--- a/framework/source/dispatch/menudispatcher.cxx
+++ b/framework/source/dispatch/menudispatcher.cxx
@@ -56,8 +56,6 @@ using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::util;
using namespace ::cppu;
-const sal_uInt16 SLOTID_MDIWINDOWLIST = 5610;
-
// constructor
MenuDispatcher::MenuDispatcher( const uno::Reference< XComponentContext >& xContext ,
@@ -152,7 +150,7 @@ void SAL_CALL MenuDispatcher::frameAction( const FrameActionEvent& aEvent ) thro
else if ( m_pMenuManager && aEvent.Action == css::frame::FrameAction_COMPONENT_DETACHING )
{
if ( m_pMenuManager )
- impl_setMenuBar( nullptr );
+ impl_clearMenuBar();
}
}
@@ -188,7 +186,7 @@ void SAL_CALL MenuDispatcher::disposing( const EventObject& ) throw( RuntimeExce
// Remove our menu from system window if it is still there!
if ( m_pMenuManager )
- impl_setMenuBar( nullptr );
+ impl_clearMenuBar();
}
}
@@ -209,7 +207,7 @@ void MenuDispatcher::impl_setAccelerators( Menu* pMenu, const Accelerator& aAcce
}
}
-bool MenuDispatcher::impl_setMenuBar( MenuBar* pMenuBar )
+bool MenuDispatcher::impl_clearMenuBar()
{
uno::Reference< XFrame > xFrame( m_xOwnerWeak.get(), UNO_QUERY );
if ( xFrame.is() )
@@ -242,30 +240,6 @@ bool MenuDispatcher::impl_setMenuBar( MenuBar* pMenuBar )
m_pMenuManager = nullptr;
}
- if ( pMenuBar != nullptr )
- {
- sal_uInt16 nPos = pMenuBar->GetItemPos( SLOTID_MDIWINDOWLIST );
- if ( nPos != MENU_ITEM_NOTFOUND )
- {
- uno::Reference< XModel > xModel;
- uno::Reference< XController > xController( xFrame->getController(), UNO_QUERY );
-
- if ( xController.is() )
- xModel.set( xController->getModel(), UNO_QUERY );
-
- // retrieve addon popup menus and add them to our menu bar
- AddonMenuManager::MergeAddonPopupMenus( xFrame, nPos, pMenuBar, m_xContext );
-
- // retrieve addon help menu items and add them to our help menu
- AddonMenuManager::MergeAddonHelpMenu( xFrame, pMenuBar, m_xContext );
- }
-
- // set new menu on our system window and create new menu manager
- m_pMenuManager = new MenuManager( m_xContext, xFrame, pMenuBar, true, true );
-
- pSysWindow->SetMenuBar( pMenuBar );
- }
-
return true;
}
}
diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx
index 737f36790bfb..30de7cbc30d1 100644
--- a/framework/source/layoutmanager/layoutmanager.cxx
+++ b/framework/source/layoutmanager/layoutmanager.cxx
@@ -2306,10 +2306,9 @@ throw (RuntimeException, std::exception)
// ILayoutNotifications
-void LayoutManager::requestLayout( Hint eHint )
+void LayoutManager::requestLayout()
{
- if ( eHint == HINT_TOOLBARSPACE_HAS_CHANGED )
- doLayout();
+ doLayout();
}
void LayoutManager::implts_doLayout_notify( bool bOuterResize )
diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx b/framework/source/layoutmanager/toolbarlayoutmanager.cxx
index ad51ba12cf99..9dff9b9c1fd3 100644
--- a/framework/source/layoutmanager/toolbarlayoutmanager.cxx
+++ b/framework/source/layoutmanager/toolbarlayoutmanager.cxx
@@ -979,7 +979,7 @@ long ToolbarLayoutManager::childWindowEvent( VclSimpleEvent* pEvent )
if ( aToolbar.m_xUIElement.is() && !aToolbar.m_bFloating )
{
implts_setLayoutDirty();
- m_pParentLayouter->requestLayout( LayoutManager::HINT_TOOLBARSPACE_HAS_CHANGED );
+ m_pParentLayouter->requestLayout();
}
}
}
@@ -3233,7 +3233,7 @@ throw( uno::RuntimeException, std::exception )
}
if ( bNotify )
- m_pParentLayouter->requestLayout( LayoutManager::HINT_TOOLBARSPACE_HAS_CHANGED );
+ m_pParentLayouter->requestLayout();
}
}
@@ -3572,7 +3572,7 @@ throw (uno::RuntimeException, std::exception)
aWriteLock.clear();
if ( bNotify )
- m_pParentLayouter->requestLayout( LayoutManager::HINT_TOOLBARSPACE_HAS_CHANGED );
+ m_pParentLayouter->requestLayout();
}
sal_Bool SAL_CALL ToolbarLayoutManager::prepareToggleFloatingMode( const lang::EventObject& e )
@@ -3726,7 +3726,7 @@ throw (uno::RuntimeException, std::exception)
aReadLock.clear();
if ( pParentLayouter )
- pParentLayouter->requestLayout( LayoutManager::HINT_TOOLBARSPACE_HAS_CHANGED );
+ pParentLayouter->requestLayout();
}
}
else
@@ -3790,7 +3790,7 @@ throw (uno::RuntimeException, std::exception)
aWriteLock.clear();
if ( bLayoutDirty && pParentLayouter )
- pParentLayouter->requestLayout( LayoutManager::HINT_TOOLBARSPACE_HAS_CHANGED );
+ pParentLayouter->requestLayout();
}
}
@@ -3943,7 +3943,7 @@ throw (uno::RuntimeException, std::exception)
aWriteLock.clear();
if ( bNotify && pParentLayouter )
- pParentLayouter->requestLayout( LayoutManager::HINT_TOOLBARSPACE_HAS_CHANGED );
+ pParentLayouter->requestLayout();
}
}
}