From 52372ae0370cb755ed810eead456d75c8cb1adf3 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Sun, 15 May 2016 17:55:48 +0200 Subject: convert NUMERICFORMATTER to scoped enum Change-Id: Ia6762153a73f01a237bfc03bf9a95a4117d1d998 Reviewed-on: https://gerrit.libreoffice.org/25010 Tested-by: Jenkins Reviewed-by: Noel Grandin --- vcl/source/control/field.cxx | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'vcl') diff --git a/vcl/source/control/field.cxx b/vcl/source/control/field.cxx index 849f2f05f1ad..4ae94361f07a 100644 --- a/vcl/source/control/field.cxx +++ b/vcl/source/control/field.cxx @@ -531,28 +531,25 @@ void NumericFormatter::ImplLoadRes( const ResId& rResId ) if( pMgr ) { - sal_uLong nMask = pMgr->ReadLong(); + RscNumFormatterFlags nMask = (RscNumFormatterFlags)pMgr->ReadLong(); - if ( NUMERICFORMATTER_MIN & nMask ) + if ( RscNumFormatterFlags::Min & nMask ) mnMin = pMgr->ReadLong(); - if ( NUMERICFORMATTER_MAX & nMask ) + if ( RscNumFormatterFlags::Max & nMask ) mnMax = pMgr->ReadLong(); - if ( NUMERICFORMATTER_STRICTFORMAT & nMask ) + if ( RscNumFormatterFlags::StrictFormat & nMask ) SetStrictFormat( pMgr->ReadShort() != 0 ); - if ( NUMERICFORMATTER_DECIMALDIGITS & nMask ) + if ( RscNumFormatterFlags::DecimalDigits & nMask ) SetDecimalDigits( pMgr->ReadShort() ); - if ( NUMERICFORMATTER_VALUE & nMask ) + if ( RscNumFormatterFlags::Value & nMask ) { mnFieldValue = ClipAgainstMinMax(pMgr->ReadLong()); mnLastValue = mnFieldValue; } - - if ( NUMERICFORMATTER_NOTHOUSANDSEP & nMask ) - SetUseThousandSep( pMgr->ReadShort() == 0 ); } } -- cgit