diff options
Diffstat (limited to 'vcl/source')
-rw-r--r-- | vcl/source/window/menu.cxx | 4 | ||||
-rw-r--r-- | vcl/source/window/syswin.cxx | 12 |
2 files changed, 9 insertions, 7 deletions
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx index ff6581d207a9..6bc427ba28f3 100644 --- a/vcl/source/window/menu.cxx +++ b/vcl/source/window/menu.cxx @@ -2483,9 +2483,9 @@ void MenuBar::SetDisplayable( bool bDisplayable ) } } -VclPtr<vcl::Window> MenuBar::ImplCreate(vcl::Window* pParent, vcl::Window* pWindow, MenuBar* pMenu) +VclPtr<MenuBarWindow> MenuBar::ImplCreate(vcl::Window* pParent, MenuBarWindow* pWindow, MenuBar* pMenu) { - VclPtr<MenuBarWindow> pMenuBarWindow = dynamic_cast<MenuBarWindow*>(pWindow); + VclPtr<MenuBarWindow> pMenuBarWindow = pWindow; if (!pMenuBarWindow) { pMenuBarWindow = VclPtr<MenuBarWindow>::Create(pParent); diff --git a/vcl/source/window/syswin.cxx b/vcl/source/window/syswin.cxx index d4e1f9e51997..e92806e739fe 100644 --- a/vcl/source/window/syswin.cxx +++ b/vcl/source/window/syswin.cxx @@ -19,6 +19,8 @@ #include <memory> +#include "menubarwindow.hxx" + #include <o3tl/safeint.hxx> #include <sal/config.h> #include <sal/log.hxx> @@ -844,14 +846,14 @@ void SystemWindow::SetMenuBar(MenuBar* pMenuBar) return; MenuBar* pOldMenuBar = mpMenuBar; - vcl::Window* pOldWindow = nullptr; - VclPtr<vcl::Window> pNewWindow; + MenuBarWindow* pOldWindow = nullptr; + VclPtr<MenuBarWindow> pNewWindow; mpMenuBar = pMenuBar; if ( mpWindowImpl->mpBorderWindow && (mpWindowImpl->mpBorderWindow->GetType() == WindowType::BORDERWINDOW) ) { if ( pOldMenuBar ) - pOldWindow = pOldMenuBar->GetWindow(); + pOldWindow = pOldMenuBar->getMenuBarWindow(); else pOldWindow = nullptr; if ( pOldWindow ) @@ -888,9 +890,9 @@ void SystemWindow::SetMenuBar(MenuBar* pMenuBar) else { if( pMenuBar ) - pNewWindow = pMenuBar->GetWindow(); + pNewWindow = pMenuBar->getMenuBarWindow(); if( pOldMenuBar ) - pOldWindow = pOldMenuBar->GetWindow(); + pOldWindow = pOldMenuBar->getMenuBarWindow(); } // update taskpane list to make menubar accessible |