summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-10-26 13:01:46 +0200
committerNoel Grandin <noelgrandin@gmail.com>2014-10-27 08:09:35 +0000
commit7ef698355ad59c6fa263daa4ded124cf512e8926 (patch)
treec929c4d25b985116192045f213b6beacf43989c2
parent608396721edcdfce8a325026844fd2fab72bbb73 (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>
-rw-r--r--cui/source/tabpages/autocdlg.cxx2
-rw-r--r--dbaccess/source/ui/control/dbtreelistbox.cxx10
-rw-r--r--dbaccess/source/ui/control/sqledit.cxx2
-rw-r--r--editeng/source/editeng/editeng.cxx24
-rw-r--r--editeng/source/editeng/impedit.cxx8
-rw-r--r--editeng/source/outliner/outlvw.cxx14
-rw-r--r--extensions/source/bibliography/framectr.cxx6
-rw-r--r--include/rsc/rsc-vcl-shared-types.hxx11
-rw-r--r--include/vcl/keycod.hxx14
-rw-r--r--rsc/inc/rscdb.hxx2
-rw-r--r--rsc/source/parser/rscicpx.cxx38
-rw-r--r--sc/source/ui/app/inputhdl.cxx2
-rw-r--r--sc/source/ui/view/tabvwsh4.cxx4
-rw-r--r--starmath/source/view.cxx6
-rw-r--r--svx/source/fmcomp/gridctrl.cxx2
-rw-r--r--svx/source/form/navigatortree.cxx6
-rw-r--r--svx/source/svdraw/svdview.cxx16
-rw-r--r--sw/source/uibase/docvw/edtwin.cxx2
-rw-r--r--vcl/source/control/edit.cxx24
-rw-r--r--vcl/source/edit/texteng.cxx14
-rw-r--r--vcl/source/edit/textview.cxx16
-rw-r--r--vcl/source/window/keycod.cxx50
22 files changed, 137 insertions, 136 deletions
diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx
index f1d3a8f3bd78..4c25cb799b32 100644
--- a/cui/source/tabpages/autocdlg.cxx
+++ b/cui/source/tabpages/autocdlg.cxx
@@ -2335,7 +2335,7 @@ bool OfaAutoCompleteTabPage::AutoCompleteMultiListBox::PreNotify(
break;
default:
- if( KEYFUNC_COPY == rKeyCode.GetFunction() )
+ if( KeyFuncType::COPY == rKeyCode.GetFunction() )
{
m_pPage->CopyToClipboard();
nHandled = true;
diff --git a/dbaccess/source/ui/control/dbtreelistbox.cxx b/dbaccess/source/ui/control/dbtreelistbox.cxx
index a91b22cee9b5..8c6978a599fd 100644
--- a/dbaccess/source/ui/control/dbtreelistbox.cxx
+++ b/dbaccess/source/ui/control/dbtreelistbox.cxx
@@ -311,26 +311,26 @@ void DBTreeListBox::KeyInput( const KeyEvent& rKEvt )
sal_uInt16 nCode = rKEvt.GetKeyCode().GetCode();
bool bHandled = false;
- if(eFunc != KEYFUNC_DONTKNOW)
+ if(eFunc != KeyFuncType::DONTKNOW)
{
switch(eFunc)
{
- case KEYFUNC_CUT:
+ case KeyFuncType::CUT:
bHandled = ( m_aCutHandler.IsSet() && !m_aSelectedEntries.empty() );
if ( bHandled )
m_aCutHandler.Call( NULL );
break;
- case KEYFUNC_COPY:
+ case KeyFuncType::COPY:
bHandled = ( m_aCopyHandler.IsSet() && !m_aSelectedEntries.empty() );
if ( bHandled )
m_aCopyHandler.Call( NULL );
break;
- case KEYFUNC_PASTE:
+ case KeyFuncType::PASTE:
bHandled = ( m_aPasteHandler.IsSet() && !m_aSelectedEntries.empty() );
if ( bHandled )
m_aPasteHandler.Call( NULL );
break;
- case KEYFUNC_DELETE:
+ case KeyFuncType::DELETE:
bHandled = ( m_aDeleteHandler.IsSet() && !m_aSelectedEntries.empty() );
if ( bHandled )
m_aDeleteHandler.Call( NULL );
diff --git a/dbaccess/source/ui/control/sqledit.cxx b/dbaccess/source/ui/control/sqledit.cxx
index 72f6a27fe35a..ff4007f729f9 100644
--- a/dbaccess/source/ui/control/sqledit.cxx
+++ b/dbaccess/source/ui/control/sqledit.cxx
@@ -126,7 +126,7 @@ void OSqlEdit::KeyInput( const KeyEvent& rKEvt )
// Is this a cut, copy, paste event?
KeyFuncType aKeyFunc = rKEvt.GetKeyCode().GetFunction();
- if( (aKeyFunc==KEYFUNC_CUT)||(aKeyFunc==KEYFUNC_COPY)||(aKeyFunc==KEYFUNC_PASTE) )
+ if( (aKeyFunc==KeyFuncType::CUT)||(aKeyFunc==KeyFuncType::COPY)||(aKeyFunc==KeyFuncType::PASTE) )
m_bAccelAction = true;
MultiLineEditSyntaxHighlight::KeyInput( rKEvt );
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 )
{
diff --git a/extensions/source/bibliography/framectr.cxx b/extensions/source/bibliography/framectr.cxx
index 13763bc8a575..812406335365 100644
--- a/extensions/source/bibliography/framectr.cxx
+++ b/extensions/source/bibliography/framectr.cxx
@@ -616,7 +616,7 @@ void BibFrameController_Impl::dispatch(const util::URL& _rURL, const uno::Sequen
vcl::Window* pChild = lcl_GetFocusChild( VCLUnoHelper::GetWindow( xWindow ) );
if(pChild)
{
- KeyEvent aEvent( 0, KEYFUNC_CUT );
+ KeyEvent aEvent( 0, KeyFuncType::CUT );
pChild->KeyInput( aEvent );
}
}
@@ -625,7 +625,7 @@ void BibFrameController_Impl::dispatch(const util::URL& _rURL, const uno::Sequen
vcl::Window* pChild = lcl_GetFocusChild( VCLUnoHelper::GetWindow( xWindow ) );
if(pChild)
{
- KeyEvent aEvent( 0, KEYFUNC_COPY );
+ KeyEvent aEvent( 0, KeyFuncType::COPY );
pChild->KeyInput( aEvent );
}
}
@@ -634,7 +634,7 @@ void BibFrameController_Impl::dispatch(const util::URL& _rURL, const uno::Sequen
vcl::Window* pChild = lcl_GetFocusChild( VCLUnoHelper::GetWindow( xWindow ) );
if(pChild)
{
- KeyEvent aEvent( 0, KEYFUNC_PASTE );
+ KeyEvent aEvent( 0, KeyFuncType::PASTE );
pChild->KeyInput( aEvent );
}
}
diff --git a/include/rsc/rsc-vcl-shared-types.hxx b/include/rsc/rsc-vcl-shared-types.hxx
index 5cda3c5622c3..203fa7318696 100644
--- a/include/rsc/rsc-vcl-shared-types.hxx
+++ b/include/rsc/rsc-vcl-shared-types.hxx
@@ -25,12 +25,11 @@
enum TimeFieldFormat {TIMEF_NONE, TIMEF_SEC, TIMEF_100TH_SEC, TIMEF_SEC_CS, TimeFieldFormat_FORCE_EQUAL_SIZE=SAL_MAX_ENUM };
-enum KeyFuncType { KEYFUNC_DONTKNOW, KEYFUNC_NEW, KEYFUNC_OPEN, KEYFUNC_SAVE,
- KEYFUNC_SAVEAS, KEYFUNC_PRINT, KEYFUNC_CLOSE, KEYFUNC_QUIT,
- KEYFUNC_CUT, KEYFUNC_COPY, KEYFUNC_PASTE, KEYFUNC_UNDO,
- KEYFUNC_REDO, KEYFUNC_DELETE, KEYFUNC_REPEAT, KEYFUNC_FIND,
- KEYFUNC_FINDBACKWARD, KEYFUNC_PROPERTIES, KEYFUNC_FRONT,
- KeyFuncType_FORCE_EQUAL_SIZE=SAL_MAX_ENUM };
+enum class KeyFuncType : sal_Int32 { DONTKNOW, NEW, OPEN, SAVE,
+ SAVEAS, PRINT, CLOSE, QUIT,
+ CUT, COPY, PASTE, UNDO,
+ REDO, DELETE, REPEAT, FIND,
+ FINDBACKWARD, PROPERTIES, FRONT };
enum class MenuItemType { DONTKNOW, STRING, IMAGE, STRINGIMAGE, SEPARATOR };
diff --git a/include/vcl/keycod.hxx b/include/vcl/keycod.hxx
index 1c8a2661d557..cfa60fe8b98a 100644
--- a/include/vcl/keycod.hxx
+++ b/include/vcl/keycod.hxx
@@ -38,10 +38,10 @@ private:
KeyFuncType eFunc;
public:
- KeyCode() { nCode = 0; eFunc = KEYFUNC_DONTKNOW; }
+ KeyCode() { nCode = 0; eFunc = KeyFuncType::DONTKNOW; }
KeyCode( const ResId& rResId );
KeyCode( sal_uInt16 nKey, sal_uInt16 nModifier = 0 )
- { nCode = nKey | nModifier; eFunc = KEYFUNC_DONTKNOW; }
+ { nCode = nKey | nModifier; eFunc = KeyFuncType::DONTKNOW; }
KeyCode( sal_uInt16 nKey, bool bShift, bool bMod1, bool bMod2, bool bMod3 );
KeyCode( KeyFuncType eFunction );
@@ -70,7 +70,7 @@ public:
OUString GetName( vcl::Window* pWindow = NULL ) const;
bool IsFunction() const
- { return (eFunc != KEYFUNC_DONTKNOW); }
+ { return (eFunc != KeyFuncType::DONTKNOW); }
KeyFuncType GetFunction() const;
@@ -92,12 +92,12 @@ inline vcl::KeyCode::KeyCode( sal_uInt16 nKey, bool bShift, bool bMod1, bool bMo
nCode |= KEY_MOD2;
if( bMod3 )
nCode |= KEY_MOD3;
- eFunc = KEYFUNC_DONTKNOW;
+ eFunc = KeyFuncType::DONTKNOW;
}
inline bool vcl::KeyCode::operator ==( const vcl::KeyCode& rKeyCode ) const
{
- if ( (eFunc == KEYFUNC_DONTKNOW) && (rKeyCode.eFunc == KEYFUNC_DONTKNOW) )
+ if ( (eFunc == KeyFuncType::DONTKNOW) && (rKeyCode.eFunc == KeyFuncType::DONTKNOW) )
return (nCode == rKeyCode.nCode);
else
return (GetFunction() == rKeyCode.GetFunction());
@@ -105,7 +105,7 @@ inline bool vcl::KeyCode::operator ==( const vcl::KeyCode& rKeyCode ) const
inline bool vcl::KeyCode::operator !=( const vcl::KeyCode& rKeyCode ) const
{
- if ( (eFunc == KEYFUNC_DONTKNOW) && (rKeyCode.eFunc == KEYFUNC_DONTKNOW) )
+ if ( (eFunc == KeyFuncType::DONTKNOW) && (rKeyCode.eFunc == KeyFuncType::DONTKNOW) )
return (nCode != rKeyCode.nCode);
else
return (GetFunction() != rKeyCode.GetFunction());
@@ -113,7 +113,7 @@ inline bool vcl::KeyCode::operator !=( const vcl::KeyCode& rKeyCode ) const
inline bool vcl::KeyCode::IsDefinedKeyCodeEqual( const vcl::KeyCode& rKeyCode ) const
{
- if ( (eFunc == KEYFUNC_DONTKNOW) && (rKeyCode.eFunc == KEYFUNC_DONTKNOW) )
+ if ( (eFunc == KeyFuncType::DONTKNOW) && (rKeyCode.eFunc == KeyFuncType::DONTKNOW) )
return (GetFullCode() == rKeyCode.GetFullCode());
return (GetFunction() == rKeyCode.GetFunction());
}
diff --git a/rsc/inc/rscdb.hxx b/rsc/inc/rscdb.hxx
index ff097bc0bcd1..6dad375a9cad 100644
--- a/rsc/inc/rscdb.hxx
+++ b/rsc/inc/rscdb.hxx
@@ -39,6 +39,7 @@ class RscCmdLine;
enum class SymbolType : sal_uInt16;
enum class ToolBoxItemBits;
enum class WindowBorderStyle : sal_uInt16;
+enum class KeyFuncType : sal_Int32;
struct WriteRcContext
{
@@ -144,6 +145,7 @@ class RscTypCont
inline void SETCONST( RscConst *p1, const char * p2, SymbolType p3 ) { SETCONST(p1, p2, static_cast<sal_uInt32>(p3)); }
inline void SETCONST( RscConst *p1, Atom p2, ToolBoxItemBits p3 ) { SETCONST(p1, p2, static_cast<sal_uInt32>(p3)); }
inline void SETCONST( RscConst *p1, Atom p2, WindowBorderStyle p3 ) { SETCONST(p1, p2, static_cast<sal_uInt32>(p3)); }
+ inline void SETCONST( RscConst *p1, const char * p2, KeyFuncType p3 ) { SETCONST(p1, p2, static_cast<sal_uInt32>(p3)); }
void SETCONST( RscConst *, Atom, sal_uInt32 );
RscEnum * InitLangType();
RscEnum * InitFieldUnitsType();
diff --git a/rsc/source/parser/rscicpx.cxx b/rsc/source/parser/rscicpx.cxx
index e71c01450a40..78e19d6275d7 100644
--- a/rsc/source/parser/rscicpx.cxx
+++ b/rsc/source/parser/rscicpx.cxx
@@ -693,25 +693,25 @@ RscTop * RscTypCont::InitClassKeyCode( RscTop * pSuper, RscEnum * pKey )
aBaseLst.push_back( pKeyFunc = new RscEnum( pHS->getID( "EnumKeyFunc" ), RSC_NOTYPE ) );
- SETCONST( pKeyFunc, "KEYFUNC_DONTKNOW", KEYFUNC_DONTKNOW );
- SETCONST( pKeyFunc, "KEYFUNC_NEW", KEYFUNC_NEW );
- SETCONST( pKeyFunc, "KEYFUNC_OPEN", KEYFUNC_OPEN );
- SETCONST( pKeyFunc, "KEYFUNC_SAVE", KEYFUNC_SAVE );
- SETCONST( pKeyFunc, "KEYFUNC_SAVEAS", KEYFUNC_SAVEAS );
- SETCONST( pKeyFunc, "KEYFUNC_PRINT", KEYFUNC_PRINT );
- SETCONST( pKeyFunc, "KEYFUNC_CLOSE", KEYFUNC_CLOSE );
- SETCONST( pKeyFunc, "KEYFUNC_QUIT", KEYFUNC_QUIT );
- SETCONST( pKeyFunc, "KEYFUNC_CUT", KEYFUNC_CUT );
- SETCONST( pKeyFunc, "KEYFUNC_COPY", KEYFUNC_COPY );
- SETCONST( pKeyFunc, "KEYFUNC_PASTE", KEYFUNC_PASTE );
- SETCONST( pKeyFunc, "KEYFUNC_UNDO", KEYFUNC_UNDO );
- SETCONST( pKeyFunc, "KEYFUNC_REDO", KEYFUNC_REDO );
- SETCONST( pKeyFunc, "KEYFUNC_DELETE", KEYFUNC_DELETE );
- SETCONST( pKeyFunc, "KEYFUNC_REPEAT", KEYFUNC_REPEAT );
- SETCONST( pKeyFunc, "KEYFUNC_FIND", KEYFUNC_FIND );
- SETCONST( pKeyFunc, "KEYFUNC_PROPERTIES", KEYFUNC_PROPERTIES );
- SETCONST( pKeyFunc, "KEYFUNC_FRONT", KEYFUNC_FRONT );
- SETCONST( pKeyFunc, "KEYFUNC_FINDBACKWARD", KEYFUNC_FINDBACKWARD );
+ SETCONST( pKeyFunc, "KEYFUNC_DONTKNOW", KeyFuncType::DONTKNOW );
+ SETCONST( pKeyFunc, "KEYFUNC_NEW", KeyFuncType::NEW );
+ SETCONST( pKeyFunc, "KEYFUNC_OPEN", KeyFuncType::OPEN );
+ SETCONST( pKeyFunc, "KEYFUNC_SAVE", KeyFuncType::SAVE );
+ SETCONST( pKeyFunc, "KEYFUNC_SAVEAS", KeyFuncType::SAVEAS );
+ SETCONST( pKeyFunc, "KEYFUNC_PRINT", KeyFuncType::PRINT );
+ SETCONST( pKeyFunc, "KEYFUNC_CLOSE", KeyFuncType::CLOSE );
+ SETCONST( pKeyFunc, "KEYFUNC_QUIT", KeyFuncType::QUIT );
+ SETCONST( pKeyFunc, "KEYFUNC_CUT", KeyFuncType::CUT );
+ SETCONST( pKeyFunc, "KEYFUNC_COPY", KeyFuncType::COPY );
+ SETCONST( pKeyFunc, "KEYFUNC_PASTE", KeyFuncType::PASTE );
+ SETCONST( pKeyFunc, "KEYFUNC_UNDO", KeyFuncType::UNDO );
+ SETCONST( pKeyFunc, "KEYFUNC_REDO", KeyFuncType::REDO );
+ SETCONST( pKeyFunc, "KEYFUNC_DELETE", KeyFuncType::DELETE );
+ SETCONST( pKeyFunc, "KEYFUNC_REPEAT", KeyFuncType::REPEAT );
+ SETCONST( pKeyFunc, "KEYFUNC_FIND", KeyFuncType::FIND );
+ SETCONST( pKeyFunc, "KEYFUNC_PROPERTIES", KeyFuncType::PROPERTIES );
+ SETCONST( pKeyFunc, "KEYFUNC_FRONT", KeyFuncType::FRONT );
+ SETCONST( pKeyFunc, "KEYFUNC_FINDBACKWARD", KeyFuncType::FINDBACKWARD );
// Variable einfuegen
nVarId = aNmTb.Put( "Function", VARNAME );
pClassKeyCode->SetVariable( nVarId, pKeyFunc, NULL );
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index 4717da786bfd..eff6c2902049 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -3183,7 +3183,7 @@ bool ScInputHandler::KeyInput( const KeyEvent& rKEvt, bool bStartEdit /* = false
KeyFuncType eFunc = rKEvt.GetKeyCode().GetFunction();
if ( nChar && nChar != 8 && nChar != 127 && // no 'backspace', no 'delete'
- KEYFUNC_CUT != eFunc) // and no 'CTRL-X'
+ KeyFuncType::CUT != eFunc) // and no 'CTRL-X'
{
if (bFormulaMode)
UseFormulaData();
diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx
index 6123f565bd39..5440daf9e0ea 100644
--- a/sc/source/ui/view/tabvwsh4.cxx
+++ b/sc/source/ui/view/tabvwsh4.cxx
@@ -1271,7 +1271,7 @@ bool ScTabViewShell::TabKeyInput(const KeyEvent& rKEvt)
// Spezialfall: Copy/Cut bei Mehrfachselektion -> Fehlermeldung
// (Slot ist disabled, SfxViewShell::KeyInput wuerde also kommentarlos verschluckt)
KeyFuncType eFunc = aCode.GetFunction();
- if ( eFunc == KEYFUNC_CUT )
+ if ( eFunc == KeyFuncType::CUT )
{
ScRange aDummy;
ScMarkType eMarkType = GetViewData().GetSimpleArea( aDummy );
@@ -1288,7 +1288,7 @@ bool ScTabViewShell::TabKeyInput(const KeyEvent& rKEvt)
// container app and are executed during Window::KeyInput.
// -> don't pass keys to input handler that would be used there
// but should call slots instead.
- bool bParent = ( GetViewFrame()->GetFrame().IsInPlace() && eFunc != KEYFUNC_DONTKNOW );
+ bool bParent = ( GetViewFrame()->GetFrame().IsInPlace() && eFunc != KeyFuncType::DONTKNOW );
if( !bUsed && !bDraw && nCode != KEY_RETURN && !bParent )
bUsed = pScMod->InputKeyEvent( rKEvt, true ); // Eingabe
diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx
index 6261019fb31e..e77f20933cc1 100644
--- a/starmath/source/view.cxx
+++ b/starmath/source/view.cxx
@@ -435,11 +435,11 @@ void SmGraphicWindow::KeyInput(const KeyEvent& rKEvt)
SmCursor& rCursor = pViewShell->GetDoc()->GetCursor();
KeyFuncType eFunc = rKEvt.GetKeyCode().GetFunction();
- if (eFunc == KEYFUNC_COPY)
+ if (eFunc == KeyFuncType::COPY)
rCursor.Copy();
- else if (eFunc == KEYFUNC_CUT)
+ else if (eFunc == KeyFuncType::CUT)
rCursor.Cut();
- else if (eFunc == KEYFUNC_PASTE)
+ else if (eFunc == KeyFuncType::PASTE)
rCursor.Paste();
else {
sal_uInt16 nCode = rKEvt.GetKeyCode().GetCode();
diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx
index 3c1a9e3bad41..f42ef319b9bc 100644
--- a/svx/source/fmcomp/gridctrl.cxx
+++ b/svx/source/fmcomp/gridctrl.cxx
@@ -3259,7 +3259,7 @@ bool DbGridControl::IsTabAllowed(bool bRight) const
void DbGridControl::KeyInput( const KeyEvent& rEvt )
{
- if (rEvt.GetKeyCode().GetFunction() == KEYFUNC_COPY)
+ if (rEvt.GetKeyCode().GetFunction() == KeyFuncType::COPY)
{
long nRow = GetCurRow();
sal_uInt16 nColId = GetCurColumnId();
diff --git a/svx/source/form/navigatortree.cxx b/svx/source/form/navigatortree.cxx
index ab83348b0964..40ede51979b7 100644
--- a/svx/source/form/navigatortree.cxx
+++ b/svx/source/form/navigatortree.cxx
@@ -1285,16 +1285,16 @@ namespace svxform
// copy'n'paste?
switch ( rCode.GetFunction() )
{
- case KEYFUNC_CUT:
+ case KeyFuncType::CUT:
doCut();
break;
- case KEYFUNC_PASTE:
+ case KeyFuncType::PASTE:
if ( implAcceptPaste() )
doPaste();
break;
- case KEYFUNC_COPY:
+ case KeyFuncType::COPY:
doCopy();
break;
diff --git a/svx/source/svdraw/svdview.cxx b/svx/source/svdraw/svdview.cxx
index b36b5e725719..bf7ca1cc4689 100644
--- a/svx/source/svdraw/svdview.cxx
+++ b/svx/source/svdraw/svdview.cxx
@@ -182,13 +182,13 @@ bool SdrView::KeyInput(const KeyEvent& rKEvt, vcl::Window* pWin)
if (!bRet && !IsExtendedKeyInputDispatcherEnabled()) {
bRet = true;
switch (rKEvt.GetKeyCode().GetFullFunction()) {
- case KEYFUNC_CUT : Cut(); break;
- case KEYFUNC_COPY : Yank(); break;
- case KEYFUNC_PASTE : Paste(pWin); break;
- case KEYFUNC_DELETE: DeleteMarked(); break;
- case KEYFUNC_UNDO: pMod->Undo(); break;
- case KEYFUNC_REDO: pMod->Redo(); break;
- case KEYFUNC_REPEAT: pMod->Repeat(*this); break;
+ case KeyFuncType::CUT : Cut(); break;
+ case KeyFuncType::COPY : Yank(); break;
+ case KeyFuncType::PASTE : Paste(pWin); break;
+ case KeyFuncType::DELETE: DeleteMarked(); break;
+ case KeyFuncType::UNDO: pMod->Undo(); break;
+ case KeyFuncType::REDO: pMod->Redo(); break;
+ case KeyFuncType::REPEAT: pMod->Repeat(*this); break;
default: {
switch (rKEvt.GetKeyCode().GetFullCode()) {
case KEY_ESCAPE: {
@@ -1390,7 +1390,7 @@ void SdrView::DeleteMarked()
{
if (IsTextEdit())
{
- SdrObjEditView::KeyInput(KeyEvent(0,vcl::KeyCode(KEYFUNC_DELETE)),pTextEditWin);
+ SdrObjEditView::KeyInput(KeyEvent(0,vcl::KeyCode(KeyFuncType::DELETE)),pTextEditWin);
}
else
{
diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx
index a8d3f61601a7..ed57dc372983 100644
--- a/sw/source/uibase/docvw/edtwin.cxx
+++ b/sw/source/uibase/docvw/edtwin.cxx
@@ -2262,7 +2262,7 @@ KEYINPUT_CHECKTABLE_INSDEL:
// Because Sfx accelerators are only called when they were
// enabled at the last status update, copy has to called
// 'forcefully' by us if necessary.
- if( rKeyCode.GetFunction() == KEYFUNC_COPY )
+ if( rKeyCode.GetFunction() == KeyFuncType::COPY )
GetView().GetViewFrame()->GetBindings().Execute(SID_COPY);
if( !bIsDocReadOnly && bNormalChar )
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index 4ca22e3054e7..cfd4b3f3840d 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -1412,11 +1412,11 @@ bool Edit::ImplHandleKeyEvent( const KeyEvent& rKEvt )
mbInternModified = false;
- if ( eFunc != KEYFUNC_DONTKNOW )
+ if ( eFunc != KeyFuncType::DONTKNOW )
{
switch ( eFunc )
{
- case KEYFUNC_CUT:
+ case KeyFuncType::CUT:
{
if ( !mbReadOnly && maSelection.Len() && !(GetStyle() & WB_PASSWORD) )
{
@@ -1427,7 +1427,7 @@ bool Edit::ImplHandleKeyEvent( const KeyEvent& rKEvt )
}
break;
- case KEYFUNC_COPY:
+ case KeyFuncType::COPY:
{
if ( !(GetStyle() & WB_PASSWORD) )
{
@@ -1437,7 +1437,7 @@ bool Edit::ImplHandleKeyEvent( const KeyEvent& rKEvt )
}
break;
- case KEYFUNC_PASTE:
+ case KeyFuncType::PASTE:
{
if ( !mbReadOnly )
{
@@ -1447,7 +1447,7 @@ bool Edit::ImplHandleKeyEvent( const KeyEvent& rKEvt )
}
break;
- case KEYFUNC_UNDO:
+ case KeyFuncType::UNDO:
{
if ( !mbReadOnly )
{
@@ -1458,7 +1458,7 @@ bool Edit::ImplHandleKeyEvent( const KeyEvent& rKEvt )
break;
default:
- eFunc = KEYFUNC_DONTKNOW;
+ eFunc = KeyFuncType::DONTKNOW;
}
}
@@ -1486,7 +1486,7 @@ bool Edit::ImplHandleKeyEvent( const KeyEvent& rKEvt )
}
}
- if ( eFunc == KEYFUNC_DONTKNOW && ! bDone )
+ if ( eFunc == KeyFuncType::DONTKNOW && ! bDone )
{
switch ( nCode )
{
@@ -2827,11 +2827,11 @@ PopupMenu* Edit::CreatePopupMenu()
pPopup->SetMenuFlags ( MENU_FLAG_ALWAYSSHOWDISABLEDENTRIES );
if ( rStyleSettings.GetAcceleratorsInContextMenus() )
{
- pPopup->SetAccelKey( SV_MENU_EDIT_UNDO, vcl::KeyCode( KEYFUNC_UNDO ) );
- pPopup->SetAccelKey( SV_MENU_EDIT_CUT, vcl::KeyCode( KEYFUNC_CUT ) );
- pPopup->SetAccelKey( SV_MENU_EDIT_COPY, vcl::KeyCode( KEYFUNC_COPY ) );
- pPopup->SetAccelKey( SV_MENU_EDIT_PASTE, vcl::KeyCode( KEYFUNC_PASTE ) );
- pPopup->SetAccelKey( SV_MENU_EDIT_DELETE, vcl::KeyCode( KEYFUNC_DELETE ) );
+ pPopup->SetAccelKey( SV_MENU_EDIT_UNDO, vcl::KeyCode( KeyFuncType::UNDO ) );
+ pPopup->SetAccelKey( SV_MENU_EDIT_CUT, vcl::KeyCode( KeyFuncType::CUT ) );
+ pPopup->SetAccelKey( SV_MENU_EDIT_COPY, vcl::KeyCode( KeyFuncType::COPY ) );
+ pPopup->SetAccelKey( SV_MENU_EDIT_PASTE, vcl::KeyCode( KeyFuncType::PASTE ) );
+ pPopup->SetAccelKey( SV_MENU_EDIT_DELETE, vcl::KeyCode( KeyFuncType::DELETE ) );
pPopup->SetAccelKey( SV_MENU_EDIT_SELECTALL, vcl::KeyCode( KEY_A, false, true, false, false ) );
pPopup->SetAccelKey( SV_MENU_EDIT_INSERTSYMBOL, vcl::KeyCode( KEY_S, true, true, false, false ) );
}
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 )
{
diff --git a/vcl/source/window/keycod.cxx b/vcl/source/window/keycod.cxx
index afe7c0d073e3..0c13f8118db9 100644
--- a/vcl/source/window/keycod.cxx
+++ b/vcl/source/window/keycod.cxx
@@ -26,27 +26,27 @@
#include <tools/rc.h>
-static const sal_uInt16 aImplKeyFuncTab[(KEYFUNC_FRONT+1)*4] =
+static const sal_uInt16 aImplKeyFuncTab[(static_cast<int>(KeyFuncType::FRONT)+1)*4] =
{
- 0, 0, 0, 0, // KEYFUNC_DONTKNOW
- KEY_N | KEY_MOD1, 0, 0, 0, // KEYFUNC_NEW
- KEY_O | KEY_MOD1, KEY_OPEN, 0, 0, // KEYFUNC_OPEN
- KEY_S | KEY_MOD1, 0, 0, 0, // KEYFUNC_SAVE
- KEY_S | KEY_SHIFT | KEY_MOD1, 0, 0, 0, // KEYFUNC_SAVEAS
- KEY_P | KEY_MOD1, 0, 0, 0, // KEYFUNC_PRINT
- KEY_W | KEY_MOD1, KEY_F4 | KEY_MOD1, 0, 0, // KEYFUNC_CLOSE
- KEY_Q | KEY_MOD1, KEY_F4 | KEY_MOD2, 0, 0, // KEYFUNC_QUIT
- KEY_X | KEY_MOD1, KEY_DELETE | KEY_SHIFT, KEY_CUT, 0, // KEYFUNC_CUT
- KEY_C | KEY_MOD1, KEY_INSERT | KEY_MOD1, KEY_COPY, 0, // KEYFUNC_COPY
- KEY_V | KEY_MOD1, KEY_INSERT | KEY_SHIFT, KEY_PASTE, 0, // KEYFUNC_PASTE
- KEY_Z | KEY_MOD1, KEY_BACKSPACE | KEY_MOD2, KEY_UNDO, 0, // KEYFUNC_UNDO
- KEY_Y | KEY_MOD1, KEY_UNDO | KEY_SHIFT, 0, 0, // KEYFUNC_REDO
- KEY_DELETE, 0, 0, 0, // KEYFUNC_DELETE
- KEY_REPEAT, 0, 0, 0, // KEYFUNC_REPEAT
- KEY_F | KEY_MOD1, KEY_FIND, 0, 0, // KEYFUNC_FIND
- KEY_F | KEY_SHIFT | KEY_MOD1, KEY_SHIFT | KEY_FIND, 0, 0, // KEYFUNC_FINDBACKWARD
- KEY_RETURN | KEY_MOD2, 0, 0, 0, // KEYFUNC_PROPERTIES
- 0, 0, 0, 0 // KEYFUNC_FRONT
+ 0, 0, 0, 0, // KeyFuncType::DONTKNOW
+ KEY_N | KEY_MOD1, 0, 0, 0, // KeyFuncType::NEW
+ KEY_O | KEY_MOD1, KEY_OPEN, 0, 0, // KeyFuncType::OPEN
+ KEY_S | KEY_MOD1, 0, 0, 0, // KeyFuncType::SAVE
+ KEY_S | KEY_SHIFT | KEY_MOD1, 0, 0, 0, // KeyFuncType::SAVEAS
+ KEY_P | KEY_MOD1, 0, 0, 0, // KeyFuncType::PRINT
+ KEY_W | KEY_MOD1, KEY_F4 | KEY_MOD1, 0, 0, // KeyFuncType::CLOSE
+ KEY_Q | KEY_MOD1, KEY_F4 | KEY_MOD2, 0, 0, // KeyFuncType::QUIT
+ KEY_X | KEY_MOD1, KEY_DELETE | KEY_SHIFT, KEY_CUT, 0, // KeyFuncType::CUT
+ KEY_C | KEY_MOD1, KEY_INSERT | KEY_MOD1, KEY_COPY, 0, // KeyFuncType::COPY
+ KEY_V | KEY_MOD1, KEY_INSERT | KEY_SHIFT, KEY_PASTE, 0, // KeyFuncType::PASTE
+ KEY_Z | KEY_MOD1, KEY_BACKSPACE | KEY_MOD2, KEY_UNDO, 0, // KeyFuncType::UNDO
+ KEY_Y | KEY_MOD1, KEY_UNDO | KEY_SHIFT, 0, 0, // KeyFuncType::REDO
+ KEY_DELETE, 0, 0, 0, // KeyFuncType::DELETE
+ KEY_REPEAT, 0, 0, 0, // KeyFuncType::REPEAT
+ KEY_F | KEY_MOD1, KEY_FIND, 0, 0, // KeyFuncType::FIND
+ KEY_F | KEY_SHIFT | KEY_MOD1, KEY_SHIFT | KEY_FIND, 0, 0, // KeyFuncType::FINDBACKWARD
+ KEY_RETURN | KEY_MOD2, 0, 0, 0, // KeyFuncType::PROPERTIES
+ 0, 0, 0, 0 // KeyFuncType::FRONT
};
bool ImplGetKeyCode( KeyFuncType eFunc, sal_uInt16& rCode1, sal_uInt16& rCode2, sal_uInt16& rCode3, sal_uInt16& rCode4 )
@@ -77,7 +77,7 @@ vcl::KeyCode::KeyCode( KeyFuncType eFunction )
vcl::KeyCode::KeyCode( const ResId& rResId )
: nCode(0)
- , eFunc(KEYFUNC_DONTKNOW)
+ , eFunc(KeyFuncType::DONTKNOW)
{
rResId.SetRT( RSC_KEYCODE );
@@ -91,7 +91,7 @@ vcl::KeyCode::KeyCode( const ResId& rResId )
sal_uLong nKeyFunc = pResMgr->ReadLong();
eFunc = (KeyFuncType)nKeyFunc;
- if ( eFunc != KEYFUNC_DONTKNOW )
+ if ( eFunc != KeyFuncType::DONTKNOW )
{
sal_uInt16 nDummy;
ImplGetKeyCode( eFunc, nCode, nDummy, nDummy, nDummy );
@@ -110,13 +110,13 @@ OUString vcl::KeyCode::GetName( vcl::Window* pWindow ) const
KeyFuncType vcl::KeyCode::GetFunction() const
{
- if ( eFunc != KEYFUNC_DONTKNOW )
+ if ( eFunc != KeyFuncType::DONTKNOW )
return eFunc;
sal_uInt16 nCompCode = GetModifier() | GetCode();
if ( nCompCode )
{
- for ( sal_uInt16 i = (sal_uInt16)KEYFUNC_NEW; i < (sal_uInt16)KEYFUNC_FRONT; i++ )
+ for ( sal_uInt16 i = (sal_uInt16)KeyFuncType::NEW; i < (sal_uInt16)KeyFuncType::FRONT; i++ )
{
sal_uInt16 nKeyCode1;
sal_uInt16 nKeyCode2;
@@ -128,7 +128,7 @@ KeyFuncType vcl::KeyCode::GetFunction() const
}
}
- return KEYFUNC_DONTKNOW;
+ return KeyFuncType::DONTKNOW;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */