summaryrefslogtreecommitdiff
path: root/starmath
diff options
context:
space:
mode:
authorNoel <noelgrandin@gmail.com>2020-11-18 10:10:40 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-11-24 09:45:04 +0100
commitbb06f51308428500c9c8d11ae05f0aa03ecc179c (patch)
treeb18620e8572ed6d4c43c8605660d59f5f7a7e531 /starmath
parent42e8e16cf93dcf944e5c1106f76aaa32057c0397 (diff)
loplugin:stringviewparam extend to comparison operators
which means that some call sites have to change to use unicode string literals i.e. u"foo" instead of "foo" Change-Id: Ie51c3adf56d343dd1d1710777f9d2a43ee66221c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106125 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'starmath')
-rw-r--r--starmath/inc/dialog.hxx4
-rw-r--r--starmath/inc/smmod.hxx4
-rw-r--r--starmath/inc/symbol.hxx2
-rw-r--r--starmath/source/cfgitem.cxx4
-rw-r--r--starmath/source/cfgitem.hxx4
-rw-r--r--starmath/source/dialog.cxx6
-rw-r--r--starmath/source/parse.cxx2
-rw-r--r--starmath/source/smmod.cxx4
-rw-r--r--starmath/source/symbol.cxx4
9 files changed, 17 insertions, 17 deletions
diff --git a/starmath/inc/dialog.hxx b/starmath/inc/dialog.hxx
index cb3fcc677069..d3017f8e9554 100644
--- a/starmath/inc/dialog.hxx
+++ b/starmath/inc/dialog.hxx
@@ -34,7 +34,7 @@ class SvxShowCharSet;
/**************************************************************************/
-void SetFontStyle(const OUString &rStyleName, vcl::Font &rFont);
+void SetFontStyle(std::u16string_view rStyleName, vcl::Font &rFont);
/**************************************************************************/
@@ -432,7 +432,7 @@ class SmSymDefineDialog final : public weld::GenericDialogController
void FillStyles();
void SetSymbolSetManager(const SmSymbolManager &rMgr);
- void SetFont(const OUString &rFontName, const OUString &rStyleName);
+ void SetFont(const OUString &rFontName, std::u16string_view rStyleName);
void SetOrigSymbol(const SmSym *pSymbol, const OUString &rSymbolSetName);
void UpdateButtons();
diff --git a/starmath/inc/smmod.hxx b/starmath/inc/smmod.hxx
index a8f1ac17c467..3bab0068495b 100644
--- a/starmath/inc/smmod.hxx
+++ b/starmath/inc/smmod.hxx
@@ -57,10 +57,10 @@ public:
SmLocalizedSymbolData() = delete;
static OUString GetUiSymbolName( const OUString &rExportName );
- static OUString GetExportSymbolName( const OUString &rUiName );
+ static OUString GetExportSymbolName( std::u16string_view rUiName );
static OUString GetUiSymbolSetName( const OUString &rExportName );
- static OUString GetExportSymbolSetName( const OUString &rUiName );
+ static OUString GetExportSymbolSetName( std::u16string_view rUiName );
};
class SmModule final : public SfxModule, public utl::ConfigurationListener
diff --git a/starmath/inc/symbol.hxx b/starmath/inc/symbol.hxx
index 58f757c4e3a2..5b43d3f0692d 100644
--- a/starmath/inc/symbol.hxx
+++ b/starmath/inc/symbol.hxx
@@ -87,7 +87,7 @@ public:
// symbol sets are for UI purpose only, thus we assemble them here
std::set< OUString > GetSymbolSetNames() const;
- SymbolPtrVec_t GetSymbolSet( const OUString& rSymbolSetName );
+ SymbolPtrVec_t GetSymbolSet( std::u16string_view rSymbolSetName );
SymbolPtrVec_t GetSymbols() const;
bool AddOrReplaceSymbol( const SmSym & rSymbol, bool bForceChange = false );
diff --git a/starmath/source/cfgitem.cxx b/starmath/source/cfgitem.cxx
index f3c0ec3e99b8..a7d7d51f71af 100644
--- a/starmath/source/cfgitem.cxx
+++ b/starmath/source/cfgitem.cxx
@@ -237,7 +237,7 @@ void SmFontFormatList::AddFontFormat( const OUString &rFntFmtId,
}
-void SmFontFormatList::RemoveFontFormat( const OUString &rFntFmtId )
+void SmFontFormatList::RemoveFontFormat( std::u16string_view rFntFmtId )
{
// search for entry
@@ -254,7 +254,7 @@ void SmFontFormatList::RemoveFontFormat( const OUString &rFntFmtId )
}
-const SmFontFormat * SmFontFormatList::GetFontFormat( const OUString &rFntFmtId ) const
+const SmFontFormat * SmFontFormatList::GetFontFormat( std::u16string_view rFntFmtId ) const
{
const SmFontFormat *pRes = nullptr;
diff --git a/starmath/source/cfgitem.hxx b/starmath/source/cfgitem.hxx
index 8fa101187297..fe11ce08f409 100644
--- a/starmath/source/cfgitem.hxx
+++ b/starmath/source/cfgitem.hxx
@@ -77,9 +77,9 @@ public:
void Clear();
void AddFontFormat( const OUString &rFntFmtId, const SmFontFormat &rFntFmt );
- void RemoveFontFormat( const OUString &rFntFmtId );
+ void RemoveFontFormat( std::u16string_view rFntFmtId );
- const SmFontFormat * GetFontFormat( const OUString &rFntFmtId ) const;
+ const SmFontFormat * GetFontFormat( std::u16string_view rFntFmtId ) const;
const SmFontFormat * GetFontFormat( size_t nPos ) const;
OUString GetFontFormatId( const SmFontFormat &rFntFmt ) const;
OUString GetFontFormatId( const SmFontFormat &rFntFmt, bool bAdd );
diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx
index 5902669c8df4..f13d0558abe3 100644
--- a/starmath/source/dialog.cxx
+++ b/starmath/source/dialog.cxx
@@ -134,12 +134,12 @@ static const SmFontStyles & GetFontStyles()
return aImpl;
}
-void SetFontStyle(const OUString &rStyleName, vcl::Font &rFont)
+void SetFontStyle(std::u16string_view rStyleName, vcl::Font &rFont)
{
// Find index related to StyleName. For an empty StyleName it's assumed to be
// 0 (neither bold nor italic).
sal_uInt16 nIndex = 0;
- if (!rStyleName.isEmpty())
+ if (!rStyleName.empty())
{
sal_uInt16 i;
const SmFontStyles &rStyles = GetFontStyles();
@@ -1952,7 +1952,7 @@ bool SmSymDefineDialog::SelectSymbol(weld::ComboBox& rComboBox,
}
-void SmSymDefineDialog::SetFont(const OUString &rFontName, const OUString &rStyleName)
+void SmSymDefineDialog::SetFont(const OUString &rFontName, std::u16string_view rStyleName)
{
// get Font (FontInfo) matching name and style
FontMetric aFontMetric;
diff --git a/starmath/source/parse.cxx b/starmath/source/parse.cxx
index 4ac26866e07c..b558da047cc0 100644
--- a/starmath/source/parse.cxx
+++ b/starmath/source/parse.cxx
@@ -2567,7 +2567,7 @@ std::unique_ptr<SmSpecialNode> SmParser::DoSpecial()
}
else if (IsExportSymbolNames())
{
- aNewName = SmLocalizedSymbolData::GetExportSymbolName(rName.copy(1));
+ aNewName = SmLocalizedSymbolData::GetExportSymbolName(rName.subView(1));
bReplace = true;
}
}
diff --git a/starmath/source/smmod.cxx b/starmath/source/smmod.cxx
index 208d6677f6c7..f0a809803a9e 100644
--- a/starmath/source/smmod.cxx
+++ b/starmath/source/smmod.cxx
@@ -61,7 +61,7 @@ OUString SmLocalizedSymbolData::GetUiSymbolName( const OUString &rExportName )
return aRes;
}
-OUString SmLocalizedSymbolData::GetExportSymbolName( const OUString &rUiName )
+OUString SmLocalizedSymbolData::GetExportSymbolName( std::u16string_view rUiName )
{
OUString aRes;
@@ -94,7 +94,7 @@ OUString SmLocalizedSymbolData::GetUiSymbolSetName( const OUString &rExportName
return aRes;
}
-OUString SmLocalizedSymbolData::GetExportSymbolSetName( const OUString &rUiName )
+OUString SmLocalizedSymbolData::GetExportSymbolSetName( std::u16string_view rUiName )
{
OUString aRes;
diff --git a/starmath/source/symbol.cxx b/starmath/source/symbol.cxx
index 5e6a6486a337..0d2f33045c08 100644
--- a/starmath/source/symbol.cxx
+++ b/starmath/source/symbol.cxx
@@ -187,10 +187,10 @@ std::set< OUString > SmSymbolManager::GetSymbolSetNames() const
}
-SymbolPtrVec_t SmSymbolManager::GetSymbolSet( const OUString& rSymbolSetName )
+SymbolPtrVec_t SmSymbolManager::GetSymbolSet( std::u16string_view rSymbolSetName )
{
SymbolPtrVec_t aRes;
- if (!rSymbolSetName.isEmpty())
+ if (!rSymbolSetName.empty())
{
for (const auto& rEntry : m_aSymbols)
{