include/vcl/menu.hxx                     |    5 -
 vcl/source/window/menu.cxx               |  118 +++++++++++++++----------------
 vcl/source/window/menubarwindow.cxx      |   10 +-
 vcl/source/window/menufloatingwindow.cxx |   18 ++--
 vcl/source/window/syswin.cxx             |   10 +-
 5 files changed, 80 insertions(+), 81 deletions(-)

New commits:
commit 66dcd9ea8af085f222d59aea25da1fae500a5e6a
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Mon Dec 2 09:38:40 2024 +0100
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Mon Dec 2 15:18:27 2024 +0100

    vcl: Prefix Menu::pWindow member with "m_"
    
    This makes a bit more obvious that this is a class
    member while reading code where it's involved, in
    particular since local `pWindow` variables are
    used in addition.
    
    Change-Id: Ic68e856a0c3ddedbf510124937cf4bc21febf916
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177658
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>
    Tested-by: Jenkins

diff --git a/include/vcl/menu.hxx b/include/vcl/menu.hxx
index dad0e7b642bb..893959e82634 100644
--- a/include/vcl/menu.hxx
+++ b/include/vcl/menu.hxx
@@ -126,7 +126,7 @@ private:
     ImplMenuDelData* mpFirstDel;
     std::unique_ptr<MenuItemList> pItemList; // list with MenuItems
     VclPtr<Menu> pStartedFrom;
-    VclPtr<vcl::Window> pWindow;
+    VclPtr<vcl::Window> m_pWindow;
 
     Link<Menu*, bool> aActivateHdl;       // Active-Handler
     Link<Menu*, bool> aDeactivateHdl;     // Deactivate-Handler
@@ -375,7 +375,7 @@ public:
     // gets the activation key of the specified item
     KeyEvent GetActivationKey( sal_uInt16 nItemId ) const;
 
-    vcl::Window* GetWindow() const { return pWindow; }
+    vcl::Window* GetWindow() const { return m_pWindow; }
 
     void SetAccessibleName( sal_uInt16 nItemId, const OUString& rStr );
     OUString GetAccessibleName( sal_uInt16 nItemId ) const;
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index bebdfd2f0eee..04e351ce4ae0 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -161,7 +161,7 @@ Menu::Menu()
     : mpFirstDel(nullptr),
       pItemList(new MenuItemList),
       pStartedFrom(nullptr),
-      pWindow(nullptr),
+      m_pWindow(nullptr),
       nTitleHeight(0),
       nEventId(nullptr),
       mnHighlightedItemPos(ITEMPOS_INVALID),
@@ -186,12 +186,12 @@ void Menu::dispose()
 
     // at the window free the reference to the accessible component
     // and make sure the MenuFloatingWindow knows about our destruction
-    if ( pWindow )
+    if (m_pWindow)
     {
-        MenuFloatingWindow* pFloat = 
static_cast<MenuFloatingWindow*>(pWindow.get());
+        MenuFloatingWindow* pFloat = 
static_cast<MenuFloatingWindow*>(m_pWindow.get());
         if( pFloat->pMenu.get() == this )
             pFloat->pMenu.clear();
-        pWindow->SetAccessible( css::uno::Reference< 
css::accessibility::XAccessible >() );
+        m_pWindow->SetAccessible( css::uno::Reference< 
css::accessibility::XAccessible >() );
     }
 
     // dispose accessible components
@@ -233,7 +233,7 @@ void Menu::dispose()
     mpSalMenu.reset();
 
     pStartedFrom.clear();
-    pWindow.clear();
+    m_pWindow.clear();
     VclReferenceBase::dispose();
 }
 
@@ -1302,7 +1302,7 @@ bool Menu::IsItemPosVisible( sal_uInt16 nItemPos ) const
 
 bool Menu::IsMenuVisible() const
 {
-    return pWindow && pWindow->IsReallyVisible();
+    return m_pWindow && m_pWindow->IsReallyVisible();
 }
 
 bool Menu::ImplIsSelectable( sal_uInt16 nPos ) const
@@ -1629,20 +1629,20 @@ Size Menu::ImplCalcSize( vcl::Window* pWin )
         aSz.setHeight( nFontHeight+6 );
 
         // get menubar height from native methods if supported
-        if( pWindow->IsNativeControlSupported( ControlType::Menubar, 
ControlPart::Entire ) )
+        if (m_pWindow->IsNativeControlSupported(ControlType::Menubar, 
ControlPart::Entire))
         {
             ImplControlValue aVal;
             tools::Rectangle aNativeBounds;
             tools::Rectangle aNativeContent;
             Point tmp( 0, 0 );
             tools::Rectangle aCtrlRegion( tmp, Size( 100, 15 ) );
-            if( pWindow->GetNativeControlRegion( ControlType::Menubar,
-                                                 ControlPart::Entire,
-                                                 aCtrlRegion,
-                                                 ControlState::ENABLED,
-                                                 aVal,
-                                                 aNativeBounds,
-                                                 aNativeContent )
+            if (m_pWindow->GetNativeControlRegion(ControlType::Menubar,
+                                                  ControlPart::Entire,
+                                                  aCtrlRegion,
+                                                  ControlState::ENABLED,
+                                                  aVal,
+                                                  aNativeBounds,
+                                                  aNativeContent)
             )
             {
                 int nNativeHeight = aNativeBounds.GetHeight();
@@ -1653,7 +1653,7 @@ Size Menu::ImplCalcSize( vcl::Window* pWin )
 
         // account for the size of the close button, which actually is a 
toolbox
         // due to NWF this is variable
-        tools::Long nCloseButtonHeight = 
static_cast<MenuBarWindow*>(pWindow.get())->MinCloseButtonSize().Height();
+        tools::Long nCloseButtonHeight = 
static_cast<MenuBarWindow*>(m_pWindow.get())->MinCloseButtonSize().Height();
         if (aSz.Height() < nCloseButtonHeight)
             aSz.setHeight( nCloseButtonHeight );
     }
@@ -1819,7 +1819,7 @@ void Menu::ImplPaint(vcl::RenderContext& rRenderContext, 
Size const & rSize,
                 // contained. The application itself should check for this!
                 // Otherwise it could happen entries are disabled due to
                 // asynchronous loading
-                if (!pData->bEnabled || !pWindow->IsEnabled())
+                if (!pData->bEnabled || !m_pWindow->IsEnabled())
                 {
                     nTextStyle   |= DrawTextFlags::Disable;
                     nSymbolStyle |= DrawSymbolFlags::Disable;
@@ -1833,7 +1833,7 @@ void Menu::ImplPaint(vcl::RenderContext& rRenderContext, 
Size const & rSize,
                     if 
(rRenderContext.IsNativeControlSupported(ControlType::MenuPopup, 
ControlPart::Separator))
                     {
                         ControlState nState = ControlState::NONE;
-                        if (pData->bEnabled && pWindow->IsEnabled())
+                        if (pData->bEnabled && m_pWindow->IsEnabled())
                             nState |= ControlState::ENABLED;
                         if (bHighlighted)
                             nState |= ControlState::SELECTED;
@@ -1885,7 +1885,7 @@ void Menu::ImplPaint(vcl::RenderContext& rRenderContext, 
Size const & rSize,
                             if (pData->bChecked)
                                 nState |= ControlState::PRESSED;
 
-                            if (pData->bEnabled && pWindow->IsEnabled())
+                            if (pData->bEnabled && m_pWindow->IsEnabled())
                                 nState |= ControlState::ENABLED;
 
                             if (bHighlighted)
@@ -1905,7 +1905,7 @@ void Menu::ImplPaint(vcl::RenderContext& rRenderContext, 
Size const & rSize,
                         }
                         else if (pData->bChecked) // by default do nothing for 
unchecked items
                         {
-                            ImplPaintCheckBackground(rRenderContext, *pWindow, 
aOuterCheckRect, pThisItemOnly && bHighlighted);
+                            ImplPaintCheckBackground(rRenderContext, 
*m_pWindow, aOuterCheckRect, pThisItemOnly && bHighlighted);
 
                             SymbolType eSymbol;
                             Size aSymbolSize;
@@ -1932,7 +1932,7 @@ void Menu::ImplPaint(vcl::RenderContext& rRenderContext, 
Size const & rSize,
                 {
                     // Don't render an image for a check thing
                     if (pData->bChecked)
-                        ImplPaintCheckBackground(rRenderContext, *pWindow, 
aOuterCheckRect, pThisItemOnly && bHighlighted);
+                        ImplPaintCheckBackground(rRenderContext, *m_pWindow, 
aOuterCheckRect, pThisItemOnly && bHighlighted);
 
                     Image aImage = pData->aImage;
 
@@ -1953,7 +1953,7 @@ void Menu::ImplPaint(vcl::RenderContext& rRenderContext, 
Size const & rSize,
                     const Menu *pMenu = this;
                     while (!pMenu->IsMenuBar() && pMenu->pStartedFrom)
                         pMenu = pMenu->pStartedFrom;
-                    if (!pMenu->IsMenuBar() || 
!static_cast<MenuBarWindow*>(pMenu->pWindow.get())->GetMBWHideAccel())
+                    if (!pMenu->IsMenuBar() || 
!static_cast<MenuBarWindow*>(pMenu->m_pWindow.get())->GetMBWHideAccel())
                         nStyle |= DrawTextFlags::Mnemonic;
 
                     if (pData->bIsTemporary)
@@ -2048,7 +2048,7 @@ void Menu::ImplPaint(vcl::RenderContext& rRenderContext, 
Size const & rSize,
                             aSpacing = nOuterSpaceX;
                         }
 
-                        if (pData->bEnabled && pWindow->IsEnabled())
+                        if (pData->bEnabled && m_pWindow->IsEnabled())
                             nState |= ControlState::ENABLED;
                         if (bHighlighted)
                             nState |= ControlState::SELECTED;
@@ -2238,18 +2238,18 @@ void Menu::ImplKillLayoutData() const
 
 void Menu::ImplFillLayoutData() const
 {
-    if (!(pWindow && pWindow->IsReallyVisible()))
+    if (!(m_pWindow && m_pWindow->IsReallyVisible()))
         return;
 
     mpLayoutData.reset(new MenuLayoutData);
     if (IsMenuBar())
     {
-        ImplPaint(*pWindow->GetOutDev(), pWindow->GetOutputSizePixel(), 0, 0, 
nullptr, false, true); // FIXME
+        ImplPaint(*m_pWindow->GetOutDev(), m_pWindow->GetOutputSizePixel(), 0, 
0, nullptr, false, true); // FIXME
     }
     else
     {
-        MenuFloatingWindow* pFloat = 
static_cast<MenuFloatingWindow*>(pWindow.get());
-        ImplPaint(*pWindow->GetOutDev(), pWindow->GetOutputSizePixel(), 
pFloat->nScrollerHeight, pFloat->ImplGetStartY(),
+        MenuFloatingWindow* pFloat = 
static_cast<MenuFloatingWindow*>(m_pWindow.get());
+        ImplPaint(*m_pWindow->GetOutDev(), m_pWindow->GetOutputSizePixel(), 
pFloat->nScrollerHeight, pFloat->ImplGetStartY(),
                   nullptr, false, true); //FIXME
     }
 }
@@ -2364,12 +2364,12 @@ bool Menu::IsHighlighted( sal_uInt16 nItemPos ) const
 {
     bool bRet = false;
 
-    if( pWindow )
+    if (m_pWindow)
     {
         if (IsMenuBar())
-            bRet = ( nItemPos == static_cast< MenuBarWindow * > 
(pWindow.get())->GetHighlightedItem() );
+            bRet = ( nItemPos == static_cast< MenuBarWindow * > 
(m_pWindow.get())->GetHighlightedItem() );
         else
-            bRet = ( nItemPos == static_cast< MenuFloatingWindow * > 
(pWindow.get())->GetHighlightedItem() );
+            bRet = ( nItemPos == static_cast< MenuFloatingWindow * > 
(m_pWindow.get())->GetHighlightedItem() );
     }
 
     return bRet;
@@ -2377,18 +2377,18 @@ bool Menu::IsHighlighted( sal_uInt16 nItemPos ) const
 
 void Menu::HighlightItem( sal_uInt16 nItemPos )
 {
-    if ( !pWindow )
+    if ( !m_pWindow )
         return;
 
     if (IsMenuBar())
     {
-        MenuBarWindow* pMenuWin = static_cast< MenuBarWindow* >( pWindow.get() 
);
+        MenuBarWindow* pMenuWin = static_cast< MenuBarWindow* >( 
m_pWindow.get() );
         pMenuWin->SetAutoPopup( false );
         pMenuWin->ChangeHighlightItem( nItemPos, false );
     }
     else
     {
-        static_cast< MenuFloatingWindow* >( pWindow.get() 
)->ChangeHighlightItem( nItemPos, false );
+        static_cast< MenuFloatingWindow* >( m_pWindow.get() 
)->ChangeHighlightItem( nItemPos, false );
     }
 }
 
@@ -2396,9 +2396,9 @@ MenuBarWindow* MenuBar::getMenuBarWindow()
 {
     // so far just a dynamic_cast, hopefully to be turned into something saner
     // at some stage
-    MenuBarWindow *pWin = dynamic_cast<MenuBarWindow*>(pWindow.get());
+    MenuBarWindow *pWin = dynamic_cast<MenuBarWindow*>(m_pWindow.get());
     //either there is no window (fdo#87663) or it is a MenuBarWindow
-    assert(!pWindow || pWin);
+    assert(!m_pWindow || pWin);
     return pWin;
 }
 
@@ -2442,7 +2442,7 @@ void MenuBar::ClosePopup(Menu *pMenu)
 
 void MenuBar::MenuBarKeyInput(const KeyEvent& rEvent)
 {
-    pWindow->KeyInput(rEvent);
+    m_pWindow->KeyInput(rEvent);
 }
 
 void MenuBar::ShowCloseButton(bool bShow)
@@ -2493,7 +2493,7 @@ VclPtr<vcl::Window> MenuBar::ImplCreate(vcl::Window* 
pParent, vcl::Window* pWind
     }
 
     pMenu->pStartedFrom = nullptr;
-    pMenu->pWindow = pWindow;
+    pMenu->m_pWindow = pWindow;
     pMenuBarWindow->SetMenu(pMenu);
     tools::Long nHeight = pWindow ? pMenu->ImplCalcSize(pWindow).Height() : 0;
 
@@ -2518,7 +2518,7 @@ void MenuBar::ImplDestroy( MenuBar* pMenu, bool bDelete )
             pMenuWin->KillActivePopup();
         pWindow->disposeOnce();
     }
-    pMenu->pWindow = nullptr;
+    pMenu->m_pWindow = nullptr;
     if (pMenu->mpSalMenu) {
         pMenu->mpSalMenu->ShowMenuBar(false);
     }
@@ -2582,10 +2582,10 @@ bool MenuBar::ImplHandleCmdEvent( const CommandEvent& 
rCEvent )
 
 void MenuBar::SelectItem(sal_uInt16 nId)
 {
-    if (!pWindow)
+    if (!m_pWindow)
         return;
 
-    pWindow->GrabFocus();
+    m_pWindow->GrabFocus();
     nId = GetItemPos( nId );
 
     MenuBarWindow* pMenuWin = getMenuBarWindow();
@@ -2947,16 +2947,16 @@ bool PopupMenu::PrepareRun(const VclPtr<vcl::Window>& 
pParentWin, tools::Rectang
         pWin->SetBorderStyle( WindowBorderStyle::NOBORDER );
     else
         pWin->SetBorderStyle( pWin->GetBorderStyle() | WindowBorderStyle::MENU 
);
-    pWindow = pWin;
+    m_pWindow = pWin;
 
     Size aSz = ImplCalcSize( pWin );
 
     AbsoluteScreenPixelRectangle aDesktopRect(pWin->GetDesktopRectPixel());
     if( Application::GetScreenCount() > 1 )
     {
-        vcl::Window* pDeskW = pWindow->GetWindow( GetWindowType::RealParent );
+        vcl::Window* pDeskW = m_pWindow->GetWindow( GetWindowType::RealParent 
);
         if( ! pDeskW )
-            pDeskW = pWindow;
+            pDeskW = m_pWindow;
         AbsoluteScreenPixelPoint 
aDesktopTL(pDeskW->OutputToAbsoluteScreenPixel(rRect.TopLeft()));
         aDesktopRect = Application::GetScreenPosSizePixel(
             
Application::GetBestScreen(AbsoluteScreenPixelRectangle(aDesktopTL, 
rRect.GetSize())));
@@ -2992,7 +2992,7 @@ bool PopupMenu::PrepareRun(const VclPtr<vcl::Window>& 
pParentWin, tools::Rectang
     if (pStartedFrom && pStartedFrom->IsMenuBar())
         nMaxHeight -= pParentWin->GetSizePixel().Height();
     sal_Int32 nLeft, nTop, nRight, nBottom;
-    pWindow->GetBorder( nLeft, nTop, nRight, nBottom );
+    m_pWindow->GetBorder( nLeft, nTop, nRight, nBottom );
     nMaxHeight -= nTop+nBottom;
     if ( aSz.Height() > nMaxHeight )
     {
@@ -3019,9 +3019,9 @@ bool PopupMenu::Run(const VclPtr<MenuFloatingWindow>& 
pWin, const bool bRealExec
     {
         sal_uInt16 aPos;
         if (pSFrom->IsMenuBar())
-            aPos = static_cast<MenuBarWindow 
*>(pSFrom->pWindow.get())->GetHighlightedItem();
+            aPos = static_cast<MenuBarWindow 
*>(pSFrom->m_pWindow.get())->GetHighlightedItem();
         else
-            aPos = static_cast<MenuFloatingWindow 
*>(pSFrom->pWindow.get())->GetHighlightedItem();
+            aPos = static_cast<MenuFloatingWindow 
*>(pSFrom->m_pWindow.get())->GetHighlightedItem();
 
         pWin->SetPosInParent(aPos);  // store position to be sent in 
SUBMENUDEACTIVATE
         pSFrom->ImplCallEventListeners(VclEventId::MenuSubmenuActivate, aPos);
@@ -3077,7 +3077,7 @@ void PopupMenu::FinishRun(const 
VclPtr<MenuFloatingWindow>& pWin, const VclPtr<v
         pWin->StopExecute();
 
     pWin->doShutdown();
-    pWindow.disposeAndClear();
+    m_pWindow.disposeAndClear();
     ImplClosePopupToolBox(pParentWin);
     ImplFlushPendingSelect();
 }
diff --git a/vcl/source/window/menubarwindow.cxx 
b/vcl/source/window/menubarwindow.cxx
index 1ec31bdd7cc7..9eaaba67db81 100644
--- a/vcl/source/window/menubarwindow.cxx
+++ b/vcl/source/window/menubarwindow.cxx
@@ -350,8 +350,8 @@ void MenuBarWindow::KillActivePopup()
     if ( !m_pActivePopup )
         return;
 
-    if( m_pActivePopup->pWindow )
-        if( static_cast<FloatingWindow 
*>(m_pActivePopup->pWindow.get())->IsInCleanUp() )
+    if (m_pActivePopup->m_pWindow)
+        if (static_cast<FloatingWindow 
*>(m_pActivePopup->m_pWindow.get())->IsInCleanUp())
             return; // kill it later
 
     if ( m_pActivePopup->bInCallback )
@@ -375,7 +375,7 @@ void MenuBarWindow::KillActivePopup()
         }
         m_pActivePopup->ImplGetFloatingWindow()->StopExecute();
         m_pActivePopup->ImplGetFloatingWindow()->doShutdown();
-        m_pActivePopup->pWindow.disposeAndClear();
+        m_pActivePopup->m_pWindow.disposeAndClear();
     }
     m_pActivePopup = nullptr;
 }
diff --git a/vcl/source/window/menufloatingwindow.cxx 
b/vcl/source/window/menufloatingwindow.cxx
index fc4f12288e46..4597a993e7f0 100644
--- a/vcl/source/window/menufloatingwindow.cxx
+++ b/vcl/source/window/menufloatingwindow.cxx
@@ -482,8 +482,8 @@ void MenuFloatingWindow::KillActivePopup( PopupMenu* 
pThisOnly )
     if ( !pActivePopup || ( pThisOnly && ( pThisOnly != pActivePopup ) ) )
         return;
 
-    if( pActivePopup->pWindow )
-        if( static_cast<FloatingWindow 
*>(pActivePopup->pWindow.get())->IsInCleanUp() )
+    if (pActivePopup->m_pWindow)
+        if (static_cast<FloatingWindow 
*>(pActivePopup->m_pWindow.get())->IsInCleanUp())
             return; // kill it later
     if ( pActivePopup->bInCallback )
         pActivePopup->bCanceled = true;
@@ -499,7 +499,7 @@ void MenuFloatingWindow::KillActivePopup( PopupMenu* 
pThisOnly )
     {
         pPopup->ImplGetFloatingWindow()->StopExecute();
         pPopup->ImplGetFloatingWindow()->doShutdown();
-        pPopup->pWindow.disposeAndClear();
+        pPopup->m_pWindow.disposeAndClear();
 
         PaintImmediately();
     }
diff --git a/vcl/source/window/syswin.cxx b/vcl/source/window/syswin.cxx
index 1109e1b48b8b..d4e1f9e51997 100644
--- a/vcl/source/window/syswin.cxx
+++ b/vcl/source/window/syswin.cxx
@@ -861,7 +861,7 @@ void SystemWindow::SetMenuBar(MenuBar* pMenuBar)
         }
         if ( pMenuBar )
         {
-            SAL_WARN_IF( pMenuBar->pWindow, "vcl", "SystemWindow::SetMenuBar() 
- MenuBars can only set in one SystemWindow at time" );
+            SAL_WARN_IF( pMenuBar->m_pWindow, "vcl", 
"SystemWindow::SetMenuBar() - MenuBars can only set in one SystemWindow at 
time" );
 
             pNewWindow = MenuBar::ImplCreate(mpWindowImpl->mpBorderWindow, 
pOldWindow, pMenuBar);
             
static_cast<ImplBorderWindow*>(mpWindowImpl->mpBorderWindow.get())->SetMenuBarWindow(pNewWindow);
commit 7ea2e48c431dad2fd704a0f75c0059904e37c715
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Mon Dec 2 09:19:55 2024 +0100
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Mon Dec 2 15:18:21 2024 +0100

    vcl: Consolidate to one Menu::pWindow getter
    
    There are two getters for that member:
    Menu::ImplGetWindow and Menu::GetWindow.
    
    Replace uses of the former with the latter
    and drop Menu::ImplGetWindow.
    
    Change-Id: Ieaefe43258172f6000c326503eeeefe1a05faabb
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177657
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>

diff --git a/include/vcl/menu.hxx b/include/vcl/menu.hxx
index 90f6d22b0ebd..dad0e7b642bb 100644
--- a/include/vcl/menu.hxx
+++ b/include/vcl/menu.hxx
@@ -209,7 +209,6 @@ protected:
 public:
     SAL_DLLPRIVATE void ImplKillLayoutData() const;
 
-    SAL_DLLPRIVATE vcl::Window* ImplGetWindow() const { return pWindow; }
 #if defined(MACOSX)
     void ImplSelectWithStart( Menu* pStartMenu = nullptr );
 #endif
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index 9b00d9cb23bf..bebdfd2f0eee 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -445,7 +445,7 @@ void Menu::InsertItem(sal_uInt16 nItemId, const OUString& 
rStr, MenuItemBits nIt
     // put Item in MenuItemList
     NbcInsertItem(nItemId, nItemBits, rStr, this, nPos, rIdent);
 
-    vcl::Window* pWin = ImplGetWindow();
+    vcl::Window* pWin = GetWindow();
     mpLayoutData.reset();
     if ( pWin )
     {
@@ -509,7 +509,7 @@ void Menu::RemoveItem( sal_uInt16 nPos )
         bRemove = true;
     }
 
-    vcl::Window* pWin = ImplGetWindow();
+    vcl::Window* pWin = GetWindow();
     if ( pWin )
     {
         ImplCalcSize( pWin );
@@ -939,7 +939,7 @@ void Menu::EnableItem( sal_uInt16 nItemId, bool bEnable )
 
     pItemData->bEnabled = bEnable;
 
-    vcl::Window* pWin = ImplGetWindow();
+    vcl::Window* pWin = GetWindow();
     if ( pWin && pWin->IsVisible() )
     {
         SAL_WARN_IF(!IsMenuBar(), "vcl", "Menu::EnableItem - Popup visible!" );
@@ -983,7 +983,7 @@ void Menu::ShowItem( sal_uInt16 nItemId, bool bVisible )
     if (IsMenuBar() || !pData || (pData->bVisible == bVisible))
         return;
 
-    vcl::Window* pWin = ImplGetWindow();
+    vcl::Window* pWin = GetWindow();
     if ( pWin && pWin->IsVisible() )
     {
         SAL_WARN( "vcl", "Menu::ShowItem - ignored for visible popups!" );
@@ -1015,7 +1015,7 @@ void Menu::SetItemText( sal_uInt16 nItemId, const 
OUString& rStr )
     if( ImplGetSalMenu() && pData->pSalMenuItem )
         ImplGetSalMenu()->SetItemText( nPos, pData->pSalMenuItem.get(), rStr );
 
-    vcl::Window* pWin = ImplGetWindow();
+    vcl::Window* pWin = GetWindow();
     mpLayoutData.reset();
     if (pWin && IsMenuBar())
     {
@@ -2510,7 +2510,7 @@ VclPtr<vcl::Window> MenuBar::ImplCreate(vcl::Window* 
pParent, vcl::Window* pWind
 
 void MenuBar::ImplDestroy( MenuBar* pMenu, bool bDelete )
 {
-    vcl::Window *pWindow = pMenu->ImplGetWindow();
+    vcl::Window *pWindow = pMenu->GetWindow();
     if (pWindow && bDelete)
     {
         MenuBarWindow* pMenuWin = pMenu->getMenuBarWindow();
@@ -2545,7 +2545,7 @@ bool MenuBar::ImplHandleKeyEvent( const KeyEvent& rKEvent 
)
 
     bool bDone = false;
     // check for enabled, if this method is called from another window...
-    vcl::Window* pWin = ImplGetWindow();
+    vcl::Window* pWin = GetWindow();
     if (pWin && pWin->IsEnabled() && pWin->IsInputEnabled()  && 
!pWin->IsInModalMode())
     {
         MenuBarWindow* pMenuWin = getMenuBarWindow();
@@ -2562,7 +2562,7 @@ bool MenuBar::ImplHandleCmdEvent( const CommandEvent& 
rCEvent )
         return false;
 
     // check for enabled, if this method is called from another window...
-    MenuBarWindow* pWin = static_cast<MenuBarWindow*>(ImplGetWindow());
+    MenuBarWindow* pWin = static_cast<MenuBarWindow*>(GetWindow());
     if ( pWin && pWin->IsEnabled() && pWin->IsInputEnabled()  && ! 
pWin->IsInModalMode() )
     {
         if (rCEvent.GetCommand() == CommandEventId::ModKeyChange && 
ImplGetSVData()->maNWFData.mbAutoAccel)
@@ -2728,7 +2728,7 @@ int MenuBar::GetMenuBarHeight() const
 // bool PopupMenu::bAnyPopupInExecute = false;
 
 MenuFloatingWindow * PopupMenu::ImplGetFloatingWindow() const {
-    return static_cast<MenuFloatingWindow *>(Menu::ImplGetWindow());
+    return static_cast<MenuFloatingWindow *>(Menu::GetWindow());
 }
 
 PopupMenu::PopupMenu()
@@ -2749,7 +2749,7 @@ PopupMenu::~PopupMenu()
 
 void PopupMenu::ClosePopup(Menu* pMenu)
 {
-    MenuFloatingWindow* p = dynamic_cast<MenuFloatingWindow*>(ImplGetWindow());
+    MenuFloatingWindow* p = dynamic_cast<MenuFloatingWindow*>(GetWindow());
     PopupMenu *pPopup = dynamic_cast<PopupMenu*>(pMenu);
     if (p && pPopup)
         p->KillActivePopup(pPopup);
@@ -2771,13 +2771,13 @@ PopupMenu* PopupMenu::GetActivePopupMenu()
 
 void PopupMenu::EndExecute()
 {
-    if ( ImplGetWindow() )
+    if (GetWindow())
         ImplGetFloatingWindow()->EndExecute( 0 );
 }
 
 void PopupMenu::SelectItem(sal_uInt16 nId)
 {
-    if ( !ImplGetWindow() )
+    if (!GetWindow())
         return;
 
     if( nId != ITEMPOS_INVALID )
@@ -2887,7 +2887,7 @@ bool PopupMenu::PrepareRun(const VclPtr<vcl::Window>& 
pParentWin, tools::Rectang
                                                            | 
FloatWinPopupEndFlags::CloseAll);
     }
 
-    SAL_WARN_IF( ImplGetWindow(), "vcl", "Win?!" );
+    SAL_WARN_IF(GetWindow(), "vcl", "Win?!");
     rRect.SetPos(pParentWin->OutputToScreenPixel(rRect.TopLeft()));
 
     nPopupModeFlags |= FloatWinPopupFlags::NoKeyClose | 
FloatWinPopupFlags::AllMouseButtonClose | FloatWinPopupFlags::GrabFocus;
diff --git a/vcl/source/window/menubarwindow.cxx 
b/vcl/source/window/menubarwindow.cxx
index 9062e9952d9e..1ec31bdd7cc7 100644
--- a/vcl/source/window/menubarwindow.cxx
+++ b/vcl/source/window/menubarwindow.cxx
@@ -361,7 +361,7 @@ void MenuBarWindow::KillActivePopup()
     m_pActivePopup->Deactivate();
     m_pActivePopup->bInCallback = false;
     // check for pActivePopup, if stopped by deactivate...
-    if ( m_pActivePopup->ImplGetWindow() )
+    if (m_pActivePopup->GetWindow())
     {
         if (mpParentPopup)
         {
@@ -470,7 +470,7 @@ void MenuBarWindow::ChangeHighlightItem( sal_uInt16 n, bool 
bSelectEntry, bool b
 
     // #57934# close active popup if applicable, as TH's background storage 
works.
     MenuItemData* pNextData = m_pMenu->pItemList->GetDataFromPos( n );
-    if ( m_pActivePopup && m_pActivePopup->ImplGetWindow() && ( !pNextData || 
( m_pActivePopup != pNextData->pSubMenu ) ) )
+    if (m_pActivePopup && m_pActivePopup->GetWindow() && (!pNextData || 
(m_pActivePopup != pNextData->pSubMenu)))
         KillActivePopup(); // pActivePopup when applicable without pWin, if 
Rescheduled in  Activate()
 
     // activate menubar only ones per cycle...
diff --git a/vcl/source/window/menufloatingwindow.cxx 
b/vcl/source/window/menufloatingwindow.cxx
index 7de7a5801282..fc4f12288e46 100644
--- a/vcl/source/window/menufloatingwindow.cxx
+++ b/vcl/source/window/menufloatingwindow.cxx
@@ -85,7 +85,7 @@ void MenuFloatingWindow::doShutdown()
         }
         if( i < nCount )
         {
-            MenuFloatingWindow* pPWin = 
static_cast<MenuFloatingWindow*>(pMenu->pStartedFrom->ImplGetWindow());
+            MenuFloatingWindow* pPWin = 
static_cast<MenuFloatingWindow*>(pMenu->pStartedFrom->GetWindow());
             if (pPWin)
                 pPWin->InvalidateItem(i);
         }
@@ -375,7 +375,7 @@ IMPL_LINK( MenuFloatingWindow, HighlightChanged, Timer*, 
pTimer, void )
     SetPopupModeFlags( nOldFlags );
 
     // nRet != 0, if it was stopped during Activate()...
-    if ( !nRet && ( pActivePopup == pTest ) && pActivePopup->ImplGetWindow() )
+    if ( !nRet && ( pActivePopup == pTest ) && pActivePopup->GetWindow() )
         pActivePopup->ImplGetFloatingWindow()->AddPopupModeWindow( this );
 }
 
@@ -495,7 +495,7 @@ void MenuFloatingWindow::KillActivePopup( PopupMenu* 
pThisOnly )
     pPopup->bInCallback = true;
     pPopup->Deactivate();
     pPopup->bInCallback = false;
-    if ( pPopup->ImplGetWindow() )
+    if (pPopup->GetWindow())
     {
         pPopup->ImplGetFloatingWindow()->StopExecute();
         pPopup->ImplGetFloatingWindow()->doShutdown();
@@ -765,7 +765,7 @@ void MenuFloatingWindow::ChangeHighlightItem( sal_uInt16 n, 
bool bStartPopupTime
             }
             if( i < nCount )
             {
-                MenuFloatingWindow* pPWin = 
static_cast<MenuFloatingWindow*>(pMenu->pStartedFrom->ImplGetWindow());
+                MenuFloatingWindow* pPWin = 
static_cast<MenuFloatingWindow*>(pMenu->pStartedFrom->GetWindow());
                 if( pPWin && pPWin->nHighlightedItem != i )
                 {
                     pPWin->InvalidateItem(i);
@@ -1118,7 +1118,7 @@ void MenuFloatingWindow::KeyInput( const KeyEvent& 
rKEvent )
                     if (pStart && pStart->IsMenuBar())
                     {
                         // Forward...
-                        pStart->ImplGetWindow()->KeyInput( rKEvent );
+                        pStart->GetWindow()->KeyInput(rKEvent);
                     }
                 }
             }
@@ -1149,7 +1149,7 @@ void MenuFloatingWindow::KeyInput( const KeyEvent& 
rKEvent )
                 if (pStart && pStart->IsMenuBar())
                 {
                     // Forward...
-                    pStart->ImplGetWindow()->KeyInput( rKEvent );
+                    pStart->GetWindow()->KeyInput(rKEvent);
                 }
             }
         }
diff --git a/vcl/source/window/syswin.cxx b/vcl/source/window/syswin.cxx
index 810f1c5cf4ff..1109e1b48b8b 100644
--- a/vcl/source/window/syswin.cxx
+++ b/vcl/source/window/syswin.cxx
@@ -253,7 +253,7 @@ TaskPaneList* SystemWindow::GetTaskPaneList()
                 pMBar = static_cast<SystemWindow*>(pWin)->GetMenuBar();
         }
         if( pMBar )
-            mpImplData->mpTaskPaneList->AddWindow( pMBar->ImplGetWindow() );
+            mpImplData->mpTaskPaneList->AddWindow(pMBar->GetWindow());
         return mpImplData->mpTaskPaneList.get();
     }
 }
@@ -851,7 +851,7 @@ void SystemWindow::SetMenuBar(MenuBar* pMenuBar)
     if ( mpWindowImpl->mpBorderWindow && 
(mpWindowImpl->mpBorderWindow->GetType() == WindowType::BORDERWINDOW) )
     {
         if ( pOldMenuBar )
-            pOldWindow = pOldMenuBar->ImplGetWindow();
+            pOldWindow = pOldMenuBar->GetWindow();
         else
             pOldWindow = nullptr;
         if ( pOldWindow )
@@ -888,9 +888,9 @@ void SystemWindow::SetMenuBar(MenuBar* pMenuBar)
     else
     {
         if( pMenuBar )
-            pNewWindow = pMenuBar->ImplGetWindow();
+            pNewWindow = pMenuBar->GetWindow();
         if( pOldMenuBar )
-            pOldWindow = pOldMenuBar->ImplGetWindow();
+            pOldWindow = pOldMenuBar->GetWindow();
     }
 
     // update taskpane list to make menubar accessible

Reply via email to