From 67c9d054517fc3b5cbc203c330eedef4b50f0e57 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Sat, 18 Oct 2014 20:16:11 +0200 Subject: fdo#84938: replace TIB_ constants with enum Change-Id: I435ce2331fb49e7ce9fe97bdfddfaef706759a84 Reviewed-on: https://gerrit.libreoffice.org/12023 Reviewed-by: Noel Grandin Tested-by: Noel Grandin --- rsc/inc/rscdb.hxx | 1 + rsc/source/parser/rscicpx.cxx | 24 ++++++++++++------------ 2 files changed, 13 insertions(+), 12 deletions(-) (limited to 'rsc') diff --git a/rsc/inc/rscdb.hxx b/rsc/inc/rscdb.hxx index c4bc2fe4ffc4..a200f1ff188d 100644 --- a/rsc/inc/rscdb.hxx +++ b/rsc/inc/rscdb.hxx @@ -140,6 +140,7 @@ class RscTypCont void Init(); // Initialisiert Klassen und Tabelle void SETCONST( RscConst *, const char *, sal_uInt32 ); inline void SETCONST( RscConst *p1, const char * p2, SymbolType p3 ) { SETCONST(p1, p2, static_cast(p3)); } + inline void SETCONST( RscConst *p1, Atom p2, ToolBoxItemBits p3 ) { SETCONST(p1, p2, static_cast(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 a9034bcb255b..661aef93ea04 100644 --- a/rsc/source/parser/rscicpx.cxx +++ b/rsc/source/parser/rscicpx.cxx @@ -1308,18 +1308,18 @@ RscTop * RscTypCont::InitClassToolBoxItem( RscTop * pSuper, aBaseLst.push_back( pFlag = new RscFlag( pHS->getID( "FlagToolBoxState" ), RSC_NOTYPE ) ); // Konstanten in Tabelle stellen - l_nCheckableId = pHS->getID( "TIB_CHECKABLE" ); - SETCONST( pFlag, l_nCheckableId, TIB_CHECKABLE ); - l_nAutoCheckId = pHS->getID( "TIB_AUTOCHECK" ); - SETCONST( pFlag, l_nAutoCheckId, TIB_AUTOCHECK ); - l_nRadioCheckId = pHS->getID( "TIB_RADIOCHECK" ); - SETCONST( pFlag, l_nRadioCheckId, TIB_RADIOCHECK ); - l_nLeftId = pHS->getID( "TIB_LEFT" ); - SETCONST( pFlag, l_nLeftId, TIB_LEFT ); - l_nAutoSizeId = pHS->getID( "TIB_AUTOSIZE" ); - SETCONST( pFlag, l_nAutoSizeId, TIB_AUTOSIZE ); - l_nDropDownId = pHS->getID( "TIB_DROPDOWN" ); - SETCONST( pFlag, l_nDropDownId, TIB_DROPDOWN ); + l_nCheckableId = pHS->getID( "ToolBoxItemBits::CHECKABLE" ); + SETCONST( pFlag, l_nCheckableId, ToolBoxItemBits::CHECKABLE ); + l_nAutoCheckId = pHS->getID( "ToolBoxItemBits::AUTOCHECK" ); + SETCONST( pFlag, l_nAutoCheckId, ToolBoxItemBits::AUTOCHECK ); + l_nRadioCheckId = pHS->getID( "ToolBoxItemBits::RADIOCHECK" ); + SETCONST( pFlag, l_nRadioCheckId, ToolBoxItemBits::RADIOCHECK ); + l_nLeftId = pHS->getID( "ToolBoxItemBits::LEFT" ); + SETCONST( pFlag, l_nLeftId, ToolBoxItemBits::LEFT ); + l_nAutoSizeId = pHS->getID( "ToolBoxItemBits::AUTOSIZE" ); + SETCONST( pFlag, l_nAutoSizeId, ToolBoxItemBits::AUTOSIZE ); + l_nDropDownId = pHS->getID( "ToolBoxItemBits::DROPDOWN" ); + SETCONST( pFlag, l_nDropDownId, ToolBoxItemBits::DROPDOWN ); // Variable einfuegen l_nVarId = aNmTb.Put( "_ToolBoxItemFlags", VARNAME ); -- cgit