[Libreoffice-commits] core.git: vcl/source

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Sat May 29 11:38:08 UTC 2021


 vcl/source/window/cursor.cxx             |    2 +-
 vcl/source/window/dialog.cxx             |   16 ++++++++--------
 vcl/source/window/dockwin.cxx            |    2 +-
 vcl/source/window/event.cxx              |   18 +++++++++---------
 vcl/source/window/menu.cxx               |    4 ++--
 vcl/source/window/menufloatingwindow.cxx |    4 ++--
 vcl/source/window/mouse.cxx              |   12 ++++++------
 vcl/source/window/paint.cxx              |    2 +-
 vcl/source/window/scrwnd.cxx             |    2 +-
 vcl/source/window/syschild.cxx           |   10 +++++-----
 vcl/source/window/syswin.cxx             |    2 +-
 vcl/source/window/toolbox.cxx            |   10 +++++-----
 vcl/source/window/toolbox2.cxx           |    6 +++---
 vcl/source/window/window2.cxx            |    4 ++--
 14 files changed, 47 insertions(+), 47 deletions(-)

New commits:
commit 8d485ec0cd35ee1ae7684f2b6ca96c0f0c6f9dac
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Sat May 29 08:34:28 2021 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Sat May 29 13:37:25 2021 +0200

    IsDisposed->isDisposed in vcl/../window
    
    Change-Id: Ic1c8bb6bb9a45d4e91c997b752e23aed35767f42
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116364
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/vcl/source/window/cursor.cxx b/vcl/source/window/cursor.cxx
index 90ac32298784..bab975a0b602 100644
--- a/vcl/source/window/cursor.cxx
+++ b/vcl/source/window/cursor.cxx
@@ -115,7 +115,7 @@ static tools::Rectangle ImplCursorInvert(vcl::RenderContext* pRenderContext, Imp
 
 static void ImplCursorInvert(vcl::Window* pWindow, ImplCursorData const * pData)
 {
-    if (!pWindow || pWindow->IsDisposed())
+    if (!pWindow || pWindow->isDisposed())
         return;
 
     vcl::PaintBufferGuardPtr pGuard;
diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx
index 882d6c0e985b..538ad37b0ede 100644
--- a/vcl/source/window/dialog.cxx
+++ b/vcl/source/window/dialog.cxx
@@ -843,7 +843,7 @@ bool Dialog::Close()
 {
     VclPtr<vcl::Window> xWindow = this;
     CallEventListeners( VclEventId::WindowClose );
-    if ( xWindow->IsDisposed() )
+    if ( xWindow->isDisposed() )
         return false;
 
     if ( mpWindowImpl->mxWindowPeer.is() && IsCreatedWithToolkit() && !IsInExecute() )
@@ -863,7 +863,7 @@ bool Dialog::Close()
     if (pCustomCancelButton)
     {
         pCustomCancelButton->Click();
-        if (xWindow->IsDisposed())
+        if (xWindow->isDisposed())
             return true;
         mbInClose = false;
         return false;
@@ -883,7 +883,7 @@ bool Dialog::Close()
             else
                 bRet = false;
         }
-        if ( xWindow->IsDisposed() )
+        if ( xWindow->isDisposed() )
             return true;
         return bRet;
     }
@@ -1048,14 +1048,14 @@ short Dialog::Execute()
 
     // Yield util EndDialog is called or dialog gets destroyed
     // (the latter should not happen, but better safe than sorry
-    while ( !xWindow->IsDisposed() && mbInExecute && !Application::IsQuit() )
+    while ( !xWindow->isDisposed() && mbInExecute && !Application::IsQuit() )
         Application::Yield();
 
     ImplEndExecuteModal();
 #ifdef DBG_UTIL
-    assert (!mpDialogParent || !mpDialogParent->IsDisposed());
+    assert (!mpDialogParent || !mpDialogParent->isDisposed());
 #endif
-    if ( !xWindow->IsDisposed() )
+    if ( !xWindow->isDisposed() )
         xWindow.clear();
     else
     {
@@ -1097,7 +1097,7 @@ void Dialog::RemoveFromDlgList()
 
 void Dialog::EndDialog( tools::Long nResult )
 {
-    if (!mbInExecute || IsDisposed())
+    if (!mbInExecute || isDisposed())
         return;
 
     const bool bModal = GetType() != WindowType::MODELESSDIALOG;
@@ -1641,7 +1641,7 @@ void TopLevelWindowLocker::decBusy()
     // unlock locked toplevel windows from being closed now busy is over
     for (auto& a : m_xImpl->m_aBusyStack.top())
     {
-        if (a->IsDisposed())
+        if (a->isDisposed())
             continue;
         a->DecModalCount();
         a->ImplGetFrame()->NotifyModalHierarchy(false);
diff --git a/vcl/source/window/dockwin.cxx b/vcl/source/window/dockwin.cxx
index 68b0ccb9916a..25890e6627a2 100644
--- a/vcl/source/window/dockwin.cxx
+++ b/vcl/source/window/dockwin.cxx
@@ -622,7 +622,7 @@ bool DockingWindow::Close()
 {
     VclPtr<vcl::Window> xWindow = this;
     CallEventListeners( VclEventId::WindowClose );
-    if ( xWindow->IsDisposed() )
+    if ( xWindow->isDisposed() )
         return false;
 
     if ( mpWindowImpl->mxWindowPeer.is() && IsCreatedWithToolkit() )
diff --git a/vcl/source/window/event.cxx b/vcl/source/window/event.cxx
index 4a01c3823110..9fa5b3d4c71e 100644
--- a/vcl/source/window/event.cxx
+++ b/vcl/source/window/event.cxx
@@ -105,7 +105,7 @@ bool Window::EventNotify( NotifyEvent& rNEvt )
 {
     bool bRet = false;
 
-    if (IsDisposed())
+    if (isDisposed())
         return false;
 
     // check for docking window
@@ -223,7 +223,7 @@ void Window::CallEventListeners( VclEventId nEvent, void* pData )
 
     Application::ImplCallEventListeners( aEvent );
 
-    if ( xWindow->IsDisposed() )
+    if ( xWindow->isDisposed() )
         return;
 
     // If maEventListeners is empty, the XVCLWindow has not yet been initialized.
@@ -241,7 +241,7 @@ void Window::CallEventListeners( VclEventId nEvent, void* pData )
         comphelper::ScopeGuard aGuard(
             [&rWindowImpl, &xWindow]()
             {
-                if (!xWindow->IsDisposed())
+                if (!xWindow->isDisposed())
                 {
                     rWindowImpl.mnEventListenersIteratingCount--;
                     if (rWindowImpl.mnEventListenersIteratingCount == 0)
@@ -251,7 +251,7 @@ void Window::CallEventListeners( VclEventId nEvent, void* pData )
         );
         for ( const Link<VclWindowEvent&,void>& rLink : aCopy )
         {
-            if (xWindow->IsDisposed()) break;
+            if (xWindow->isDisposed()) break;
             // check this hasn't been removed in some re-enterancy scenario fdo#47368
             if( rWindowImpl.maEventListenersDeleted.find(rLink) == rWindowImpl.maEventListenersDeleted.end() )
                 rLink.Call( aEvent );
@@ -261,7 +261,7 @@ void Window::CallEventListeners( VclEventId nEvent, void* pData )
     while ( xWindow )
     {
 
-        if ( xWindow->IsDisposed() )
+        if ( xWindow->isDisposed() )
             return;
 
         auto& rWindowImpl = *xWindow->mpWindowImpl;
@@ -274,7 +274,7 @@ void Window::CallEventListeners( VclEventId nEvent, void* pData )
             comphelper::ScopeGuard aGuard(
                 [&rWindowImpl, &xWindow]()
                 {
-                    if (!xWindow->IsDisposed())
+                    if (!xWindow->isDisposed())
                     {
                         rWindowImpl.mnChildEventListenersIteratingCount--;
                         if (rWindowImpl.mnChildEventListenersIteratingCount == 0)
@@ -284,7 +284,7 @@ void Window::CallEventListeners( VclEventId nEvent, void* pData )
             );
             for ( const Link<VclWindowEvent&,void>& rLink : aCopy )
             {
-                if (xWindow->IsDisposed())
+                if (xWindow->isDisposed())
                     return;
                 // Check this hasn't been removed in some re-enterancy scenario fdo#47368.
                 if( rWindowImpl.maChildEventListenersDeleted.find(rLink) == rWindowImpl.maChildEventListenersDeleted.end() )
@@ -292,7 +292,7 @@ void Window::CallEventListeners( VclEventId nEvent, void* pData )
             }
         }
 
-        if ( xWindow->IsDisposed() )
+        if ( xWindow->isDisposed() )
             return;
 
         xWindow = xWindow->GetParent();
@@ -468,7 +468,7 @@ void Window::ImplNotifyKeyMouseCommandEventListeners( NotifyEvent& rNEvt )
             CallEventListeners( VclEventId::WindowKeyUp, const_cast<KeyEvent *>(rNEvt.GetKeyEvent()) );
     }
 
-    if ( xWindow->IsDisposed() )
+    if ( xWindow->isDisposed() )
         return;
 
     // #106721# check if we're part of a compound control and notify
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index 531e2ccae77f..5cc01ef41df1 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -2905,7 +2905,7 @@ sal_uInt16 PopupMenu::ImplExecute( const VclPtr<vcl::Window>& pW, const tools::R
     Activate();
     bInCallback = false;
 
-    if ( pW->IsDisposed() )
+    if ( pW->isDisposed() )
         return 0;   // Error
 
     if ( bCanceled || bKilled )
@@ -3065,7 +3065,7 @@ sal_uInt16 PopupMenu::ImplExecute( const VclPtr<vcl::Window>& pW, const tools::R
     if ( bRealExecute )
     {
         pWin->Execute();
-        if (pWin->IsDisposed())
+        if (pWin->isDisposed())
             return 0;
 
         xFocusId = pWin->GetFocusId();
diff --git a/vcl/source/window/menufloatingwindow.cxx b/vcl/source/window/menufloatingwindow.cxx
index d4d59e90d5c2..7597e170fe5f 100644
--- a/vcl/source/window/menufloatingwindow.cxx
+++ b/vcl/source/window/menufloatingwindow.cxx
@@ -432,7 +432,7 @@ void MenuFloatingWindow::End()
     if (!bInExecute)
         return;
 
-    if (GetParent() && !GetParent()->IsDisposed())
+    if (GetParent() && !GetParent()->isDisposed())
         GetParent()->DecModalCount();
 
     // restore focus to previous window if we still have the focus
@@ -1194,7 +1194,7 @@ void MenuFloatingWindow::KeyInput( const KeyEvent& rKEvent )
     }
 
     // #105474# check if menu window was not destroyed
-    if ( !xWindow->IsDisposed() )
+    if ( !xWindow->isDisposed() )
     {
         bKeyInput = false;
     }
diff --git a/vcl/source/window/mouse.cxx b/vcl/source/window/mouse.cxx
index 101a586b9b68..e57485927eed 100644
--- a/vcl/source/window/mouse.cxx
+++ b/vcl/source/window/mouse.cxx
@@ -342,7 +342,7 @@ void Window::ImplGrabFocus( GetFocusFlags nFlags )
     }
 
     // call Get- and LoseFocus
-    if ( pOldFocusWindow && ! pOldFocusWindow->IsDisposed() )
+    if ( pOldFocusWindow && ! pOldFocusWindow->isDisposed() )
     {
         NotifyEvent aNEvt( MouseNotifyEvent::LOSEFOCUS, pOldFocusWindow );
         if ( !ImplCallPreNotify( aNEvt ) )
@@ -369,15 +369,15 @@ void Window::ImplGrabFocus( GetFocusFlags nFlags )
             // notify the new focus window so it can restore the inner focus
             // eg, toolboxes can select their recent active item
             if( pOldFocusWindow &&
-                ! pOldFocusWindow->IsDisposed() &&
+                ! pOldFocusWindow->isDisposed() &&
                 ( pOldFocusWindow->GetDialogControlFlags() & DialogControlFlags::FloatWinPopupModeEndCancel ) )
                 mpWindowImpl->mnGetFocusFlags |= GetFocusFlags::FloatWinPopupModeEndCancel;
             NotifyEvent aNEvt( MouseNotifyEvent::GETFOCUS, this );
-            if ( !ImplCallPreNotify( aNEvt ) && !xWindow->IsDisposed() )
+            if ( !ImplCallPreNotify( aNEvt ) && !xWindow->isDisposed() )
                 CompatGetFocus();
-            if( !xWindow->IsDisposed() )
-                ImplCallActivateListeners( (pOldFocusWindow && ! pOldFocusWindow->IsDisposed()) ? pOldFocusWindow : nullptr );
-            if( !xWindow->IsDisposed() )
+            if( !xWindow->isDisposed() )
+                ImplCallActivateListeners( (pOldFocusWindow && ! pOldFocusWindow->isDisposed()) ? pOldFocusWindow : nullptr );
+            if( !xWindow->isDisposed() )
             {
                 mpWindowImpl->mnGetFocusFlags = GetFocusFlags::NONE;
                 mpWindowImpl->mbInFocusHdl = false;
diff --git a/vcl/source/window/paint.cxx b/vcl/source/window/paint.cxx
index b18dba870e93..d595bd78d82d 100644
--- a/vcl/source/window/paint.cxx
+++ b/vcl/source/window/paint.cxx
@@ -1327,7 +1327,7 @@ void Window::PaintImmediately()
         if (comphelper::LibreOfficeKit::isActive() && pUpdateWindow->GetParentDialog())
             pUpdateWindow->LogicInvalidate(nullptr);
 
-        if (xWindow->IsDisposed())
+        if (xWindow->isDisposed())
            return;
 
         bFlush = true;
diff --git a/vcl/source/window/scrwnd.cxx b/vcl/source/window/scrwnd.cxx
index efb29c4f52f5..7be0cd6074cf 100644
--- a/vcl/source/window/scrwnd.cxx
+++ b/vcl/source/window/scrwnd.cxx
@@ -375,7 +375,7 @@ IMPL_LINK_NOARG(ImplWheelWindow, ImplScrollHdl, Timer *, void)
             const sal_uInt64 nTime = tools::Time::GetSystemTicks();
             VclPtr<ImplWheelWindow> xWin(this);
             pWindow->Command( aCEvt );
-            if( xWin->IsDisposed() )
+            if( xWin->isDisposed() )
                 return;
             mnRepaintTime = std::max( tools::Time::GetSystemTicks() - nTime, sal_uInt64(1) );
             ImplRecalcScrollValues();
diff --git a/vcl/source/window/syschild.cxx b/vcl/source/window/syschild.cxx
index 7e72d1044f06..644aa1f095f2 100644
--- a/vcl/source/window/syschild.cxx
+++ b/vcl/source/window/syschild.cxx
@@ -43,12 +43,12 @@ static void ImplSysChildProc( SystemChildWindow* pInst, SalObjEvent nEvent )
             pWindow->ImplGetFrameData()->mbSysObjFocus = true;
             pWindow->ImplGetFrameData()->mbInSysObjToTopHdl = true;
             pWindow->ToTop( ToTopFlags::NoGrabFocus );
-            if( pWindow->IsDisposed() )
+            if( pWindow->isDisposed() )
                 break;
             pWindow->ImplGetFrameData()->mbInSysObjToTopHdl = false;
             pWindow->ImplGetFrameData()->mbInSysObjFocusHdl = true;
             pWindow->GrabFocus();
-            if( pWindow->IsDisposed() )
+            if( pWindow->isDisposed() )
                 break;
             pWindow->ImplGetFrameData()->mbInSysObjFocusHdl = false;
             break;
@@ -56,7 +56,7 @@ static void ImplSysChildProc( SystemChildWindow* pInst, SalObjEvent nEvent )
         case SalObjEvent::LoseFocus:
             // trigger a LoseFocus which matches the status
             // of the window with matching Activate-Status
-            if (pWindow->IsDisposed())
+            if (pWindow->isDisposed())
                 break;
             pWindow->ImplGetFrameData()->mbSysObjFocus = false;
             if ( !pWindow->ImplGetFrameData()->mnFocusId )
@@ -72,10 +72,10 @@ static void ImplSysChildProc( SystemChildWindow* pInst, SalObjEvent nEvent )
                 pWindow->ToTop( ToTopFlags::NoGrabFocus );
             else
                 pWindow->ToTop();
-            if( pWindow->IsDisposed() )
+            if( pWindow->isDisposed() )
                 break;
             pWindow->GrabFocus();
-            if( pWindow->IsDisposed() )
+            if( pWindow->isDisposed() )
                 break;
             pWindow->ImplGetFrameData()->mbInSysObjToTopHdl = false;
             break;
diff --git a/vcl/source/window/syswin.cxx b/vcl/source/window/syswin.cxx
index ab8be281c3a4..2f3e7a9d3832 100644
--- a/vcl/source/window/syswin.cxx
+++ b/vcl/source/window/syswin.cxx
@@ -267,7 +267,7 @@ bool SystemWindow::Close()
 {
     VclPtr<vcl::Window> xWindow = this;
     CallEventListeners( VclEventId::WindowClose );
-    if ( xWindow->IsDisposed() )
+    if ( xWindow->isDisposed() )
         return false;
 
     if ( mpWindowImpl->mxWindowPeer.is() && IsCreatedWithToolkit() )
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index 0e67a1f10d0b..a993b697b100 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -2990,7 +2990,7 @@ bool ToolBox::ImplHandleMouseButtonUp( const MouseEvent& rMEvt, bool bCancel )
                         // prevent from being destroyed in the select handler
                         VclPtr<vcl::Window> xWindow = this;
                         Select();
-                        if ( xWindow->IsDisposed() )
+                        if ( xWindow->isDisposed() )
                             return true;
                     }
                 }
@@ -3398,7 +3398,7 @@ void ToolBox::Tracking( const TrackingEvent& rTEvt )
     else
         ImplHandleMouseMove( rTEvt.GetMouseEvent(), rTEvt.IsTrackingRepeat() );
 
-    if ( xWindow->IsDisposed() )
+    if ( xWindow->isDisposed() )
         // toolbox was deleted
         return;
     DockingWindow::Tracking( rTEvt );
@@ -4233,7 +4233,7 @@ bool ToolBox::ImplActivateItem( vcl::KeyCode aKeyCode )
             // #107776# we might be destroyed in the selecthandler
             VclPtr<vcl::Window> xWindow = this;
             Select();
-            if ( xWindow->IsDisposed() )
+            if ( xWindow->isDisposed() )
                 return bRet;
 
             Deactivate();
@@ -4475,7 +4475,7 @@ void ToolBox::KeyInput( const KeyEvent& rKEvt )
         }
     }
 
-    if ( xWindow->IsDisposed() )
+    if ( xWindow->isDisposed() )
         return;
 
     // #107251# move focus away if this toolbox was disabled during keyinput
@@ -4798,7 +4798,7 @@ void ToolBox::ImplShowFocus()
     if( mnHighItemId && HasFocus() )
     {
         ImplToolItem* pItem = ImplGetItem( mnHighItemId );
-        if (pItem && pItem->mpWindow && !pItem->mpWindow->IsDisposed())
+        if (pItem && pItem->mpWindow && !pItem->mpWindow->isDisposed())
         {
             vcl::Window *pWin = pItem->mpWindow->ImplGetWindowImpl()->mpBorderWindow ? pItem->mpWindow->ImplGetWindowImpl()->mpBorderWindow.get() : pItem->mpWindow.get();
             pWin->ImplGetWindowImpl()->mbDrawSelectionBackground = true;
diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx
index fd338243ee22..291cad218c37 100644
--- a/vcl/source/window/toolbox2.cxx
+++ b/vcl/source/window/toolbox2.cxx
@@ -368,7 +368,7 @@ void ToolBox::Select()
     CallEventListeners( VclEventId::ToolboxSelect );
     maSelectHdl.Call( this );
 
-    if ( xWindow->IsDisposed() )
+    if ( xWindow->isDisposed() )
         return;
 
     // TODO: GetFloatingWindow in DockingWindow is currently inline, change it to check dockingwrapper
@@ -1620,14 +1620,14 @@ void ToolBox::ExecuteCustomMenu( const tools::Rectangle& rRect )
     sal_uInt16 uId = GetMenu()->Execute( pWin, tools::Rectangle( ImplGetPopupPosition( aMenuRect ), Size() ),
                             PopupMenuFlags::ExecuteDown | PopupMenuFlags::NoMouseUpClose );
 
-    if ( pWin->IsDisposed() )
+    if ( pWin->isDisposed() )
         return;
 
     if( GetMenu() )
         GetMenu()->RemoveEventListener( LINK( this, ToolBox, ImplCustomMenuListener ) );
     if( bBorderDel )
     {
-        if( pBorderWin->IsDisposed() )
+        if( pBorderWin->isDisposed() )
             return;
     }
 
diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx
index 19eb432a73ec..5477e98be940 100644
--- a/vcl/source/window/window2.cxx
+++ b/vcl/source/window/window2.cxx
@@ -354,7 +354,7 @@ VclPtr<vcl::Window> Window::SaveFocus()
 
 void Window::EndSaveFocus(const VclPtr<vcl::Window>& xFocusWin)
 {
-    if (xFocusWin && !xFocusWin->IsDisposed())
+    if (xFocusWin && !xFocusWin->isDisposed())
     {
         xFocusWin->GrabFocus();
     }
@@ -1324,7 +1324,7 @@ static bool HasParentDockingWindow(const vcl::Window* pWindow)
 
 void Window::queue_resize(StateChangedType eReason)
 {
-    if (IsDisposed())
+    if (isDisposed())
         return;
 
     bool bSomeoneCares = queue_ungrouped_resize(this);


More information about the Libreoffice-commits mailing list