aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden
diff options
context:
space:
mode:
authorMcCabe Maxsted2010-08-30 19:55:44 -0700
committerMcCabe Maxsted2010-08-30 19:55:44 -0700
commite0e982b0f96ea5a3e8e7bff00ea1004f9c349ccc (patch)
tree7e66846ca41303a3f58b31cbfb0f9e2410ac5014 /linden
parentAdded missing chatbar_as_cmdline.h file (diff)
downloadmeta-impy-e0e982b0f96ea5a3e8e7bff00ea1004f9c349ccc.zip
meta-impy-e0e982b0f96ea5a3e8e7bff00ea1004f9c349ccc.tar.gz
meta-impy-e0e982b0f96ea5a3e8e7bff00ea1004f9c349ccc.tar.bz2
meta-impy-e0e982b0f96ea5a3e8e7bff00ea1004f9c349ccc.tar.xz
Fixed bad merge in lltexteditor.cpp
Diffstat (limited to 'linden')
-rw-r--r--linden/indra/llui/lltexteditor.cpp77
1 files changed, 21 insertions, 56 deletions
diff --git a/linden/indra/llui/lltexteditor.cpp b/linden/indra/llui/lltexteditor.cpp
index be6d3ef..51f7ad6 100644
--- a/linden/indra/llui/lltexteditor.cpp
+++ b/linden/indra/llui/lltexteditor.cpp
@@ -5007,69 +5007,35 @@ BOOL LLTextEditor::findHTML(const std::string &line, S32 *begin, S32 *end, std::
5007 { 5007 {
5008 S32 strpos, strpos2; 5008 S32 strpos, strpos2;
5009 5009
5010 url = line.substr(*begin,*end - *begin); 5010 // Is this try here still needed considering the changes to LLTextEditor::findHTMLToken? - MC
5011 std::string slurlID = "slurl.com/secondlife/"; 5011 try
5012 strpos = url.find(slurlID);
5013
5014 if (strpos < 0)
5015 {
5016 slurlID="maps.secondlife.com/secondlife/";
5017 strpos = url.find(slurlID);
5018 }
5019
5020 if (strpos < 0)
5021 { 5012 {
5022 slurlID="secondlife://"; 5013 url = line.substr(*begin,*end - *begin);
5014 std::string slurlID = "slurl.com/secondlife/";
5023 strpos = url.find(slurlID); 5015 strpos = url.find(slurlID);
5024 }
5025
5026 if (strpos < 0)
5027 {
5028 slurlID="sl://";
5029 strpos = url.find(slurlID);
5030 }
5031
5032 if (strpos >= 0)
5033 {
5034 strpos+=slurlID.length();
5035 5016
5036 while ( ( strpos2=url.find("/",strpos) ) == -1 )
5037 {
5038 if ((*end+2) >= (S32)line.length() || line.substr(*end,1) != " " )
5039 {
5040 matched=FALSE;
5041 break;
5042 }
5043
5044 strpos = (*end + 1) - *begin;
5045
5046 *end = findHTMLToken(line,(*begin + strpos),FALSE);
5047 url = line.substr(*begin,*end - *begin);
5048 }
5049 }
5050
5051 if (strpos < 0) 5017 if (strpos < 0)
5052 { 5018 {
5053 slurlID="maps.secondlife.com/secondlife/"; 5019 slurlID="maps.secondlife.com/secondlife/";
5054 strpos = url.find(slurlID); 5020 strpos = url.find(slurlID);
5055 } 5021 }
5056 5022
5057 if (strpos < 0) 5023 if (strpos < 0)
5058 { 5024 {
5059 slurlID="secondlife://"; 5025 slurlID="secondlife://";
5060 strpos = url.find(slurlID); 5026 strpos = url.find(slurlID);
5061 } 5027 }
5062 5028
5063 if (strpos < 0) 5029 if (strpos < 0)
5064 { 5030 {
5065 slurlID="sl://"; 5031 slurlID="sl://";
5066 strpos = url.find(slurlID); 5032 strpos = url.find(slurlID);
5067 } 5033 }
5068 5034
5069 if (strpos >= 0) 5035 if (strpos >= 0)
5070 { 5036 {
5071 strpos+=slurlID.length(); 5037 strpos+=slurlID.length();
5072 5038
5073 while ( ( strpos2=url.find("/",strpos) ) == -1 ) 5039 while ( ( strpos2=url.find("/",strpos) ) == -1 )
5074 { 5040 {
5075 if ((*end+2) >= (S32)line.length() || line.substr(*end,1) != " " ) 5041 if ((*end+2) >= (S32)line.length() || line.substr(*end,1) != " " )
@@ -5077,19 +5043,18 @@ BOOL LLTextEditor::findHTML(const std::string &line, S32 *begin, S32 *end, std::
5077 matched=FALSE; 5043 matched=FALSE;
5078 break; 5044 break;
5079 } 5045 }
5080 5046
5081 strpos = (*end + 1) - *begin; 5047 strpos = (*end + 1) - *begin;
5082 5048
5083 *end = findHTMLToken(line,(*begin + strpos),FALSE); 5049 *end = findHTMLToken(line,(*begin + strpos),FALSE);
5084 url = line.substr(*begin,*end - *begin); 5050 url = line.substr(*begin,*end - *begin);
5085 } 5051 }
5086 } 5052 }
5087
5088 } 5053 }
5089 5054
5090 catch ( std::out_of_range outOfRange ) 5055 catch ( std::out_of_range outOfRange )
5091 { 5056 {
5092 LL_WARNS("TextEditor") << "got std::out_of_range exception \"" << line << "\"" << LL_ENDL; 5057 llwarns << "got std::out_of_range exception \"" << line << "\"" << llendl;
5093 } 5058 }
5094 } 5059 }
5095 5060