summaryrefslogtreecommitdiff
path: root/indra/llui/lltexteditor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui/lltexteditor.cpp')
-rw-r--r--indra/llui/lltexteditor.cpp102
1 files changed, 0 insertions, 102 deletions
diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp
index 6620b684f4..3537c764b9 100644
--- a/indra/llui/lltexteditor.cpp
+++ b/indra/llui/lltexteditor.cpp
@@ -167,50 +167,6 @@ private:
};
///////////////////////////////////////////////////////////////////
-class LLTextEditor::TextCmdAddString : public LLTextBase::TextCmd
-{
-public:
- TextCmdAddString(S32 pos, bool group_with_next, char *str,
- LLTextSegmentPtr segment) :
- TextCmd(pos, group_with_next, segment),
- mWString(utf8str_to_wstring(str)),
- mBlockExtensions(FALSE)
- {
- }
- virtual void blockExtensions()
- {
- mBlockExtensions = TRUE;
- }
- virtual bool canExtend(S32 pos) const
- {
- if (!mSegments.empty()) return FALSE;
-
- return !mBlockExtensions
- && (pos == getPosition() + (S32)mWString.length());
- }
- virtual bool execute(LLTextBase* editor, S32* delta)
- {
- *delta = insert(editor, getPosition(), mWString);
- LLWStringUtil::truncate(mWString, *delta);
- return (*delta != 0);
- }
- virtual S32 undo(LLTextBase* editor)
- {
- remove(editor, getPosition(), mWString.length());
- return getPosition();
- }
- virtual S32 redo(LLTextBase* editor)
- {
- insert(editor, getPosition(), mWString);
- return getPosition() + mWString.length();
- }
-
-private:
- LLWString mWString;
- bool mBlockExtensions;
-};
-
-///////////////////////////////////////////////////////////////////
class LLTextEditor::TextCmdOverwriteChar : public LLTextBase::TextCmd
{
@@ -1208,18 +1164,6 @@ S32 LLTextEditor::addChar(S32 pos, llwchar wc)
return execute(new TextCmdAddChar(pos, false, wc, LLTextSegmentPtr()));
}
-S32 LLTextEditor::addString(S32 pos, char *str)
-{
- if ((wstring_utf8_length(getWText()) + strlen(str))
- > mMaxTextByteLength) {
- make_ui_sound("UISndBadKeystroke");
- return 0;
- }
-
- return execute(new TextCmdAddString(pos, FALSE, str,
- LLTextSegmentPtr()));
-}
-
void LLTextEditor::addChar(llwchar wc)
{
if (!getEnabled())
@@ -1257,34 +1201,6 @@ void LLTextEditor::addChar(llwchar wc)
}
}
-void LLTextEditor::addString(char *str)
-{
- if (!getEnabled())
- return;
- if (hasSelection())
- deleteSelection(TRUE);
- else if (LL_KIM_OVERWRITE == gKeyboard->getInsertMode())
- removeChar(mCursorPos);
-
- setCursorPos(mCursorPos + addString(mCursorPos, str));
-
- if (!mReadOnly && mAutoreplaceCallback != NULL) {
- S32 replacement_start;
- S32 replacement_length;
- LLWString replacement_string;
- S32 new_cursor_pos = mCursorPos;
- mAutoreplaceCallback(replacement_start, replacement_length,
- replacement_string, new_cursor_pos, getWText());
-
- if (replacement_length > 0 || !replacement_string.empty()) {
- remove(replacement_start, replacement_length, true);
- insert(replacement_start, replacement_string, false,
- LLTextSegmentPtr());
- setCursorPos(new_cursor_pos);
- }
- }
-}
-
void LLTextEditor::showEmojiHelper()
{
if (mReadOnly || !mShowEmojiHelper)
@@ -2056,24 +1972,6 @@ bool LLTextEditor::handleUnicodeCharHere(llwchar uni_char)
return handled;
}
-bool LLTextEditor::handleUnicodeStringHere(char *uni_str)
-{
- auto handled = FALSE;
-
- if (!mReadOnly) {
- addString(uni_str);
- getWindow()->hideCursorUntilMouseMove();
- handled = TRUE;
- }
-
- if (handled) {
- resetCursorBlink();
- deselect();
- onKeyStroke();
- }
-
- return handled;
-}
// virtual
bool LLTextEditor::canDoDelete() const