diff options
| author | James Cook <james@lindenlab.com> | 2008-04-30 23:30:09 +0000 |
|---|---|---|
| committer | James Cook <james@lindenlab.com> | 2008-04-30 23:30:09 +0000 |
| commit | 36fccc3888c5dc318a8a235da8a5cae4faeb637d (patch) | |
| tree | 021e439fe9fa3a285062d70bf0b8c0f799471681 /indra/llui/lllineeditor.cpp | |
| parent | cf2a96375f62316b98c2dddd57f812f7565584be (diff) | |
svn merge -r 86190:86191 maint-ui-11-merge (EFFECTIVE MERGE: -r 84579:85724 maint-ui-11-qa).
Diffstat (limited to 'indra/llui/lllineeditor.cpp')
| -rw-r--r-- | indra/llui/lllineeditor.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/indra/llui/lllineeditor.cpp b/indra/llui/lllineeditor.cpp index b54470d44a..90e0552861 100644 --- a/indra/llui/lllineeditor.cpp +++ b/indra/llui/lllineeditor.cpp @@ -132,7 +132,8 @@ LLLineEditor::LLLineEditor(const LLString& name, const LLRect& rect, mSelectAllonFocusReceived( FALSE ), mPassDelete(FALSE), mReadOnly(FALSE), - mImage( sImage ) + mImage( sImage ), + mReplaceNewlinesWithSpaces( TRUE ) { llassert( max_length_bytes > 0 ); @@ -961,7 +962,7 @@ void LLLineEditor::paste() LLWString clean_string(paste); LLWString::replaceTabsWithSpaces(clean_string, 1); //clean_string = wstring_detabify(paste, 1); - LLWString::replaceChar(clean_string, '\n', ' '); + LLWString::replaceChar(clean_string, '\n', mReplaceNewlinesWithSpaces ? ' ' : 182); // 182 == paragraph character // Insert the string @@ -2547,6 +2548,10 @@ S32 LLLineEditor::getPreeditFontSize() const return llround(mGLFont->getLineHeight() * LLUI::sGLScaleFactor.mV[VY]); } +void LLLineEditor::setReplaceNewlinesWithSpaces(BOOL replace) +{ + mReplaceNewlinesWithSpaces = replace; +} static LLRegisterWidget<LLSearchEditor> r2("search_editor"); |
