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 /svtools | |
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 'svtools')
-rw-r--r-- | svtools/source/control/fmtfield.cxx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/svtools/source/control/fmtfield.cxx b/svtools/source/control/fmtfield.cxx index 5d4c93171028..3b47e08c938b 100644 --- a/svtools/source/control/fmtfield.cxx +++ b/svtools/source/control/fmtfield.cxx @@ -558,7 +558,7 @@ void FormattedField::SetFormatter(SvNumberFormatter* pFormatter, bool bResetForm // get the Office's locale and translate LanguageType eSysLanguage = SvtSysLocale().GetLanguageTag().getLanguageType( false); // get the standard numeric format for this language - m_nFormatKey = m_pFormatter->GetStandardFormat( css::util::NumberFormat::NUMBER, eSysLanguage ); + m_nFormatKey = m_pFormatter->GetStandardFormat( SvNumFormatType::NUMBER, eSysLanguage ); } else m_nFormatKey = 0; @@ -577,7 +577,7 @@ void FormattedField::SetFormatter(SvNumberFormatter* pFormatter, bool bResetForm // convert the old format string into the new language sal_Int32 nCheckPos; - short nType; + SvNumFormatType nType; pFormatter->PutandConvertEntry(sOldFormat, nCheckPos, nType, nDestKey, aOldLang, aNewLang); m_nFormatKey = nDestKey; } @@ -603,7 +603,7 @@ bool FormattedField::SetFormat(const OUString& rFormatString, LanguageType eLang if (nNewKey == NUMBERFORMAT_ENTRY_NOT_FOUND) { sal_Int32 nCheckPos; - short nType; + SvNumFormatType nType; OUString rFormat(rFormatString); if (!ImplGetFormatter()->PutEntry(rFormat, nCheckPos, nType, nNewKey, eLang)) return false; @@ -648,7 +648,7 @@ void FormattedField::SetThousandsSep(bool _bUseSeparator) // ... and introduce it to the formatter sal_Int32 nCheckPos = 0; sal_uInt32 nNewKey; - short nType; + SvNumFormatType nType; ImplGetFormatter()->PutEntry(sFmtDescription, nCheckPos, nType, nNewKey, eLang); // set the new key @@ -689,7 +689,7 @@ void FormattedField::SetDecimalDigits(sal_uInt16 _nPrecision) // ... and introduce it to the formatter sal_Int32 nCheckPos = 0; sal_uInt32 nNewKey; - short nType; + SvNumFormatType nType; ImplGetFormatter()->PutEntry(sFmtDescription, nCheckPos, nType, nNewKey, eLang); // set the new key @@ -911,17 +911,17 @@ bool FormattedField::ImplGetValue(double& dNewVal) nFormatKey = 0; // special treatment for percentage formatting - if (ImplGetFormatter()->GetType(m_nFormatKey) == css::util::NumberFormat::PERCENT) + if (ImplGetFormatter()->GetType(m_nFormatKey) == SvNumFormatType::PERCENT) { // the language of our format LanguageType eLanguage = m_pFormatter->GetEntry(m_nFormatKey)->GetLanguage(); // the default number format for this language - sal_uLong nStandardNumericFormat = m_pFormatter->GetStandardFormat(css::util::NumberFormat::NUMBER, eLanguage); + sal_uLong nStandardNumericFormat = m_pFormatter->GetStandardFormat(SvNumFormatType::NUMBER, eLanguage); sal_uInt32 nTempFormat = nStandardNumericFormat; double dTemp; if (m_pFormatter->IsNumberFormat(sText, nTempFormat, dTemp) && - css::util::NumberFormat::NUMBER == m_pFormatter->GetType(nTempFormat)) + SvNumFormatType::NUMBER == m_pFormatter->GetType(nTempFormat)) // the string is equivalent to a number formatted one (has no % sign) -> append it sText += "%"; // (with this, a input of '3' becomes '3%', which then by the formatter is translated |