summaryrefslogtreecommitdiff
path: root/rsc
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-12-20 16:21:21 +0200
committerNoel Grandin <noel@peralex.com>2015-01-06 10:59:40 +0200
commitbae855e667993ea6cddd551452c6e2fa60bdc2f3 (patch)
tree6ddf4f5d003ce53e9855cbe260851ef00ffa69ca /rsc
parent9b45157ab20c9b158a1ef8f4f364d7a46d9c276b (diff)
fdo#84938: replace BUTTONTYPE_ constants with 'enum class'
Change-Id: I54f9019297913683605b5aea9f79b3defc1dcc13
Diffstat (limited to 'rsc')
-rw-r--r--rsc/inc/rscdb.hxx3
-rw-r--r--rsc/source/parser/rscicpx.cxx6
2 files changed, 6 insertions, 3 deletions
diff --git a/rsc/inc/rscdb.hxx b/rsc/inc/rscdb.hxx
index 9a8aa723d1de..6ddfe7d36fab 100644
--- a/rsc/inc/rscdb.hxx
+++ b/rsc/inc/rscdb.hxx
@@ -42,6 +42,7 @@ enum class WindowBorderStyle : sal_Int16;
enum class KeyFuncType : sal_Int32;
enum class MenuItemBits : sal_Int16;
enum class ToolBoxItemType;
+enum class ButtonType;
struct WriteRcContext
{
@@ -152,6 +153,8 @@ class RscTypCont
inline void SETCONST( RscConst *p1, const char * p2, MenuItemBits p3 ) { SETCONST(p1, p2, static_cast<sal_uInt32>(p3)); }
inline void SETCONST( RscConst *p1, Atom p2, MenuItemBits p3 ) { SETCONST(p1, p2, static_cast<sal_uInt32>(p3)); }
inline void SETCONST( RscConst *p1, const char * p2, ToolBoxItemType p3 ) { SETCONST(p1, p2, static_cast<sal_uInt32>(p3)); }
+ inline void SETCONST( RscConst *p1, Atom p2, ButtonType p3 ) { SETCONST(p1, p2, static_cast<sal_uInt32>(p3)); }
+ inline void SETCONST( RscConst *p1, const char * p2, ButtonType p3 ) { SETCONST(p1, p2, static_cast<sal_uInt32>(p3)); }
RscEnum * InitLangType();
RscEnum * InitFieldUnitsType();
RscEnum * InitColor();
diff --git a/rsc/source/parser/rscicpx.cxx b/rsc/source/parser/rscicpx.cxx
index f62ff3e61ba7..0d23d0b05b58 100644
--- a/rsc/source/parser/rscicpx.cxx
+++ b/rsc/source/parser/rscicpx.cxx
@@ -1238,9 +1238,9 @@ RscTop * RscTypCont::InitClassToolBox( RscTop * pSuper,
RscEnum * pEnum;
aBaseLst.push_back( pEnum = new RscEnum( pHS->getID( "EnumButtonType" ), RSC_NOTYPE ) );
- SETCONST( pEnum, "BUTTON_SYMBOL", BUTTON_SYMBOL );
- SETCONST( pEnum, "BUTTON_TEXT", BUTTON_TEXT );
- SETCONST( pEnum, "BUTTON_SYMBOLTEXT", BUTTON_SYMBOLTEXT );
+ SETCONST( pEnum, "BUTTON_SYMBOL", ButtonType::SYMBOLONLY );
+ SETCONST( pEnum, "BUTTON_TEXT", ButtonType::TEXT );
+ SETCONST( pEnum, "BUTTON_SYMBOLTEXT", ButtonType::SYMBOLTEXT );
// Variable einfuegen
nId = aNmTb.Put( "ButtonType", VARNAME );