diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-09-15 11:32:16 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-09-16 14:44:19 +0200 |
commit | f66661c166244f9828e7a383539aa763507e45ef (patch) | |
tree | 834d3e86eae8ee1bd0f5ff79f9bf63c2005beec3 /filter | |
parent | 2ba9f793c7e80a3bed9aceb3281d55ddc7957f85 (diff) |
convert SvxTimeFormat to scoped enum
and make the numerators look more like our internal formatting codes
Change-Id: I3b3d448cec913e72c7ffb6cc3e7754241af36d93
Reviewed-on: https://gerrit.libreoffice.org/42345
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'filter')
-rw-r--r-- | filter/source/msfilter/svdfppt.cxx | 12 | ||||
-rw-r--r-- | filter/source/svg/svgexport.cxx | 14 |
2 files changed, 13 insertions, 13 deletions
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx index 8301c8e9b583..1678fbf0efec 100644 --- a/filter/source/msfilter/svdfppt.cxx +++ b/filter/source/msfilter/svdfppt.cxx @@ -6410,7 +6410,7 @@ PPTFieldEntry::~PPTFieldEntry() void PPTFieldEntry::GetDateTime( const sal_uInt32 nVal, SvxDateFormat& eDateFormat, SvxTimeFormat& eTimeFormat ) { eDateFormat = SVXDATEFORMAT_APPDEFAULT; - eTimeFormat = SVXTIMEFORMAT_APPDEFAULT; + eTimeFormat = SvxTimeFormat::AppDefault; // evaluate ID switch( nVal ) { @@ -6433,19 +6433,19 @@ void PPTFieldEntry::GetDateTime( const sal_uInt32 nVal, SvxDateFormat& eDateForm eDateFormat = SVXDATEFORMAT_A; SAL_FALLTHROUGH; case 9: - eTimeFormat = SVXTIMEFORMAT_24_HM; + eTimeFormat = SvxTimeFormat::HH24_MM; break; case 8: eDateFormat = SVXDATEFORMAT_A; SAL_FALLTHROUGH; case 11: - eTimeFormat = SVXTIMEFORMAT_12_HM; + eTimeFormat = SvxTimeFormat::HH12_MM; break; case 10: - eTimeFormat = SVXTIMEFORMAT_24_HMS; + eTimeFormat = SvxTimeFormat::HH24_MM_SS; break; case 12: - eTimeFormat = SVXTIMEFORMAT_12_HMS; + eTimeFormat = SvxTimeFormat::HH12_MM_SS; break; } } @@ -6457,7 +6457,7 @@ void PPTFieldEntry::SetDateTime( sal_uInt32 nVal ) GetDateTime( nVal, eDateFormat, eTimeFormat ); if ( eDateFormat != SVXDATEFORMAT_APPDEFAULT ) xField1.reset(new SvxFieldItem(SvxDateField( Date( Date::SYSTEM ), SvxDateType::Var, eDateFormat ), EE_FEATURE_FIELD)); - if ( eTimeFormat != SVXTIMEFORMAT_APPDEFAULT ) + if ( eTimeFormat != SvxTimeFormat::AppDefault ) { std::unique_ptr<SvxFieldItem> xFieldItem(new SvxFieldItem(SvxExtTimeField( tools::Time( tools::Time::SYSTEM ), SvxTimeType::Var, eTimeFormat ), EE_FEATURE_FIELD)); if (xField1) diff --git a/filter/source/svg/svgexport.cxx b/filter/source/svg/svgexport.cxx index 070f389785c8..c50cddde7d16 100644 --- a/filter/source/svg/svgexport.cxx +++ b/filter/source/svg/svgexport.cxx @@ -251,23 +251,23 @@ public: } SvxTimeFormat eTimeFormat = (SvxTimeFormat)( ( format >> 4 ) & 0x0f ); - if( eTimeFormat ) + if( eTimeFormat != SvxTimeFormat::AppDefault ) { switch( eTimeFormat ) { - case SVXTIMEFORMAT_24_HMS: // 13:49:38 + case SvxTimeFormat::HH24_MM_SS: // 13:49:38 sTimeFormat.clear(); break; - case SVXTIMEFORMAT_AM_HM: // 01:49 PM - case SVXTIMEFORMAT_12_HM: + case SvxTimeFormat::HH12_MM_AMPM: // 01:49 PM + case SvxTimeFormat::HH12_MM: sTimeFormat.clear(); break; - case SVXTIMEFORMAT_AM_HMS: // 01:49:38 PM - case SVXTIMEFORMAT_12_HMS: + case SvxTimeFormat::HH12_MM_SS_AMPM: // 01:49:38 PM + case SvxTimeFormat::HH12_MM_SS: sTimeFormat.clear(); break; // default case - case SVXTIMEFORMAT_24_HM: // 13:49 + case SvxTimeFormat::HH24_MM: // 13:49 default: sTimeFormat.clear(); break; |