summaryrefslogtreecommitdiff
path: root/indra/llui/lltextbase.cpp
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2015-03-23 22:39:18 -0400
committerOz Linden <oz@lindenlab.com>2015-03-23 22:39:18 -0400
commitd6f7a16a686a32a3369661b8db35860e7cae6e8f (patch)
tree07b0117b098fef20dd9ddc597e4c0599c4235a4d /indra/llui/lltextbase.cpp
parent7ba82a6409e4fc096407f0247b084950d1e3c14a (diff)
parentc489f1f8647a77c8c7d5fb5b721433dd72cb49c8 (diff)
merge changes for 3.7.26-release
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 e51f2a212f..a3b7595e09 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"
@@ -2020,6 +2021,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);
@@ -2056,7 +2059,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
@@ -2064,14 +2072,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())
{