diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-06-23 16:05:57 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-06-25 17:19:48 +0200 |
commit | 93d42c1b23721120fd2b61ee0b8842a14fd9b6b8 (patch) | |
tree | 5a2c4108ad65f7171a6c9bbf87199c874693a703 /linguistic/source/dlistimp.cxx | |
parent | a006f60b6ae22db6acb57d06167a3c6fd8bc6f1b (diff) |
loplugin:oncevar in l10ntools..mysqlc
Change-Id: Ifd4826f8ba4e10f2e012172fa693794d68bb6b4d
Reviewed-on: https://gerrit.libreoffice.org/39188
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'linguistic/source/dlistimp.cxx')
-rw-r--r-- | linguistic/source/dlistimp.cxx | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/linguistic/source/dlistimp.cxx b/linguistic/source/dlistimp.cxx index bff87e2f66ad..02bd690bd314 100644 --- a/linguistic/source/dlistimp.cxx +++ b/linguistic/source/dlistimp.cxx @@ -289,8 +289,6 @@ void DicList::SearchForDictionaries( const OUString *pDirCnt = aDirCnt.getConstArray(); sal_Int32 nEntries = aDirCnt.getLength(); - OUString aDCN("dcn"); - OUString aDCP("dcp"); for (sal_Int32 i = 0; i < nEntries; ++i) { OUString aURL( pDirCnt[i] ); @@ -303,9 +301,9 @@ void DicList::SearchForDictionaries( sal_Int32 nPos = aURL.indexOf('.'); OUString aExt( aURL.copy(nPos + 1).toAsciiLowerCase() ); - if (aDCN.equals(aExt)) // negativ + if ("dcn" == aExt) // negativ bNeg = true; - else if (aDCP.equals(aExt)) // positiv + else if ("dcp" == aExt) // positiv bNeg = false; else continue; // andere Files @@ -350,7 +348,6 @@ sal_Int32 DicList::GetDicPos(const uno::Reference< XDictionary > &xDic) { osl::MutexGuard aGuard( GetLinguMutex() ); - sal_Int32 nPos = -1; DictionaryVec_t& rDicList = GetOrCreateDicList(); size_t n = rDicList.size(); for (size_t i = 0; i < n; i++) @@ -358,7 +355,7 @@ sal_Int32 DicList::GetDicPos(const uno::Reference< XDictionary > &xDic) if ( rDicList[i] == xDic ) return i; } - return nPos; + return -1; } /// @throws Exception @@ -613,9 +610,8 @@ void DicList::CreateDicList() // create IgnoreAllList dictionary with empty URL (non persistent) // and add it to list - OUString aDicName( "IgnoreAllList" ); uno::Reference< XDictionary > xIgnAll( - createDictionary( aDicName, LinguLanguageToLocale( LANGUAGE_NONE ), + createDictionary( "IgnoreAllList", LinguLanguageToLocale( LANGUAGE_NONE ), DictionaryType_POSITIVE, OUString() ) ); if (xIgnAll.is()) { |