summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-02-26 17:32:29 +0000
committerCaolán McNamara <caolanm@redhat.com>2021-02-27 20:14:36 +0100
commit15b86b9dc15afbb5cc3c318f57f500a6a77b67c9 (patch)
tree2a2554cc42af634e7da15e9daff8240413d8a82d /vcl
parent6d21adad1cf0c6b5a61e7540af9d0f6bdaff099b (diff)
hide some FloatingWindow details
Change-Id: I1dc8cb7adc9a26efb74634353b9d75286e31ebb7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111663 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/window/dockmgr.cxx10
-rw-r--r--vcl/source/window/dockwin.cxx5
-rw-r--r--vcl/source/window/floatwin.cxx3
-rw-r--r--vcl/source/window/menu.cxx2
-rw-r--r--vcl/source/window/toolbox2.cxx6
5 files changed, 18 insertions, 8 deletions
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() );
}
}