aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--linden/indra/llui/lllineeditor.cpp10
-rw-r--r--linden/indra/llui/lltexteditor.cpp10
2 files changed, 10 insertions, 10 deletions
diff --git a/linden/indra/llui/lllineeditor.cpp b/linden/indra/llui/lllineeditor.cpp
index 4581ec7..e73b287 100644
--- a/linden/indra/llui/lllineeditor.cpp
+++ b/linden/indra/llui/lllineeditor.cpp
@@ -779,7 +779,7 @@ BOOL LLLineEditor::handleRightMouseDown( S32 x, S32 y, MASK mask )
779 779
780 //setCursorAtLocalPos( x); 780 //setCursorAtLocalPos( x);
781 S32 wordStart = 0; 781 S32 wordStart = 0;
782 S32 wordEnd = 0; 782 S32 wordLen = 0;
783 S32 pos = calculateCursorFromMouse(x); 783 S32 pos = calculateCursorFromMouse(x);
784 784
785 LLMenuGL* menu = (LLMenuGL*)mPopupMenuHandle.get(); 785 LLMenuGL* menu = (LLMenuGL*)mPopupMenuHandle.get();
@@ -808,11 +808,11 @@ BOOL LLLineEditor::handleRightMouseDown( S32 x, S32 y, MASK mask )
808 if (!mReadOnly && mSpellCheckable) 808 if (!mReadOnly && mSpellCheckable)
809 { 809 {
810 // search for word matches 810 // search for word matches
811 bool is_word_part = getWordBoundriesAt(pos, &wordStart, &wordEnd); 811 bool is_word_part = getWordBoundriesAt(pos, &wordStart, &wordLen);
812 if (is_word_part) 812 if (is_word_part)
813 { 813 {
814 const LLWString& text = mText.getWString(); 814 const LLWString& text = mText.getWString();
815 std::string selectedWord(std::string(text.begin(), text.end()).substr(wordStart,wordEnd-wordStart)); 815 std::string selectedWord(std::string(text.begin(), text.end()).substr(wordStart,wordLen));
816 816
817 if (!glggHunSpell->isSpelledRight(selectedWord)) 817 if (!glggHunSpell->isSpelledRight(selectedWord))
818 { 818 {
@@ -824,7 +824,7 @@ BOOL LLLineEditor::handleRightMouseDown( S32 x, S32 y, MASK mask )
824 SpellMenuBind * tempStruct = new SpellMenuBind; 824 SpellMenuBind * tempStruct = new SpellMenuBind;
825 tempStruct->origin = this; 825 tempStruct->origin = this;
826 tempStruct->word = suggs[i]; 826 tempStruct->word = suggs[i];
827 tempStruct->wordPositionEnd = wordEnd; 827 tempStruct->wordPositionEnd = wordStart + wordLen;
828 tempStruct->wordPositionStart=wordStart; 828 tempStruct->wordPositionStart=wordStart;
829 LLMenuItemCallGL * suggMenuItem = new LLMenuItemCallGL( 829 LLMenuItemCallGL * suggMenuItem = new LLMenuItemCallGL(
830 tempStruct->word, spell_correct, NULL, tempStruct); 830 tempStruct->word, spell_correct, NULL, tempStruct);
@@ -836,7 +836,7 @@ BOOL LLLineEditor::handleRightMouseDown( S32 x, S32 y, MASK mask )
836 SpellMenuBind * tempStruct = new SpellMenuBind; 836 SpellMenuBind * tempStruct = new SpellMenuBind;
837 tempStruct->origin = this; 837 tempStruct->origin = this;
838 tempStruct->word = selectedWord; 838 tempStruct->word = selectedWord;
839 tempStruct->wordPositionEnd = wordEnd; 839 tempStruct->wordPositionEnd = wordStart + wordLen;
840 tempStruct->wordPositionStart=wordStart; 840 tempStruct->wordPositionStart=wordStart;
841 LLMenuItemCallGL * suggMenuItem = new LLMenuItemCallGL( 841 LLMenuItemCallGL * suggMenuItem = new LLMenuItemCallGL(
842 "Add Word", spell_add, NULL, tempStruct); 842 "Add Word", spell_add, NULL, tempStruct);
diff --git a/linden/indra/llui/lltexteditor.cpp b/linden/indra/llui/lltexteditor.cpp
index 369eb1e..fdf8bcf 100644
--- a/linden/indra/llui/lltexteditor.cpp
+++ b/linden/indra/llui/lltexteditor.cpp
@@ -1502,7 +1502,7 @@ BOOL LLTextEditor::handleRightMouseDown( S32 x, S32 y, MASK mask )
1502 1502
1503 //setCursorAtLocalPos( x, y, TRUE ); 1503 //setCursorAtLocalPos( x, y, TRUE );
1504 S32 wordStart = 0; 1504 S32 wordStart = 0;
1505 S32 wordEnd = 0; 1505 S32 wordLen = 0;
1506 S32 pos = getCursorPosFromLocalCoord(x,y,TRUE); 1506 S32 pos = getCursorPosFromLocalCoord(x,y,TRUE);
1507 1507
1508 LLMenuGL* menu = (LLMenuGL*)mPopupMenuHandle.get(); 1508 LLMenuGL* menu = (LLMenuGL*)mPopupMenuHandle.get();
@@ -1526,11 +1526,11 @@ BOOL LLTextEditor::handleRightMouseDown( S32 x, S32 y, MASK mask )
1526 menu->setItemVisible("Spelsep", !mReadOnly && mSpellCheckable); 1526 menu->setItemVisible("Spelsep", !mReadOnly && mSpellCheckable);
1527 if (!mReadOnly && mSpellCheckable) 1527 if (!mReadOnly && mSpellCheckable)
1528 { 1528 {
1529 bool is_word_part = getWordBoundriesAt(pos, &wordStart, &wordEnd); 1529 bool is_word_part = getWordBoundriesAt(pos, &wordStart, &wordLen);
1530 if (is_word_part) 1530 if (is_word_part)
1531 { 1531 {
1532 const LLWString &text = mWText; 1532 const LLWString &text = mWText;
1533 std::string selectedWord(std::string(text.begin(), text.end()).substr(wordStart,wordEnd-wordStart)); 1533 std::string selectedWord(std::string(text.begin(), text.end()).substr(wordStart,wordLen));
1534 1534
1535 if (!glggHunSpell->isSpelledRight(selectedWord)) 1535 if (!glggHunSpell->isSpelledRight(selectedWord))
1536 { 1536 {
@@ -1542,7 +1542,7 @@ BOOL LLTextEditor::handleRightMouseDown( S32 x, S32 y, MASK mask )
1542 SpellMenuBind * tempStruct = new SpellMenuBind; 1542 SpellMenuBind * tempStruct = new SpellMenuBind;
1543 tempStruct->origin = this; 1543 tempStruct->origin = this;
1544 tempStruct->word = suggs[i]; 1544 tempStruct->word = suggs[i];
1545 tempStruct->wordPositionEnd = wordEnd; 1545 tempStruct->wordPositionEnd = wordStart + wordLen;
1546 tempStruct->wordPositionStart=wordStart; 1546 tempStruct->wordPositionStart=wordStart;
1547 tempStruct->wordY=y; 1547 tempStruct->wordY=y;
1548 LLMenuItemCallGL * suggMenuItem = new LLMenuItemCallGL( 1548 LLMenuItemCallGL * suggMenuItem = new LLMenuItemCallGL(
@@ -1554,7 +1554,7 @@ BOOL LLTextEditor::handleRightMouseDown( S32 x, S32 y, MASK mask )
1554 SpellMenuBind * tempStruct = new SpellMenuBind; 1554 SpellMenuBind * tempStruct = new SpellMenuBind;
1555 tempStruct->origin = this; 1555 tempStruct->origin = this;
1556 tempStruct->word = selectedWord; 1556 tempStruct->word = selectedWord;
1557 tempStruct->wordPositionEnd = wordEnd; 1557 tempStruct->wordPositionEnd = wordStart + wordLen;
1558 tempStruct->wordPositionStart=wordStart; 1558 tempStruct->wordPositionStart=wordStart;
1559 tempStruct->wordY=y; 1559 tempStruct->wordY=y;
1560 LLMenuItemCallGL * suggMenuItem = new LLMenuItemCallGL( 1560 LLMenuItemCallGL * suggMenuItem = new LLMenuItemCallGL(