diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-02-19 11:43:57 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-02-19 11:43:57 +0100 |
commit | 35f659604156a204ff6ec373700b87a9ef4747ac (patch) | |
tree | 10ef40dab6eaccb930cc6a78142acc569fab4f3f | |
parent | 8071c8cc56c938d08cf328ae2f50c4e22d2f094c (diff) |
sw: loplugin:passstuffbyref
Change-Id: Ie7eeb7aecba9d83a7437cf7aa0c92f0aa751a573
-rw-r--r-- | sw/source/ui/fldui/fldref.cxx | 12 | ||||
-rw-r--r-- | sw/source/ui/fldui/fldref.hxx | 4 |
2 files changed, 8 insertions, 8 deletions
diff --git a/sw/source/ui/fldui/fldref.cxx b/sw/source/ui/fldui/fldref.cxx index 216f4d738898..e6b4eaf88312 100644 --- a/sw/source/ui/fldui/fldref.cxx +++ b/sw/source/ui/fldui/fldref.cxx @@ -491,7 +491,7 @@ void SwFieldRefPage::SubTypeHdl() } // renew types in SelectionLB after filtering -void SwFieldRefPage::UpdateSubType(OUString filterString) +void SwFieldRefPage::UpdateSubType(const OUString& filterString) { SwWrtShell *pSh = GetWrtShell(); if(!pSh) @@ -731,13 +731,13 @@ void SwFieldRefPage::UpdateSubType(OUString filterString) } } -bool SwFieldRefPage::MatchSubstring( OUString list_string, OUString substr ) +bool SwFieldRefPage::MatchSubstring( const OUString& rListString, const OUString& rSubstr ) { - if(substr.isEmpty()) + if(rSubstr.isEmpty()) return true; - list_string = list_string.toAsciiLowerCase(); - substr = substr.toAsciiLowerCase(); - if(list_string.indexOf(substr) >= 0) + OUString aListString = rListString.toAsciiLowerCase(); + OUString aSubstr = rSubstr.toAsciiLowerCase(); + if(aListString.indexOf(aSubstr) >= 0) return true; return false; } diff --git a/sw/source/ui/fldui/fldref.hxx b/sw/source/ui/fldui/fldref.hxx index 51a6cc5d48b5..76a8ec6e3dfa 100644 --- a/sw/source/ui/fldui/fldref.hxx +++ b/sw/source/ui/fldui/fldref.hxx @@ -69,9 +69,9 @@ class SwFieldRefPage : public SwFieldPage void SubTypeHdl(); - void UpdateSubType(OUString filterString = OUString()); + void UpdateSubType(const OUString& filterString = OUString()); - bool MatchSubstring( OUString list_string, OUString substr ); + bool MatchSubstring( const OUString& list_string, const OUString& substr ); sal_Int32 FillFormatLB(sal_uInt16 nTypeId); |