diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-08-29 00:36:22 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-08-29 09:56:08 +0100 |
commit | 3829892dbc5475a49250729541be369ea9532d28 (patch) | |
tree | 9a57bc4865772c6613db2c71c6fde609d8563e09 /sc | |
parent | de82a40f84c69081a517617989c344ec9597cb45 (diff) |
merge together 5 or ascii isalpha/isalnum/isdigit implementations
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/tool/compiler.cxx | 3 | ||||
-rw-r--r-- | sc/source/ui/app/inputhdl.cxx | 5 |
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 ) ) |