[Libreoffice-commits] core.git: compilerplugins/clang include/vcl vcl/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Mon Nov 26 07:49:16 UTC 2018
compilerplugins/clang/unusedenumconstants.readonly.results | 8 --------
include/vcl/window.hxx | 12 ++++--------
vcl/source/window/mouse.cxx | 3 ---
vcl/source/window/winproc.cxx | 7 +++----
4 files changed, 7 insertions(+), 23 deletions(-)
New commits:
commit f4315955689ef0373c6ab3b4cc73b9130ea1531f
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Fri Nov 23 15:03:10 2018 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Mon Nov 26 08:48:55 2018 +0100
remove unused StartTrackingFlags enum values
Change-Id: Ib72e4d5e3e1c65bc4d44756f98392393c79dab0e
Reviewed-on: https://gerrit.libreoffice.org/63971
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/compilerplugins/clang/unusedenumconstants.readonly.results b/compilerplugins/clang/unusedenumconstants.readonly.results
index 94bab4fd2689..3a5f2fc378cd 100644
--- a/compilerplugins/clang/unusedenumconstants.readonly.results
+++ b/compilerplugins/clang/unusedenumconstants.readonly.results
@@ -1098,14 +1098,6 @@ include/vcl/window.hxx:121
enum TrackingEventFlags DontCallHdl
include/vcl/window.hxx:172
enum ShowFlags NoParentUpdate
-include/vcl/window.hxx:298
- enum StartTrackingFlags KeyInput
-include/vcl/window.hxx:300
- enum StartTrackingFlags NoKeyCancel
-include/vcl/window.hxx:303
- enum StartTrackingFlags MouseButtonDown
-include/vcl/window.hxx:304
- enum StartTrackingFlags FocusCancel
include/xmloff/shapeexport.hxx:53
enum XMLShapeExportFlags WIDTH
include/xmloff/shapeexport.hxx:54
diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx
index 99a6d2b6b599..dc5def79c8a3 100644
--- a/include/vcl/window.hxx
+++ b/include/vcl/window.hxx
@@ -294,19 +294,15 @@ namespace o3tl
// Flags for StartTracking()
enum class StartTrackingFlags
{
- NONE = 0x0000,
- KeyInput = 0x0001,
+ NONE = 0x0001,
KeyMod = 0x0002,
- NoKeyCancel = 0x0004,
- ScrollRepeat = 0x0008,
- ButtonRepeat = 0x0010,
- MouseButtonDown = 0x0020,
- FocusCancel = 0x0040,
+ ScrollRepeat = 0x0004,
+ ButtonRepeat = 0x0008,
};
namespace o3tl
{
- template<> struct typed_flags<StartTrackingFlags> : is_typed_flags<StartTrackingFlags, 0x007f> {};
+ template<> struct typed_flags<StartTrackingFlags> : is_typed_flags<StartTrackingFlags, 0x000f> {};
}
// Flags for StartAutoScroll()
diff --git a/vcl/source/window/mouse.cxx b/vcl/source/window/mouse.cxx
index 98cb27322aee..19851303499b 100644
--- a/vcl/source/window/mouse.cxx
+++ b/vcl/source/window/mouse.cxx
@@ -346,9 +346,6 @@ void Window::ImplGrabFocus( GetFocusFlags nFlags )
// call Get- and LoseFocus
if ( pOldFocusWindow && ! pOldFocusWindow->IsDisposed() )
{
- if ( pOldFocusWindow->IsTracking() &&
- (pSVData->maWinData.mnTrackFlags & StartTrackingFlags::FocusCancel) )
- pOldFocusWindow->EndTracking( TrackingEventFlags::Cancel | TrackingEventFlags::Focus );
NotifyEvent aNEvt( MouseNotifyEvent::LOSEFOCUS, pOldFocusWindow );
if ( !ImplCallPreNotify( aNEvt ) )
pOldFocusWindow->CompatLoseFocus();
diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx
index 247b6443e366..ea29c4a265d7 100644
--- a/vcl/source/window/winproc.cxx
+++ b/vcl/source/window/winproc.cxx
@@ -687,8 +687,7 @@ bool ImplHandleMouseEvent( const VclPtr<vcl::Window>& xWindow, MouseNotifyEvent
}
else if ( nSVEvent == MouseNotifyEvent::MOUSEBUTTONDOWN )
{
- if ( pSVData->maWinData.mpTrackWin &&
- !(pSVData->maWinData.mnTrackFlags & StartTrackingFlags::MouseButtonDown) )
+ if ( pSVData->maWinData.mpTrackWin )
bRet = true;
else
{
@@ -919,7 +918,7 @@ static bool ImplHandleKey( vcl::Window* pWindow, MouseNotifyEvent nSVEvent,
{
sal_uInt16 nOrigCode = aKeyCode.GetCode();
- if ( (nOrigCode == KEY_ESCAPE) && !(pSVData->maWinData.mnTrackFlags & StartTrackingFlags::NoKeyCancel) )
+ if ( nOrigCode == KEY_ESCAPE )
{
pSVData->maWinData.mpTrackWin->EndTracking( TrackingEventFlags::Cancel | TrackingEventFlags::Key );
if ( pSVData->maWinData.mpFirstFloat )
@@ -940,7 +939,7 @@ static bool ImplHandleKey( vcl::Window* pWindow, MouseNotifyEvent nSVEvent,
pSVData->maWinData.mpTrackWin->EndTracking( TrackingEventFlags::Key );
return true;
}
- else if ( !(pSVData->maWinData.mnTrackFlags & StartTrackingFlags::KeyInput) )
+ else
return true;
}
More information about the Libreoffice-commits
mailing list