From f34e8ab3e7e7138c2ffe4bd61516f43a2d297d3a Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Tue, 2 Mar 2021 10:21:44 +0000 Subject: keep ImplDockingWindowWrapper DLL_PRIVATE and use DockingManager to get the FloatingWindow instead Change-Id: Ifedfe3cc9b024069eef5ea9b7952f2dc2f58b645 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111819 Tested-by: Jenkins Reviewed-by: Mike Kaganski --- framework/source/layoutmanager/toolbarlayoutmanager.cxx | 7 +++---- include/vcl/dockwin.hxx | 3 ++- vcl/source/window/dockmgr.cxx | 8 ++++++++ 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx b/framework/source/layoutmanager/toolbarlayoutmanager.cxx index 4182dba99590..36a91c9074f6 100644 --- a/framework/source/layoutmanager/toolbarlayoutmanager.cxx +++ b/framework/source/layoutmanager/toolbarlayoutmanager.cxx @@ -1851,12 +1851,11 @@ void ToolbarLayoutManager::implts_getDockingAreaElementInfos( ui::DockingArea eD DockingManager* pDockMgr = vcl::Window::GetDockingManager(); if (pDockMgr != nullptr) { - ImplDockingWindowWrapper* pWrapper - = pDockMgr->GetDockingWindowWrapper(pWindow); - if (pWrapper != nullptr && pWrapper->GetFloatingWindow()) + SystemWindow* pFloatingWindow = pDockMgr->GetFloatingWindow(pWindow); + if (pFloatingWindow) { // update the position data of the floating window - if (pWrapper->GetFloatingWindow()->UpdatePositionData()) + if (pFloatingWindow->UpdatePositionData()) { awt::Rectangle aTmpRect = xWindow->getPosSize(); UIElement uiElem = elem; diff --git a/include/vcl/dockwin.hxx b/include/vcl/dockwin.hxx index 48116e42d11c..d8f69ccd1fb5 100644 --- a/include/vcl/dockwin.hxx +++ b/include/vcl/dockwin.hxx @@ -69,7 +69,7 @@ struct EndPopupModeData * All DockingWindows should be converted the new class. */ -class VCL_DLLPUBLIC ImplDockingWindowWrapper final +class ImplDockingWindowWrapper final { friend class ::vcl::Window; friend class DockingManager; @@ -186,6 +186,7 @@ public: bool IsFloating( const vcl::Window *pWin ); void SetFloatingMode( const vcl::Window *pWin, bool bFloating ); + SystemWindow* GetFloatingWindow(const vcl::Window *pWin); void Lock( const vcl::Window *pWin ); void Unlock( const vcl::Window *pWin ); diff --git a/vcl/source/window/dockmgr.cxx b/vcl/source/window/dockmgr.cxx index 3c196211531e..83018e34622b 100644 --- a/vcl/source/window/dockmgr.cxx +++ b/vcl/source/window/dockmgr.cxx @@ -366,6 +366,14 @@ void DockingManager::EndPopupMode( const vcl::Window *pWin ) static_cast(pWrapper->GetFloatingWindow())->EndPopupMode(); } +SystemWindow* DockingManager::GetFloatingWindow(const vcl::Window *pWin) +{ + ImplDockingWindowWrapper *pWrapper = GetDockingWindowWrapper( pWin ); + if (pWrapper) + return pWrapper->GetFloatingWindow(); + return nullptr; +} + void DockingManager::SetPopupModeEndHdl( const vcl::Window *pWindow, const Link& rLink ) { ImplDockingWindowWrapper* pWrapper = GetDockingWindowWrapper( pWindow ); -- cgit