diff --git a/autobuild.xml b/autobuild.xml index 2f3a135809c3ffb7756eee900f517c8192e8c24e..1a2aa0e137475befe8209ac08465965b3cd14f01 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -536,11 +536,11 @@ <key>archive</key> <map> <key>hash</key> - <string>e082b5423cca66ceadbc2e5d372b495210a61d80763981994f85fdafb2edace179cbff5cdb6306cbdec81d1b278bcb832896b87033250cc081c1ea15b3497201</string> + <string>6e2a2290a3dab3f01a51f5cd280b5b311b46fd2f244456a74d398fa25e9d93707c640057fb94dd08d078cd3e9a88f147fc905833010dddfb8471a3e32d851c28</string> <key>hash_algorithm</key> <string>blake2b</string> <key>url</key> - <string>https://git.alchemyviewer.org/api/v4/projects/49/packages/generic/fmodstudio/2.02.03.1163/fmodstudio-2.02.03-darwin64-1163.tar.zst</string> + <string>https://git.alchemyviewer.org/api/v4/projects/49/packages/generic/fmodstudio/2.02.04.1274/fmodstudio-2.02.04-darwin64-1274.tar.zst</string> </map> <key>name</key> <string>darwin64</string> @@ -550,11 +550,11 @@ <key>archive</key> <map> <key>hash</key> - <string>f0459842efccae4269faa302cf4f6d90bf196a722f694756ea89b3b9a529b33b5dbb9a8b8fe0131fd6c85e480ac28feb89f7ed96403d63393f9de04cc966c75b</string> + <string>7f8c2f28310a5b14f3c5b723c944fa7c72a3d578f07cfead8ea6580cd965cf02f699e4f49eb3d82a6aa32646bd572456aebe100d8bd39d3268e95beec16a6f63</string> <key>hash_algorithm</key> <string>blake2b</string> <key>url</key> - <string>https://git.alchemyviewer.org/api/v4/projects/49/packages/generic/fmodstudio/2.02.03.1163/fmodstudio-2.02.03-linux64-1163.tar.zst</string> + <string>https://git.alchemyviewer.org/api/v4/projects/49/packages/generic/fmodstudio/2.02.04.1274/fmodstudio-2.02.04-linux64-1274.tar.zst</string> </map> <key>name</key> <string>linux64</string> @@ -564,18 +564,18 @@ <key>archive</key> <map> <key>hash</key> - <string>64f27ccb33f48bbb1345eb742d045f2a02c4ca461c9f5a73e689113e2da7bedad1210ccdbfa1db92f8f708eebf61d41235a297327c8d148cdb9b1c380ad315fa</string> + <string>4ee74085fd10b5252cbd0358ecbb3986d9b718d31b1b51588404eec122bf1ac9b72bc8f689ef676e7104c1771b81686a81c38623a96704b6354be0d138935a26</string> <key>hash_algorithm</key> <string>blake2b</string> <key>url</key> - <string>https://git.alchemyviewer.org/api/v4/projects/49/packages/generic/fmodstudio/2.02.03.1163/fmodstudio-2.02.03-windows64-1163.tar.zst</string> + <string>https://git.alchemyviewer.org/api/v4/projects/49/packages/generic/fmodstudio/2.02.04.1274/fmodstudio-2.02.04-windows64-1274.tar.zst</string> </map> <key>name</key> <string>windows64</string> </map> </map> <key>version</key> - <string>2.02.03</string> + <string>2.02.04</string> </map> <key>fonts</key> <map> diff --git a/indra/llui/llfolderview.cpp b/indra/llui/llfolderview.cpp index 81531ea1837d03fedb3025c105da2cdc080ff424..48a8b8beb0ad83a1946e05193182bab3cce8018f 100644 --- a/indra/llui/llfolderview.cpp +++ b/indra/llui/llfolderview.cpp @@ -211,7 +211,7 @@ LLFolderView::LLFolderView(const Params& p) //clear label // go ahead and render root folder as usual // just make sure the label ("Inventory Folder") never shows up - mLabel = LLStringUtil::null; + mLabel.clear(); // Escape is handled by reverting the rename, not commiting it (default behavior) LLLineEditor::Params params; diff --git a/indra/llui/llfolderviewitem.cpp b/indra/llui/llfolderviewitem.cpp index 783d4a2006f50dd443d9f7731de7ca02bd65e6a5..5c9c15f0b8e6f78cfdcfd606e96d2cc00471aeec 100644 --- a/indra/llui/llfolderviewitem.cpp +++ b/indra/llui/llfolderviewitem.cpp @@ -138,7 +138,7 @@ LLFolderViewItem::LLFolderViewItem(const LLFolderViewItem::Params& p) mItemHeight(p.item_height), mControlLabelRotation(0.f), mDragAndDropTarget(FALSE), - mLabel(p.name), + mLabel(utf8str_to_wstring(p.name)), mRoot(p.root), mViewModelItem(p.listener), mIsMouseOverTitle(false), @@ -185,7 +185,7 @@ BOOL LLFolderViewItem::postBuild() LLFolderViewModelItem& vmi = *getViewModelItem(); // getDisplayName() is expensive (due to internal getLabelSuffix() and name building) // it also sets search strings so it requires a filter reset - mLabel = vmi.getDisplayName(); + mLabel = utf8str_to_wstring(vmi.getDisplayName()); setToolTip(vmi.getName()); // Dirty the filter flag of the model from the view (CHUI-849) @@ -297,7 +297,7 @@ void LLFolderViewItem::refresh() { LLFolderViewModelItem& vmi = *getViewModelItem(); - mLabel = vmi.getDisplayName(); + mLabel = utf8str_to_wstring(vmi.getDisplayName()); setToolTip(vmi.getName()); // icons are slightly expensive to get, can be optimized // see LLInventoryIcon::getIcon() @@ -310,7 +310,7 @@ void LLFolderViewItem::refresh() // Very Expensive! // Can do a number of expensive checks, like checking active motions, wearables or friend list mLabelStyle = vmi.getLabelStyle(); - mLabelSuffix = vmi.getLabelSuffix(); + mLabelSuffix = utf8str_to_wstring(vmi.getLabelSuffix()); } // Dirty the filter flag of the model from the view (CHUI-849) @@ -335,7 +335,7 @@ void LLFolderViewItem::refreshSuffix() // Very Expensive! // Can do a number of expensive checks, like checking active motions, wearables or friend list mLabelStyle = vmi->getLabelStyle(); - mLabelSuffix = vmi->getLabelSuffix(); + mLabelSuffix = utf8str_to_wstring(vmi->getLabelSuffix()); } mLabelWidthDirty = true; @@ -396,7 +396,7 @@ S32 LLFolderViewItem::arrange( S32* width, S32* height ) // it is purely visual, so it is fine to do at our laisure refreshSuffix(); } - mLabelWidth = getLabelXPos() + getLabelFontForStyle(mLabelStyle)->getWidth(mLabel) + getLabelFontForStyle(mLabelStyle)->getWidth(mLabelSuffix) + mLabelPaddingRight; + mLabelWidth = getLabelXPos() + getLabelFontForStyle(mLabelStyle)->getWidth(mLabel.c_str()) + getLabelFontForStyle(mLabelStyle)->getWidth(mLabelSuffix.c_str()) + mLabelPaddingRight; mLabelWidthDirty = false; } @@ -872,7 +872,7 @@ void LLFolderViewItem::drawLabel(const LLFontGL * font, const F32 x, const F32 y //--------------------------------------------------------------------------------// // Draw the actual label text // - font->renderUTF8(mLabel, 0, x, y, color, + font->render(mLabel, 0, x, y, color, LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, getRect().getWidth() - (S32) x - mLabelPaddingRight, &right_x, TRUE); } @@ -923,12 +923,12 @@ void LLFolderViewItem::draw() F32 right_x = 0; F32 y = (F32)getRect().getHeight() - font->getLineHeight() - (F32)mTextPad - (F32)TOP_PAD; F32 text_left = (F32)getLabelXPos(); - std::string combined_string = mLabel + mLabelSuffix; + LLWString combined_string = mLabel + mLabelSuffix; if (filter_string_length > 0) { - S32 left = ll_round(text_left) + font->getWidth(combined_string, 0, mViewModelItem->getFilterStringOffset()) - 2; - S32 right = left + font->getWidth(combined_string, mViewModelItem->getFilterStringOffset(), filter_string_length) + 2; + S32 left = ll_round(text_left) + font->getWidth(combined_string.c_str(), 0, mViewModelItem->getFilterStringOffset()) - 2; + S32 right = left + font->getWidth(combined_string.c_str(), mViewModelItem->getFilterStringOffset(), filter_string_length) + 2; S32 bottom = llfloor(getRect().getHeight() - font->getLineHeight() - 3 - TOP_PAD); S32 top = getRect().getHeight() - TOP_PAD; @@ -951,7 +951,7 @@ void LLFolderViewItem::draw() // if (!mLabelSuffix.empty()) { - font->renderUTF8( mLabelSuffix, 0, right_x, y, isFadeItem() ? color : (LLColor4)sSuffixColor, + font->render( mLabelSuffix, 0, right_x, y, isFadeItem() ? color : (LLColor4)sSuffixColor, LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, S32_MAX, &right_x, FALSE ); } @@ -962,9 +962,9 @@ void LLFolderViewItem::draw() if (filter_string_length > 0) { S32 filter_offset = mViewModelItem->getFilterStringOffset(); - F32 match_string_left = text_left + font->getWidthF32(combined_string, 0, filter_offset + filter_string_length) - font->getWidthF32(combined_string, filter_offset, filter_string_length); + F32 match_string_left = text_left + font->getWidthF32(combined_string.c_str(), 0, filter_offset + filter_string_length) - font->getWidthF32(combined_string.c_str(), filter_offset, filter_string_length); F32 yy = (F32)getRect().getHeight() - font->getLineHeight() - (F32)mTextPad - (F32)TOP_PAD; - font->renderUTF8( combined_string, filter_offset, match_string_left, yy, + font->render( combined_string, filter_offset, match_string_left, yy, sFilterTextColor, LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, filter_string_length, S32_MAX, &right_x, FALSE ); } diff --git a/indra/llui/llfolderviewitem.h b/indra/llui/llfolderviewitem.h index 616d2e7d863dba003d02fb3ead0a8984a3a64596..3dc05ec4a9efc6093601ee5494b56b50c768918c 100644 --- a/indra/llui/llfolderviewitem.h +++ b/indra/llui/llfolderviewitem.h @@ -87,14 +87,14 @@ class LLFolderViewItem : public LLView LLFolderViewItem(const Params& p); - std::string mLabel; + LLWString mLabel; S32 mLabelWidth; bool mLabelWidthDirty; S32 mLabelPaddingRight; LLFolderViewFolder* mParentFolder; LLPointer<LLFolderViewModelItem> mViewModelItem; LLFontGL::StyleFlags mLabelStyle; - std::string mLabelSuffix; + LLWString mLabelSuffix; bool mSuffixNeedsRefresh; //suffix and icons LLUIImagePtr mIcon, mIconOpen, @@ -236,7 +236,7 @@ class LLFolderViewItem : public LLView // This method returns the label displayed on the view. This // method was primarily added to allow sorting on the folder // contents possible before the entire view has been constructed. - const std::string& getLabel() const { return mLabel; } + const auto& getLabel() const { return mLabel; } LLFolderViewFolder* getParentFolder( void ) { return mParentFolder; } const LLFolderViewFolder* getParentFolder( void ) const { return mParentFolder; } diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index f14192b405b7bcadc5986c41086c060bedcf896d..59b4a6bb7aff6bfe86e471abe7bc55f7c6a7e919 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -1477,7 +1477,7 @@ void LLTextBase::replaceWithSuggestion(U32 index) deselect(); // Insert the suggestion in its place LLWString suggestion = utf8str_to_wstring(mSuggestionList[index]); - insertStringNoUndo(it->first, utf8str_to_wstring(mSuggestionList[index])); + insertStringNoUndo(it->first, suggestion); // Delete the misspelled word removeStringNoUndo(it->first + (S32)suggestion.length(), it->second - it->first); diff --git a/indra/newview/llexpandabletextbox.cpp b/indra/newview/llexpandabletextbox.cpp index d657f04457ab937c3070a1a41e703099d847af82..cf559458bcb7f43f98efd718faf34f5c1fd29ae2 100644 --- a/indra/newview/llexpandabletextbox.cpp +++ b/indra/newview/llexpandabletextbox.cpp @@ -41,7 +41,7 @@ class LLExpanderSegment : public LLTextSegment : LLTextSegment(start, end), mEditor(editor), mStyle(style), - mExpanderLabel(more_text) + mExpanderLabel(utf8str_to_wstring(more_text)) {} /*virtual*/ bool getDimensionsF32(S32 first_char, S32 num_chars, F32& width, S32& height) const @@ -80,7 +80,7 @@ class LLExpanderSegment : public LLTextSegment /*virtual*/ F32 draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRectf& draw_rect) { F32 right_x; - mStyle->getFont()->renderUTF8(mExpanderLabel, start, + mStyle->getFont()->render(mExpanderLabel, start, draw_rect.mRight, draw_rect.mTop, mStyle->getColor(), LLFontGL::RIGHT, LLFontGL::TOP, @@ -103,7 +103,7 @@ class LLExpanderSegment : public LLTextSegment private: LLTextBase& mEditor; LLStyleSP mStyle; - std::string mExpanderLabel; + LLWString mExpanderLabel; }; LLExpandableTextBox::LLTextBoxEx::Params::Params() diff --git a/indra/newview/llworldmapview.cpp b/indra/newview/llworldmapview.cpp index ce14b84cb787de5427f254cebda48ae151f18865..db39738ed3877b0e6c3b97da850b8fd2870a71ce 100644 --- a/indra/newview/llworldmapview.cpp +++ b/indra/newview/llworldmapview.cpp @@ -1034,7 +1034,7 @@ void LLWorldMapView::drawTracking(const LLVector3d& pos_global, const LLColor4& LLColor4::white, LLFontGL::HCENTER, LLFontGL::BASELINE, LLFontGL::NORMAL, LLFontGL::DROP_SHADOW); - if (tooltip != "") + if (!tooltip.empty()) { text_y -= font->getLineHeight();