diff options
author | Martin Reddy <lynx@lindenlab.com> | 2009-09-22 18:00:16 +0000 |
---|---|---|
committer | Martin Reddy <lynx@lindenlab.com> | 2009-09-22 18:00:16 +0000 |
commit | 12762053e5aff372a9f8d473c71aa81e805bb474 (patch) | |
tree | c2c29e3b178cc9c51b99bd94d2f478e96d8a7d30 /indra/llui/lltextbox.cpp | |
parent | be41bf82c6325fc45c7c6474645f384479e27091 (diff) |
EXT-944 EXT-1026: converted the LLUrlRegistry::findUrl() method to
work on an LLWString instead of a std::string, so that we don't have
to worry about character offsets for variable-length-encoded UTF-8
strings.
This was causing crashes whenever we would try to show a textbox with
a URL and foreign characters (> 1 byte chars). Damn, I suck!
Diffstat (limited to 'indra/llui/lltextbox.cpp')
-rw-r--r-- | indra/llui/lltextbox.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/indra/llui/lltextbox.cpp b/indra/llui/lltextbox.cpp index 810626268f..3cde42d75c 100644 --- a/indra/llui/lltextbox.cpp +++ b/indra/llui/lltextbox.cpp @@ -297,7 +297,7 @@ LLWString LLTextBox::getWrappedText(const LLStringExplicit& in_text, F32 max_wid // find the next Url in the text string LLUrlMatch match; - while ( LLUrlRegistry::instance().findUrl(wstring_to_utf8str(wtext), match)) + while ( LLUrlRegistry::instance().findUrl(wtext, match)) { S32 start = match.getStart(); S32 end = match.getEnd() + 1; @@ -573,7 +573,7 @@ void LLTextBox::updateDisplayTextAndSegments() LLWString text = mText.getWString(); // find the next Url in the text string - while ( LLUrlRegistry::instance().findUrl(wstring_to_utf8str(text), match, + while ( LLUrlRegistry::instance().findUrl(text, match, boost::bind(&LLTextBox::onUrlLabelUpdated, this, _1, _2)) ) { // work out the char offset for the start/end of the url |