diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-06-29 12:25:02 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-07-02 08:47:48 +0200 |
commit | d98f1e4e0373782ad71b945dcc92c1c3d6dcf6c8 (patch) | |
tree | a39deddf841d478d7baa5e96829891447383a597 /vcl | |
parent | 683fa7b68673c8c6563ee493b8b5682bb6fd1b8a (diff) |
loplugin:unusedfields improve checking for write-only fields
we trade off a little accuracy for finding more possible write-only
fields.
Change-Id: I9f7edba99481fe4ded0a9d8e45e911b0ee99d269
Reviewed-on: https://gerrit.libreoffice.org/56715
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/inc/window.h | 1 | ||||
-rw-r--r-- | vcl/source/window/dndeventdispatcher.cxx | 16 | ||||
-rw-r--r-- | vcl/source/window/window.cxx | 1 | ||||
-rw-r--r-- | vcl/source/window/window2.cxx | 13 |
4 files changed, 0 insertions, 31 deletions
diff --git a/vcl/inc/window.h b/vcl/inc/window.h index da11f0bc514e..0e2ee4a7cb6f 100644 --- a/vcl/inc/window.h +++ b/vcl/inc/window.h @@ -290,7 +290,6 @@ public: ParentClipMode mnParentClipMode; ActivateModeFlags mnActivateMode; DialogControlFlags mnDlgCtrlFlags; - sal_uInt16 mnLockCount; AlwaysInputMode meAlwaysInputMode; VclAlign meHalign; VclAlign meValign; diff --git a/vcl/source/window/dndeventdispatcher.cxx b/vcl/source/window/dndeventdispatcher.cxx index a5f6cdf515a2..9a0814052b24 100644 --- a/vcl/source/window/dndeventdispatcher.cxx +++ b/vcl/source/window/dndeventdispatcher.cxx @@ -260,9 +260,6 @@ sal_Int32 DNDEventDispatcher::fireDragEnterEvent( vcl::Window *pWindow, { SolarMutexClearableGuard aSolarGuard; - // set an UI lock - pWindow->IncrementLockCount(); - // query DropTarget from window Reference< XDropTarget > xDropTarget = pWindow->GetDropTarget(); @@ -323,9 +320,6 @@ sal_Int32 DNDEventDispatcher::fireDragExitEvent( vcl::Window *pWindow ) if( xDropTarget.is() ) n = static_cast < DNDListenerContainer * > ( xDropTarget.get() )->fireDragExitEvent(); - - // release UI lock - pWindow->DecrementLockCount(); } return n; @@ -385,13 +379,6 @@ sal_Int32 DNDEventDispatcher::fireDropEvent( vcl::Window *pWindow, n = static_cast < DNDListenerContainer * > ( xDropTarget.get() )->fireDropEvent( xContext, nDropAction, relLoc.X(), relLoc.Y(), nSourceActions, xTransferable ); } - - if ( !xWindow->IsDisposed() ) - { - // release UI lock - pWindow->DecrementLockCount(); - } - } return n; @@ -420,9 +407,6 @@ sal_Int32 DNDEventDispatcher::fireDragGestureEvent( vcl::Window *pWindow, n = static_cast < DNDListenerContainer * > ( xDragGestureRecognizer.get() )->fireDragGestureEvent( nDragAction, relLoc.X(), relLoc.Y(), xSource, event ); } - - // release UI lock - pWindow->DecrementLockCount(); } return n; diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index 8383e58a6e07..02f856cf4eb6 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -647,7 +647,6 @@ WindowImpl::WindowImpl( WindowType nType ) mnParentClipMode = ParentClipMode::NONE; // Flags for Parent-ClipChildren-Mode mnActivateMode = ActivateModeFlags::NONE; // Will be converted in System/Overlap-Windows mnDlgCtrlFlags = DialogControlFlags::NONE; // DialogControl-Flags - mnLockCount = 0; // LockCount meAlwaysInputMode = AlwaysInputNone; // neither AlwaysEnableInput nor AlwaysDisableInput called meHalign = VclAlign::Fill; meValign = VclAlign::Fill; diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx index 426eb01636ec..459557d438b8 100644 --- a/vcl/source/window/window2.cxx +++ b/vcl/source/window/window2.cxx @@ -979,19 +979,6 @@ void Window::SetCompoundControl( bool bCompound ) mpWindowImpl->mbCompoundControl = bCompound; } -void Window::IncrementLockCount() -{ - assert( mpWindowImpl != nullptr ); - mpWindowImpl->mnLockCount++; -} - -void Window::DecrementLockCount() -{ - assert( mpWindowImpl != nullptr ); - if (mpWindowImpl) - mpWindowImpl->mnLockCount--; -} - WinBits Window::GetStyle() const { return mpWindowImpl ? mpWindowImpl->mnStyle : 0; |