summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-08-24 11:28:40 +0200
committerNoel Grandin <noel@peralex.com>2016-08-25 08:40:00 +0200
commit9296ec4403b642939ae49322c5d84066ac5854c8 (patch)
treed836c77eaac63f49b9f7d0a7b0d38725cadec55c /sw
parent6d61808a3dd98a9d05dacb4e4db68bcdb31dcee9 (diff)
convert SvxNumValCategory to scoped enum
and fix bug in NumFormatListBox::GetDefValue in SW Change-Id: I459b7d5bd181235daa5d128315604f1ed1259ed4
Diffstat (limited to 'sw')
-rw-r--r--sw/source/uibase/utlui/numfmtlb.cxx18
1 files changed, 9 insertions, 9 deletions
diff --git a/sw/source/uibase/utlui/numfmtlb.cxx b/sw/source/uibase/utlui/numfmtlb.cxx
index 0a535a8d6948..d54d84ce9866 100644
--- a/sw/source/uibase/utlui/numfmtlb.cxx
+++ b/sw/source/uibase/utlui/numfmtlb.cxx
@@ -438,42 +438,42 @@ IMPL_LINK_TYPED( NumFormatListBox, SelectHdl, ListBox&, rBox, void )
double NumFormatListBox::GetDefValue(const short nFormatType) const
{
- double fDefValue = 0.0;
+ SvxNumValCategory nDefValue = SvxNumValCategory::Standard;
switch (nFormatType)
{
case css::util::NumberFormat::DATE:
case css::util::NumberFormat::DATE|css::util::NumberFormat::TIME:
- fDefValue = SVX_NUMVAL_DATE;
+ nDefValue = SvxNumValCategory::Date;
break;
case css::util::NumberFormat::TIME:
- fDefValue = SVX_NUMVAL_TIME;
+ nDefValue = SvxNumValCategory::Time;
break;
case css::util::NumberFormat::TEXT:
case css::util::NumberFormat::UNDEFINED:
- fDefValue = 0;
+ nDefValue = SvxNumValCategory::Standard;
break;
case css::util::NumberFormat::CURRENCY:
- fDefValue = SVX_NUMVAL_CURRENCY;
+ nDefValue = SvxNumValCategory::Currency;
break;
case css::util::NumberFormat::PERCENT:
- fDefValue = SVX_NUMVAL_PERCENT;
+ nDefValue = SvxNumValCategory::Percent;
break;
case css::util::NumberFormat::LOGICAL:
- fDefValue = SVX_NUMVAL_BOOLEAN;
+ nDefValue = SvxNumValCategory::Boolean;
break;
default:
- fDefValue = SVX_NUMVAL_STANDARD;
+ nDefValue = SvxNumValCategory::Standard;
break;
}
- return fDefValue;
+ return fSvxNumValConst[nDefValue];
}
void NumFormatListBox::Clear()