framework/source/layoutmanager/toolbarlayoutmanager.cxx | 1 - include/sfx2/childwin.hxx | 3 +-- include/vcl/dockwin.hxx | 6 +++--- include/vcl/floatwin.hxx | 1 - include/vcl/syswin.hxx | 2 ++ sfx2/source/appl/childwin.cxx | 5 ++--- sfx2/source/devtools/DevelopmentToolDockingWindow.cxx | 2 -- sfx2/source/dialog/dockwin.cxx | 3 +-- sfx2/source/dialog/splitwin.cxx | 1 - sfx2/source/sidebar/SidebarController.cxx | 1 - starmath/source/ElementsDockingWindow.cxx | 1 - starmath/source/view.cxx | 1 - vcl/source/window/dockmgr.cxx | 10 +++++++--- vcl/source/window/dockwin.cxx | 5 +++++ vcl/source/window/floatwin.cxx | 3 ++- vcl/source/window/menu.cxx | 2 +- vcl/source/window/toolbox2.cxx | 6 +++--- 17 files changed, 27 insertions(+), 26 deletions(-)
New commits: commit 15b86b9dc15afbb5cc3c318f57f500a6a77b67c9 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Fri Feb 26 17:32:29 2021 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Sat Feb 27 20:14:36 2021 +0100 hide some FloatingWindow details Change-Id: I1dc8cb7adc9a26efb74634353b9d75286e31ebb7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111663 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx b/framework/source/layoutmanager/toolbarlayoutmanager.cxx index 157299180999..4182dba99590 100644 --- a/framework/source/layoutmanager/toolbarlayoutmanager.cxx +++ b/framework/source/layoutmanager/toolbarlayoutmanager.cxx @@ -38,7 +38,6 @@ #include <toolkit/helper/vclunohelper.hxx> #include <toolkit/helper/convert.hxx> #include <vcl/i18nhelp.hxx> -#include <vcl/floatwin.hxx> #include <vcl/dockingarea.hxx> #include <vcl/settings.hxx> #include <vcl/svapp.hxx> diff --git a/include/sfx2/childwin.hxx b/include/sfx2/childwin.hxx index 3a945b47b1de..fd614a06d632 100644 --- a/include/sfx2/childwin.hxx +++ b/include/sfx2/childwin.hxx @@ -112,7 +112,6 @@ struct SFX2_DLLPUBLIC SfxChildWinFactory ~SfxChildWinFactory(); }; -class FloatingWindow; struct SfxChildWindow_Impl; class SFX2_DLLPUBLIC SfxChildWindowContext { @@ -133,7 +132,7 @@ public: sal_uInt16 GetContextId() const { return nContextId; } - static FloatingWindow* GetFloatingWindow(vcl::Window *pParent); + static SystemWindow* GetFloatingWindow(vcl::Window *pParent); static void RegisterChildWindowContext(SfxModule*, sal_uInt16, std::unique_ptr<SfxChildWinContextFactory>); }; diff --git a/include/vcl/dockwin.hxx b/include/vcl/dockwin.hxx index 7315ca9d4f6c..48116e42d11c 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 ImplDockingWindowWrapper final +class VCL_DLLPUBLIC ImplDockingWindowWrapper final { friend class ::vcl::Window; friend class DockingManager; @@ -155,7 +155,7 @@ public: void SetFloatingMode( bool bFloatMode ); bool IsFloatingMode() const; - FloatingWindow* GetFloatingWindow() const { return mpFloatWin; } + SystemWindow* GetFloatingWindow() const; void SetFloatStyle( WinBits nWinStyle ); WinBits GetFloatStyle() const { return mnFloatBits;} @@ -308,7 +308,7 @@ public: void SetFloatingMode( bool bFloatMode ); bool IsFloatingMode() const; - FloatingWindow* GetFloatingWindow() const { return mpFloatWin; } + SystemWindow* GetFloatingWindow() const; void SetFloatingPos( const Point& rNewPos ); Point GetFloatingPos() const; diff --git a/include/vcl/floatwin.hxx b/include/vcl/floatwin.hxx index 1c715a46cbc7..ad87e036b0c4 100644 --- a/include/vcl/floatwin.hxx +++ b/include/vcl/floatwin.hxx @@ -132,7 +132,6 @@ public: void SetPopupModeEndHdl( const Link<FloatingWindow*,void>& rLink ) { maPopupModeEndHdl = rLink; } bool GrabsFocus() const { return mbGrabFocus; } - bool UpdatePositionData(); static Point CalcFloatingPosition( vcl::Window* pWindow, const tools::Rectangle& rRect, FloatWinPopupFlags nFlags, sal_uInt16& rArrangeIndex ); }; diff --git a/include/vcl/syswin.hxx b/include/vcl/syswin.hxx index f8d1683bd490..7c6f279b7037 100644 --- a/include/vcl/syswin.hxx +++ b/include/vcl/syswin.hxx @@ -235,6 +235,8 @@ public: void SetApplicationID( const OUString &rApplicationID ); + bool UpdatePositionData(); + void SetCloseHdl(const Link<SystemWindow&,void>& rLink); const Link<SystemWindow&,void>& GetCloseHdl() const; diff --git a/sfx2/source/appl/childwin.cxx b/sfx2/source/appl/childwin.cxx index b07dc5b5bb40..72e469a04403 100644 --- a/sfx2/source/appl/childwin.cxx +++ b/sfx2/source/appl/childwin.cxx @@ -29,7 +29,6 @@ #include <sal/log.hxx> #include <tools/debug.hxx> -#include <vcl/floatwin.hxx> #include <vcl/svapp.hxx> #include <sfx2/childwin.hxx> #include <sfx2/app.hxx> @@ -530,7 +529,7 @@ SfxChildWindowContext::~SfxChildWindowContext() pWindow.disposeAndClear(); } -FloatingWindow* SfxChildWindowContext::GetFloatingWindow(vcl::Window *pParent) +SystemWindow* SfxChildWindowContext::GetFloatingWindow(vcl::Window *pParent) { if (pParent->GetType() == WindowType::DOCKINGWINDOW || pParent->GetType() == WindowType::TOOLBOX) { @@ -538,7 +537,7 @@ FloatingWindow* SfxChildWindowContext::GetFloatingWindow(vcl::Window *pParent) } if (pParent->GetType() == WindowType::FLOATINGWINDOW) { - return static_cast<FloatingWindow*>(pParent); + return static_cast<SystemWindow*>(pParent); } return nullptr; } diff --git a/sfx2/source/devtools/DevelopmentToolDockingWindow.cxx b/sfx2/source/devtools/DevelopmentToolDockingWindow.cxx index fec7cdfc34ad..6bd92f17256d 100644 --- a/sfx2/source/devtools/DevelopmentToolDockingWindow.cxx +++ b/sfx2/source/devtools/DevelopmentToolDockingWindow.cxx @@ -18,8 +18,6 @@ #include <sfx2/objsh.hxx> #include <sfx2/viewfrm.hxx> -#include <vcl/floatwin.hxx> - #include "SelectionChangeHandler.hxx" using namespace css; diff --git a/sfx2/source/dialog/dockwin.cxx b/sfx2/source/dialog/dockwin.cxx index a5e88f0584dd..d824cbfe4be7 100644 --- a/sfx2/source/dialog/dockwin.cxx +++ b/sfx2/source/dialog/dockwin.cxx @@ -24,7 +24,6 @@ #include <vcl/svapp.hxx> #include <vcl/timer.hxx> -#include <vcl/floatwin.hxx> #include <vcl/idle.hxx> #include <o3tl/safeint.hxx> #include <osl/diagnose.h> @@ -951,7 +950,7 @@ void SfxDockingWindow::Initialize_Impl() return; } - FloatingWindow* pFloatWin = GetFloatingWindow(); + SystemWindow* pFloatWin = GetFloatingWindow(); bool bSet = false; if ( pFloatWin ) { diff --git a/sfx2/source/dialog/splitwin.cxx b/sfx2/source/dialog/splitwin.cxx index 6c96c0e4eb12..2e910f8d2fb0 100644 --- a/sfx2/source/dialog/splitwin.cxx +++ b/sfx2/source/dialog/splitwin.cxx @@ -27,7 +27,6 @@ #include <tools/debug.hxx> #include <vcl/event.hxx> -#include <vcl/floatwin.hxx> #include <vcl/menu.hxx> #include <vcl/timer.hxx> #include <vcl/svapp.hxx> diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx index fdd52a44f783..be6572c85180 100644 --- a/sfx2/source/sidebar/SidebarController.cxx +++ b/sfx2/source/sidebar/SidebarController.cxx @@ -35,7 +35,6 @@ #include <framework/ContextChangeEventMultiplexerTunnel.hxx> -#include <vcl/floatwin.hxx> #include <vcl/uitest/logger.hxx> #include <vcl/uitest/eventdescription.hxx> #include <vcl/svapp.hxx> diff --git a/starmath/source/ElementsDockingWindow.cxx b/starmath/source/ElementsDockingWindow.cxx index 5daf36d50120..aae6027bbdc4 100644 --- a/starmath/source/ElementsDockingWindow.cxx +++ b/starmath/source/ElementsDockingWindow.cxx @@ -34,7 +34,6 @@ #include <sfx2/sfxmodelfactory.hxx> #include <svl/stritem.hxx> #include <vcl/event.hxx> -#include <vcl/floatwin.hxx> #include <vcl/settings.hxx> #include <vcl/uitest/eventdescription.hxx> #include <vcl/uitest/logger.hxx> diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx index 563cce24467e..3d732bbc5b4d 100644 --- a/starmath/source/view.cxx +++ b/starmath/source/view.cxx @@ -44,7 +44,6 @@ #include <svl/itemset.hxx> #include <svl/poolitem.hxx> #include <svl/stritem.hxx> -#include <vcl/floatwin.hxx> #include <vcl/transfer.hxx> #include <svtools/colorcfg.hxx> #include <svl/whiter.hxx> diff --git a/vcl/source/window/dockmgr.cxx b/vcl/source/window/dockmgr.cxx index bdef0d5581ef..3c196211531e 100644 --- a/vcl/source/window/dockmgr.cxx +++ b/vcl/source/window/dockmgr.cxx @@ -362,8 +362,8 @@ bool DockingManager::IsInPopupMode( const vcl::Window *pWindow ) void DockingManager::EndPopupMode( const vcl::Window *pWin ) { ImplDockingWindowWrapper *pWrapper = GetDockingWindowWrapper( pWin ); - if( pWrapper && pWrapper->GetFloatingWindow() && pWrapper->GetFloatingWindow()->IsInPopupMode() ) - pWrapper->GetFloatingWindow()->EndPopupMode(); + if( pWrapper && pWrapper->GetFloatingWindow() && static_cast<FloatingWindow*>(pWrapper->GetFloatingWindow())->IsInPopupMode() ) + static_cast<FloatingWindow*>(pWrapper->GetFloatingWindow())->EndPopupMode(); } void DockingManager::SetPopupModeEndHdl( const vcl::Window *pWindow, const Link<FloatingWindow*,void>& rLink ) @@ -876,7 +876,7 @@ IMPL_LINK_NOARG(ImplDockingWindowWrapper, PopupModeEnd, FloatingWindow*, void) bool ImplDockingWindowWrapper::IsInPopupMode() const { if( GetFloatingWindow() ) - return GetFloatingWindow()->IsInPopupMode(); + return static_cast<FloatingWindow*>(GetFloatingWindow())->IsInPopupMode(); else return false; } @@ -1065,5 +1065,9 @@ void ImplDockingWindowWrapper::Unlock() pToolBox->Lock( mbLocked ); } +SystemWindow* ImplDockingWindowWrapper::GetFloatingWindow() const +{ + return mpFloatWin; +} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/source/window/dockwin.cxx b/vcl/source/window/dockwin.cxx index 4a5910da1c0f..efa9d2272672 100644 --- a/vcl/source/window/dockwin.cxx +++ b/vcl/source/window/dockwin.cxx @@ -1077,6 +1077,11 @@ void DockingWindow::SetIdleDebugName( const char *pDebugName ) maLayoutIdle.SetDebugName( pDebugName ); } +SystemWindow* DockingWindow::GetFloatingWindow() const +{ + return mpFloatWin; +} + DropdownDockingWindow::DropdownDockingWindow(vcl::Window* pParent, const css::uno::Reference<css::frame::XFrame>& rFrame, bool bTearable) : DockingWindow(pParent, !bTearable ? OString("InterimDockParent") : OString("InterimTearableParent"), diff --git a/vcl/source/window/floatwin.cxx b/vcl/source/window/floatwin.cxx index 8f8da5d577ed..5c973da11283 100644 --- a/vcl/source/window/floatwin.cxx +++ b/vcl/source/window/floatwin.cxx @@ -956,7 +956,8 @@ void FloatingWindow::AddPopupModeWindow(vcl::Window* pWindow) // !!! up-to-now only 1 window and not yet a list mpFirstPopupModeWin = pWindow; } -bool FloatingWindow::UpdatePositionData() + +bool SystemWindow::UpdatePositionData() { auto pWin = ImplGetParent(); if (pWin) diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx index ea3f8e95ff3d..ccb1178f8a0b 100644 --- a/vcl/source/window/menu.cxx +++ b/vcl/source/window/menu.cxx @@ -107,7 +107,7 @@ void ImplClosePopupToolBox( const VclPtr<vcl::Window>& pWin ) { ImplDockingWindowWrapper* pWrapper = ImplGetDockingManager()->GetDockingWindowWrapper( pWin ); if ( pWrapper && pWrapper->GetFloatingWindow() ) - pWrapper->GetFloatingWindow()->EndPopupMode( FloatWinPopupEndFlags::CloseAll ); + static_cast<FloatingWindow*>(pWrapper->GetFloatingWindow())->EndPopupMode( FloatWinPopupEndFlags::CloseAll ); } } diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx index 06569732a145..c231848a9cf1 100644 --- a/vcl/source/window/toolbox2.cxx +++ b/vcl/source/window/toolbox2.cxx @@ -371,8 +371,8 @@ void ToolBox::Select() // TODO: GetFloatingWindow in DockingWindow is currently inline, change it to check dockingwrapper ImplDockingWindowWrapper *pWrapper = ImplGetDockingManager()->GetDockingWindowWrapper( this ); - if( pWrapper && pWrapper->GetFloatingWindow() && pWrapper->GetFloatingWindow()->IsInPopupMode() ) - pWrapper->GetFloatingWindow()->EndPopupMode(); + if( pWrapper && pWrapper->GetFloatingWindow() && static_cast<FloatingWindow*>(pWrapper->GetFloatingWindow())->IsInPopupMode() ) + static_cast<FloatingWindow*>(pWrapper->GetFloatingWindow())->EndPopupMode(); } void ToolBox::InsertItem( sal_uInt16 nItemId, const Image& rImage, ToolBoxItemBits nBits, ImplToolItems::size_type nPos ) @@ -1657,7 +1657,7 @@ bool ToolBox::ImplIsInPopupMode() const else { ImplDockingWindowWrapper *pWrapper = ImplGetDockingManager()->GetDockingWindowWrapper( this ); - return ( pWrapper && pWrapper->GetFloatingWindow() && pWrapper->GetFloatingWindow()->IsInPopupMode() ); + return ( pWrapper && pWrapper->GetFloatingWindow() && static_cast<FloatingWindow*>(pWrapper->GetFloatingWindow())->IsInPopupMode() ); } } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits