diff options
author | Noel Grandin <noel@peralex.com> | 2014-10-26 13:01:46 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2014-10-27 08:09:35 +0000 |
commit | 7ef698355ad59c6fa263daa4ded124cf512e8926 (patch) | |
tree | c929c4d25b985116192045f213b6beacf43989c2 /vcl/source/edit | |
parent | 608396721edcdfce8a325026844fd2fab72bbb73 (diff) |
fdo#84938: replace KEYTYPE_ constants with enum
Change-Id: I563cf96f8ca815d6c8ad9f5fe365fc7ce7a2a328
Reviewed-on: https://gerrit.libreoffice.org/12104
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'vcl/source/edit')
-rw-r--r-- | vcl/source/edit/texteng.cxx | 14 | ||||
-rw-r--r-- | vcl/source/edit/textview.cxx | 16 |
2 files changed, 15 insertions, 15 deletions
diff --git a/vcl/source/edit/texteng.cxx b/vcl/source/edit/texteng.cxx index e0f8d5b31231..792d7e1fecf1 100644 --- a/vcl/source/edit/texteng.cxx +++ b/vcl/source/edit/texteng.cxx @@ -322,20 +322,20 @@ bool TextEngine::DoesKeyChangeText( const KeyEvent& rKeyEvent ) bool bDoesChange = false; KeyFuncType eFunc = rKeyEvent.GetKeyCode().GetFunction(); - if ( eFunc != KEYFUNC_DONTKNOW ) + if ( eFunc != KeyFuncType::DONTKNOW ) { switch ( eFunc ) { - case KEYFUNC_UNDO: - case KEYFUNC_REDO: - case KEYFUNC_CUT: - case KEYFUNC_PASTE: bDoesChange = true; + case KeyFuncType::UNDO: + case KeyFuncType::REDO: + case KeyFuncType::CUT: + case KeyFuncType::PASTE: bDoesChange = true; break; default: // might get handled below - eFunc = KEYFUNC_DONTKNOW; + eFunc = KeyFuncType::DONTKNOW; } } - if ( eFunc == KEYFUNC_DONTKNOW ) + if ( eFunc == KeyFuncType::DONTKNOW ) { switch ( rKeyEvent.GetKeyCode().GetCode() ) { diff --git a/vcl/source/edit/textview.cxx b/vcl/source/edit/textview.cxx index fdd4872bf792..4bcd9f3b4d2f 100644 --- a/vcl/source/edit/textview.cxx +++ b/vcl/source/edit/textview.cxx @@ -563,34 +563,34 @@ bool TextView::KeyInput( const KeyEvent& rKeyEvent ) sal_uInt16 nCode = rKeyEvent.GetKeyCode().GetCode(); KeyFuncType eFunc = rKeyEvent.GetKeyCode().GetFunction(); - if ( eFunc != KEYFUNC_DONTKNOW ) + if ( eFunc != KeyFuncType::DONTKNOW ) { switch ( eFunc ) { - case KEYFUNC_CUT: + case KeyFuncType::CUT: { if ( !mpImpl->mbReadOnly ) Cut(); } break; - case KEYFUNC_COPY: + case KeyFuncType::COPY: { Copy(); } break; - case KEYFUNC_PASTE: + case KeyFuncType::PASTE: { if ( !mpImpl->mbReadOnly ) Paste(); } break; - case KEYFUNC_UNDO: + case KeyFuncType::UNDO: { if ( !mpImpl->mbReadOnly ) Undo(); } break; - case KEYFUNC_REDO: + case KeyFuncType::REDO: { if ( !mpImpl->mbReadOnly ) Redo(); @@ -598,10 +598,10 @@ bool TextView::KeyInput( const KeyEvent& rKeyEvent ) break; default: // might get processed below - eFunc = KEYFUNC_DONTKNOW; + eFunc = KeyFuncType::DONTKNOW; } } - if ( eFunc == KEYFUNC_DONTKNOW ) + if ( eFunc == KeyFuncType::DONTKNOW ) { switch ( nCode ) { |