diff options
author | Noel Grandin <noel@peralex.com> | 2014-10-27 20:41:11 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2014-10-28 06:12:28 +0000 |
commit | 17a99a9074a7d25cc7e13bf7aaac0fa11e2174a0 (patch) | |
tree | fa314e333575af0d219dd87ff589a58736f55f03 /rsc | |
parent | 282e954477f904524ca192256c4e33ab0585e2f6 (diff) |
fdo#84938: replace TIMEF_ constants with enum
Change-Id: Ia6aa4e21fef46b20d1d8996d2f15855b8ba1776e
Reviewed-on: https://gerrit.libreoffice.org/12114
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'rsc')
-rw-r--r-- | rsc/inc/rscdb.hxx | 5 | ||||
-rw-r--r-- | rsc/source/parser/rscibas.cxx | 6 |
2 files changed, 7 insertions, 4 deletions
diff --git a/rsc/inc/rscdb.hxx b/rsc/inc/rscdb.hxx index 6dad375a9cad..1212fad8e533 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 TimeFieldFormat : sal_Int32; enum class KeyFuncType : sal_Int32; struct WriteRcContext @@ -142,11 +143,13 @@ class RscTypCont void Init(); // Initialisiert Klassen und Tabelle void SETCONST( RscConst *, const char *, sal_uInt32 ); + void SETCONST( RscConst *, Atom, sal_uInt32 ); 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 ); + inline void SETCONST( RscConst *p1, Atom p2, TimeFieldFormat p3 ) { SETCONST(p1, p2, static_cast<sal_uInt32>(p3)); } + inline void SETCONST( RscConst *p1, const char * p2, TimeFieldFormat p3 ) { SETCONST(p1, p2, static_cast<sal_uInt32>(p3)); } RscEnum * InitLangType(); RscEnum * InitFieldUnitsType(); RscEnum * InitTimeFieldFormat(); diff --git a/rsc/source/parser/rscibas.cxx b/rsc/source/parser/rscibas.cxx index a7c5c2dfb068..da5d688cb7f2 100644 --- a/rsc/source/parser/rscibas.cxx +++ b/rsc/source/parser/rscibas.cxx @@ -209,9 +209,9 @@ RscEnum * RscTypCont::InitTimeFieldFormat() pTimeFieldFormat = new RscEnum( pHS->getID( "EnumTimeFieldFormat" ), RSC_NOTYPE ); - SETCONST( pTimeFieldFormat, "TIMEF_NONE", TIMEF_NONE ); - SETCONST( pTimeFieldFormat, "TIMEF_SEC", TIMEF_SEC ); - SETCONST( pTimeFieldFormat, "TIMEF_100TH_SEC", TIMEF_100TH_SEC ); + SETCONST( pTimeFieldFormat, "TIMEF_NONE", TimeFieldFormat::F_NONE ); + SETCONST( pTimeFieldFormat, "TIMEF_SEC", TimeFieldFormat::F_SEC ); + SETCONST( pTimeFieldFormat, "TIMEF_100TH_SEC", TimeFieldFormat::F_100TH_SEC ); return pTimeFieldFormat; } |