summaryrefslogtreecommitdiff
path: root/editeng/source/misc/svxacorr.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-04-12 16:39:03 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-04-18 07:37:31 +0000
commit789055bc2acb4c71483fd60ea258d158bd5aec10 (patch)
tree7849de841a71f667a30b2a971ad0c3d406110396 /editeng/source/misc/svxacorr.cxx
parent150ac9cf05ed9da6a2af5bc3f820280fd853e519 (diff)
clang-tidy performance-unnecessary-copy-initialization
probably not much performance benefit, but it sure is good at identifying leftover intermediate variables from previous refactorings. Change-Id: I3ce16fe496ac2733c1cb0a35f74c0fc9193cc657 Reviewed-on: https://gerrit.libreoffice.org/24026 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'editeng/source/misc/svxacorr.cxx')
-rw-r--r--editeng/source/misc/svxacorr.cxx20
1 files changed, 8 insertions, 12 deletions
diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index 2ec8405b1881..cafb0c0e5998 100644
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -1752,14 +1752,12 @@ bool SvxAutoCorrect::FindInWrdSttExceptList( LanguageType eLang,
// First search for eLang, then primary language of eLang
// and last in LANGUAGE_UNDETERMINED
- OUString sTemp(sWord);
if (m_pLangTable->find(aLanguageTag) != m_pLangTable->end() || CreateLanguageFile(aLanguageTag, false))
{
//the language is available - so bring it on
auto const& pList = m_pLangTable->find(aLanguageTag)->second;
- OUString _sTemp(sWord);
- if(pList->GetWrdSttExceptList()->find(_sTemp) != pList->GetWrdSttExceptList()->end() )
+ if(pList->GetWrdSttExceptList()->find(sWord) != pList->GetWrdSttExceptList()->end() )
return true;
}
@@ -1773,7 +1771,7 @@ bool SvxAutoCorrect::FindInWrdSttExceptList( LanguageType eLang,
{
//the language is available - so bring it on
auto const& pList = m_pLangTable->find(aLanguageTag)->second;
- if(pList->GetWrdSttExceptList()->find(sTemp) != pList->GetWrdSttExceptList()->end() )
+ if(pList->GetWrdSttExceptList()->find(sWord) != pList->GetWrdSttExceptList()->end() )
return true;
}
@@ -1782,7 +1780,7 @@ bool SvxAutoCorrect::FindInWrdSttExceptList( LanguageType eLang,
{
//the language is available - so bring it on
auto const& pList = m_pLangTable->find(aLanguageTag)->second;
- if(pList->GetWrdSttExceptList()->find(sTemp) != pList->GetWrdSttExceptList()->end() )
+ if(pList->GetWrdSttExceptList()->find(sWord) != pList->GetWrdSttExceptList()->end() )
return true;
}
return false;
@@ -1831,13 +1829,12 @@ bool SvxAutoCorrect::FindInCplSttExceptList(LanguageType eLang,
// First search for eLang, then primary language of eLang
// and last in LANGUAGE_UNDETERMINED
- OUString sTemp( sWord );
if (m_pLangTable->find(aLanguageTag) != m_pLangTable->end() || CreateLanguageFile(aLanguageTag, false))
{
//the language is available - so bring it on
const SvStringsISortDtor* pList = m_pLangTable->find(aLanguageTag)->second->GetCplSttExceptList();
- if(bAbbreviation ? lcl_FindAbbreviation(pList, sWord) : pList->find(sTemp) != pList->end() )
+ if(bAbbreviation ? lcl_FindAbbreviation(pList, sWord) : pList->find(sWord) != pList->end() )
return true;
}
@@ -1851,7 +1848,7 @@ bool SvxAutoCorrect::FindInCplSttExceptList(LanguageType eLang,
{
//the language is available - so bring it on
const SvStringsISortDtor* pList = m_pLangTable->find(aLanguageTag)->second->GetCplSttExceptList();
- if(bAbbreviation ? lcl_FindAbbreviation(pList, sWord) : pList->find(sTemp) != pList->end() )
+ if(bAbbreviation ? lcl_FindAbbreviation(pList, sWord) : pList->find(sWord) != pList->end() )
return true;
}
@@ -1860,7 +1857,7 @@ bool SvxAutoCorrect::FindInCplSttExceptList(LanguageType eLang,
{
//the language is available - so bring it on
const SvStringsISortDtor* pList = m_pLangTable->find(aLanguageTag)->second->GetCplSttExceptList();
- if(bAbbreviation ? lcl_FindAbbreviation(pList, sWord) : pList->find(sTemp) != pList->end() )
+ if(bAbbreviation ? lcl_FindAbbreviation(pList, sWord) : pList->find(sWord) != pList->end() )
return true;
}
return false;
@@ -1967,12 +1964,11 @@ void SvxAutoCorrectLanguageLists::LoadXMLExceptList_Imp(
rpLst = new SvStringsISortDtor;
{
- OUString sStrmName( pStrmName, strlen(pStrmName), RTL_TEXTENCODING_MS_1252 );
- OUString sTmp( sStrmName );
+ const OUString sStrmName( pStrmName, strlen(pStrmName), RTL_TEXTENCODING_MS_1252 );
if( rStg.Is() && rStg->IsStream( sStrmName ) )
{
- tools::SvRef<SotStorageStream> xStrm = rStg->OpenSotStream( sTmp,
+ tools::SvRef<SotStorageStream> xStrm = rStg->OpenSotStream( sStrmName,
( StreamMode::READ | StreamMode::SHARE_DENYWRITE | StreamMode::NOCREATE ) );
if( SVSTREAM_OK != xStrm->GetError())
{