summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-09-15 11:32:16 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-09-16 14:44:19 +0200
commitf66661c166244f9828e7a383539aa763507e45ef (patch)
tree834d3e86eae8ee1bd0f5ff79f9bf63c2005beec3 /sd
parent2ba9f793c7e80a3bed9aceb3281d55ddc7957f85 (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 'sd')
-rw-r--r--sd/source/filter/eppt/eppt.cxx8
-rw-r--r--sd/source/filter/ppt/pptin.cxx2
-rw-r--r--sd/source/ui/app/sdpopup.cxx22
-rw-r--r--sd/source/ui/dlg/dlgfield.cxx24
-rw-r--r--sd/source/ui/dlg/headerfooterdlg.cxx12
5 files changed, 34 insertions, 34 deletions
diff --git a/sd/source/filter/eppt/eppt.cxx b/sd/source/filter/eppt/eppt.cxx
index 7b882ed168d0..24fad7dd7bd8 100644
--- a/sd/source/filter/eppt/eppt.cxx
+++ b/sd/source/filter/eppt/eppt.cxx
@@ -634,16 +634,16 @@ void PPTWriter::ImplCreateHeaderFooters( css::uno::Reference< css::beans::XPrope
}
switch( eTimeFormat )
{
- case SVXTIMEFORMAT_24_HM :
+ case SvxTimeFormat::HH24_MM :
nFormat = 9;
break;
- case SVXTIMEFORMAT_12_HM :
+ case SvxTimeFormat::HH12_MM :
nFormat = 11;
break;
- case SVXTIMEFORMAT_24_HMS :
+ case SvxTimeFormat::HH24_MM_SS :
nFormat = 10;
break;
- case SVXTIMEFORMAT_12_HMS :
+ case SvxTimeFormat::HH12_MM_SS :
nFormat = 12;
break;
default:
diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx
index 617a117544e9..fe102637b60e 100644
--- a/sd/source/filter/ppt/pptin.cxx
+++ b/sd/source/filter/ppt/pptin.cxx
@@ -1460,7 +1460,7 @@ void ImplSdPPTImport::SetHeaderFooterPageSettings( SdPage* pPage, const PptSlide
SvxDateFormat eDateFormat;
SvxTimeFormat eTimeFormat;
PPTFieldEntry::GetDateTime( pHFE->nAtom & 0xff, eDateFormat, eTimeFormat );
- rHeaderFooterSettings.meDateTimeFormat = eDateFormat | ( eTimeFormat << 4 );
+ rHeaderFooterSettings.meDateTimeFormat = eDateFormat | ( static_cast<int>(eTimeFormat) << 4 );
}
break;
case 1 :
diff --git a/sd/source/ui/app/sdpopup.cxx b/sd/source/ui/app/sdpopup.cxx
index f984570ceedc..2a9f8d9615bb 100644
--- a/sd/source/ui/app/sdpopup.cxx
+++ b/sd/source/ui/app/sdpopup.cxx
@@ -97,27 +97,27 @@ void SdFieldPopup::Fill( LanguageType eLanguage )
else
CheckItem( 2 );
- //SVXTIMEFORMAT_APPDEFAULT, // is not used
- //SVXTIMEFORMAT_SYSTEM, // is not used
+ //SvxTimeFormat::AppDefault, // is not used
+ //SvxTimeFormat::System, // is not used
InsertItem( nID++, SdResId( STR_STANDARD_NORMAL ), nStyle );
SvNumberFormatter* pNumberFormatter = SD_MOD()->GetNumberFormatter();
- aTimeField.SetFormat( SVXTIMEFORMAT_24_HM ); // 13:49
+ aTimeField.SetFormat( SvxTimeFormat::HH24_MM ); // 13:49
InsertItem( nID++, aTimeField.GetFormatted( *pNumberFormatter, eLanguage ), nStyle );
- aTimeField.SetFormat( SVXTIMEFORMAT_24_HMS ); // 13:49:38
+ aTimeField.SetFormat( SvxTimeFormat::HH24_MM_SS ); // 13:49:38
InsertItem( nID++, aTimeField.GetFormatted( *pNumberFormatter, eLanguage ), nStyle );
- aTimeField.SetFormat( SVXTIMEFORMAT_24_HMSH ); // 13:49:38.78
+ aTimeField.SetFormat( SvxTimeFormat::HH24_MM_SS_00 ); // 13:49:38.78
InsertItem( nID++, aTimeField.GetFormatted( *pNumberFormatter, eLanguage ), nStyle );
- aTimeField.SetFormat( SVXTIMEFORMAT_12_HM ); // 01:49
+ aTimeField.SetFormat( SvxTimeFormat::HH12_MM ); // 01:49
InsertItem( nID++, aTimeField.GetFormatted( *pNumberFormatter, eLanguage ), nStyle );
- aTimeField.SetFormat( SVXTIMEFORMAT_12_HMS ); // 01:49:38
+ aTimeField.SetFormat( SvxTimeFormat::HH12_MM_SS ); // 01:49:38
InsertItem( nID++, aTimeField.GetFormatted( *pNumberFormatter, eLanguage ), nStyle );
- aTimeField.SetFormat( SVXTIMEFORMAT_12_HMSH ); // 01:49:38.78
+ aTimeField.SetFormat( SvxTimeFormat::HH12_MM_SS_00 ); // 01:49:38.78
InsertItem( nID++, aTimeField.GetFormatted( *pNumberFormatter, eLanguage ), nStyle );
- //SVXTIMEFORMAT_AM_HM, // 01:49 PM
- //SVXTIMEFORMAT_AM_HMS, // 01:49:38 PM
- //SVXTIMEFORMAT_AM_HMSH // 01:49:38.78 PM
+ //SvxTimeFormat::HH12_MM_AMPM, // 01:49 PM
+ //SvxTimeFormat::HH12_MM_SS_AMPM, // 01:49:38 PM
+ //SvxTimeFormat::HH12_MM_SS_00_AMPM // 01:49:38.78 PM
CheckItem( (sal_uInt16) ( pTimeField->GetFormat() ) + 1 ); // - 2 + 3 !
}
diff --git a/sd/source/ui/dlg/dlgfield.cxx b/sd/source/ui/dlg/dlgfield.cxx
index f87c4393eb7e..188dfbded6e9 100644
--- a/sd/source/ui/dlg/dlgfield.cxx
+++ b/sd/source/ui/dlg/dlgfield.cxx
@@ -203,28 +203,28 @@ void SdModifyFieldDlg::FillFormatList()
const SvxExtTimeField* pTimeField = static_cast<const SvxExtTimeField*>( pField );
SvxExtTimeField aTimeField( *pTimeField );
- //SVXTIMEFORMAT_APPDEFAULT, // not used
- //SVXTIMEFORMAT_SYSTEM, // not used
+ //SvxTimeFormat::AppDefault, // not used
+ //SvxTimeFormat::System, // not used
m_pLbFormat->InsertEntry( SdResId( STR_STANDARD_NORMAL ) );
SvNumberFormatter* pNumberFormatter = SD_MOD()->GetNumberFormatter();
- aTimeField.SetFormat( SVXTIMEFORMAT_24_HM ); // 13:49
+ aTimeField.SetFormat( SvxTimeFormat::HH24_MM ); // 13:49
m_pLbFormat->InsertEntry( aTimeField.GetFormatted( *pNumberFormatter, eLangType ) );
- aTimeField.SetFormat( SVXTIMEFORMAT_24_HMS ); // 13:49:38
+ aTimeField.SetFormat( SvxTimeFormat::HH24_MM_SS ); // 13:49:38
m_pLbFormat->InsertEntry( aTimeField.GetFormatted( *pNumberFormatter, eLangType ) );
- aTimeField.SetFormat( SVXTIMEFORMAT_24_HMSH ); // 13:49:38.78
+ aTimeField.SetFormat( SvxTimeFormat::HH24_MM_SS_00 ); // 13:49:38.78
m_pLbFormat->InsertEntry( aTimeField.GetFormatted( *pNumberFormatter, eLangType ) );
- aTimeField.SetFormat( SVXTIMEFORMAT_12_HM ); // 01:49
+ aTimeField.SetFormat( SvxTimeFormat::HH12_MM ); // 01:49
m_pLbFormat->InsertEntry( aTimeField.GetFormatted( *pNumberFormatter, eLangType ) );
- aTimeField.SetFormat( SVXTIMEFORMAT_12_HMS ); // 01:49:38
+ aTimeField.SetFormat( SvxTimeFormat::HH12_MM_SS ); // 01:49:38
m_pLbFormat->InsertEntry( aTimeField.GetFormatted( *pNumberFormatter, eLangType ) );
- aTimeField.SetFormat( SVXTIMEFORMAT_12_HMSH ); // 01:49:38.78
+ aTimeField.SetFormat( SvxTimeFormat::HH12_MM_SS_00 ); // 01:49:38.78
m_pLbFormat->InsertEntry( aTimeField.GetFormatted( *pNumberFormatter, eLangType ) );
- //SVXTIMEFORMAT_AM_HM, // 01:49 PM
- //SVXTIMEFORMAT_AM_HMS, // 01:49:38 PM
- //SVXTIMEFORMAT_AM_HMSH // 01:49:38.78 PM
+ //SvxTimeFormat::HH12_MM_AMPM, // 01:49 PM
+ //SvxTimeFormat::HH12_MM_SS_AMPM, // 01:49:38 PM
+ //SvxTimeFormat::HH12_MM_SS_00_AMPM // 01:49:38.78 PM
- m_pLbFormat->SelectEntryPos( (sal_uInt16) ( pTimeField->GetFormat() - 2 ) );
+ m_pLbFormat->SelectEntryPos( static_cast<sal_uInt16>(pTimeField->GetFormat()) - 2 );
}
else if( dynamic_cast< const SvxExtFileField *>( pField ) != nullptr )
{
diff --git a/sd/source/ui/dlg/headerfooterdlg.cxx b/sd/source/ui/dlg/headerfooterdlg.cxx
index c6eb9cd55e10..922aa47c027f 100644
--- a/sd/source/ui/dlg/headerfooterdlg.cxx
+++ b/sd/source/ui/dlg/headerfooterdlg.cxx
@@ -100,14 +100,14 @@ int const nDateTimeFormats[nDateTimeFormatsCount] =
SVXDATEFORMAT_E,
SVXDATEFORMAT_F,
- SVXDATEFORMAT_A | (SVXTIMEFORMAT_24_HM << 4),
- SVXDATEFORMAT_A | (SVXTIMEFORMAT_12_HM << 4),
+ SVXDATEFORMAT_A | (static_cast<int>(SvxTimeFormat::HH24_MM) << 4),
+ SVXDATEFORMAT_A | (static_cast<int>(SvxTimeFormat::HH12_MM) << 4),
- (SVXTIMEFORMAT_24_HM << 4),
- (SVXTIMEFORMAT_24_HMS <<4),
+ static_cast<int>(SvxTimeFormat::HH24_MM) << 4,
+ static_cast<int>(SvxTimeFormat::HH24_MM_SS) << 4,
- (SVXTIMEFORMAT_12_HM << 4 ),
- (SVXTIMEFORMAT_12_HMS << 4 )
+ static_cast<int>(SvxTimeFormat::HH12_MM) << 4,
+ static_cast<int>(SvxTimeFormat::HH12_MM_SS) << 4
};
class HeaderFooterTabPage : public TabPage