diff options
author | Jan Holesovsky <kendy@collabora.com> | 2015-09-29 10:22:03 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2015-09-29 11:23:37 +0200 |
commit | e124cd5213750b89e8a6a03dffc43172bc5402a6 (patch) | |
tree | a68408382414c256b90e96b798342b209e345027 | |
parent | d355207b45755cfe1eef0147bc25ead931741684 (diff) |
XFrame parameter to SetMenuBar() is actually never used.
Change-Id: I9413f575c0964d6cbf8a32d0b85c9f2c686bb8fc
-rw-r--r-- | framework/source/layoutmanager/layoutmanager.cxx | 10 | ||||
-rw-r--r-- | include/vcl/menu.hxx | 3 | ||||
-rw-r--r-- | include/vcl/syswin.hxx | 2 | ||||
-rw-r--r-- | vcl/source/window/menu.cxx | 2 | ||||
-rw-r--r-- | vcl/source/window/syswin.cxx | 7 |
5 files changed, 13 insertions, 11 deletions
diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx index 4b4b645b440b..a662ce8d970c 100644 --- a/framework/source/layoutmanager/layoutmanager.cxx +++ b/framework/source/layoutmanager/layoutmanager.cxx @@ -782,7 +782,7 @@ void LayoutManager::implts_updateUIElementsVisibleState( bool bSetVisible ) if ( pSysWindow ) { if ( bSetVisible ) - pSysWindow->SetMenuBar(pMenuBar, m_xFrame); + pSysWindow->SetMenuBar(pMenuBar); else pSysWindow->SetMenuBar( 0 ); } @@ -1166,7 +1166,7 @@ throw (uno::RuntimeException, std::exception) SystemWindow* pSysWindow = getTopSystemWindow( m_xContainerWindow ); if ( pSysWindow ) - pSysWindow->SetMenuBar(pMenuBar, m_xFrame); + pSysWindow->SetMenuBar(pMenuBar); m_bInplaceMenuSet = true; m_xInplaceMenuBar = Reference< XComponent >( static_cast<OWeakObject *>(m_pInplaceMenuBar), UNO_QUERY ); @@ -1193,7 +1193,7 @@ throw (uno::RuntimeException) if ( pSysWindow ) { if ( pMenuBarWrapper ) - pSysWindow->SetMenuBar(static_cast<MenuBar *>(pMenuBarWrapper->GetMenuBarManager()->GetMenuBar()), m_xFrame); + pSysWindow->SetMenuBar(static_cast<MenuBar *>(pMenuBarWrapper->GetMenuBarManager()->GetMenuBar())); else pSysWindow->SetMenuBar(0); } @@ -1494,7 +1494,7 @@ throw (RuntimeException, std::exception) MenuBar* pMenuBar = static_cast<MenuBar*>(pAwtMenuBar->GetMenu()); if ( pMenuBar ) { - pSysWindow->SetMenuBar(pMenuBar, m_xFrame); + pSysWindow->SetMenuBar(pMenuBar); pMenuBar->SetDisplayable( m_bMenuVisible ); if ( m_bMenuVisible ) bNotify = true; @@ -2580,7 +2580,7 @@ bool LayoutManager::implts_resetMenuBar() SystemWindow* pSysWindow = getTopSystemWindow( xContainerWindow ); if ( pSysWindow && bMenuVisible && pSetMenuBar ) { - pSysWindow->SetMenuBar(pSetMenuBar, m_xFrame); + pSysWindow->SetMenuBar(pSetMenuBar); pSetMenuBar->SetDisplayable( true ); return true; } diff --git a/include/vcl/menu.hxx b/include/vcl/menu.hxx index 160ef8bc34f9..b61c4a87b96e 100644 --- a/include/vcl/menu.hxx +++ b/include/vcl/menu.hxx @@ -423,8 +423,7 @@ class VCL_DLLPUBLIC MenuBar : public Menu friend class MenuFloatingWindow; friend class SystemWindow; - SAL_DLLPRIVATE static vcl::Window* ImplCreate(vcl::Window* pParent, vcl::Window* pWindow, - MenuBar* pMenu, const css::uno::Reference<css::frame::XFrame> &rFrame); + SAL_DLLPRIVATE static vcl::Window* ImplCreate(vcl::Window* pParent, vcl::Window* pWindow, MenuBar* pMenu); SAL_DLLPRIVATE static void ImplDestroy(MenuBar* pMenu, bool bDelete); SAL_DLLPRIVATE bool ImplHandleKeyEvent(const KeyEvent& rKEvent, bool bFromMenu = true); SAL_DLLPRIVATE bool ImplHandleCmdEvent(const CommandEvent& rCEvent); diff --git a/include/vcl/syswin.hxx b/include/vcl/syswin.hxx index 78de8c97e30d..fe4eaf42ecd6 100644 --- a/include/vcl/syswin.hxx +++ b/include/vcl/syswin.hxx @@ -233,7 +233,7 @@ public: void SetWindowState(const OString& rStr); OString GetWindowState(sal_uInt32 nMask = WINDOWSTATE_MASK_ALL) const; - void SetMenuBar(MenuBar* pMenuBar, const css::uno::Reference<css::frame::XFrame>& rFrame = css::uno::Reference<css::frame::XFrame>()); + void SetMenuBar(MenuBar* pMenuBar); MenuBar* GetMenuBar() const { return mpMenuBar; } void SetMenuBarMode( MenuBarMode nMode ); diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx index 23f857aa3273..2505afa94939 100644 --- a/vcl/source/window/menu.cxx +++ b/vcl/source/window/menu.cxx @@ -2549,7 +2549,7 @@ void MenuBar::SetDisplayable( bool bDisplayable ) } } -vcl::Window* MenuBar::ImplCreate(vcl::Window* pParent, vcl::Window* pWindow, MenuBar* pMenu, const css::uno::Reference<css::frame::XFrame> &/*rFrame*/) +vcl::Window* MenuBar::ImplCreate(vcl::Window* pParent, vcl::Window* pWindow, MenuBar* pMenu) { MenuBarWindow *pMenuBarWindow = dynamic_cast<MenuBarWindow*>(pWindow); if (!pMenuBarWindow) diff --git a/vcl/source/window/syswin.cxx b/vcl/source/window/syswin.cxx index b711cb342e0b..cac6542649a9 100644 --- a/vcl/source/window/syswin.cxx +++ b/vcl/source/window/syswin.cxx @@ -902,7 +902,7 @@ OString SystemWindow::GetWindowState( sal_uInt32 nMask ) const return ImplWindowStateToStr(aData); } -void SystemWindow::SetMenuBar(MenuBar* pMenuBar, const css::uno::Reference<css::frame::XFrame>& rFrame) +void SystemWindow::SetMenuBar(MenuBar* pMenuBar) { if ( mpMenuBar != pMenuBar ) { @@ -925,7 +925,10 @@ void SystemWindow::SetMenuBar(MenuBar* pMenuBar, const css::uno::Reference<css:: if ( pMenuBar ) { DBG_ASSERT( !pMenuBar->pWindow, "SystemWindow::SetMenuBar() - MenuBars can only set in one SystemWindow at time" ); - static_cast<ImplBorderWindow*>(mpWindowImpl->mpBorderWindow.get())->SetMenuBarWindow( pNewWindow = MenuBar::ImplCreate( mpWindowImpl->mpBorderWindow, pOldWindow, pMenuBar, rFrame)); + + pNewWindow = MenuBar::ImplCreate(mpWindowImpl->mpBorderWindow, pOldWindow, pMenuBar); + static_cast<ImplBorderWindow*>(mpWindowImpl->mpBorderWindow.get())->SetMenuBarWindow(pNewWindow); + CallEventListeners( VCLEVENT_WINDOW_MENUBARADDED, static_cast<void*>(pMenuBar) ); } else |