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 /editeng | |
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 'editeng')
-rw-r--r-- | editeng/source/editeng/editeng.cxx | 24 | ||||
-rw-r--r-- | editeng/source/editeng/impedit.cxx | 8 | ||||
-rw-r--r-- | editeng/source/outliner/outlvw.cxx | 14 |
3 files changed, 23 insertions, 23 deletions
diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx index 56c487cd978e..4635136927a2 100644 --- a/editeng/source/editeng/editeng.cxx +++ b/editeng/source/editeng/editeng.cxx @@ -974,18 +974,18 @@ bool EditEngine::PostKeyEvent( const KeyEvent& rKeyEvent, EditView* pEditView, v sal_uInt16 nCode = rKeyEvent.GetKeyCode().GetCode(); KeyFuncType eFunc = rKeyEvent.GetKeyCode().GetFunction(); - if ( eFunc != KEYFUNC_DONTKNOW ) + if ( eFunc != KeyFuncType::DONTKNOW ) { switch ( eFunc ) { - case KEYFUNC_UNDO: + case KeyFuncType::UNDO: { if ( !bReadOnly ) pEditView->Undo(); return true; } // break; - case KEYFUNC_REDO: + case KeyFuncType::REDO: { if ( !bReadOnly ) pEditView->Redo(); @@ -994,7 +994,7 @@ bool EditEngine::PostKeyEvent( const KeyEvent& rKeyEvent, EditView* pEditView, v // break; default: // is then possible edited below. - eFunc = KEYFUNC_DONTKNOW; + eFunc = KeyFuncType::DONTKNOW; } } @@ -1007,7 +1007,7 @@ bool EditEngine::PostKeyEvent( const KeyEvent& rKeyEvent, EditView* pEditView, v pImpEditEngine->CallNotify( aNotify ); } - if ( eFunc == KEYFUNC_DONTKNOW ) + if ( eFunc == KeyFuncType::DONTKNOW ) { switch ( nCode ) { @@ -2651,20 +2651,20 @@ bool EditEngine::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: // is then possibly edited below. - eFunc = KEYFUNC_DONTKNOW; + eFunc = KeyFuncType::DONTKNOW; } } - if ( eFunc == KEYFUNC_DONTKNOW ) + if ( eFunc == KeyFuncType::DONTKNOW ) { switch ( rKeyEvent.GetKeyCode().GetCode() ) { diff --git a/editeng/source/editeng/impedit.cxx b/editeng/source/editeng/impedit.cxx index a71176cc0b7d..4ec83bb5501d 100644 --- a/editeng/source/editeng/impedit.cxx +++ b/editeng/source/editeng/impedit.cxx @@ -990,11 +990,11 @@ bool ImpEditView::PostKeyEvent( const KeyEvent& rKeyEvent, vcl::Window* pFrameWi bool bDone = false; KeyFuncType eFunc = rKeyEvent.GetKeyCode().GetFunction(); - if ( eFunc != KEYFUNC_DONTKNOW ) + if ( eFunc != KeyFuncType::DONTKNOW ) { switch ( eFunc ) { - case KEYFUNC_CUT: + case KeyFuncType::CUT: { if ( !bReadOnly ) { @@ -1004,14 +1004,14 @@ bool ImpEditView::PostKeyEvent( const KeyEvent& rKeyEvent, vcl::Window* pFrameWi } } break; - case KEYFUNC_COPY: + case KeyFuncType::COPY: { Reference<com::sun::star::datatransfer::clipboard::XClipboard> aClipBoard(GetWindow()->GetClipboard()); CutCopy( aClipBoard, false ); bDone = true; } break; - case KEYFUNC_PASTE: + case KeyFuncType::PASTE: { if ( !bReadOnly && IsPasteEnabled() ) { diff --git a/editeng/source/outliner/outlvw.cxx b/editeng/source/outliner/outlvw.cxx index bc0aeedead0d..f0032b8b10d1 100644 --- a/editeng/source/outliner/outlvw.cxx +++ b/editeng/source/outliner/outlvw.cxx @@ -93,11 +93,11 @@ bool OutlinerView::PostKeyEvent( const KeyEvent& rKEvt, vcl::Window* pFrameWin ) return true; } - if ( eFunc != KEYFUNC_DONTKNOW ) + if ( eFunc != KeyFuncType::DONTKNOW ) { switch ( eFunc ) { - case KEYFUNC_CUT: + case KeyFuncType::CUT: { if ( !bReadOnly ) { @@ -106,13 +106,13 @@ bool OutlinerView::PostKeyEvent( const KeyEvent& rKEvt, vcl::Window* pFrameWin ) } } break; - case KEYFUNC_COPY: + case KeyFuncType::COPY: { Copy(); bKeyProcessed = true; } break; - case KEYFUNC_PASTE: + case KeyFuncType::PASTE: { if ( !bReadOnly ) { @@ -121,7 +121,7 @@ bool OutlinerView::PostKeyEvent( const KeyEvent& rKEvt, vcl::Window* pFrameWin ) } } break; - case KEYFUNC_DELETE: + case KeyFuncType::DELETE: { if( !bReadOnly && !bSelection && ( pOwner->ImplGetOutlinerMode() != OUTLINERMODE_TEXTOBJECT ) ) { @@ -138,10 +138,10 @@ bool OutlinerView::PostKeyEvent( const KeyEvent& rKEvt, vcl::Window* pFrameWin ) } break; default: // is then possibly edited below. - eFunc = KEYFUNC_DONTKNOW; + eFunc = KeyFuncType::DONTKNOW; } } - if ( eFunc == KEYFUNC_DONTKNOW ) + if ( eFunc == KeyFuncType::DONTKNOW ) { switch ( nCode ) { |