diff options
author | Noel Grandin <noel@peralex.com> | 2016-04-12 16:39:03 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-04-18 07:37:31 +0000 |
commit | 789055bc2acb4c71483fd60ea258d158bd5aec10 (patch) | |
tree | 7849de841a71f667a30b2a971ad0c3d406110396 /sc/source/ui/unoobj/tokenuno.cxx | |
parent | 150ac9cf05ed9da6a2af5bc3f820280fd853e519 (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 'sc/source/ui/unoobj/tokenuno.cxx')
-rw-r--r-- | sc/source/ui/unoobj/tokenuno.cxx | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/sc/source/ui/unoobj/tokenuno.cxx b/sc/source/ui/unoobj/tokenuno.cxx index a684a61991a8..b1800ced542e 100644 --- a/sc/source/ui/unoobj/tokenuno.cxx +++ b/sc/source/ui/unoobj/tokenuno.cxx @@ -191,12 +191,11 @@ void SAL_CALL ScFormulaParserObj::setPropertyValue( uno::RuntimeException, std::exception) { SolarMutexGuard aGuard; - OUString aString(aPropertyName); - if ( aString == SC_UNO_COMPILEFAP ) + if ( aPropertyName == SC_UNO_COMPILEFAP ) { aValue >>= mbCompileFAP; } - else if ( aString == SC_UNO_COMPILEENGLISH ) + else if ( aPropertyName == SC_UNO_COMPILEENGLISH ) { bool bOldEnglish = mbEnglish; if (aValue >>= mbEnglish) @@ -215,15 +214,15 @@ void SAL_CALL ScFormulaParserObj::setPropertyValue( else throw lang::IllegalArgumentException(); } - else if ( aString == SC_UNO_FORMULACONVENTION ) + else if ( aPropertyName == SC_UNO_FORMULACONVENTION ) { aValue >>= mnConv; } - else if ( aString == SC_UNO_IGNORELEADING ) + else if ( aPropertyName == SC_UNO_IGNORELEADING ) { aValue >>= mbIgnoreSpaces; } - else if ( aString == SC_UNO_OPCODEMAP ) + else if ( aPropertyName == SC_UNO_OPCODEMAP ) { if (aValue >>= maOpCodeMapping) { @@ -235,7 +234,7 @@ void SAL_CALL ScFormulaParserObj::setPropertyValue( else throw lang::IllegalArgumentException(); } - else if ( aString == SC_UNO_EXTERNALLINKS ) + else if ( aPropertyName == SC_UNO_EXTERNALLINKS ) { if (!(aValue >>= maExternalLinks)) throw lang::IllegalArgumentException(); @@ -250,28 +249,27 @@ uno::Any SAL_CALL ScFormulaParserObj::getPropertyValue( const OUString& aPropert { SolarMutexGuard aGuard; uno::Any aRet; - OUString aString(aPropertyName); - if ( aString == SC_UNO_COMPILEFAP ) + if ( aPropertyName == SC_UNO_COMPILEFAP ) { aRet <<= mbCompileFAP; } - else if ( aString == SC_UNO_COMPILEENGLISH ) + else if ( aPropertyName == SC_UNO_COMPILEENGLISH ) { aRet <<= mbEnglish; } - else if ( aString == SC_UNO_FORMULACONVENTION ) + else if ( aPropertyName == SC_UNO_FORMULACONVENTION ) { aRet <<= mnConv; } - else if ( aString == SC_UNO_IGNORELEADING ) + else if ( aPropertyName == SC_UNO_IGNORELEADING ) { aRet <<= mbIgnoreSpaces; } - else if ( aString == SC_UNO_OPCODEMAP ) + else if ( aPropertyName == SC_UNO_OPCODEMAP ) { aRet <<= maOpCodeMapping; } - else if ( aString == SC_UNO_EXTERNALLINKS ) + else if ( aPropertyName == SC_UNO_EXTERNALLINKS ) { aRet <<= maExternalLinks; } |