[Libreoffice-commits] core.git: framework/source include/vcl vcl/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Wed Mar 3 09:03:20 UTC 2021
framework/source/layoutmanager/toolbarlayoutmanager.cxx | 7 +++----
include/vcl/dockwin.hxx | 3 ++-
vcl/source/window/dockmgr.cxx | 8 ++++++++
3 files changed, 13 insertions(+), 5 deletions(-)
New commits:
commit f34e8ab3e7e7138c2ffe4bd61516f43a2d297d3a
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Mar 2 10:21:44 2021 +0000
Commit: Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Wed Mar 3 10:02:25 2021 +0100
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 at collabora.com>
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 );
More information about the Libreoffice-commits
mailing list