diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp index 33d710cb0..03bafce7d 100644 --- a/indra/llui/lltexteditor.cpp +++ b/indra/llui/lltexteditor.cpp @@ -741,7 +741,7 @@ LLMenuGL* LLTextEditor::createUrlContextMenu(S32 x, S32 y, const std::string &in return menu; } -void LLTextEditor::setText(const LLStringExplicit &utf8str) +void LLTextEditor::setText(const LLStringExplicit &utf8str, bool force_replace_links) { // clear out the existing text and segments mWText.clear(); @@ -756,7 +756,7 @@ void LLTextEditor::setText(const LLStringExplicit &utf8str) //LLStringUtil::removeCRLF(text); // appendText modifies mCursorPos... - appendText(utf8str, false, false); + appendText(utf8str, false, false, nullptr, force_replace_links); // ...so move cursor to top after appending text setCursorPos(0); @@ -766,9 +766,9 @@ void LLTextEditor::setText(const LLStringExplicit &utf8str) mTextIsUpToDate = true; } -void LLTextEditor::setWText(const LLWString& text) +void LLTextEditor::setWText(const LLWString& text, bool force_replace_links) { - setText(wstring_to_utf8str(text)); + setText(wstring_to_utf8str(text), force_replace_links); } // virtual diff --git a/indra/llui/lltexteditor.h b/indra/llui/lltexteditor.h index 0d92803b4..c8a67fdbd 100644 --- a/indra/llui/lltexteditor.h +++ b/indra/llui/lltexteditor.h @@ -276,8 +276,8 @@ public: LLMenuGL* createUrlContextMenu(S32 x, S32 y, const std::string &url); // create a popup context menu for the given Url // Non-undoable - void setText(const LLStringExplicit &utf8str); - void setWText(const LLWString &wtext); + void setText(const LLStringExplicit &utf8str, bool force_replace_links = true); + void setWText(const LLWString &wtext, bool force_replace_links = true); // Returns byte length limit S32 getMaxLength() const { return mMaxTextByteLength; }