diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2017-04-17 21:35:35 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-04-26 08:50:54 +0200 |
commit | c70d49c7c888da8cfd73db8585e7be1f37fc398a (patch) | |
tree | c0e540401850018464ca76300536faf9aa7e27d2 /xmloff/source | |
parent | cd4344d3bdef631b3e64ac12a9e64bc9670c1b7c (diff) |
use strong_int for LanguageType
Change-Id: If99a944f7032180355da291ad283b4cfcea4f448
Reviewed-on: https://gerrit.libreoffice.org/36629
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmloff/source')
-rw-r--r-- | xmloff/source/style/xmlnumfe.cxx | 10 | ||||
-rw-r--r-- | xmloff/source/style/xmlnumfi.cxx | 4 |
2 files changed, 7 insertions, 7 deletions
diff --git a/xmloff/source/style/xmlnumfe.cxx b/xmloff/source/style/xmlnumfe.cxx index 07e4ac23c126..1b2b42b120c9 100644 --- a/xmloff/source/style/xmlnumfe.cxx +++ b/xmloff/source/style/xmlnumfe.cxx @@ -316,12 +316,12 @@ void SvXMLNumFmtExport::AddStyleAttr_Impl( bool bLong ) } } -void SvXMLNumFmtExport::AddLanguageAttr_Impl( sal_Int32 nLang ) +void SvXMLNumFmtExport::AddLanguageAttr_Impl( LanguageType nLang ) { if ( nLang != LANGUAGE_SYSTEM ) { rExport.AddLanguageTagAttributes( XML_NAMESPACE_NUMBER, XML_NAMESPACE_NUMBER, - LanguageTag( (LanguageType)nLang), false); + LanguageTag( nLang), false); } } @@ -372,7 +372,7 @@ void SvXMLNumFmtExport::WriteCurrencyElement_Impl( const OUString& rString, sal_Int32 nLang = rExt.toInt32(16); if ( nLang < 0 ) nLang = -nLang; - AddLanguageAttr_Impl( nLang ); // adds to pAttrList + AddLanguageAttr_Impl( LanguageType(nLang) ); // adds to pAttrList } SvXMLElementExport aElem( rExport, @@ -1836,9 +1836,9 @@ void SvXMLNumFmtExport::Export( bool bIsAutoStyle ) } if (!bIsAutoStyle) { - std::vector<sal_uInt16> aLanguages; + std::vector<LanguageType> aLanguages; pFormatter->GetUsedLanguages( aLanguages ); - for (std::vector<sal_uInt16>::const_iterator it(aLanguages.begin()); it != aLanguages.end(); ++it) + for (std::vector<LanguageType>::const_iterator it(aLanguages.begin()); it != aLanguages.end(); ++it) { LanguageType nLang = *it; diff --git a/xmloff/source/style/xmlnumfi.cxx b/xmloff/source/style/xmlnumfi.cxx index 7bb2e30862d0..e0a2cd09dc3b 100644 --- a/xmloff/source/style/xmlnumfi.cxx +++ b/xmloff/source/style/xmlnumfi.cxx @@ -1486,7 +1486,7 @@ SvXMLNumFormatContext::SvXMLNumFormatContext( SvXMLImport& rImport, { aFormatCode.append( "][$-" ); // language code in upper hex: - aFormatCode.append(OUString::number(eLang, 16).toAsciiUpperCase()); + aFormatCode.append(OUString::number((sal_uInt16)eLang, 16).toAsciiUpperCase()); } aFormatCode.append( ']' ); } @@ -2037,7 +2037,7 @@ void SvXMLNumFormatContext::AddCurrency( const OUString& rContent, LanguageType if ( nLang != LANGUAGE_SYSTEM ) { // '-' sign and language code in hex: - aFormatCode.append("-" + OUString::number(sal_Int32(nLang), 16).toAsciiUpperCase()); + aFormatCode.append("-" + OUString::number(sal_uInt16(nLang), 16).toAsciiUpperCase()); } aFormatCode.append( ']' ); // end of "new" currency symbol |