summaryrefslogtreecommitdiff
path: root/indra/llui/lltextbase.cpp
diff options
context:
space:
mode:
authorCinder Biscuits <cinder@alchemyviewer.org>2015-02-26 14:55:50 -0700
committerCinder Biscuits <cinder@alchemyviewer.org>2015-02-26 14:55:50 -0700
commitd9673d6c1d67ac104fc7872ea2da88560832dd28 (patch)
treeb2ab207152ee7b025eab69eed03733819bdf3d05 /indra/llui/lltextbase.cpp
parent4665d35453f00fcccd6e17ea84d0549f62b07c5f (diff)
parentd4a2e9fd9a0e7001a6c824ddd6cf37039a632b9d (diff)
Merged lindenlab/viewer-tools-update into default
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 367bc9a084..43e048d216 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())
{