summaryrefslogtreecommitdiff
path: root/indra/llui/lltextbase.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui/lltextbase.cpp')
-rwxr-xr-xindra/llui/lltextbase.cpp42
1 files changed, 21 insertions, 21 deletions
diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp
index cc171661ce..f08aeecc99 100755
--- a/indra/llui/lltextbase.cpp
+++ b/indra/llui/lltextbase.cpp
@@ -689,7 +689,7 @@ void LLTextBase::drawText()
seg_iter++;
if (seg_iter == mSegments.end())
{
- llwarns << "Ran off the segmentation end!" << llendl;
+ LL_WARNS() << "Ran off the segmentation end!" << LL_ENDL;
return;
}
@@ -1259,13 +1259,13 @@ void LLTextBase::setReadOnlyColor(const LLColor4 &c)
}
//virtual
-void LLTextBase::handleVisibilityChange( BOOL new_visibility )
+void LLTextBase::onVisibilityChange( BOOL new_visibility )
{
if(!new_visibility && mPopupMenu)
{
mPopupMenu->hide();
}
- LLUICtrl::handleVisibilityChange(new_visibility);
+ LLUICtrl::onVisibilityChange(new_visibility);
}
//virtual
@@ -1318,6 +1318,7 @@ void LLTextBase::replaceWithSuggestion(U32 index)
// Insert the suggestion in its place
LLWString suggestion = utf8str_to_wstring(mSuggestionList[index]);
insertStringNoUndo(it->first, utf8str_to_wstring(mSuggestionList[index]));
+
setCursorPos(it->first + (S32)suggestion.length());
break;
@@ -1436,10 +1437,10 @@ S32 LLTextBase::getLeftOffset(S32 width)
}
-static LLFastTimer::DeclareTimer FTM_TEXT_REFLOW ("Text Reflow");
+static LLTrace::BlockTimerStatHandle FTM_TEXT_REFLOW ("Text Reflow");
void LLTextBase::reflow()
{
- LLFastTimer ft(FTM_TEXT_REFLOW);
+ LL_RECORD_BLOCK_TIME(FTM_TEXT_REFLOW);
updateSegments();
@@ -1481,7 +1482,7 @@ void LLTextBase::reflow()
// use an even number of iterations to avoid user visible oscillation of the layout
if(++reflow_count > 2)
{
- lldebugs << "Breaking out of reflow due to possible infinite loop in " << getName() << llendl;
+ LL_DEBUGS() << "Breaking out of reflow due to possible infinite loop in " << getName() << LL_ENDL;
break;
}
@@ -1778,10 +1779,10 @@ void LLTextBase::removeDocumentChild(LLView* view)
}
-static LLFastTimer::DeclareTimer FTM_UPDATE_TEXT_SEGMENTS("Update Text Segments");
+static LLTrace::BlockTimerStatHandle FTM_UPDATE_TEXT_SEGMENTS("Update Text Segments");
void LLTextBase::updateSegments()
{
- LLFastTimer ft(FTM_UPDATE_TEXT_SEGMENTS);
+ LL_RECORD_BLOCK_TIME(FTM_UPDATE_TEXT_SEGMENTS);
createDefaultSegment();
}
@@ -1870,7 +1871,6 @@ LLTextBase::segment_set_t::iterator LLTextBase::getSegIterContaining(S32 index)
// when there are no segments, we return the end iterator, which must be checked by caller
if (mSegments.size() <= 1) { return mSegments.begin(); }
- //FIXME: avoid operator new somehow (without running into refcount problems)
index_segment->setStart(index);
index_segment->setEnd(index);
segment_set_t::iterator it = mSegments.upper_bound(index_segment);
@@ -2020,7 +2020,7 @@ static LLUIImagePtr image_from_icon_name(const std::string& icon_name)
}
}
-static LLFastTimer::DeclareTimer FTM_PARSE_HTML("Parse HTML");
+static LLTrace::BlockTimerStatHandle FTM_PARSE_HTML("Parse HTML");
void LLTextBase::appendTextImpl(const std::string &new_text, const LLStyle::Params& input_params)
{
@@ -2030,7 +2030,7 @@ void LLTextBase::appendTextImpl(const std::string &new_text, const LLStyle::Para
S32 part = (S32)LLTextParser::WHOLE;
if (mParseHTML && !style_params.is_link) // Don't search for URLs inside a link segment (STORM-358).
{
- LLFastTimer _(FTM_PARSE_HTML);
+ LL_RECORD_BLOCK_TIME(FTM_PARSE_HTML);
S32 start=0,end=0;
LLUrlMatch match;
std::string text = new_text;
@@ -2097,11 +2097,11 @@ void LLTextBase::appendTextImpl(const std::string &new_text, const LLStyle::Para
}
}
-static LLFastTimer::DeclareTimer FTM_APPEND_TEXT("Append Text");
+static LLTrace::BlockTimerStatHandle FTM_APPEND_TEXT("Append Text");
void LLTextBase::appendText(const std::string &new_text, bool prepend_newline, const LLStyle::Params& input_params)
{
- LLFastTimer _(FTM_APPEND_TEXT);
+ LL_RECORD_BLOCK_TIME(FTM_APPEND_TEXT);
if (new_text.empty())
return;
@@ -2150,7 +2150,7 @@ void LLTextBase::setFont(const LLFontGL* font)
void LLTextBase::needsReflow(S32 index)
{
- lldebugs << "reflow on object " << (void*)this << " index = " << mReflowIndex << ", new index = " << index << llendl;
+ LL_DEBUGS() << "reflow on object " << (void*)this << " index = " << mReflowIndex << ", new index = " << index << LL_ENDL;
mReflowIndex = llmin(mReflowIndex, index);
}
@@ -3197,7 +3197,7 @@ void LLNormalTextSegment::setToolTip(const std::string& tooltip)
// we cannot replace a keyword tooltip that's loaded from a file
if (mToken)
{
- llwarns << "LLTextSegment::setToolTip: cannot replace keyword tooltip." << llendl;
+ LL_WARNS() << "LLTextSegment::setToolTip: cannot replace keyword tooltip." << LL_ENDL;
return;
}
mTooltip = tooltip;
@@ -3253,14 +3253,14 @@ S32 LLNormalTextSegment::getNumChars(S32 num_pixels, S32 segment_offset, S32 lin
if(getLength() < segment_offset + mStart)
{
- llinfos << "getLength() < segment_offset + mStart\t getLength()\t" << getLength() << "\tsegment_offset:\t"
- << segment_offset << "\tmStart:\t" << mStart << "\tsegments\t" << mEditor.mSegments.size() << "\tmax_chars\t" << max_chars << llendl;
+ LL_INFOS() << "getLength() < segment_offset + mStart\t getLength()\t" << getLength() << "\tsegment_offset:\t"
+ << segment_offset << "\tmStart:\t" << mStart << "\tsegments\t" << mEditor.mSegments.size() << "\tmax_chars\t" << max_chars << LL_ENDL;
}
if( (offsetLength + 1) < max_chars)
{
- llinfos << "offsetString.length() + 1 < max_chars\t max_chars:\t" << max_chars << "\toffsetLength:\t" << offsetLength << " getLength() : "
- << getLength() << "\tsegment_offset:\t" << segment_offset << "\tmStart:\t" << mStart << "\tsegments\t" << mEditor.mSegments.size() << llendl;
+ LL_INFOS() << "offsetString.length() + 1 < max_chars\t max_chars:\t" << max_chars << "\toffsetString.length():\t" << offsetLength << " getLength() : "
+ << getLength() << "\tsegment_offset:\t" << segment_offset << "\tmStart:\t" << mStart << "\tsegments\t" << mEditor.mSegments.size() << LL_ENDL;
}
S32 num_chars = mStyle->getFont()->maxDrawableChars( text.c_str() + (segment_offset + mStart),
@@ -3290,13 +3290,13 @@ S32 LLNormalTextSegment::getNumChars(S32 num_pixels, S32 segment_offset, S32 lin
void LLNormalTextSegment::dump() const
{
- llinfos << "Segment [" <<
+ LL_INFOS() << "Segment [" <<
// mColor.mV[VX] << ", " <<
// mColor.mV[VY] << ", " <<
// mColor.mV[VZ] << "]\t[" <<
mStart << ", " <<
getEnd() << "]" <<
- llendl;
+ LL_ENDL;
}
/*virtual*/