diff options
-rw-r--r-- | editeng/source/items/flditem.cxx | 35 | ||||
-rw-r--r-- | editeng/source/uno/unofield.cxx | 9 | ||||
-rw-r--r-- | filter/source/msfilter/svdfppt.cxx | 12 | ||||
-rw-r--r-- | filter/source/svg/svgexport.cxx | 14 | ||||
-rw-r--r-- | include/editeng/flditem.hxx | 29 | ||||
-rw-r--r-- | oox/source/export/drawingml.cxx | 25 | ||||
-rw-r--r-- | sc/source/ui/unoobj/fielduno.cxx | 2 | ||||
-rw-r--r-- | sd/source/filter/eppt/eppt.cxx | 8 | ||||
-rw-r--r-- | sd/source/filter/ppt/pptin.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/app/sdpopup.cxx | 22 | ||||
-rw-r--r-- | sd/source/ui/dlg/dlgfield.cxx | 24 | ||||
-rw-r--r-- | sd/source/ui/dlg/headerfooterdlg.cxx | 12 |
12 files changed, 101 insertions, 93 deletions
diff --git a/editeng/source/items/flditem.cxx b/editeng/source/items/flditem.cxx index dab1ad10c484..50061b0d4bef 100644 --- a/editeng/source/items/flditem.cxx +++ b/editeng/source/items/flditem.cxx @@ -89,7 +89,8 @@ SvxFieldData* SvxFieldData::Create(const uno::Reference<text::XTextContent>& xTe sal_Int32 nNumFmt = -1; xPropSet->getPropertyValue(UNO_TC_PROP_NUMFORMAT) >>= nNumFmt; - if (nNumFmt >= SVXTIMEFORMAT_APPDEFAULT && nNumFmt <= SVXTIMEFORMAT_AM_HMSH) + if (static_cast<SvxTimeFormat>(nNumFmt) >= SvxTimeFormat::AppDefault && + static_cast<SvxTimeFormat>(nNumFmt) <= SvxTimeFormat::HH12_MM_SS_00_AMPM) pData->SetFormat(static_cast<SvxTimeFormat>(nNumFmt)); return pData; @@ -595,7 +596,7 @@ SvxExtTimeField::SvxExtTimeField() : m_nFixTime( tools::Time(tools::Time::SYSTEM).GetTime() ) { eType = SvxTimeType::Var; - eFormat = SVXTIMEFORMAT_STANDARD; + eFormat = SvxTimeFormat::Standard; } @@ -639,13 +640,13 @@ OUString SvxExtTimeField::GetFormatted( tools::Time const & aTime, SvxTimeFormat { switch( eFormat ) { - case SVXTIMEFORMAT_SYSTEM : - OSL_FAIL( "SVXTIMEFORMAT_SYSTEM: not implemented" ); - eFormat = SVXTIMEFORMAT_STANDARD; + case SvxTimeFormat::System : + OSL_FAIL( "SvxTimeFormat::System: not implemented" ); + eFormat = SvxTimeFormat::Standard; break; - case SVXTIMEFORMAT_APPDEFAULT : - OSL_FAIL( "SVXTIMEFORMAT_APPDEFAULT: not implemented" ); - eFormat = SVXTIMEFORMAT_STANDARD; + case SvxTimeFormat::AppDefault : + OSL_FAIL( "SvxTimeFormat::AppDefault: not implemented" ); + eFormat = SvxTimeFormat::Standard; break; default: ;//prevent warning } @@ -654,10 +655,10 @@ OUString SvxExtTimeField::GetFormatted( tools::Time const & aTime, SvxTimeFormat switch( eFormat ) { - case SVXTIMEFORMAT_12_HM: + case SvxTimeFormat::HH12_MM: nFormatKey = rFormatter.GetFormatIndex( NF_TIME_HHMMAMPM, eLang ); break; - case SVXTIMEFORMAT_12_HMSH: + case SvxTimeFormat::HH12_MM_SS_00: { // no builtin format available, try to insert or reuse OUString aFormatCode( "HH:MM:SS.00 AM/PM" ); @@ -665,26 +666,26 @@ OUString SvxExtTimeField::GetFormatted( tools::Time const & aTime, SvxTimeFormat short nType; rFormatter.PutandConvertEntry( aFormatCode, nCheckPos, nType, nFormatKey, LANGUAGE_ENGLISH_US, eLang ); - DBG_ASSERT( nCheckPos == 0, "SVXTIMEFORMAT_12_HMSH: could not insert format code" ); + DBG_ASSERT( nCheckPos == 0, "SvxTimeFormat::HH12_MM_SS_00: could not insert format code" ); if ( nCheckPos ) { nFormatKey = rFormatter.GetFormatIndex( NF_TIME_HH_MMSS00, eLang ); } break; } - case SVXTIMEFORMAT_24_HM: + case SvxTimeFormat::HH24_MM: nFormatKey = rFormatter.GetFormatIndex( NF_TIME_HHMM, eLang ); break; - case SVXTIMEFORMAT_24_HMSH: + case SvxTimeFormat::HH24_MM_SS_00: nFormatKey = rFormatter.GetFormatIndex( NF_TIME_HH_MMSS00, eLang ); break; - case SVXTIMEFORMAT_12_HMS: + case SvxTimeFormat::HH12_MM_SS: nFormatKey = rFormatter.GetFormatIndex( NF_TIME_HHMMSSAMPM, eLang ); break; - case SVXTIMEFORMAT_24_HMS: + case SvxTimeFormat::HH24_MM_SS: nFormatKey = rFormatter.GetFormatIndex( NF_TIME_HHMMSS, eLang ); break; - case SVXTIMEFORMAT_STANDARD: + case SvxTimeFormat::Standard: default: nFormatKey = rFormatter.GetStandardFormat( css::util::NumberFormat::TIME, eLang ); } @@ -937,7 +938,7 @@ OUString SvxDateTimeField::GetFormatted( SvxTimeFormat eTimeFormat = (SvxTimeFormat)((eFormat >> 4) & 0x0f); - if(eTimeFormat) + if(eTimeFormat != SvxTimeFormat::AppDefault) { OUStringBuffer aBuf(aRet); diff --git a/editeng/source/uno/unofield.cxx b/editeng/source/uno/unofield.cxx index e97c3d3c0e0e..194781fc9a95 100644 --- a/editeng/source/uno/unofield.cxx +++ b/editeng/source/uno/unofield.cxx @@ -259,7 +259,7 @@ SvxUnoTextField::SvxUnoTextField( sal_Int32 nServiceId ) throw() case text::textfield::Type::TIME: mpImpl->mbBoolean2 = false; mpImpl->mbBoolean1 = false; - mpImpl->mnInt32 = SVXTIMEFORMAT_STANDARD; + mpImpl->mnInt32 = static_cast<sal_Int32>(SvxTimeFormat::Standard); break; case text::textfield::Type::URL: @@ -327,14 +327,14 @@ SvxUnoTextField::SvxUnoTextField( uno::Reference< text::XTextRange > const & xAn case text::textfield::Type::TIME: mpImpl->mbBoolean2 = false; mpImpl->mbBoolean1 = false; - mpImpl->mnInt32 = SVXTIMEFORMAT_STANDARD; + mpImpl->mnInt32 = static_cast<sal_Int32>(SvxTimeFormat::Standard); break; case text::textfield::Type::EXTENDED_TIME: mpImpl->mbBoolean2 = false; mpImpl->maDateTime = getTime( static_cast<const SvxExtTimeField*>(pData)->GetFixTime() ); mpImpl->mbBoolean1 = static_cast<const SvxExtTimeField*>(pData)->GetType() == SvxTimeType::Fix; - mpImpl->mnInt32 = static_cast<const SvxExtTimeField*>(pData)->GetFormat(); + mpImpl->mnInt32 = static_cast<sal_Int32>(static_cast<const SvxExtTimeField*>(pData)->GetFormat()); break; case text::textfield::Type::URL: @@ -402,7 +402,8 @@ SvxFieldData* SvxUnoTextField::CreateFieldData() const throw() tools::Time aTime( setTime( mpImpl->maDateTime ) ); pData = new SvxExtTimeField( aTime, mpImpl->mbBoolean1?SvxTimeType::Fix:SvxTimeType::Var ); - if( mpImpl->mnInt32 >= SVXTIMEFORMAT_APPDEFAULT && mpImpl->mnInt32 <= SVXTIMEFORMAT_AM_HMSH ) + if( static_cast<SvxTimeFormat>(mpImpl->mnInt32) >= SvxTimeFormat::AppDefault && + static_cast<SvxTimeFormat>(mpImpl->mnInt32) <= SvxTimeFormat::HH12_MM_SS_00_AMPM ) static_cast<SvxExtTimeField*>(pData)->SetFormat( (SvxTimeFormat)mpImpl->mnInt32 ); } else 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; diff --git a/include/editeng/flditem.hxx b/include/editeng/flditem.hxx index feacfafe25c4..addb6974493e 100644 --- a/include/editeng/flditem.hxx +++ b/include/editeng/flditem.hxx @@ -244,19 +244,20 @@ enum class SvxTimeType { Fix, Var }; -enum SvxTimeFormat { SVXTIMEFORMAT_APPDEFAULT = 0, // Set as in App - SVXTIMEFORMAT_SYSTEM, // Set as in System - SVXTIMEFORMAT_STANDARD, - SVXTIMEFORMAT_24_HM, // 13:49 - SVXTIMEFORMAT_24_HMS, // 13:49:38 - SVXTIMEFORMAT_24_HMSH, // 13:49:38.78 - SVXTIMEFORMAT_12_HM, // 01:49 - SVXTIMEFORMAT_12_HMS, // 01:49:38 - SVXTIMEFORMAT_12_HMSH, // 01:49:38.78 - SVXTIMEFORMAT_AM_HM, // 01:49 PM - SVXTIMEFORMAT_AM_HMS, // 01:49:38 PM - SVXTIMEFORMAT_AM_HMSH // 01:49:38.78 PM - }; +enum class SvxTimeFormat { + AppDefault = 0, // Set as in App + System, // Set as in System + Standard, + HH24_MM, // 13:49 + HH24_MM_SS, // 13:49:38 + HH24_MM_SS_00, // 13:49:38.78 + HH12_MM, // 01:49 + HH12_MM_SS, // 01:49:38 + HH12_MM_SS_00, // 01:49:38.78 + HH12_MM_AMPM, // 01:49 PM + HH12_MM_SS_AMPM, // 01:49:38 PM + HH12_MM_SS_00_AMPM // 01:49:38.78 PM +}; class EDITENG_DLLPUBLIC SvxExtTimeField : public SvxFieldData { @@ -270,7 +271,7 @@ public: SvxExtTimeField(); explicit SvxExtTimeField( const tools::Time& rTime, SvxTimeType eType, - SvxTimeFormat eFormat = SVXTIMEFORMAT_STANDARD ); + SvxTimeFormat eFormat = SvxTimeFormat::Standard ); sal_Int64 GetFixTime() const { return m_nFixTime; } void SetFixTime( const tools::Time& rTime ) { m_nFixTime = rTime.GetTime(); } diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index 44cfc48ad089..7ca7d765ec6a 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -1670,17 +1670,22 @@ OUString DrawingML::GetFieldValue( const css::uno::Reference< css::text::XTextRa { sal_Int32 nNumFmt = -1; rXPropSet->getPropertyValue(UNO_TC_PROP_NUMFORMAT) >>= nNumFmt; - switch(nNumFmt) + switch(static_cast<SvxTimeFormat>(nNumFmt)) { - case SVXTIMEFORMAT_STANDARD: - case SVXTIMEFORMAT_24_HMS: aFieldValue = "datetime11"; // 13:49:38 - break; - case SVXTIMEFORMAT_24_HM: aFieldValue = "datetime10"; // 13:49 - break; - case SVXTIMEFORMAT_12_HM: aFieldValue = "datetime12"; // 01:49 PM - break; - case SVXTIMEFORMAT_12_HMS: aFieldValue = "datetime13"; // 01:49:38 PM - break; + case SvxTimeFormat::Standard: + case SvxTimeFormat::HH24_MM_SS: + aFieldValue = "datetime11"; // 13:49:38 + break; + case SvxTimeFormat::HH24_MM: + aFieldValue = "datetime10"; // 13:49 + break; + case SvxTimeFormat::HH12_MM: + aFieldValue = "datetime12"; // 01:49 PM + break; + case SvxTimeFormat::HH12_MM_SS: + aFieldValue = "datetime13"; // 01:49:38 PM + break; + default: break; } } else if(aFieldKind == "ExtFile") diff --git a/sc/source/ui/unoobj/fielduno.cxx b/sc/source/ui/unoobj/fielduno.cxx index f2be21935522..257bf8fa31df 100644 --- a/sc/source/ui/unoobj/fielduno.cxx +++ b/sc/source/ui/unoobj/fielduno.cxx @@ -991,7 +991,7 @@ uno::Any ScEditFieldObj::getPropertyValueDateTime(const OUString& rName) } if (rName == SC_UNONAME_NUMFMT) - return uno::makeAny<sal_Int32>(p->GetFormat()); + return uno::makeAny<sal_Int32>(static_cast<sal_Int32>(p->GetFormat())); } break; default: 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 |