diff options
author | Eike Rathke <erack@redhat.com> | 2016-09-01 12:17:36 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2016-09-01 12:26:00 +0200 |
commit | b9a2c849a657bdb9d5953b96f60409cb877b0005 (patch) | |
tree | a8331c51115023577322a0c6357afe9d7572ca4e /sc/source/ui/app | |
parent | b4a1c54e6ca203fb364d37dccac5ce3160793989 (diff) |
exclude also single quoted strings from function name suggestion
These may be sheet names or label names, but never function names.
For example, typing ='e should not suggest "[EASTERSUNDAY], EDATE, ..."
Change-Id: I818b91b533b868ccb6d2eb1eef74112162d2fe3d
Diffstat (limited to 'sc/source/ui/app')
-rw-r--r-- | sc/source/ui/app/inputhdl.cxx | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx index 0a4cfe19928e..d7e816062743 100644 --- a/sc/source/ui/app/inputhdl.cxx +++ b/sc/source/ui/app/inputhdl.cxx @@ -1242,14 +1242,21 @@ void ScInputHandler::UseFormulaData() miAutoPosFormula = findTextAll(*pFormulaData, miAutoPosFormula, aText, aNewVec, false); if (miAutoPosFormula != pFormulaData->end()) { - // check if partial function name is not Between quotes - bool bBetweenQuotes = false; + // check if partial function name is not between quotes + sal_Unicode cBetweenQuotes = 0; for ( int n = 0; n < aSelText.getLength(); n++ ) { - if ( aSelText[ n ] == '"' ) - bBetweenQuotes = !bBetweenQuotes; + if (cBetweenQuotes) + { + if (aSelText[n] == cBetweenQuotes) + cBetweenQuotes = 0; + } + else if ( aSelText[ n ] == '"' ) + cBetweenQuotes = '"'; + else if ( aSelText[ n ] == '\'' ) + cBetweenQuotes = '\''; } - if ( bBetweenQuotes ) + if ( cBetweenQuotes ) return; // we're between quotes ShowFuncList(aNewVec); |