diff options
author | Noel <noelgrandin@gmail.com> | 2020-11-18 10:10:40 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-11-24 09:45:04 +0100 |
commit | bb06f51308428500c9c8d11ae05f0aa03ecc179c (patch) | |
tree | b18620e8572ed6d4c43c8605660d59f5f7a7e531 /svl/source | |
parent | 42e8e16cf93dcf944e5c1106f76aaa32057c0397 (diff) |
loplugin:stringviewparam extend to comparison operators
which means that some call sites have to change to use
unicode string literals i.e. u"foo" instead of "foo"
Change-Id: Ie51c3adf56d343dd1d1710777f9d2a43ee66221c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106125
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svl/source')
-rw-r--r-- | svl/source/items/style.cxx | 2 | ||||
-rw-r--r-- | svl/source/numbers/zforfind.cxx | 2 | ||||
-rw-r--r-- | svl/source/numbers/zforfind.hxx | 2 | ||||
-rw-r--r-- | svl/source/numbers/zforlist.cxx | 22 | ||||
-rw-r--r-- | svl/source/passwordcontainer/passwordcontainer.cxx | 8 | ||||
-rw-r--r-- | svl/source/passwordcontainer/passwordcontainer.hxx | 6 |
6 files changed, 21 insertions, 21 deletions
diff --git a/svl/source/items/style.cxx b/svl/source/items/style.cxx index 8ef014755874..2d7eaf3c222f 100644 --- a/svl/source/items/style.cxx +++ b/svl/source/items/style.cxx @@ -791,7 +791,7 @@ void SfxStyleSheetBasePool::Clear() pImpl->mxIndexedStyleSheets->Clear(cleanup); } -void SfxStyleSheetBasePool::ChangeParent(const OUString& rOld, +void SfxStyleSheetBasePool::ChangeParent(std::u16string_view rOld, const OUString& rNew, SfxStyleFamily eFamily, bool bVirtual) diff --git a/svl/source/numbers/zforfind.cxx b/svl/source/numbers/zforfind.cxx index eff5d48d9755..273e23bcd9d1 100644 --- a/svl/source/numbers/zforfind.cxx +++ b/svl/source/numbers/zforfind.cxx @@ -575,7 +575,7 @@ inline bool ImpSvNumberInputScan::GetThousandSep( const OUString& rString, * "false"=> -1: * else => 0: */ -short ImpSvNumberInputScan::GetLogical( const OUString& rString ) const +short ImpSvNumberInputScan::GetLogical( std::u16string_view rString ) const { short res; diff --git a/svl/source/numbers/zforfind.hxx b/svl/source/numbers/zforfind.hxx index 0c66cb46f770..dfdbc0e7be1e 100644 --- a/svl/source/numbers/zforfind.hxx +++ b/svl/source/numbers/zforfind.hxx @@ -277,7 +277,7 @@ private: sal_Int32& nPos, sal_uInt16 nStringPos ) const; // Get boolean value - short GetLogical( const OUString& rString ) const; + short GetLogical( std::u16string_view rString ) const; // Get month and advance string position short GetMonth( const OUString& rString, diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx index cced64f86d8c..f21f4448b873 100644 --- a/svl/source/numbers/zforlist.cxx +++ b/svl/source/numbers/zforlist.cxx @@ -548,7 +548,7 @@ const OUString& SvNumberFormatter::GetNumThousandSep() const { return aThousandS const OUString& SvNumberFormatter::GetDateSep() const { return aDateSep; } -bool SvNumberFormatter::IsDecimalSep( const OUString& rStr ) const +bool SvNumberFormatter::IsDecimalSep( std::u16string_view rStr ) const { if (rStr == GetNumDecimalSep()) return true; @@ -937,7 +937,7 @@ sal_uInt32 SvNumberFormatter::ImpGetCLOffset(LanguageType eLnge) const return nOffset; } -sal_uInt32 SvNumberFormatter::ImpIsEntry(const OUString& rString, +sal_uInt32 SvNumberFormatter::ImpIsEntry(std::u16string_view rString, sal_uInt32 nCLOffset, LanguageType eLnge) { @@ -3224,7 +3224,7 @@ OUString SvNumberFormatter::GenerateFormat(sal_uInt32 nIndex, return sString.makeStringAndClear(); } -bool SvNumberFormatter::IsUserDefined(const OUString& sStr, +bool SvNumberFormatter::IsUserDefined(std::u16string_view sStr, LanguageType eLnge) { ::osl::MutexGuard aGuard( GetInstanceMutex() ); @@ -3244,7 +3244,7 @@ bool SvNumberFormatter::IsUserDefined(const OUString& sStr, return pEntry && (pEntry->GetType() & SvNumFormatType::DEFINED); } -sal_uInt32 SvNumberFormatter::GetEntryKey(const OUString& sStr, +sal_uInt32 SvNumberFormatter::GetEntryKey(std::u16string_view sStr, LanguageType eLnge) { ::osl::MutexGuard aGuard( GetInstanceMutex() ); @@ -3542,7 +3542,7 @@ const NfCurrencyEntry& SvNumberFormatter::GetCurrencyEntry( LanguageType eLang ) // static -const NfCurrencyEntry* SvNumberFormatter::GetCurrencyEntry(const OUString& rAbbrev, LanguageType eLang ) +const NfCurrencyEntry* SvNumberFormatter::GetCurrencyEntry(std::u16string_view rAbbrev, LanguageType eLang ) { eLang = MsLangId::getRealLanguage( eLang ); const NfCurrencyTable& rTable = GetTheCurrencyTable(); @@ -3560,8 +3560,8 @@ const NfCurrencyEntry* SvNumberFormatter::GetCurrencyEntry(const OUString& rAbbr // static -const NfCurrencyEntry* SvNumberFormatter::GetLegacyOnlyCurrencyEntry( const OUString& rSymbol, - const OUString& rAbbrev ) +const NfCurrencyEntry* SvNumberFormatter::GetLegacyOnlyCurrencyEntry( std::u16string_view rSymbol, + std::u16string_view rAbbrev ) { GetTheCurrencyTable(); // just for initialization const NfCurrencyTable& rTable = theLegacyOnlyCurrencyTable::get(); @@ -3589,7 +3589,7 @@ IMPL_STATIC_LINK_NOARG( SvNumberFormatter, CurrencyChangeLink, LinkParamNone*, v // static -void SvNumberFormatter::SetDefaultSystemCurrency( const OUString& rAbbrev, LanguageType eLang ) +void SvNumberFormatter::SetDefaultSystemCurrency( std::u16string_view rAbbrev, LanguageType eLang ) { ::osl::MutexGuard aGuard( GetGlobalMutex() ); if ( eLang == LANGUAGE_SYSTEM ) @@ -3598,7 +3598,7 @@ void SvNumberFormatter::SetDefaultSystemCurrency( const OUString& rAbbrev, Langu } const NfCurrencyTable& rTable = GetTheCurrencyTable(); sal_uInt16 nCount = rTable.size(); - if ( !rAbbrev.isEmpty() ) + if ( !rAbbrev.empty() ) { for ( sal_uInt16 j = 0; j < nCount; j++ ) { @@ -3719,7 +3719,7 @@ sal_uInt32 SvNumberFormatter::ImpGetDefaultCurrencyFormat() // true: continue; false: break loop, if pFoundEntry==NULL dupe found bool SvNumberFormatter::ImpLookupCurrencyEntryLoopBody( const NfCurrencyEntry*& pFoundEntry, bool& bFoundBank, const NfCurrencyEntry* pData, - sal_uInt16 nPos, const OUString& rSymbol ) + sal_uInt16 nPos, std::u16string_view rSymbol ) { bool bFound; if ( pData->GetSymbol() == rSymbol ) @@ -3827,7 +3827,7 @@ bool SvNumberFormatter::GetNewCurrencySymbolString( sal_uInt32 nFormat, OUString // static const NfCurrencyEntry* SvNumberFormatter::GetCurrencyEntry( bool & bFoundBank, - const OUString& rSymbol, + std::u16string_view rSymbol, const OUString& rExtension, LanguageType eFormatLanguage, bool bOnlyStringLanguage ) diff --git a/svl/source/passwordcontainer/passwordcontainer.cxx b/svl/source/passwordcontainer/passwordcontainer.cxx index 51fb129cddb1..893c7eb96ef8 100644 --- a/svl/source/passwordcontainer/passwordcontainer.cxx +++ b/svl/source/passwordcontainer/passwordcontainer.cxx @@ -659,7 +659,7 @@ void PasswordContainer::PrivateAdd( const OUString& Url, const OUString& UserNam UrlRecord SAL_CALL PasswordContainer::find( const OUString& aURL, const Reference< XInteractionHandler >& aHandler ) { - return find( aURL, OUString(), false, aHandler ); + return find( aURL, u"", false, aHandler ); } @@ -669,7 +669,7 @@ UrlRecord SAL_CALL PasswordContainer::findForName( const OUString& aURL, const O } -Sequence< UserRecord > PasswordContainer::FindUsr( const std::vector< NamePassRecord >& userlist, const OUString& aName, const Reference< XInteractionHandler >& aHandler ) +Sequence< UserRecord > PasswordContainer::FindUsr( const std::vector< NamePassRecord >& userlist, std::u16string_view aName, const Reference< XInteractionHandler >& aHandler ) { sal_uInt32 nInd = 0; for (auto const& aNPIter : userlist) @@ -692,7 +692,7 @@ Sequence< UserRecord > PasswordContainer::FindUsr( const std::vector< NamePassRe bool PasswordContainer::createUrlRecord( const PassMap::iterator & rIter, bool bName, - const OUString & aName, + std::u16string_view aName, const Reference< XInteractionHandler >& aHandler, UrlRecord & rRec ) { @@ -719,7 +719,7 @@ bool PasswordContainer::createUrlRecord( UrlRecord PasswordContainer::find( const OUString& aURL, - const OUString& aName, + std::u16string_view aName, bool bName, // only needed to support empty user names const Reference< XInteractionHandler >& aHandler ) { diff --git a/svl/source/passwordcontainer/passwordcontainer.hxx b/svl/source/passwordcontainer/passwordcontainer.hxx index 46ffec888602..937a2be66975 100644 --- a/svl/source/passwordcontainer/passwordcontainer.hxx +++ b/svl/source/passwordcontainer/passwordcontainer.hxx @@ -231,20 +231,20 @@ private: /// @throws css::uno::RuntimeException css::uno::Sequence< css::task::UserRecord > FindUsr( const ::std::vector< NamePassRecord >& userlist, - const OUString& name, + std::u16string_view name, const css::uno::Reference< css::task::XInteractionHandler >& Handler ); /// @throws css::uno::RuntimeException bool createUrlRecord( const PassMap::iterator & rIter, bool bName, - const OUString & aName, + std::u16string_view aName, const css::uno::Reference< css::task::XInteractionHandler >& aHandler, css::task::UrlRecord & rRec ); /// @throws css::uno::RuntimeException css::task::UrlRecord find( const OUString& aURL, - const OUString& aName, + std::u16string_view aName, bool bName, // only needed to support empty user names const css::uno::Reference< css::task::XInteractionHandler >& aHandler ); |