diff options
author | Eike Rathke <erack@redhat.com> | 2014-05-12 19:04:48 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2014-05-12 23:27:02 +0200 |
commit | ead754112a1ecaa456d8b5d7231ed178bbcb3a0b (patch) | |
tree | 301d30555f8aab9175579a7d089525ac17f64d7a | |
parent | 0fadbdbbdbd55cf60f9a202f1cf7b1d60517078c (diff) |
nitpick: avoid triple redirection inside loop, fdo#75264 related
Also, it's fdo#12345 instead of fdo12345 (just to provide better
"grep'ability").
Change-Id: Id1c1f849addcb96f71408ba38e2dde8e316271be
-rw-r--r-- | sc/source/ui/app/inputhdl.cxx | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx index 22a0e05db039..da4f5a20c423 100644 --- a/sc/source/ui/app/inputhdl.cxx +++ b/sc/source/ui/app/inputhdl.cxx @@ -728,10 +728,12 @@ void ScInputHandler::GetFormulaData() if ( pDesc->pFuncName ) { pFormulaData->insert(ScTypedStrData(*pDesc->pFuncName, 0.0, ScTypedStrData::Standard)); - // fdo75264 fill maFormulaChar with all characters used in formula names - for ( sal_Int32 j = 0; j < pDesc->pFuncName->getLength(); j++ ) + const sal_Unicode* pName = pDesc->pFuncName->getStr(); + const sal_Int32 nLen = pDesc->pFuncName->getLength(); + // fdo#75264 fill maFormulaChar with all characters used in formula names + for ( sal_Int32 j = 0; j < nLen; j++ ) { - sal_Unicode c = pDesc->pFuncName->getStr()[ j ]; + sal_Unicode c = pName[ j ]; maFormulaChar.insert( c ); } pDesc->initArgumentInfo(); @@ -1018,7 +1020,7 @@ bool ScInputHandler::GetFuncName( OUString& aStart, OUString& aResult ) aStart = ScGlobal::pCharClass->uppercase( aStart ); sal_Int32 nPos = aStart.getLength() - 1; sal_Unicode c = aStart[ nPos ]; - // fdo75264 use maFormulaChar to check if characters are used in function names + // fdo#75264 use maFormulaChar to check if characters are used in function names ::std::set< sal_Unicode >::const_iterator p = maFormulaChar.find( c ); if ( p == maFormulaChar.end() ) return false; // last character is not part of any function name, quit |