diff options
-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 e7cd682deda8..f268dbf574a2 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); |