bin/find-can-be-private-symbols.functions.results | 2 -- include/svl/numformat.hxx | 12 ++++++------ svl/source/numbers/zforlist.cxx | 10 +++------- 3 files changed, 9 insertions(+), 15 deletions(-)
New commits: commit 241d855f79d4e4b560a127ccdbcaa6b32297f52d Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Thu Mar 7 13:18:06 2024 +0000 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Thu Mar 7 16:31:17 2024 +0100 ResetDefaultSystemCurrency can be private only called by a friend from the same .so Change-Id: I5f63e83325b291b95b0132089dc331f3b7e79362 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164538 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> diff --git a/bin/find-can-be-private-symbols.functions.results b/bin/find-can-be-private-symbols.functions.results index 483607ec1394..561339f79170 100644 --- a/bin/find-can-be-private-symbols.functions.results +++ b/bin/find-can-be-private-symbols.functions.results @@ -9250,7 +9250,6 @@ SvNumberFormatter::IsDecimalSep(std::basic_string_view<char16_t, std::char_trait SvNumberFormatter::IsLocaleInstalled(o3tl::strong_int<unsigned short, LanguageTypeTag>) SvNumberFormatter::PutandConvertEntrySystem(rtl::OUString&, int&, SvNumFormatType&, unsigned int&, o3tl::strong_int<unsigned short, LanguageTypeTag>, o3tl::strong_int<unsigned short, LanguageTypeTag>) SvNumberFormatter::ReplaceSystemCL(o3tl::strong_int<unsigned short, LanguageTypeTag>) -SvNumberFormatter::ResetDefaultSystemCurrency() SvNumberFormatter::SetDefaultSystemCurrency(std::basic_string_view<char16_t, std::char_traits<char16_t> >, o3tl::strong_int<unsigned short, LanguageTypeTag>) SvNumberFormatter::SetNoZero(bool) SvNumberformat::GetCal() const diff --git a/include/svl/numformat.hxx b/include/svl/numformat.hxx index 6c256aaf09d5..681bb678eb53 100644 --- a/include/svl/numformat.hxx +++ b/include/svl/numformat.hxx @@ -683,14 +683,14 @@ private: // Whether nFIndex is a special builtin format SVL_DLLPRIVATE bool ImpIsSpecialStandardFormat(sal_uInt32 nFIndex, LanguageType eLnge); + // called by SvNumberFormatterRegistry_Impl::Notify if the default system currency changes + SVL_DLLPRIVATE void ResetDefaultSystemCurrency(); + // own mutex, may also be used by internal class SvNumberFormatterRegistry_Impl static ::osl::Mutex& GetGlobalMutex(); ::osl::Mutex& GetInstanceMutex() const { return m_aMutex; } public: - // called by SvNumberFormatterRegistry_Impl::Notify if the default system currency changes - void ResetDefaultSystemCurrency(); - // Called by SvNumberFormatterRegistry_Impl::Notify if the system locale's // date acceptance patterns change. void InvalidateDateAcceptancePatterns(); diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx index 86417b04f621..9bea00f42cfe 100644 --- a/svl/source/numbers/zforlist.cxx +++ b/svl/source/numbers/zforlist.cxx @@ -242,7 +242,6 @@ void SvNumberFormatterRegistry_Impl::ConfigurationChanged( utl::ConfigurationBro } } - SvNumberFormatterRegistry_Impl* SvNumberFormatter::pFormatterRegistry = nullptr; volatile bool SvNumberFormatter::bCurrencyTableInitialized = false; namespace @@ -3756,19 +3755,16 @@ void SvNumberFormatter::SetDefaultSystemCurrency( std::u16string_view rAbbrev, L nSystemCurrencyPosition = 0; // not found => simple SYSTEM } - void SvNumberFormatter::ResetDefaultSystemCurrency() { nDefaultSystemCurrencyFormat = NUMBERFORMAT_ENTRY_NOT_FOUND; } - void SvNumberFormatter::InvalidateDateAcceptancePatterns() { pStringScanner->InvalidateDateAcceptancePatterns(); } - sal_uInt32 SvNumberFormatter::ImpGetDefaultSystemCurrencyFormat() { if ( nDefaultSystemCurrencyFormat == NUMBERFORMAT_ENTRY_NOT_FOUND ) commit dbc00dd52c36a4fa6346ab4cf497cb02d6eedec8 Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Thu Mar 7 13:14:16 2024 +0000 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Thu Mar 7 16:31:09 2024 +0100 IsSpecialStandardFormat can be private, only used internally and rename to ImpIsSpecialStandardFormat Change-Id: Ie20c83906559f94e545f384807396ec8acf970f9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164537 Tested-by: Caolán McNamara <caolan.mcnam...@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> diff --git a/bin/find-can-be-private-symbols.functions.results b/bin/find-can-be-private-symbols.functions.results index bb2ef5c7ae79..483607ec1394 100644 --- a/bin/find-can-be-private-symbols.functions.results +++ b/bin/find-can-be-private-symbols.functions.results @@ -9248,7 +9248,6 @@ SvNumberFormatter::ImpSubstituteEntry(SvNumberformat*, unsigned int*) SvNumberFormatter::InvalidateDateAcceptancePatterns() SvNumberFormatter::IsDecimalSep(std::basic_string_view<char16_t, std::char_traits<char16_t> >) const SvNumberFormatter::IsLocaleInstalled(o3tl::strong_int<unsigned short, LanguageTypeTag>) -SvNumberFormatter::IsSpecialStandardFormat(unsigned int, o3tl::strong_int<unsigned short, LanguageTypeTag>) SvNumberFormatter::PutandConvertEntrySystem(rtl::OUString&, int&, SvNumFormatType&, unsigned int&, o3tl::strong_int<unsigned short, LanguageTypeTag>, o3tl::strong_int<unsigned short, LanguageTypeTag>) SvNumberFormatter::ReplaceSystemCL(o3tl::strong_int<unsigned short, LanguageTypeTag>) SvNumberFormatter::ResetDefaultSystemCurrency() diff --git a/include/svl/numformat.hxx b/include/svl/numformat.hxx index 6a007d1bd057..6c256aaf09d5 100644 --- a/include/svl/numformat.hxx +++ b/include/svl/numformat.hxx @@ -297,9 +297,6 @@ public: sal_uInt32 GetStandardFormat(double fNumber, sal_uInt32 nFIndex, SvNumFormatType eType, LanguageType eLnge); - /// Whether nFIndex is a special builtin format - bool IsSpecialStandardFormat(sal_uInt32 nFIndex, LanguageType eLnge); - /** Return a time format that best matches fNumber. */ sal_uInt32 GetTimeFormat(double fNumber, LanguageType eLnge, bool bForceDuration); @@ -683,6 +680,9 @@ private: // Substitute a format during GetFormatEntry(), i.e. system formats. SvNumberformat* ImpSubstituteEntry(SvNumberformat* pFormat, sal_uInt32* o_pRealKey = nullptr); + // Whether nFIndex is a special builtin format + SVL_DLLPRIVATE bool ImpIsSpecialStandardFormat(sal_uInt32 nFIndex, LanguageType eLnge); + // own mutex, may also be used by internal class SvNumberFormatterRegistry_Impl static ::osl::Mutex& GetGlobalMutex(); ::osl::Mutex& GetInstanceMutex() const { return m_aMutex; } diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx index c1a3fcb9015d..86417b04f621 100644 --- a/svl/source/numbers/zforlist.cxx +++ b/svl/source/numbers/zforlist.cxx @@ -1473,7 +1473,7 @@ sal_uInt32 SvNumberFormatter::GetStandardFormat( SvNumFormatType eType, Language } } -bool SvNumberFormatter::IsSpecialStandardFormat( sal_uInt32 nFIndex, +bool SvNumberFormatter::ImpIsSpecialStandardFormat( sal_uInt32 nFIndex, LanguageType eLnge ) { ::osl::MutexGuard aGuard( GetInstanceMutex() ); @@ -1488,7 +1488,7 @@ sal_uInt32 SvNumberFormatter::GetStandardFormat( sal_uInt32 nFIndex, SvNumFormat LanguageType eLnge ) { ::osl::MutexGuard aGuard( GetInstanceMutex() ); - if ( IsSpecialStandardFormat( nFIndex, eLnge ) ) + if ( ImpIsSpecialStandardFormat( nFIndex, eLnge ) ) return nFIndex; else return GetStandardFormat( eType, eLnge ); @@ -1526,7 +1526,7 @@ sal_uInt32 SvNumberFormatter::GetStandardFormat( double fNumber, sal_uInt32 nFIn SvNumFormatType eType, LanguageType eLnge ) { ::osl::MutexGuard aGuard( GetInstanceMutex() ); - if ( IsSpecialStandardFormat( nFIndex, eLnge ) ) + if ( ImpIsSpecialStandardFormat( nFIndex, eLnge ) ) return nFIndex; switch( eType )