remove unused StartTrackingFlags enum values

Change-Id: Ib72e4d5e3e1c65bc4d44756f98392393c79dab0e
Reviewed-on: https://gerrit.libreoffice.org/63971
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
Noel Grandin
2018-11-23 15:03:10 +02:00
parent 84d9785a04
commit f431595568
4 changed files with 7 additions and 23 deletions

View File

@@ -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

View File

@@ -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()

View File

@@ -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();

View File

@@ -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;
}