diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2017-12-03 21:46:37 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2017-12-19 22:08:26 +0100 |
commit | 00bc5a097313fbd003675267be961ad3a152ba42 (patch) | |
tree | de9b9e6981d3c2f262b9391335a067d4898185b6 /chart2 | |
parent | b74da08e556b7b001943f0288a61da53791d4dcf (diff) |
wrap scoped enum around css::util::NumberFormat
Change-Id: Icab5ded8bccdb95f79b3fa35ea164f47919c68fa
Reviewed-on: https://gerrit.libreoffice.org/46339
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/source/controller/dialogs/DataBrowser.cxx | 4 | ||||
-rw-r--r-- | chart2/source/controller/dialogs/tp_Scale.cxx | 20 | ||||
-rw-r--r-- | chart2/source/tools/DiagramHelper.cxx | 4 |
3 files changed, 14 insertions, 14 deletions
diff --git a/chart2/source/controller/dialogs/DataBrowser.cxx b/chart2/source/controller/dialogs/DataBrowser.cxx index 5071974206a3..31372feab01a 100644 --- a/chart2/source/controller/dialogs/DataBrowser.cxx +++ b/chart2/source/controller/dialogs/DataBrowser.cxx @@ -1130,8 +1130,8 @@ bool DataBrowser::isDateTimeString( const OUString& aInputString, double& fOutDa SvNumberFormatter* pSvNumberFormatter = m_spNumberFormatterWrapper.get() ? m_spNumberFormatterWrapper->getSvNumberFormatter() : nullptr; if( !aInputString.isEmpty() && pSvNumberFormatter && pSvNumberFormatter->IsNumberFormat( aInputString, nNumberFormat, fOutDateTimeValue ) ) { - short nType = pSvNumberFormatter->GetType( nNumberFormat); - return (nType & util::NumberFormat::DATE) || (nType & util::NumberFormat::TIME); + SvNumFormatType nType = pSvNumberFormatter->GetType( nNumberFormat); + return (nType & SvNumFormatType::DATE) || (nType & SvNumFormatType::TIME); } return false; } diff --git a/chart2/source/controller/dialogs/tp_Scale.cxx b/chart2/source/controller/dialogs/tp_Scale.cxx index 3a791f53baf2..c4e04638abda 100644 --- a/chart2/source/controller/dialogs/tp_Scale.cxx +++ b/chart2/source/controller/dialogs/tp_Scale.cxx @@ -422,11 +422,11 @@ DeactivateRC ScaleTabPage::DeactivatePage(SfxItemSet* pItemSet) bool bDateAxis = m_nAxisType == chart2::AxisType::DATE; sal_uInt32 nMinMaxOriginFmt = m_pFmtFldMax->GetFormatKey(); - if (pNumFormatter->GetType(nMinMaxOriginFmt) == css::util::NumberFormat::TEXT) + if (pNumFormatter->GetType(nMinMaxOriginFmt) == SvNumFormatType::TEXT) nMinMaxOriginFmt = 0; // numberformat_text cause numbers to fail being numbers... Shouldn't happen, but can. sal_uInt32 nStepFmt = m_pFmtFldStepMain->GetFormatKey(); - if (pNumFormatter->GetType(nStepFmt) == css::util::NumberFormat::TEXT) + if (pNumFormatter->GetType(nStepFmt) == SvNumFormatType::TEXT) nStepFmt = 0; Control* pControl = nullptr; @@ -564,8 +564,8 @@ void ScaleTabPage::SetNumFormat() if( pNumFormatter ) { - short eType = pNumFormatter->GetType( nFmt ); - if( eType == css::util::NumberFormat::DATE ) + SvNumFormatType eType = pNumFormatter->GetType( nFmt ); + if( eType == SvNumFormatType::DATE ) { // for intervals use standard format for dates (so you can enter a number of days) const SvNumberformat* pFormat = pNumFormatter->GetEntry( nFmt ); @@ -574,23 +574,23 @@ void ScaleTabPage::SetNumFormat() else nFmt = pNumFormatter->GetStandardIndex(); } - else if( eType == css::util::NumberFormat::DATETIME ) + else if( eType == SvNumFormatType::DATETIME ) { // for intervals use time format for date times const SvNumberformat* pFormat = pNumFormatter->GetEntry( nFmt ); if( pFormat ) - nFmt = pNumFormatter->GetStandardFormat( css::util::NumberFormat::TIME, pFormat->GetLanguage() ); + nFmt = pNumFormatter->GetStandardFormat( SvNumFormatType::TIME, pFormat->GetLanguage() ); else - nFmt = pNumFormatter->GetStandardFormat( css::util::NumberFormat::TIME ); + nFmt = pNumFormatter->GetStandardFormat( SvNumFormatType::TIME ); } - if( m_nAxisType == chart2::AxisType::DATE && ( eType != css::util::NumberFormat::DATE && eType != css::util::NumberFormat::DATETIME) ) + if( m_nAxisType == chart2::AxisType::DATE && ( eType != SvNumFormatType::DATE && eType != SvNumFormatType::DATETIME) ) { const SvNumberformat* pFormat = pNumFormatter->GetEntry( nFmt ); if( pFormat ) - nFmt = pNumFormatter->GetStandardFormat( css::util::NumberFormat::DATE, pFormat->GetLanguage() ); + nFmt = pNumFormatter->GetStandardFormat( SvNumFormatType::DATE, pFormat->GetLanguage() ); else - nFmt = pNumFormatter->GetStandardFormat( css::util::NumberFormat::DATE ); + nFmt = pNumFormatter->GetStandardFormat( SvNumFormatType::DATE ); m_pFmtFldMax->SetFormatKey( nFmt ); m_pFmtFldMin->SetFormatKey( nFmt ); diff --git a/chart2/source/tools/DiagramHelper.cxx b/chart2/source/tools/DiagramHelper.cxx index 7430402e9af5..5d1c3e7c6a90 100644 --- a/chart2/source/tools/DiagramHelper.cxx +++ b/chart2/source/tools/DiagramHelper.cxx @@ -1173,7 +1173,7 @@ sal_Int32 DiagramHelper::getDateTimeInputNumberFormat( const Reference< util::XN SAL_WARN("chart2", "DiagramHelper::getDateTimeInputNumberFormat - no SvNumberFormatter"); else { - short nType; + SvNumFormatType nType; // Obtain best matching date, time or datetime format. nRet = pNumFormatter->GuessDateTimeFormat( nType, fNumber, LANGUAGE_SYSTEM); // Obtain the corresponding edit format. @@ -1190,7 +1190,7 @@ sal_Int32 DiagramHelper::getPercentNumberFormat( const Reference< util::XNumberF SvNumberFormatter* pNumFormatter = aNumberFormatterWrapper.getSvNumberFormatter(); if( pNumFormatter ) { - nRet = pNumFormatter->GetStandardFormat( util::NumberFormat::PERCENT, rLanguageTag.getLanguageType() ); + nRet = pNumFormatter->GetStandardFormat( SvNumFormatType::PERCENT, rLanguageTag.getLanguageType() ); } else { |