summaryrefslogtreecommitdiff
path: root/indra/llui/lltexteditor.cpp
diff options
context:
space:
mode:
authorDebi King (Dessie) <dessie@lindenlab.com>2012-01-19 15:49:48 -0500
committerDebi King (Dessie) <dessie@lindenlab.com>2012-01-19 15:49:48 -0500
commit7e9ba401d1489ef96c5315f03332f28d62d97899 (patch)
treec2eabeb3f4f635ae49e5a3e9b07da54dad30eee2 /indra/llui/lltexteditor.cpp
parent2abb1a81c56a27eab02157851cb9e67730231bb6 (diff)
parent4c5141c5677a2e98c1331026d4e119abee6ab2ae (diff)
reconciled .hgtags
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;
+}