From 3c58f0768049718fae3d47d5ebfa6c7485ad52b1 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 4 Nov 2014 21:10:34 +0200 Subject: fdo#84938: replace TOOLBOXITEM_ constants with enum Change-Id: I08c4a456f9e80f70719ca8c3ad5c0f0d2d8282f6 Reviewed-on: https://gerrit.libreoffice.org/12258 Tested-by: LibreOffice gerrit bot Reviewed-by: Noel Grandin --- rsc/inc/rscdb.hxx | 2 ++ rsc/source/parser/rscicpx.cxx | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'rsc') diff --git a/rsc/inc/rscdb.hxx b/rsc/inc/rscdb.hxx index 26e0a9ba0786..d2b8f4f1887d 100644 --- a/rsc/inc/rscdb.hxx +++ b/rsc/inc/rscdb.hxx @@ -42,6 +42,7 @@ enum class WindowBorderStyle : sal_Int16; enum class TimeFieldFormat : sal_Int32; enum class KeyFuncType : sal_Int32; enum class MenuItemBits : sal_Int16; +enum class ToolBoxItemType; struct WriteRcContext { @@ -153,6 +154,7 @@ class RscTypCont inline void SETCONST( RscConst *p1, const char * p2, TimeFieldFormat p3 ) { SETCONST(p1, p2, static_cast(p3)); } inline void SETCONST( RscConst *p1, const char * p2, MenuItemBits p3 ) { SETCONST(p1, p2, static_cast(p3)); } inline void SETCONST( RscConst *p1, Atom p2, MenuItemBits p3 ) { SETCONST(p1, p2, static_cast(p3)); } + inline void SETCONST( RscConst *p1, const char * p2, ToolBoxItemType p3 ) { SETCONST(p1, p2, static_cast(p3)); } RscEnum * InitLangType(); RscEnum * InitFieldUnitsType(); RscEnum * InitTimeFieldFormat(); diff --git a/rsc/source/parser/rscicpx.cxx b/rsc/source/parser/rscicpx.cxx index 0d2276aa7c49..35fc0ff6a999 100644 --- a/rsc/source/parser/rscicpx.cxx +++ b/rsc/source/parser/rscicpx.cxx @@ -1290,10 +1290,10 @@ RscTop * RscTypCont::InitClassToolBoxItem( RscTop * pSuper, RscEnum * pEnum; aBaseLst.push_back( pEnum = new RscEnum( pHS->getID( "EnumToolBoxItemType" ), RSC_NOTYPE ) ); - SETCONST( pEnum, "TOOLBOXITEM_BUTTON", TOOLBOXITEM_BUTTON ); - SETCONST( pEnum, "TOOLBOXITEM_SPACE", TOOLBOXITEM_SPACE ); - SETCONST( pEnum, "TOOLBOXITEM_SEPARATOR", TOOLBOXITEM_SEPARATOR ); - SETCONST( pEnum, "TOOLBOXITEM_BREAK", TOOLBOXITEM_BREAK ); + SETCONST( pEnum, "TOOLBOXITEM_BUTTON", ToolBoxItemType::BUTTON ); + SETCONST( pEnum, "TOOLBOXITEM_SPACE", ToolBoxItemType::SPACE ); + SETCONST( pEnum, "TOOLBOXITEM_SEPARATOR", ToolBoxItemType::SEPARATOR ); + SETCONST( pEnum, "TOOLBOXITEM_BREAK", ToolBoxItemType::BREAK ); // Variable einfuegen nId = aNmTb.Put( "Type", VARNAME ); -- cgit v1.2.3