[Libreoffice-commits] core.git: 2 commits - sw/source

Miklos Vajna vmiklos at collabora.co.uk
Fri Feb 19 10:45:11 UTC 2016


 sw/source/ui/fldui/fldref.cxx |   12 ++++++------
 sw/source/ui/fldui/fldref.hxx |    4 ++--
 2 files changed, 8 insertions(+), 8 deletions(-)

New commits:
commit cb3a1b5958ea067af867e4dd59636868dfdd2d5c
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Fri Feb 19 11:44:44 2016 +0100

    sw: loplugin:staticmethods
    
    Change-Id: I67504956436dd394446c723c1a3f164855697466

diff --git a/sw/source/ui/fldui/fldref.hxx b/sw/source/ui/fldui/fldref.hxx
index 76a8ec6..b881c43 100644
--- a/sw/source/ui/fldui/fldref.hxx
+++ b/sw/source/ui/fldui/fldref.hxx
@@ -71,7 +71,7 @@ class SwFieldRefPage : public SwFieldPage
 
     void                UpdateSubType(const OUString& filterString = OUString());
 
-    bool                MatchSubstring( const OUString& list_string, const OUString& substr );
+    static bool                MatchSubstring( const OUString& list_string, const OUString& substr );
 
     sal_Int32               FillFormatLB(sal_uInt16 nTypeId);
 
commit 35f659604156a204ff6ec373700b87a9ef4747ac
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Fri Feb 19 11:43:57 2016 +0100

    sw: loplugin:passstuffbyref
    
    Change-Id: Ie7eeb7aecba9d83a7437cf7aa0c92f0aa751a573

diff --git a/sw/source/ui/fldui/fldref.cxx b/sw/source/ui/fldui/fldref.cxx
index 216f4d7..e6b4eaf 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 51a6cc5..76a8ec6 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);
 


More information about the Libreoffice-commits mailing list