diff options
author | Steven Bennetts <steve@lindenlab.com> | 2008-09-23 01:53:11 +0000 |
---|---|---|
committer | Steven Bennetts <steve@lindenlab.com> | 2008-09-23 01:53:11 +0000 |
commit | afe61eb994377e25d60d0a0893510a693149c6be (patch) | |
tree | 80c6e33cd664e5c8b1c5f55c3b7b49c081dd590a /indra/llui/lllineeditor.cpp | |
parent | 2945882258ad1befe8e8094c0a1a655e4ddbcd30 (diff) |
QAR-849 merge maint-viewer-10-merge 96838-97237 -> release
Diffstat (limited to 'indra/llui/lllineeditor.cpp')
-rw-r--r-- | indra/llui/lllineeditor.cpp | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/indra/llui/lllineeditor.cpp b/indra/llui/lllineeditor.cpp index a41b2af2b4..a8ed555a45 100644 --- a/indra/llui/lllineeditor.cpp +++ b/indra/llui/lllineeditor.cpp @@ -35,6 +35,7 @@ #include "lllineeditor.h" +#include "lltexteditor.h" #include "audioengine.h" #include "llmath.h" #include "llfontgl.h" @@ -450,19 +451,19 @@ BOOL LLLineEditor::handleDoubleClick(S32 x, S32 y, MASK mask) BOOL doSelectAll = TRUE; // Select the word we're on - if( isPartOfWord( wtext[mCursorPos] ) ) + if( LLTextEditor::isPartOfWord( wtext[mCursorPos] ) ) { S32 old_selection_start = mLastSelectionStart; S32 old_selection_end = mLastSelectionEnd; // Select word the cursor is over - while ((mCursorPos > 0) && isPartOfWord( wtext[mCursorPos-1] )) + while ((mCursorPos > 0) && LLTextEditor::isPartOfWord( wtext[mCursorPos-1] )) { // Find the start of the word mCursorPos--; } startSelection(); - while ((mCursorPos < (S32)wtext.length()) && isPartOfWord( wtext[mCursorPos] ) ) + while ((mCursorPos < (S32)wtext.length()) && LLTextEditor::isPartOfWord( wtext[mCursorPos] ) ) { // Find the end of the word mCursorPos++; } @@ -764,7 +765,7 @@ S32 LLLineEditor::prevWordPos(S32 cursorPos) const { cursorPos--; } - while( (cursorPos > 0) && isPartOfWord( wtext[cursorPos-1] ) ) + while( (cursorPos > 0) && LLTextEditor::isPartOfWord( wtext[cursorPos-1] ) ) { cursorPos--; } @@ -774,7 +775,7 @@ S32 LLLineEditor::prevWordPos(S32 cursorPos) const S32 LLLineEditor::nextWordPos(S32 cursorPos) const { const LLWString& wtext = mText.getWString(); - while( (cursorPos < getLength()) && isPartOfWord( wtext[cursorPos] ) ) + while( (cursorPos < getLength()) && LLTextEditor::isPartOfWord( wtext[cursorPos] ) ) { cursorPos++; } @@ -1817,9 +1818,6 @@ BOOL LLLineEditor::prevalidateFloat(const LLWString &str) return success; } -//static -BOOL LLLineEditor::isPartOfWord(llwchar c) { return (c == '_') || isalnum(c); } - // static BOOL LLLineEditor::postvalidateFloat(const std::string &str) { @@ -1993,7 +1991,7 @@ BOOL LLLineEditor::prevalidateAlphaNum(const LLWString &str) if(len == 0) return rv; while(len--) { - if( !isalnum(str[len]) ) + if( !LLStringOps::isAlnum((char)str[len]) ) { rv = FALSE; break; @@ -2012,7 +2010,7 @@ BOOL LLLineEditor::prevalidateAlphaNumSpace(const LLWString &str) if(len == 0) return rv; while(len--) { - if(!(isalnum(str[len]) || (' ' == str[len]))) + if(!(LLStringOps::isAlnum((char)str[len]) || (' ' == str[len]))) { rv = FALSE; break; @@ -2034,7 +2032,7 @@ BOOL LLLineEditor::prevalidatePrintableNotPipe(const LLWString &str) rv = FALSE; break; } - if(!((' ' == str[len]) || isalnum(str[len]) || ispunct(str[len]))) + if(!((' ' == str[len]) || LLStringOps::isAlnum((char)str[len]) || LLStringOps::isPunct((char)str[len]))) { rv = FALSE; break; @@ -2052,12 +2050,13 @@ BOOL LLLineEditor::prevalidatePrintableNoSpace(const LLWString &str) if(len == 0) return rv; while(len--) { - if(iswspace(str[len])) + if(LLStringOps::isSpace(str[len])) { rv = FALSE; break; } - if( !(isalnum(str[len]) || ispunct(str[len]) ) ) + if( !(LLStringOps::isAlnum((char)str[len]) || + LLStringOps::isPunct((char)str[len]) ) ) { rv = FALSE; break; |