summaryrefslogtreecommitdiff
path: root/rsc
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 /rsc
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>
Diffstat (limited to 'rsc')
-rw-r--r--rsc/inc/rscdb.hxx2
-rw-r--r--rsc/source/parser/rscicpx.cxx38
2 files changed, 21 insertions, 19 deletions
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 );