diff options
Diffstat (limited to 'starmath')
-rw-r--r-- | starmath/inc/smmod.hxx | 4 | ||||
-rw-r--r-- | starmath/source/parse5.cxx | 2 | ||||
-rw-r--r-- | starmath/source/smmod.cxx | 9 | ||||
-rw-r--r-- | starmath/source/symbol.cxx | 4 |
4 files changed, 10 insertions, 9 deletions
diff --git a/starmath/inc/smmod.hxx b/starmath/inc/smmod.hxx index b968f9092124..f75643d0ffe8 100644 --- a/starmath/inc/smmod.hxx +++ b/starmath/inc/smmod.hxx @@ -53,10 +53,10 @@ class SmLocalizedSymbolData public: SmLocalizedSymbolData() = delete; - static OUString GetUiSymbolName( const OUString &rExportName ); + static OUString GetUiSymbolName( std::u16string_view rExportName ); static OUString GetExportSymbolName( std::u16string_view rUiName ); - static OUString GetUiSymbolSetName( const OUString &rExportName ); + static OUString GetUiSymbolSetName( std::u16string_view rExportName ); static OUString GetExportSymbolSetName( std::u16string_view rUiName ); }; diff --git a/starmath/source/parse5.cxx b/starmath/source/parse5.cxx index 60e341bab71d..06c2f0c0dc1e 100644 --- a/starmath/source/parse5.cxx +++ b/starmath/source/parse5.cxx @@ -2621,7 +2621,7 @@ std::unique_ptr<SmSpecialNode> SmParser5::DoSpecial() { if (IsImportSymbolNames()) { - aNewName = SmLocalizedSymbolData::GetUiSymbolName(rName.copy(1)); + aNewName = SmLocalizedSymbolData::GetUiSymbolName(rName.subView(1)); bReplace = true; } else if (IsExportSymbolNames()) diff --git a/starmath/source/smmod.cxx b/starmath/source/smmod.cxx index 484c4af4a6dd..783965844b38 100644 --- a/starmath/source/smmod.cxx +++ b/starmath/source/smmod.cxx @@ -19,6 +19,7 @@ #include <sal/config.h> +#include <o3tl/string_view.hxx> #include <sfx2/objface.hxx> #include <svl/whiter.hxx> #include <sfx2/viewsh.hxx> @@ -43,13 +44,13 @@ OUString SmResId(TranslateId aId) return Translate::get(aId, SM_MOD()->GetResLocale()); } -OUString SmLocalizedSymbolData::GetUiSymbolName( const OUString &rExportName ) +OUString SmLocalizedSymbolData::GetUiSymbolName( std::u16string_view rExportName ) { OUString aRes; for (size_t i = 0; i < SAL_N_ELEMENTS(RID_UI_SYMBOL_NAMES); ++i) { - if (rExportName.equalsAscii(RID_UI_SYMBOL_NAMES[i].mpId)) + if (o3tl::equalsAscii(rExportName, RID_UI_SYMBOL_NAMES[i].mpId)) { aRes = SmResId(RID_UI_SYMBOL_NAMES[i]); break; @@ -76,13 +77,13 @@ OUString SmLocalizedSymbolData::GetExportSymbolName( std::u16string_view rUiName return aRes; } -OUString SmLocalizedSymbolData::GetUiSymbolSetName( const OUString &rExportName ) +OUString SmLocalizedSymbolData::GetUiSymbolSetName( std::u16string_view rExportName ) { OUString aRes; for (size_t i = 0; i < SAL_N_ELEMENTS(RID_UI_SYMBOLSET_NAMES); ++i) { - if (rExportName.equalsAscii(RID_UI_SYMBOLSET_NAMES[i].mpId)) + if (o3tl::equalsAscii(rExportName, RID_UI_SYMBOLSET_NAMES[i].mpId)) { aRes = SmResId(RID_UI_SYMBOLSET_NAMES[i]); break; diff --git a/starmath/source/symbol.cxx b/starmath/source/symbol.cxx index 4dfd8374872c..d28d558f59a1 100644 --- a/starmath/source/symbol.cxx +++ b/starmath/source/symbol.cxx @@ -224,7 +224,7 @@ void SmSymbolManager::Load() } // now add a %i... symbol to the 'iGreek' set for every symbol found in the 'Greek' set. - const OUString aGreekSymbolSetName(SmLocalizedSymbolData::GetUiSymbolSetName("Greek")); + const OUString aGreekSymbolSetName(SmLocalizedSymbolData::GetUiSymbolSetName(u"Greek")); const SymbolPtrVec_t aGreekSymbols( GetSymbolSet( aGreekSymbolSetName ) ); OUString aSymbolSetName = "i" + aGreekSymbolSetName; size_t nSymbols = aGreekSymbols.size(); @@ -252,7 +252,7 @@ void SmSymbolManager::Save() // prepare to skip symbols from iGreek on saving OUString aSymbolSetName = "i" + - SmLocalizedSymbolData::GetUiSymbolSetName("Greek"); + SmLocalizedSymbolData::GetUiSymbolSetName(u"Greek"); SymbolPtrVec_t aTmp( GetSymbols() ); std::vector< SmSym > aSymbols; |