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

Jan Holesovsky kendy at collabora.com
Tue Sep 29 02:24:15 PDT 2015


 framework/source/layoutmanager/layoutmanager.cxx |   10 +++++-----
 include/vcl/menu.hxx                             |    3 +--
 include/vcl/syswin.hxx                           |    2 +-
 vcl/source/window/menu.cxx                       |    2 +-
 vcl/source/window/syswin.cxx                     |    7 +++++--
 5 files changed, 13 insertions(+), 11 deletions(-)

New commits:
commit e124cd5213750b89e8a6a03dffc43172bc5402a6
Author: Jan Holesovsky <kendy at collabora.com>
Date:   Tue Sep 29 10:22:03 2015 +0200

    XFrame parameter to SetMenuBar() is actually never used.
    
    Change-Id: I9413f575c0964d6cbf8a32d0b85c9f2c686bb8fc

diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx
index 4b4b645..a662ce8 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 160ef8b..b61c4a8 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 78de8c9..fe4eaf4 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 23f857a..2505afa 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 b711cb3..cac6542 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


More information about the Libreoffice-commits mailing list