summaryrefslogtreecommitdiff
path: root/indra/llui/lltexteditor.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2012-01-24 11:03:22 -0500
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2012-01-24 11:03:22 -0500
commit361efbc07e83ec79a19d96b34aa1913dce1d0e1d (patch)
tree9d0655556ae0011fdc2ed4f8917faeb5efe29616 /indra/llui/lltexteditor.cpp
parent9e6a5d721193f181c39e58fe00073bece74b081a (diff)
parent79f1cd0a73bd86ff545ad78b9b1878e350d77416 (diff)
merge
Diffstat (limited to 'indra/llui/lltexteditor.cpp')
-rw-r--r--indra/llui/lltexteditor.cpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp
index 9bd445988d..3a23ce1cac 100644
--- a/indra/llui/lltexteditor.cpp
+++ b/indra/llui/lltexteditor.cpp
@@ -2250,6 +2250,22 @@ void LLTextEditor::insertText(const std::string &new_text)
setEnabled( enabled );
}
+void LLTextEditor::insertText(LLWString &new_text)
+{
+ BOOL enabled = getEnabled();
+ setEnabled( TRUE );
+
+ // Delete any selected characters (the insertion replaces them)
+ if( hasSelection() )
+ {
+ deleteSelection(TRUE);
+ }
+
+ setCursorPos(mCursorPos + insert( mCursorPos, new_text, FALSE, LLTextSegmentPtr() ));
+
+ setEnabled( enabled );
+}
+
void LLTextEditor::appendWidget(const LLInlineViewSegment::Params& params, const std::string& text, bool allow_undo)
{
// Save old state
@@ -2838,3 +2854,13 @@ void LLTextEditor::clear()
getViewModel()->setDisplay(LLWStringUtil::null);
clearSegments();
}
+
+bool LLTextEditor::canLoadOrSaveToFile()
+{
+ return !mReadOnly;
+}
+
+S32 LLTextEditor::spacesPerTab()
+{
+ return SPACES_PER_TAB;
+}