summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2014-11-06 20:25:40 +0100
committerEike Rathke <erack@redhat.com>2014-11-06 21:32:56 +0100
commitb448ee4a3a5a121f3b08a8e946a934d3414a5251 (patch)
tree39babee5e72336b5686ac92ba01189688a72d108
parentremove unnecessary SV_NUMBERFORMATTER_VERSION_NEWSTANDARD (diff)
downloadcore-b448ee4a3a5a121f3b08a8e946a934d3414a5251.tar.gz
core-b448ee4a3a5a121f3b08a8e946a934d3414a5251.zip
eliminate ImpInsertNewStandardFormat()
Change-Id: I66fd200f1a504af22430e0471e1c98927101a9de
-rw-r--r--include/svl/zforlist.hxx6
-rw-r--r--svl/source/numbers/zforlist.cxx29
2 files changed, 10 insertions, 25 deletions
diff --git a/include/svl/zforlist.hxx b/include/svl/zforlist.hxx
index dc7c7da759fe..bd3c0deb3062 100644
--- a/include/svl/zforlist.hxx
+++ b/include/svl/zforlist.hxx
@@ -826,12 +826,6 @@ private:
sal_uInt32 nPos,
bool bAfterChangingSystemCL = false,
sal_Int16 nOrgIndex = 0 );
- // ImpInsertNewStandardFormat for new (since version ...) builtin formats
- SVL_DLLPRIVATE SvNumberformat* ImpInsertNewStandardFormat( const ::com::sun::star::i18n::NumberFormatCode& rCode,
- sal_uInt32 nPos,
- sal_uInt16 nVersion,
- bool bAfterChangingSystemCL = false,
- sal_Int16 nOrgIndex = 0 );
// Return CLOffset or (MaxCLOffset + SV_COUNTRY_LANGUAGE_OFFSET) if new language/country
SVL_DLLPRIVATE sal_uInt32 ImpGetCLOffset(LanguageType eLnge) const;
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++;
+ }
}
}
}