summaryrefslogtreecommitdiff
path: root/indra/llui/lltextbase.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui/lltextbase.cpp')
-rwxr-xr-xindra/llui/lltextbase.cpp18
1 files changed, 12 insertions, 6 deletions
diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp
index 9b125a85b9..09f923e74f 100755
--- a/indra/llui/lltextbase.cpp
+++ b/indra/llui/lltextbase.cpp
@@ -38,6 +38,7 @@
#include "lltextutil.h"
#include "lltooltip.h"
#include "lluictrl.h"
+#include "lluriparser.h"
#include "llurlaction.h"
#include "llurlregistry.h"
#include "llview.h"
@@ -2019,6 +2020,8 @@ static LLUIImagePtr image_from_icon_name(const std::string& icon_name)
static LLTrace::BlockTimerStatHandle FTM_PARSE_HTML("Parse HTML");
+
+
void LLTextBase::appendTextImpl(const std::string &new_text, const LLStyle::Params& input_params)
{
LLStyle::Params style_params(input_params);
@@ -2055,7 +2058,12 @@ void LLTextBase::appendTextImpl(const std::string &new_text, const LLStyle::Para
std::string subtext=text.substr(0,start);
appendAndHighlightText(subtext, part, style_params);
}
+
+ // add icon before url if need
+ LLTextUtil::processUrlMatch(&match, this, isContentTrusted() || match.isTrusted());
+
// output the styled Url
+ //appendAndHighlightTextImpl(label, part, link_params, match.underlineOnHoverOnly());
appendAndHighlightTextImpl(match.getLabel(), part, link_params, match.underlineOnHoverOnly());
// set the tooltip for the Url label
@@ -2063,14 +2071,12 @@ void LLTextBase::appendTextImpl(const std::string &new_text, const LLStyle::Para
{
segment_set_t::iterator it = getSegIterContaining(getLength()-1);
if (it != mSegments.end())
- {
- LLTextSegmentPtr segment = *it;
- segment->setToolTip(match.getTooltip());
- }
+ {
+ LLTextSegmentPtr segment = *it;
+ segment->setToolTip(match.getTooltip());
+ }
}
- LLTextUtil::processUrlMatch(&match,this,isContentTrusted());
-
// move on to the rest of the text after the Url
if (end < (S32)text.length())
{