diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-03-02 10:21:44 +0000 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2021-03-03 10:02:25 +0100 |
commit | f34e8ab3e7e7138c2ffe4bd61516f43a2d297d3a (patch) | |
tree | 0be5fccffcd46109b3f7f0dca408ce753b3bca2f | |
parent | 4f06d7cd74273e5691bb5a601452ea0e7eccffb3 (diff) |
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 <mike.kaganski@collabora.com>
-rw-r--r-- | framework/source/layoutmanager/toolbarlayoutmanager.cxx | 7 | ||||
-rw-r--r-- | include/vcl/dockwin.hxx | 3 | ||||
-rw-r--r-- | 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<FloatingWindow*>(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<FloatingWindow*,void>& rLink ) { ImplDockingWindowWrapper* pWrapper = GetDockingWindowWrapper( pWindow ); |