diff options
| author | Loren Shih <seraph@lindenlab.com> | 2010-04-28 13:37:21 -0400 |
|---|---|---|
| committer | Loren Shih <seraph@lindenlab.com> | 2010-04-28 13:37:21 -0400 |
| commit | 29e1804139691229a887144b612f147e1c9dcffb (patch) | |
| tree | ef7b33360da228b7f2e078dbea5af763c1548230 /indra/llui/llurlentry.cpp | |
| parent | 26d324a2dd06ebde896f7856622a55414eb75d77 (diff) | |
| parent | 96df3f3eb1351973d140ba73b507de44b1052c89 (diff) | |
automated merge
Diffstat (limited to 'indra/llui/llurlentry.cpp')
| -rw-r--r-- | indra/llui/llurlentry.cpp | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp index 736de651da..3375c13c94 100644 --- a/indra/llui/llurlentry.cpp +++ b/indra/llui/llurlentry.cpp @@ -765,3 +765,35 @@ std::string LLUrlEntryNoLink::getLabel(const std::string &url, const LLUrlLabelC { return getUrl(url); } + +// +// LLUrlEntryIcon describes an icon with <icon>...</icon> tags +// +LLUrlEntryIcon::LLUrlEntryIcon() +{ + mPattern = boost::regex("<icon\\s*>\\s*([^<]*)?\\s*</icon\\s*>", + boost::regex::perl|boost::regex::icase); + mDisabledLink = true; +} + +std::string LLUrlEntryIcon::getUrl(const std::string &url) const +{ + return LLStringUtil::null; +} + +std::string LLUrlEntryIcon::getLabel(const std::string &url, const LLUrlLabelCallback &cb) +{ + return LLStringUtil::null; +} + +std::string LLUrlEntryIcon::getIcon(const std::string &url) +{ + // Grep icon info between <icon>...</icon> tags + // matches[1] contains the icon name/path + boost::match_results<std::string::const_iterator> matches; + mIcon = (boost::regex_match(url, matches, mPattern) && matches[1].matched) + ? matches[1] + : LLStringUtil::null; + LLStringUtil::trim(mIcon); + return mIcon; +} |
