summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/tool/compiler.cxx3
-rw-r--r--sc/source/ui/app/inputhdl.cxx5
2 files changed, 5 insertions, 3 deletions
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index 2c14b8649169..f8199a6ecadc 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -47,6 +47,7 @@
#include <com/sun/star/sheet/FormulaMapGroup.hpp>
#include <comphelper/processfactory.hxx>
#include <unotools/transliterationwrapper.hxx>
+#include <comphelper/string.hxx>
#include <tools/urlobj.hxx>
#include <rtl/math.hxx>
#include <ctype.h>
@@ -2711,7 +2712,7 @@ bool ScCompiler::IsPredetectedReference( const String& rName )
return false; // :#REF!.AB42 or :#REF!42 or :#REF!#REF!
break;
default:
- if ((('A' <= c && c <= 'Z') || ('a' <= c && c <= 'z')) &&
+ if (comphelper::string::isalpha(c) &&
((mnPredetectedReference > 1 && ':' == c2) || 0 == c2))
return false; // AB#REF!: or AB#REF!
}
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index 44dfe326fe66..1524397a121f 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -62,6 +62,7 @@
#include <vcl/help.hxx>
#include <vcl/cursor.hxx>
#include <tools/urlobj.hxx>
+#include <comphelper/string.hxx>
#include <formula/formulahelper.hxx>
#include "inputwin.hxx"
@@ -768,7 +769,7 @@ void ScInputHandler::ShowTipCursor()
if( nLeftParentPos != STRING_NOTFOUND )
{
sal_Unicode c = ( nLeftParentPos > 0 ) ? aSelText.GetChar( nLeftParentPos-1 ) : 0;
- if( !((c >= 'A' && c<= 'Z') || (c>= 'a' && c<= 'z' )) )
+ if( !(comphelper::string::isalphaAscii(c)) )
continue;
nNextFStart = aHelper.GetFunctionStart( aSelText, nLeftParentPos, sal_True);
if( aHelper.GetNextFunc( aSelText, false, nNextFStart, &nNextFEnd, &ppFDesc, &aArgs ) )
@@ -1012,7 +1013,7 @@ void ScInputHandler::UseFormulaData()
// nLeftParentPos can be 0 if a parenthesis is inserted before the formula
sal_Unicode c = ( nLeftParentPos > 0 ) ? aFormula.GetChar( nLeftParentPos-1 ) : 0;
- if( !((c >= 'A' && c<= 'Z') || (c>= 'a' && c<= 'z') ) )
+ if( !(comphelper::string::isalphaAscii(c)) )
continue;
nNextFStart = aHelper.GetFunctionStart( aFormula, nLeftParentPos, sal_True);
if( aHelper.GetNextFunc( aFormula, false, nNextFStart, &nNextFEnd, &ppFDesc, &aArgs ) )