Kaydet (Commit) e124cd52 authored tarafından Jan Holesovsky's avatar Jan Holesovsky

XFrame parameter to SetMenuBar() is actually never used.

Change-Id: I9413f575c0964d6cbf8a32d0b85c9f2c686bb8fc
üst d355207b
...@@ -782,7 +782,7 @@ void LayoutManager::implts_updateUIElementsVisibleState( bool bSetVisible ) ...@@ -782,7 +782,7 @@ void LayoutManager::implts_updateUIElementsVisibleState( bool bSetVisible )
if ( pSysWindow ) if ( pSysWindow )
{ {
if ( bSetVisible ) if ( bSetVisible )
pSysWindow->SetMenuBar(pMenuBar, m_xFrame); pSysWindow->SetMenuBar(pMenuBar);
else else
pSysWindow->SetMenuBar( 0 ); pSysWindow->SetMenuBar( 0 );
} }
...@@ -1166,7 +1166,7 @@ throw (uno::RuntimeException, std::exception) ...@@ -1166,7 +1166,7 @@ throw (uno::RuntimeException, std::exception)
SystemWindow* pSysWindow = getTopSystemWindow( m_xContainerWindow ); SystemWindow* pSysWindow = getTopSystemWindow( m_xContainerWindow );
if ( pSysWindow ) if ( pSysWindow )
pSysWindow->SetMenuBar(pMenuBar, m_xFrame); pSysWindow->SetMenuBar(pMenuBar);
m_bInplaceMenuSet = true; m_bInplaceMenuSet = true;
m_xInplaceMenuBar = Reference< XComponent >( static_cast<OWeakObject *>(m_pInplaceMenuBar), UNO_QUERY ); m_xInplaceMenuBar = Reference< XComponent >( static_cast<OWeakObject *>(m_pInplaceMenuBar), UNO_QUERY );
...@@ -1193,7 +1193,7 @@ throw (uno::RuntimeException) ...@@ -1193,7 +1193,7 @@ throw (uno::RuntimeException)
if ( pSysWindow ) if ( pSysWindow )
{ {
if ( pMenuBarWrapper ) if ( pMenuBarWrapper )
pSysWindow->SetMenuBar(static_cast<MenuBar *>(pMenuBarWrapper->GetMenuBarManager()->GetMenuBar()), m_xFrame); pSysWindow->SetMenuBar(static_cast<MenuBar *>(pMenuBarWrapper->GetMenuBarManager()->GetMenuBar()));
else else
pSysWindow->SetMenuBar(0); pSysWindow->SetMenuBar(0);
} }
...@@ -1494,7 +1494,7 @@ throw (RuntimeException, std::exception) ...@@ -1494,7 +1494,7 @@ throw (RuntimeException, std::exception)
MenuBar* pMenuBar = static_cast<MenuBar*>(pAwtMenuBar->GetMenu()); MenuBar* pMenuBar = static_cast<MenuBar*>(pAwtMenuBar->GetMenu());
if ( pMenuBar ) if ( pMenuBar )
{ {
pSysWindow->SetMenuBar(pMenuBar, m_xFrame); pSysWindow->SetMenuBar(pMenuBar);
pMenuBar->SetDisplayable( m_bMenuVisible ); pMenuBar->SetDisplayable( m_bMenuVisible );
if ( m_bMenuVisible ) if ( m_bMenuVisible )
bNotify = true; bNotify = true;
...@@ -2580,7 +2580,7 @@ bool LayoutManager::implts_resetMenuBar() ...@@ -2580,7 +2580,7 @@ bool LayoutManager::implts_resetMenuBar()
SystemWindow* pSysWindow = getTopSystemWindow( xContainerWindow ); SystemWindow* pSysWindow = getTopSystemWindow( xContainerWindow );
if ( pSysWindow && bMenuVisible && pSetMenuBar ) if ( pSysWindow && bMenuVisible && pSetMenuBar )
{ {
pSysWindow->SetMenuBar(pSetMenuBar, m_xFrame); pSysWindow->SetMenuBar(pSetMenuBar);
pSetMenuBar->SetDisplayable( true ); pSetMenuBar->SetDisplayable( true );
return true; return true;
} }
......
...@@ -423,8 +423,7 @@ class VCL_DLLPUBLIC MenuBar : public Menu ...@@ -423,8 +423,7 @@ class VCL_DLLPUBLIC MenuBar : public Menu
friend class MenuFloatingWindow; friend class MenuFloatingWindow;
friend class SystemWindow; friend class SystemWindow;
SAL_DLLPRIVATE static vcl::Window* ImplCreate(vcl::Window* pParent, vcl::Window* pWindow, SAL_DLLPRIVATE static vcl::Window* ImplCreate(vcl::Window* pParent, vcl::Window* pWindow, MenuBar* pMenu);
MenuBar* pMenu, const css::uno::Reference<css::frame::XFrame> &rFrame);
SAL_DLLPRIVATE static void ImplDestroy(MenuBar* pMenu, bool bDelete); SAL_DLLPRIVATE static void ImplDestroy(MenuBar* pMenu, bool bDelete);
SAL_DLLPRIVATE bool ImplHandleKeyEvent(const KeyEvent& rKEvent, bool bFromMenu = true); SAL_DLLPRIVATE bool ImplHandleKeyEvent(const KeyEvent& rKEvent, bool bFromMenu = true);
SAL_DLLPRIVATE bool ImplHandleCmdEvent(const CommandEvent& rCEvent); SAL_DLLPRIVATE bool ImplHandleCmdEvent(const CommandEvent& rCEvent);
......
...@@ -233,7 +233,7 @@ public: ...@@ -233,7 +233,7 @@ public:
void SetWindowState(const OString& rStr); void SetWindowState(const OString& rStr);
OString GetWindowState(sal_uInt32 nMask = WINDOWSTATE_MASK_ALL) const; 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; } MenuBar* GetMenuBar() const { return mpMenuBar; }
void SetMenuBarMode( MenuBarMode nMode ); void SetMenuBarMode( MenuBarMode nMode );
......
...@@ -2549,7 +2549,7 @@ void MenuBar::SetDisplayable( bool bDisplayable ) ...@@ -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); MenuBarWindow *pMenuBarWindow = dynamic_cast<MenuBarWindow*>(pWindow);
if (!pMenuBarWindow) if (!pMenuBarWindow)
......
...@@ -902,7 +902,7 @@ OString SystemWindow::GetWindowState( sal_uInt32 nMask ) const ...@@ -902,7 +902,7 @@ OString SystemWindow::GetWindowState( sal_uInt32 nMask ) const
return ImplWindowStateToStr(aData); return ImplWindowStateToStr(aData);
} }
void SystemWindow::SetMenuBar(MenuBar* pMenuBar, const css::uno::Reference<css::frame::XFrame>& rFrame) void SystemWindow::SetMenuBar(MenuBar* pMenuBar)
{ {
if ( mpMenuBar != pMenuBar ) if ( mpMenuBar != pMenuBar )
{ {
...@@ -925,7 +925,10 @@ void SystemWindow::SetMenuBar(MenuBar* pMenuBar, const css::uno::Reference<css:: ...@@ -925,7 +925,10 @@ void SystemWindow::SetMenuBar(MenuBar* pMenuBar, const css::uno::Reference<css::
if ( pMenuBar ) if ( pMenuBar )
{ {
DBG_ASSERT( !pMenuBar->pWindow, "SystemWindow::SetMenuBar() - MenuBars can only set in one SystemWindow at time" ); 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) ); CallEventListeners( VCLEVENT_WINDOW_MENUBARADDED, static_cast<void*>(pMenuBar) );
} }
else else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment