diff options
author | Eike Rathke <erack@redhat.com> | 2014-11-06 20:25:40 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2014-11-06 21:32:56 +0100 |
commit | b448ee4a3a5a121f3b08a8e946a934d3414a5251 (patch) | |
tree | 39babee5e72336b5686ac92ba01189688a72d108 /svl | |
parent | 11eba2ea906636b7bb801ed42bcd3b7ad3ce5496 (diff) |
eliminate ImpInsertNewStandardFormat()
Change-Id: I66fd200f1a504af22430e0471e1c98927101a9de
Diffstat (limited to 'svl')
-rw-r--r-- | svl/source/numbers/zforlist.cxx | 29 |
1 files changed, 10 insertions, 19 deletions
diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx index 6282ca35d3a4..3a92ce92a5e9 100644 --- a/svl/source/numbers/zforlist.cxx +++ b/svl/source/numbers/zforlist.cxx @@ -1751,19 +1751,6 @@ SvNumberformat* SvNumberFormatter::ImpInsertFormat( const ::com::sun::star::i18n return pFormat; } -SvNumberformat* SvNumberFormatter::ImpInsertNewStandardFormat( - const ::com::sun::star::i18n::NumberFormatCode& rCode, - sal_uInt32 nPos, sal_uInt16 nVersion, bool bAfterChangingSystemCL, - sal_Int16 nOrgIndex ) -{ - SvNumberformat* pNewFormat = ImpInsertFormat( rCode, nPos, - bAfterChangingSystemCL, nOrgIndex ); - if (pNewFormat) - pNewFormat->SetNewStandardDefined( nVersion ); - // so that it gets saved, displayed properly, and converted by old versions - return pNewFormat; -} - void SvNumberFormatter::GetFormatSpecialInfo(sal_uInt32 nFormat, bool& bThousand, bool& IsRed, @@ -2525,10 +2512,12 @@ void SvNumberFormatter::ImpGenerateAdditionalFormats( sal_uInt32 CLOffset, //! no default on currency bool bDefault = aFormatSeq[j].Default; aFormatSeq[j].Default = false; - if ( ImpInsertNewStandardFormat( pFormatArr[j], nPos+1, - SV_NUMBERFORMATTER_VERSION_ADDITIONAL_I18N_FORMATS, - bAfterChangingSystemCL, nOrgIndex ) ) + if ( SvNumberformat* pNewFormat = ImpInsertFormat( pFormatArr[j], nPos+1, + bAfterChangingSystemCL, nOrgIndex ) ) + { + pNewFormat->SetNewStandardDefined( SV_NUMBERFORMATTER_VERSION_ADDITIONAL_I18N_FORMATS ); nPos++; + } pFormatArr[j].Index = nOrgIndex; aFormatSeq[j].Default = bDefault; } @@ -2554,10 +2543,12 @@ void SvNumberFormatter::ImpGenerateAdditionalFormats( sal_uInt32 CLOffset, } if ( pFormatArr[j].Index >= NF_INDEX_TABLE_LOCALE_DATA_DEFAULTS ) { - if ( ImpInsertNewStandardFormat( pFormatArr[j], nPos+1, - SV_NUMBERFORMATTER_VERSION_ADDITIONAL_I18N_FORMATS, - bAfterChangingSystemCL ) ) + if ( SvNumberformat* pNewFormat = ImpInsertFormat( pFormatArr[j], nPos+1, + bAfterChangingSystemCL ) ) + { + pNewFormat->SetNewStandardDefined( SV_NUMBERFORMATTER_VERSION_ADDITIONAL_I18N_FORMATS ); nPos++; + } } } } |