summaryrefslogtreecommitdiff
path: root/sd/source/ui/app
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-09-15 13:55:39 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-09-18 13:16:23 +0200
commit7d14555ef7e867c5b1a0e195e3ef056885697c59 (patch)
treeaf39963caf1328d41756e4463a2a39019448026d /sd/source/ui/app
parent0083b33650c2f584ceff6eeaf9ef6993bfe0ae9b (diff)
convert SvxDateFormat to scoped enum
And simplify the code in sd/headerfooterdlg, no need for the complex encoding of date and time when we can just index into a static array. Change-Id: I677400bf1f956c81eba665b71dbda9183b63f55c Reviewed-on: https://gerrit.libreoffice.org/42346 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd/source/ui/app')
-rw-r--r--sd/source/ui/app/sdmod2.cxx3
-rw-r--r--sd/source/ui/app/sdpopup.cxx16
2 files changed, 10 insertions, 9 deletions
diff --git a/sd/source/ui/app/sdmod2.cxx b/sd/source/ui/app/sdmod2.cxx
index 89f0285abca0..f7c76b3e54b1 100644
--- a/sd/source/ui/app/sdmod2.cxx
+++ b/sd/source/ui/app/sdmod2.cxx
@@ -391,7 +391,8 @@ IMPL_LINK(SdModule, CalcFieldValueHdl, EditFieldInfo*, pInfo, void)
Date aDate( Date::SYSTEM );
tools::Time aTime( tools::Time::SYSTEM );
LanguageType eLang = pInfo->GetOutliner()->GetLanguage( pInfo->GetPara(), pInfo->GetPos() );
- aRepresentation = SvxDateTimeField::GetFormatted( aDate, aTime, (SvxDateFormat)rSettings.meDateTimeFormat, *GetNumberFormatter(), eLang );
+ aRepresentation = SvxDateTimeField::GetFormatted( aDate, aTime,
+ rSettings.meDateFormat, rSettings.meTimeFormat, *GetNumberFormatter(), eLang );
}
}
}
diff --git a/sd/source/ui/app/sdpopup.cxx b/sd/source/ui/app/sdpopup.cxx
index 2a9f8d9615bb..19d63c06b452 100644
--- a/sd/source/ui/app/sdpopup.cxx
+++ b/sd/source/ui/app/sdpopup.cxx
@@ -65,24 +65,24 @@ void SdFieldPopup::Fill( LanguageType eLanguage )
else
CheckItem( 2 );
- //SVXDATEFORMAT_APPDEFAULT, // is not used
- //SVXDATEFORMAT_SYSTEM, // is not used
+ //SvxDateFormat::AppDefault, // is not used
+ //SvxDateFormat::System, // is not used
InsertItem( nID++, SdResId( STR_STANDARD_SMALL ), nStyle );
InsertItem( nID++, SdResId( STR_STANDARD_BIG ), nStyle );
SvNumberFormatter* pNumberFormatter = SD_MOD()->GetNumberFormatter();
- aDateField.SetFormat( SVXDATEFORMAT_A ); // 13.02.96
+ aDateField.SetFormat( SvxDateFormat::A ); // 13.02.96
InsertItem( nID++, aDateField.GetFormatted( *pNumberFormatter, eLanguage ), nStyle );
- aDateField.SetFormat( SVXDATEFORMAT_B ); // 13.02.1996
+ aDateField.SetFormat( SvxDateFormat::B ); // 13.02.1996
InsertItem( nID++, aDateField.GetFormatted( *pNumberFormatter, eLanguage ), nStyle );
- aDateField.SetFormat( SVXDATEFORMAT_C ); // 13.Feb 1996
+ aDateField.SetFormat( SvxDateFormat::C ); // 13.Feb 1996
InsertItem( nID++, aDateField.GetFormatted( *pNumberFormatter, eLanguage ), nStyle );
- aDateField.SetFormat( SVXDATEFORMAT_D ); // 13.Februar 1996
+ aDateField.SetFormat( SvxDateFormat::D ); // 13.Februar 1996
InsertItem( nID++, aDateField.GetFormatted( *pNumberFormatter, eLanguage ), nStyle );
- aDateField.SetFormat( SVXDATEFORMAT_E ); // Die, 13.Februar 1996
+ aDateField.SetFormat( SvxDateFormat::E ); // Die, 13.Februar 1996
InsertItem( nID++, aDateField.GetFormatted( *pNumberFormatter, eLanguage ), nStyle );
- aDateField.SetFormat( SVXDATEFORMAT_F ); // Dienstag, 13.Februar 1996
+ aDateField.SetFormat( SvxDateFormat::F ); // Dienstag, 13.Februar 1996
InsertItem( nID++, aDateField.GetFormatted( *pNumberFormatter, eLanguage ), nStyle );
CheckItem( (sal_uInt16) ( pDateField->GetFormat() ) + 1 ); // - 2 + 3 !