diff options
author | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-03-07 13:14:16 +0000 |
---|---|---|
committer | Aron Budea <aron.budea@collabora.com> | 2024-05-08 07:27:09 +0200 |
commit | 3111f6ec8c208cf94b5419d0821af06365951752 (patch) | |
tree | e647fa117c3314c7e7a013647913aa7ded6f788c | |
parent | bae2f207b26aefee98b4de92bd47874c1608375f (diff) |
Related: tdf#160056 various methods that don't need to be exported
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.mcnamara@collabora.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
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.mcnamara@collabora.com>
GetNonEndOfPathToken can be private
Change-Id: Iebf8b84c205eee083ecf8b436520911ba132fe5c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164703
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Related: tdf#160056 can be private and not exported
Change-Id: I3da15340809603b991d3a41beb2af7a0ba375acc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165137
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Related: tdf#160056 ImpSubstituteEntry can be private and not exported
Change-Id: I895db1f02338b6c2a1fec8bdfc15c2857fbee38f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165138
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166124
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
(cherry picked from commit 78b62dadcc119359e9fd5ceb670e2585d18d4c3a)
-rw-r--r-- | bin/find-can-be-private-symbols.functions.results | 5 | ||||
-rw-r--r-- | include/formula/tokenarray.hxx | 2 | ||||
-rw-r--r-- | include/svl/numformat.hxx | 27 | ||||
-rw-r--r-- | svl/source/numbers/zforlist.cxx | 10 |
4 files changed, 18 insertions, 26 deletions
diff --git a/bin/find-can-be-private-symbols.functions.results b/bin/find-can-be-private-symbols.functions.results index c3a75e5aede0..fe6f779e8566 100644 --- a/bin/find-can-be-private-symbols.functions.results +++ b/bin/find-can-be-private-symbols.functions.results @@ -9405,14 +9405,10 @@ SvNumberFormatter::GetTimeFormat(double, o3tl::strong_int<unsigned short, Langua SvNumberFormatter::GetTransliteration() const SvNumberFormatter::GetUserDefColor(unsigned short) SvNumberFormatter::ImpLookupCurrencyEntryLoopBody(NfCurrencyEntry const*&, bool&, NfCurrencyEntry const*, unsigned short, std::basic_string_view<char16_t, std::char_traits<char16_t> >) -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() 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 @@ -19343,7 +19339,6 @@ formula::FormulaTokenArray::operator=(formula::FormulaTokenArray const&) formula::FormulaTokenArray::operator=(formula::FormulaTokenArray&&) formula::FormulaTokenArrayPlainIterator::AfterRemoveToken(unsigned short, unsigned short) formula::FormulaTokenArrayPlainIterator::PeekNext() -formula::FormulaTokenIterator::GetNonEndOfPathToken(short) const formula::FormulaTokenIterator::Item::Item(formula::FormulaTokenArray const*, short, short) formula::FormulaTokenIterator::Push(formula::FormulaTokenArray const*) formula::FormulaTypedDoubleToken::GetDoubleType() const diff --git a/include/formula/tokenarray.hxx b/include/formula/tokenarray.hxx index 330543d427dc..fbf2c186768a 100644 --- a/include/formula/tokenarray.hxx +++ b/include/formula/tokenarray.hxx @@ -577,7 +577,7 @@ public: void ReInit( const FormulaTokenArray& ); private: - const FormulaToken* GetNonEndOfPathToken( short nIdx ) const; + SAL_DLLPRIVATE const FormulaToken* GetNonEndOfPathToken( short nIdx ) const; }; // For use in SAL_INFO, SAL_WARN etc diff --git a/include/svl/numformat.hxx b/include/svl/numformat.hxx index 2a9c52ce33c2..bf31ff22b605 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); @@ -677,26 +674,30 @@ private: DECL_DLLPRIVATE_STATIC_LINK(SvNumberFormatter, CurrencyChangeLink, LinkParamNone*, void); // Substitute a format during GetFormatEntry(), i.e. system formats. - SvNumberformat* ImpSubstituteEntry(SvNumberformat* pFormat, sal_uInt32* o_pRealKey = nullptr); + SVL_DLLPRIVATE 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); + + // called by SvNumberFormatterRegistry_Impl::Notify if the default system currency changes + SVL_DLLPRIVATE void ResetDefaultSystemCurrency(); + + // Replace the SYSTEM language/country format codes. Called upon change of + // the user configurable locale. + // Old compatibility codes are replaced, user defined are converted, and + // new format codes are appended. + SVL_DLLPRIVATE void ReplaceSystemCL(LanguageType eOldLanguage); // 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(); - // Replace the SYSTEM language/country format codes. Called upon change of - // the user configurable locale. - // Old compatibility codes are replaced, user defined are converted, and - // new format codes are appended. - void ReplaceSystemCL(LanguageType eOldLanguage); - const css::uno::Reference<css::uno::XComponentContext>& GetComponentContext() const; //! The following method is not to be used from outside but must be diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx index a81dc68860bb..c96653460d95 100644 --- a/svl/source/numbers/zforlist.cxx +++ b/svl/source/numbers/zforlist.cxx @@ -243,7 +243,6 @@ void SvNumberFormatterRegistry_Impl::ConfigurationChanged( utl::ConfigurationBro } } - SvNumberFormatterRegistry_Impl* SvNumberFormatter::pFormatterRegistry = nullptr; volatile bool SvNumberFormatter::bCurrencyTableInitialized = false; namespace @@ -1474,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() ); @@ -1489,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 ); @@ -1527,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 ) @@ -3762,19 +3761,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 ) |