summaryrefslogtreecommitdiff
path: root/vcl/source/window/window.cxx
diff options
context:
space:
mode:
authorNoel <noel.grandin@collabora.co.uk>2021-03-28 10:28:45 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-05-31 15:19:31 +0200
commit9abedad72c73ad83b66f3f8d261efdc5ce889683 (patch)
tree3ba0c1eb510904b81f605301a4756050d187667b /vcl/source/window/window.cxx
parent6034b642581803e2cb2566abe0a0cab0cbfeb50a (diff)
Drop Window::IsDisposed
in favour of the isDisposed in the VclReferenceBase base class, so we have one flag for this instead of two. Change-Id: Ib3d6ba750f95f21996bab2838af4c56295a13f4c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113249 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/source/window/window.cxx')
-rw-r--r--vcl/source/window/window.cxx33
1 files changed, 14 insertions, 19 deletions
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index fa3cb12133d5..5c9d7c431437 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -134,17 +134,12 @@ namespace
}
#endif
-bool Window::IsDisposed() const
-{
- return !mpWindowImpl;
-}
-
void Window::dispose()
{
assert( mpWindowImpl );
assert( !mpWindowImpl->mbInDispose ); // should only be called from disposeOnce()
assert( (!mpWindowImpl->mpParent ||
- !mpWindowImpl->mpParent->IsDisposed()) &&
+ mpWindowImpl->mpParent->mpWindowImpl) &&
"vcl::Window child should have its parent disposed first" );
// remove Key and Mouse events issued by Application::PostKey/MouseEvent
@@ -1736,7 +1731,7 @@ void Window::ImplNewInputContext()
{
ImplSVData* pSVData = ImplGetSVData();
vcl::Window* pFocusWin = pSVData->mpWinData->mpFocusWin;
- if ( !pFocusWin || !pFocusWin->mpWindowImpl || pFocusWin->IsDisposed() )
+ if ( !pFocusWin || !pFocusWin->mpWindowImpl || pFocusWin->isDisposed() )
return;
// Is InputContext changed?
@@ -1845,7 +1840,7 @@ void Window::GetFocus()
{
VclPtr<vcl::Window> xWindow(this);
mpWindowImpl->mpLastFocusWindow->GrabFocus();
- if( xWindow->IsDisposed() )
+ if( xWindow->isDisposed() )
return;
}
@@ -2187,7 +2182,7 @@ vcl::Font Window::GetPointFont(vcl::RenderContext const & rRenderContext) const
void Window::Show(bool bVisible, ShowFlags nFlags)
{
- if ( IsDisposed() || mpWindowImpl->mbVisible == bVisible )
+ if ( isDisposed() || mpWindowImpl->mbVisible == bVisible )
return;
VclPtr<vcl::Window> xWindow(this);
@@ -2198,7 +2193,7 @@ void Window::Show(bool bVisible, ShowFlags nFlags)
if ( !bVisible )
{
ImplHideAllOverlaps();
- if( xWindow->IsDisposed() )
+ if( xWindow->isDisposed() )
return;
if ( mpWindowImpl->mpBorderWindow )
@@ -2224,7 +2219,7 @@ void Window::Show(bool bVisible, ShowFlags nFlags)
vcl::Region aInvRegion = mpWindowImpl->maWinClipRegion;
- if( xWindow->IsDisposed() )
+ if( xWindow->isDisposed() )
return;
bRealVisibilityChanged = mpWindowImpl->mbReallyVisible;
@@ -2360,7 +2355,7 @@ void Window::Show(bool bVisible, ShowFlags nFlags)
bool bNoActivate(nFlags & (ShowFlags::NoActivate|ShowFlags::NoFocusChange));
mpWindowImpl->mpFrame->Show( true, bNoActivate );
}
- if( xWindow->IsDisposed() )
+ if( xWindow->isDisposed() )
return;
// Query the correct size of the window, if we are waiting for
@@ -2378,13 +2373,13 @@ void Window::Show(bool bVisible, ShowFlags nFlags)
mpWindowImpl->mpFrameData->mpBuffer->SetOutputSizePixel(GetOutputSizePixel());
}
- if( xWindow->IsDisposed() )
+ if( xWindow->isDisposed() )
return;
ImplShowAllOverlaps();
}
- if( xWindow->IsDisposed() )
+ if( xWindow->isDisposed() )
return;
// the SHOW/HIDE events also serve as indicators to send child creation/destroy events to the access bridge
@@ -2394,7 +2389,7 @@ void Window::Show(bool bVisible, ShowFlags nFlags)
// now only notify with a NULL data pointer, for all other clients except the access bridge.
if ( !bRealVisibilityChanged )
CallEventListeners( mpWindowImpl->mbVisible ? VclEventId::WindowShow : VclEventId::WindowHide );
- if( xWindow->IsDisposed() )
+ if( xWindow->isDisposed() )
return;
}
@@ -2413,7 +2408,7 @@ Size Window::GetSizePixel() const
VclPtr<vcl::Window> xWindow( const_cast<Window*>(this) );
mpWindowImpl->mpFrameData->maResizeIdle.Stop();
mpWindowImpl->mpFrameData->maResizeIdle.Invoke( nullptr );
- if( xWindow->IsDisposed() )
+ if( xWindow->isDisposed() )
return Size(0,0);
}
@@ -2432,7 +2427,7 @@ void Window::GetBorder( sal_Int32& rLeftBorder, sal_Int32& rTopBorder,
void Window::Enable( bool bEnable, bool bChild )
{
- if ( IsDisposed() )
+ if ( isDisposed() )
return;
if ( !bEnable )
@@ -3396,7 +3391,7 @@ void Window::ImplCallDeactivateListeners( vcl::Window *pNew )
{
VclPtr<vcl::Window> xWindow(this);
CallEventListeners( VclEventId::WindowDeactivate, pNew );
- if( xWindow->IsDisposed() )
+ if( xWindow->isDisposed() )
return;
// #100759#, avoid walking the wrong frame's hierarchy
@@ -3414,7 +3409,7 @@ void Window::ImplCallActivateListeners( vcl::Window *pOld )
VclPtr<vcl::Window> xWindow(this);
CallEventListeners( VclEventId::WindowActivate, pOld );
- if( xWindow->IsDisposed() )
+ if( xWindow->isDisposed() )
return;
if ( ImplGetParent() )