diff options
author | merov <none@none> | 2012-01-13 15:13:13 -0800 |
---|---|---|
committer | merov <none@none> | 2012-01-13 15:13:13 -0800 |
commit | 6051ac65d62c364e3d797a841d675e20f4182e63 (patch) | |
tree | 945883571ae7f12689233fccfd4bd09ead7d9f05 /indra/llui/lltexteditor.cpp | |
parent | 86ef722e7cb2e4c791e8223f5c09a0552b52b574 (diff) | |
parent | 86009704769a79768eb02f459b1b99ea060e5fc1 (diff) |
Pull from viewer-experience
Diffstat (limited to 'indra/llui/lltexteditor.cpp')
-rw-r--r-- | indra/llui/lltexteditor.cpp | 26 |
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; +} |