From 36fccc3888c5dc318a8a235da8a5cae4faeb637d Mon Sep 17 00:00:00 2001 From: James Cook Date: Wed, 30 Apr 2008 23:30:09 +0000 Subject: svn merge -r 86190:86191 maint-ui-11-merge (EFFECTIVE MERGE: -r 84579:85724 maint-ui-11-qa). --- indra/llui/lllineeditor.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'indra/llui/lllineeditor.cpp') 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 r2("search_editor"); -- cgit v1.2.3