summaryrefslogtreecommitdiff
path: root/cui
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 /cui
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 'cui')
-rw-r--r--cui/source/customize/SvxNotebookbarConfigPage.cxx6
-rw-r--r--cui/source/customize/cfgutil.cxx2
-rw-r--r--cui/source/dialogs/hlinettp.cxx2
-rw-r--r--cui/source/dialogs/hlmailtp.cxx4
-rw-r--r--cui/source/dialogs/hlmarkwn.cxx4
-rw-r--r--cui/source/dialogs/scriptdlg.cxx6
-rw-r--r--cui/source/inc/cfgutil.hxx2
-rw-r--r--cui/source/inc/cuitabarea.hxx10
-rw-r--r--cui/source/inc/hlinettp.hxx2
-rw-r--r--cui/source/inc/hlmailtp.hxx4
-rw-r--r--cui/source/inc/hlmarkwn.hxx4
-rw-r--r--cui/source/inc/optdict.hxx2
-rw-r--r--cui/source/inc/scriptdlg.hxx6
-rw-r--r--cui/source/inc/treeopt.hxx8
-rw-r--r--cui/source/options/fontsubs.cxx4
-rw-r--r--cui/source/options/optdict.cxx2
-rw-r--r--cui/source/options/optjava.cxx2
-rw-r--r--cui/source/options/optjava.hxx2
-rw-r--r--cui/source/options/optlingu.cxx14
-rw-r--r--cui/source/options/treeopt.cxx50
-rw-r--r--cui/source/tabpages/autocdlg.cxx2
-rw-r--r--cui/source/tabpages/tpbitmap.cxx2
-rw-r--r--cui/source/tabpages/tpcolor.cxx2
-rw-r--r--cui/source/tabpages/tpgradnt.cxx2
-rw-r--r--cui/source/tabpages/tphatch.cxx2
-rw-r--r--cui/source/tabpages/tppattern.cxx2
26 files changed, 74 insertions, 74 deletions
diff --git a/cui/source/customize/SvxNotebookbarConfigPage.cxx b/cui/source/customize/SvxNotebookbarConfigPage.cxx
index c8b594b9039e..b3dd97f1d43d 100644
--- a/cui/source/customize/SvxNotebookbarConfigPage.cxx
+++ b/cui/source/customize/SvxNotebookbarConfigPage.cxx
@@ -49,8 +49,8 @@ namespace container = com::sun::star::container;
namespace beans = com::sun::star::beans;
namespace graphic = com::sun::star::graphic;
-static bool isCategoryAvailable(const OUString& sClassId, const OUString& sUIItemId,
- const OUString& sActiveCategory, bool& isCategory)
+static bool isCategoryAvailable(const OUString& sClassId, std::u16string_view sUIItemId,
+ std::u16string_view sActiveCategory, bool& isCategory)
{
if (sUIItemId == sActiveCategory)
return true;
@@ -474,7 +474,7 @@ SvxNotebookbarEntriesListBox::SvxNotebookbarEntriesListBox(std::unique_ptr<weld:
SvxNotebookbarEntriesListBox::~SvxNotebookbarEntriesListBox() {}
-static void EditRegistryFile(const OUString& sUIItemId, const OUString& sSetEntry,
+static void EditRegistryFile(std::u16string_view sUIItemId, const OUString& sSetEntry,
const OUString& sNotebookbarInterface)
{
int nFlag = 0;
diff --git a/cui/source/customize/cfgutil.cxx b/cui/source/customize/cfgutil.cxx
index f1c5ccef7221..778e2940ba1d 100644
--- a/cui/source/customize/cfgutil.cxx
+++ b/cui/source/customize/cfgutil.cxx
@@ -757,7 +757,7 @@ OUString CuiConfigGroupListBox::GetImage(
}
Reference< XInterface >
-CuiConfigGroupListBox::getDocumentModel( Reference< XComponentContext > const & xCtx, OUString const & docName )
+CuiConfigGroupListBox::getDocumentModel( Reference< XComponentContext > const & xCtx, std::u16string_view docName )
{
Reference< XInterface > xModel;
Reference< frame::XDesktop2 > desktop = frame::Desktop::create( xCtx );
diff --git a/cui/source/dialogs/hlinettp.cxx b/cui/source/dialogs/hlinettp.cxx
index f2deeb9b3c78..140d2a59da3b 100644
--- a/cui/source/dialogs/hlinettp.cxx
+++ b/cui/source/dialogs/hlinettp.cxx
@@ -279,7 +279,7 @@ void SvxHyperlinkInternetTp::SetScheme(const OUString& rScheme)
|*
|************************************************************************/
-void SvxHyperlinkInternetTp::RemoveImproperProtocol(const OUString& aProperScheme)
+void SvxHyperlinkInternetTp::RemoveImproperProtocol(std::u16string_view aProperScheme)
{
OUString aStrURL ( m_xCbbTarget->get_active_text() );
if ( !aStrURL.isEmpty() )
diff --git a/cui/source/dialogs/hlmailtp.cxx b/cui/source/dialogs/hlmailtp.cxx
index 1cae4b29d2fa..521af033b422 100644
--- a/cui/source/dialogs/hlmailtp.cxx
+++ b/cui/source/dialogs/hlmailtp.cxx
@@ -167,7 +167,7 @@ void SvxHyperlinkMailTp::SetInitFocus()
/*************************************************************************
|************************************************************************/
-void SvxHyperlinkMailTp::SetScheme(const OUString& rScheme)
+void SvxHyperlinkMailTp::SetScheme(std::u16string_view rScheme)
{
//update target:
RemoveImproperProtocol(rScheme);
@@ -183,7 +183,7 @@ void SvxHyperlinkMailTp::SetScheme(const OUString& rScheme)
|* Remove protocol if it does not fit to the current button selection
|*
|************************************************************************/
-void SvxHyperlinkMailTp::RemoveImproperProtocol(const OUString& aProperScheme)
+void SvxHyperlinkMailTp::RemoveImproperProtocol(std::u16string_view aProperScheme)
{
OUString aStrURL(m_xCbbReceiver->get_active_text());
if ( !aStrURL.isEmpty() )
diff --git a/cui/source/dialogs/hlmarkwn.cxx b/cui/source/dialogs/hlmarkwn.cxx
index ab28675b4932..8996c0e6790c 100644
--- a/cui/source/dialogs/hlmarkwn.cxx
+++ b/cui/source/dialogs/hlmarkwn.cxx
@@ -382,7 +382,7 @@ void SvxHlinkDlgMarkWnd::ClearTree()
}
// Find Entry for String
-std::unique_ptr<weld::TreeIter> SvxHlinkDlgMarkWnd::FindEntry (const OUString& aStrName)
+std::unique_ptr<weld::TreeIter> SvxHlinkDlgMarkWnd::FindEntry (std::u16string_view aStrName)
{
bool bFound=false;
std::unique_ptr<weld::TreeIter> xEntry = mxLbTree->make_iterator();
@@ -404,7 +404,7 @@ std::unique_ptr<weld::TreeIter> SvxHlinkDlgMarkWnd::FindEntry (const OUString& a
}
// Select Entry
-bool SvxHlinkDlgMarkWnd::SelectEntry(const OUString& aStrMark)
+bool SvxHlinkDlgMarkWnd::SelectEntry(std::u16string_view aStrMark)
{
std::unique_ptr<weld::TreeIter> xEntry = FindEntry(aStrMark);
if (!xEntry)
diff --git a/cui/source/dialogs/scriptdlg.cxx b/cui/source/dialogs/scriptdlg.cxx
index 78bb8be5d8f8..cb7d8776dcbd 100644
--- a/cui/source/dialogs/scriptdlg.cxx
+++ b/cui/source/dialogs/scriptdlg.cxx
@@ -113,7 +113,7 @@ void SvxScriptOrgDialog::deleteAllTree()
while (bNextEntry);
}
-void SvxScriptOrgDialog::Init( const OUString& language )
+void SvxScriptOrgDialog::Init( std::u16string_view language )
{
m_xScriptsBox->freeze();
@@ -202,7 +202,7 @@ void SvxScriptOrgDialog::Init( const OUString& language )
}
Reference< XInterface >
-SvxScriptOrgDialog::getDocumentModel( Reference< XComponentContext > const & xCtx, OUString const & docName )
+SvxScriptOrgDialog::getDocumentModel( Reference< XComponentContext > const & xCtx, std::u16string_view docName )
{
Reference< XInterface > xModel;
Reference< frame::XDesktop2 > desktop = frame::Desktop::create(xCtx);
@@ -229,7 +229,7 @@ SvxScriptOrgDialog::getDocumentModel( Reference< XComponentContext > const & xCt
}
Reference< browse::XBrowseNode >
-SvxScriptOrgDialog::getLangNodeFromRootNode( Reference< browse::XBrowseNode > const & rootNode, OUString const & language )
+SvxScriptOrgDialog::getLangNodeFromRootNode( Reference< browse::XBrowseNode > const & rootNode, std::u16string_view language )
{
Reference< browse::XBrowseNode > langNode;
diff --git a/cui/source/inc/cfgutil.hxx b/cui/source/inc/cfgutil.hxx
index c4d50e2aeb12..8187d5e14314 100644
--- a/cui/source/inc/cfgutil.hxx
+++ b/cui/source/inc/cfgutil.hxx
@@ -196,7 +196,7 @@ class CuiConfigGroupListBox
static css::uno::Reference< css::uno::XInterface > getDocumentModel(
css::uno::Reference< css::uno::XComponentContext > const & xCtx,
- OUString const & docName);
+ std::u16string_view docName);
void InitModule();
void FillScriptList(const css::uno::Reference< css::script::browse::XBrowseNode >& xRootNode,
diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx
index a1927624f20d..aa660c6d791d 100644
--- a/cui/source/inc/cuitabarea.hxx
+++ b/cui/source/inc/cuitabarea.hxx
@@ -392,7 +392,7 @@ private:
void ModifiedHdl_Impl(void const *);
void SetControlState_Impl( css::awt::GradientStyle eXGS );
- sal_Int32 SearchGradientList(const OUString& rGradientName);
+ sal_Int32 SearchGradientList(std::u16string_view rGradientName);
public:
SvxGradientTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs);
@@ -460,7 +460,7 @@ private:
DECL_LINK( ClickRenameHdl_Impl, SvxPresetListBox*, void );
DECL_LINK( ClickDeleteHdl_Impl, SvxPresetListBox*, void );
- sal_Int32 SearchHatchList(const OUString& rHatchName);
+ sal_Int32 SearchHatchList(std::u16string_view rHatchName);
public:
SvxHatchTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs);
@@ -538,7 +538,7 @@ private:
DECL_LINK( ClickImportHdl, weld::Button&, void );
void ClickBitmapHdl_Impl();
void CalculateBitmapPresetSize();
- sal_Int32 SearchBitmapList(const OUString& rBitmapName);
+ sal_Int32 SearchBitmapList(std::u16string_view rBitmapName);
sal_Int32 SearchBitmapList(const GraphicObject& rGraphicObject);
public:
@@ -593,7 +593,7 @@ private:
DECL_LINK( ClickRenameHdl_Impl, SvxPresetListBox*, void );
DECL_LINK( ClickDeleteHdl_Impl, SvxPresetListBox*, void );
- sal_Int32 SearchPatternList(const OUString& rPatternName);
+ sal_Int32 SearchPatternList(std::u16string_view rPatternName);
public:
SvxPatternTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs);
@@ -706,7 +706,7 @@ private:
void UpdateModified();
- static sal_Int32 FindInCustomColors( OUString const & aColorName );
+ static sal_Int32 FindInCustomColors( std::u16string_view aColorName );
sal_Int32 FindInPalette( const Color& rColor );
public:
diff --git a/cui/source/inc/hlinettp.hxx b/cui/source/inc/hlinettp.hxx
index 528a54594fcb..c317fc122fd4 100644
--- a/cui/source/inc/hlinettp.hxx
+++ b/cui/source/inc/hlinettp.hxx
@@ -55,7 +55,7 @@ private:
void SetScheme(const OUString& rScheme);
- void RemoveImproperProtocol(const OUString& rProperScheme);
+ void RemoveImproperProtocol(std::u16string_view rProperScheme);
OUString GetSchemeFromButtons() const;
INetProtocol GetSmartProtocolFromButtons() const;
diff --git a/cui/source/inc/hlmailtp.hxx b/cui/source/inc/hlmailtp.hxx
index 12600f32e890..8b8bc39d88cb 100644
--- a/cui/source/inc/hlmailtp.hxx
+++ b/cui/source/inc/hlmailtp.hxx
@@ -38,8 +38,8 @@ private:
///< Button : Address book
DECL_LINK (ModifiedReceiverHdl_Impl, weld::ComboBox&, void ); ///< Combobox "receiver" modified
- void SetScheme(const OUString& rScheme);
- void RemoveImproperProtocol(const OUString& aProperScheme);
+ void SetScheme(std::u16string_view rScheme);
+ void RemoveImproperProtocol(std::u16string_view aProperScheme);
OUString CreateAbsoluteURL() const;
diff --git a/cui/source/inc/hlmarkwn.hxx b/cui/source/inc/hlmarkwn.hxx
index ee7924e3aa03..9552bc10097c 100644
--- a/cui/source/inc/hlmarkwn.hxx
+++ b/cui/source/inc/hlmarkwn.hxx
@@ -47,7 +47,7 @@ protected:
bool RefreshFromDoc( const OUString& aURL );
void RestoreLastSelection();
- std::unique_ptr<weld::TreeIter> FindEntry(const OUString& aStrName);
+ std::unique_ptr<weld::TreeIter> FindEntry(std::u16string_view aStrName);
void ClearTree();
int FillTree( const css::uno::Reference< css::container::XNameAccess >& xLinks, const weld::TreeIter* pParentEntry =nullptr );
@@ -61,7 +61,7 @@ public:
void MoveTo(const Point& rNewPos);
void RefreshTree(const OUString& aStrURL);
- bool SelectEntry(const OUString& aStrMark);
+ bool SelectEntry(std::u16string_view aStrMark);
sal_uInt16 SetError( sal_uInt16 nError);
};
diff --git a/cui/source/inc/optdict.hxx b/cui/source/inc/optdict.hxx
index 2465613322af..1449e9457ad9 100644
--- a/cui/source/inc/optdict.hxx
+++ b/cui/source/inc/optdict.hxx
@@ -102,7 +102,7 @@ private:
int GetLBInsertPos(const OUString &rDicWord);
public:
- SvxEditDictionaryDialog(weld::Window* pParent, const OUString& rName);
+ SvxEditDictionaryDialog(weld::Window* pParent, std::u16string_view rName);
virtual ~SvxEditDictionaryDialog() override;
};
diff --git a/cui/source/inc/scriptdlg.hxx b/cui/source/inc/scriptdlg.hxx
index 65e76e534ffd..6a1cbd15ae5c 100644
--- a/cui/source/inc/scriptdlg.hxx
+++ b/cui/source/inc/scriptdlg.hxx
@@ -115,7 +115,7 @@ protected:
void StoreCurrentSelection();
void RestorePreviousSelection();
- void Init(const OUString& language);
+ void Init(std::u16string_view language);
void delUserData(const weld::TreeIter& rIter);
void deleteTree(weld::TreeIter& rIter);
void deleteAllTree();
@@ -135,9 +135,9 @@ protected:
css::uno::Reference< css::frame::XModel>& model);
static css::uno::Reference< css::script::browse::XBrowseNode >
- getLangNodeFromRootNode( css::uno::Reference< css::script::browse::XBrowseNode > const & root, OUString const & language );
+ getLangNodeFromRootNode( css::uno::Reference< css::script::browse::XBrowseNode > const & root, std::u16string_view language );
- static css::uno::Reference< css::uno::XInterface > getDocumentModel( css::uno::Reference< css::uno::XComponentContext > const & xCtx, OUString const & docName );
+ static css::uno::Reference< css::uno::XInterface > getDocumentModel( css::uno::Reference< css::uno::XComponentContext > const & xCtx, std::u16string_view docName );
public:
// prob need another arg in the ctor
diff --git a/cui/source/inc/treeopt.hxx b/cui/source/inc/treeopt.hxx
index a07232848b6c..59f7ef2d3e03 100644
--- a/cui/source/inc/treeopt.hxx
+++ b/cui/source/inc/treeopt.hxx
@@ -150,11 +150,11 @@ private:
void Initialize( const css::uno::Reference< css::frame::XFrame >& _xFrame );
void InitWidgets();
- void LoadExtensionOptions( const OUString& rExtensionId );
+ void LoadExtensionOptions( std::u16string_view rExtensionId );
static OUString GetModuleIdentifier( const css::uno::Reference<
css::frame::XFrame >& xFrame );
- static std::unique_ptr<Module> LoadModule( const OUString& rModuleIdentifier );
- static VectorOfNodes LoadNodes( Module* pModule, const OUString& rExtensionId );
+ static std::unique_ptr<Module> LoadModule( std::u16string_view rModuleIdentifier );
+ static VectorOfNodes LoadNodes( Module* pModule, std::u16string_view rExtensionId );
void InsertNodes( const VectorOfNodes& rNodeList );
void ApplyOptions();
@@ -177,7 +177,7 @@ public:
OfaTreeOptionsDialog(weld::Window* pParent,
const css::uno::Reference< css::frame::XFrame >& _xFrame,
bool bActivateLastSelection);
- OfaTreeOptionsDialog(weld::Window* pParent, const OUString& rExtensionId);
+ OfaTreeOptionsDialog(weld::Window* pParent, std::u16string_view rExtensionId);
virtual ~OfaTreeOptionsDialog() override;
OptionsPageInfo* AddTabPage( sal_uInt16 nId, const OUString& rPageName, sal_uInt16 nGroup );
diff --git a/cui/source/options/fontsubs.cxx b/cui/source/options/fontsubs.cxx
index b067aaf05f80..997f57798860 100644
--- a/cui/source/options/fontsubs.cxx
+++ b/cui/source/options/fontsubs.cxx
@@ -267,7 +267,7 @@ IMPL_LINK(SvxFontSubstTabPage, SelectComboBoxHdl, weld::ComboBox&, rBox, void)
namespace
{
// search in the "font" column
- int findText(const weld::TreeView& rTreeView, const OUString& rCol)
+ int findText(const weld::TreeView& rTreeView, std::u16string_view rCol)
{
for (int i = 0, nEntryCount = rTreeView.n_children(); i < nEntryCount; ++i)
{
@@ -277,7 +277,7 @@ namespace
return -1;
}
- bool findRow(const weld::TreeView& rTreeView, const OUString& rCol1, const OUString& rCol2)
+ bool findRow(const weld::TreeView& rTreeView, std::u16string_view rCol1, std::u16string_view rCol2)
{
int nRow = findText(rTreeView, rCol1);
if (nRow == -1)
diff --git a/cui/source/options/optdict.cxx b/cui/source/options/optdict.cxx
index 5832e8321c53..55bfd4b72224 100644
--- a/cui/source/options/optdict.cxx
+++ b/cui/source/options/optdict.cxx
@@ -198,7 +198,7 @@ IMPL_LINK_NOARG(SvxNewDictionaryDialog, ModifyHdl_Impl, weld::Entry&, void)
// class SvxEditDictionaryDialog -------------------------------------------
-SvxEditDictionaryDialog::SvxEditDictionaryDialog(weld::Window* pParent, const OUString& rName)
+SvxEditDictionaryDialog::SvxEditDictionaryDialog(weld::Window* pParent, std::u16string_view rName)
: GenericDialogController(pParent, "cui/ui/editdictionarydialog.ui", "EditDictionaryDialog")
, sModify(CuiResId(STR_MODIFY))
, bFirstSelect(false)
diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx
index ed695295b583..e6af34320fe7 100644
--- a/cui/source/options/optjava.cxx
+++ b/cui/source/options/optjava.cxx
@@ -893,7 +893,7 @@ IMPL_LINK_NOARG(SvxJavaClassPathDlg, SelectHdl_Impl, weld::TreeView&, void)
EnableRemoveButton();
}
-bool SvxJavaClassPathDlg::IsPathDuplicate( const OUString& _rPath )
+bool SvxJavaClassPathDlg::IsPathDuplicate( std::u16string_view _rPath )
{
bool bRet = false;
int nCount = m_xPathList->n_children();
diff --git a/cui/source/options/optjava.hxx b/cui/source/options/optjava.hxx
index d850986a45b0..a3af9aaf71b1 100644
--- a/cui/source/options/optjava.hxx
+++ b/cui/source/options/optjava.hxx
@@ -185,7 +185,7 @@ private:
DECL_LINK(RemoveHdl_Impl, weld::Button&, void);
DECL_LINK(SelectHdl_Impl, weld::TreeView&, void);
- bool IsPathDuplicate(const OUString& _rPath);
+ bool IsPathDuplicate(std::u16string_view _rPath);
void EnableRemoveButton()
{
m_xRemoveBtn->set_sensitive(m_xPathList->get_selected_index() != -1);
diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx
index 09cdb0d9e1b5..1b646fc51043 100644
--- a/cui/source/options/optlingu.cxx
+++ b/cui/source/options/optlingu.cxx
@@ -75,7 +75,7 @@ const char cThes[] = SN_THESAURUS;
// static ----------------------------------------------------------------
static sal_Int32 lcl_SeqGetEntryPos(
- const Sequence< OUString > &rSeq, const OUString &rEntry )
+ const Sequence< OUString > &rSeq, std::u16string_view rEntry )
{
sal_Int32 i;
sal_Int32 nLen = rSeq.getLength();
@@ -357,7 +357,7 @@ public:
uno::Reference<XLinguServiceManager2> & GetManager() { return xLinguSrvcMgr; }
void SetChecked( const Sequence< OUString > &rConfiguredServices );
- void Reconfigure( const OUString &rDisplayName, bool bEnable );
+ void Reconfigure( std::u16string_view rDisplayName, bool bEnable );
const Sequence<Locale> & GetAllSupportedLocales() const { return aAllServiceLocales; }
@@ -380,11 +380,11 @@ public:
// language.
Sequence< OUString > GetSortedImplNames( LanguageType nLang, sal_uInt8 nType );
- ServiceInfo_Impl * GetInfoByImplName( const OUString &rSvcImplName );
+ ServiceInfo_Impl * GetInfoByImplName( std::u16string_view rSvcImplName );
};
-static sal_Int32 lcl_SeqGetIndex( const Sequence< OUString > &rSeq, const OUString &rTxt )
+static sal_Int32 lcl_SeqGetIndex( const Sequence< OUString > &rSeq, std::u16string_view rTxt )
{
sal_Int32 nRes = -1;
sal_Int32 nLen = rSeq.getLength();
@@ -449,7 +449,7 @@ Sequence< OUString > SvxLinguData_Impl::GetSortedImplNames( LanguageType nLang,
}
-ServiceInfo_Impl * SvxLinguData_Impl::GetInfoByImplName( const OUString &rSvcImplName )
+ServiceInfo_Impl * SvxLinguData_Impl::GetInfoByImplName( std::u16string_view rSvcImplName )
{
for (sal_uInt32 i = 0; i < nDisplayServices; ++i)
{
@@ -730,9 +730,9 @@ bool SvxLinguData_Impl::AddRemove(
}
-void SvxLinguData_Impl::Reconfigure( const OUString &rDisplayName, bool bEnable )
+void SvxLinguData_Impl::Reconfigure( std::u16string_view rDisplayName, bool bEnable )
{
- DBG_ASSERT( !rDisplayName.isEmpty(), "empty DisplayName" );
+ DBG_ASSERT( !rDisplayName.empty(), "empty DisplayName" );
ServiceInfo_Impl *pInfo = nullptr;
for (sal_uInt32 i = 0; i < nDisplayServices; ++i)
diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx
index 6e822e974c5e..6f63828c173f 100644
--- a/cui/source/options/treeopt.cxx
+++ b/cui/source/options/treeopt.cxx
@@ -159,7 +159,7 @@ static ModuleToGroupNameMap_Impl ModuleMap[] =
{ u"Base", OUString(), SID_SB_STARBASEOPTIONS },
};
-static void setGroupName( const OUString& rModule, const OUString& rGroupName )
+static void setGroupName( std::u16string_view rModule, const OUString& rGroupName )
{
for (ModuleToGroupNameMap_Impl& rEntry : ModuleMap)
{
@@ -209,7 +209,7 @@ static void deleteGroupNames()
rEntry.m_sGroupName.clear();
}
-static sal_uInt16 getGroupNodeId( const OUString& rModule )
+static sal_uInt16 getGroupNodeId( std::u16string_view rModule )
{
sal_uInt16 nNodeId = 0xFFFF;
for (const ModuleToGroupNameMap_Impl& rEntry : ModuleMap)
@@ -496,7 +496,7 @@ OfaTreeOptionsDialog::OfaTreeOptionsDialog(weld::Window* pParent, const Referenc
InitTreeAndHandler();
Initialize( _xFrame );
- LoadExtensionOptions( OUString() );
+ LoadExtensionOptions( u"" );
if (bActivateLastSelection)
ActivateLastSelection();
@@ -504,13 +504,13 @@ OfaTreeOptionsDialog::OfaTreeOptionsDialog(weld::Window* pParent, const Referenc
}
// Ctor() with ExtensionId -----------------------------------------------
-OfaTreeOptionsDialog::OfaTreeOptionsDialog(weld::Window* pParent, const OUString& rExtensionId)
+OfaTreeOptionsDialog::OfaTreeOptionsDialog(weld::Window* pParent, std::u16string_view rExtensionId)
: SfxOkDialogController(pParent, "cui/ui/optionsdialog.ui", "OptionsDialog")
INI_LIST()
{
InitWidgets();
- bIsFromExtensionManager = ( !rExtensionId.isEmpty() );
+ bIsFromExtensionManager = ( !rExtensionId.empty() );
InitTreeAndHandler();
LoadExtensionOptions( rExtensionId );
ActivateLastSelection();
@@ -1359,7 +1359,7 @@ void OfaTreeOptionsDialog::Initialize( const Reference< XFrame >& _xFrame )
// %PRODUCTNAME options
if ( !lcl_isOptionHidden( SID_GENERAL_OPTIONS, aOptionsDlgOpt ) )
{
- setGroupName("ProductName", CuiResId(SID_GENERAL_OPTIONS_RES[0].first));
+ setGroupName(u"ProductName", CuiResId(SID_GENERAL_OPTIONS_RES[0].first));
nGroup = AddGroup(CuiResId(SID_GENERAL_OPTIONS_RES[0].first), nullptr, nullptr, SID_GENERAL_OPTIONS );
const sal_uInt16 nEnd = static_cast<sal_uInt16>(SAL_N_ELEMENTS(SID_GENERAL_OPTIONS_RES));
@@ -1399,7 +1399,7 @@ void OfaTreeOptionsDialog::Initialize( const Reference< XFrame >& _xFrame )
// Load and Save options
if ( !lcl_isOptionHidden( SID_FILTER_DLG, aOptionsDlgOpt ) )
{
- setGroupName( "LoadSave", CuiResId(SID_FILTER_DLG_RES[0].first) );
+ setGroupName( u"LoadSave", CuiResId(SID_FILTER_DLG_RES[0].first) );
nGroup = AddGroup( CuiResId(SID_FILTER_DLG_RES[0].first), nullptr, nullptr, SID_FILTER_DLG );
for ( size_t i = 1; i < SAL_N_ELEMENTS(SID_FILTER_DLG_RES); ++i )
{
@@ -1413,7 +1413,7 @@ void OfaTreeOptionsDialog::Initialize( const Reference< XFrame >& _xFrame )
SvtLanguageOptions aLanguageOptions;
if ( !lcl_isOptionHidden( SID_LANGUAGE_OPTIONS, aOptionsDlgOpt ) )
{
- setGroupName("LanguageSettings", CuiResId(SID_LANGUAGE_OPTIONS_RES[0].first));
+ setGroupName(u"LanguageSettings", CuiResId(SID_LANGUAGE_OPTIONS_RES[0].first));
nGroup = AddGroup(CuiResId(SID_LANGUAGE_OPTIONS_RES[0].first), nullptr, nullptr, SID_LANGUAGE_OPTIONS );
for (size_t i = 1; i < SAL_N_ELEMENTS(SID_LANGUAGE_OPTIONS_RES); ++i)
{
@@ -1443,9 +1443,9 @@ void OfaTreeOptionsDialog::Initialize( const Reference< XFrame >& _xFrame )
if ( !lcl_isOptionHidden( SID_SW_EDITOPTIONS, aOptionsDlgOpt ) )
{
if ( aFactory == "com.sun.star.text.WebDocument" )
- setGroupName( "WriterWeb", CuiResId(SID_SW_EDITOPTIONS_RES[0].first) );
+ setGroupName( u"WriterWeb", CuiResId(SID_SW_EDITOPTIONS_RES[0].first) );
else
- setGroupName( "Writer", CuiResId(SID_SW_EDITOPTIONS_RES[0].first) );
+ setGroupName( u"Writer", CuiResId(SID_SW_EDITOPTIONS_RES[0].first) );
nGroup = AddGroup(CuiResId(SID_SW_EDITOPTIONS_RES[0].first), pSwMod, pSwMod, SID_SW_EDITOPTIONS );
for ( size_t i = 1; i < SAL_N_ELEMENTS(SID_SW_EDITOPTIONS_RES); ++i )
{
@@ -1487,7 +1487,7 @@ void OfaTreeOptionsDialog::Initialize( const Reference< XFrame >& _xFrame )
if ( !lcl_isOptionHidden( SID_SC_EDITOPTIONS, aOptionsDlgOpt ) )
{
SfxModule* pScMod = SfxApplication::GetModule( SfxToolsModule::Calc );
- setGroupName( "Calc", CuiResId(SID_SC_EDITOPTIONS_RES[0].first) );
+ setGroupName( u"Calc", CuiResId(SID_SC_EDITOPTIONS_RES[0].first) );
nGroup = AddGroup( CuiResId(SID_SC_EDITOPTIONS_RES[0].first), pScMod, pScMod, SID_SC_EDITOPTIONS );
const sal_uInt16 nCount = static_cast<sal_uInt16>(SAL_N_ELEMENTS(SID_SC_EDITOPTIONS_RES));
for ( sal_uInt16 i = 1; i < nCount; ++i )
@@ -1510,7 +1510,7 @@ void OfaTreeOptionsDialog::Initialize( const Reference< XFrame >& _xFrame )
{
if ( !lcl_isOptionHidden( SID_SD_EDITOPTIONS, aOptionsDlgOpt ) )
{
- setGroupName( "Impress", CuiResId(SID_SD_EDITOPTIONS_RES[0].first) );
+ setGroupName( u"Impress", CuiResId(SID_SD_EDITOPTIONS_RES[0].first) );
nGroup = AddGroup( CuiResId(SID_SD_EDITOPTIONS_RES[0].first), pSdMod, pSdMod, SID_SD_EDITOPTIONS );
const sal_uInt16 nCount = static_cast<sal_uInt16>(SAL_N_ELEMENTS(SID_SD_EDITOPTIONS_RES));
for ( sal_uInt16 i = 1; i < nCount; ++i )
@@ -1532,7 +1532,7 @@ void OfaTreeOptionsDialog::Initialize( const Reference< XFrame >& _xFrame )
{
if ( !lcl_isOptionHidden( SID_SD_GRAPHIC_OPTIONS, aOptionsDlgOpt ) )
{
- setGroupName( "Draw", CuiResId(SID_SD_GRAPHIC_OPTIONS_RES[0].first) );
+ setGroupName( u"Draw", CuiResId(SID_SD_GRAPHIC_OPTIONS_RES[0].first) );
nGroup = AddGroup( CuiResId(SID_SD_GRAPHIC_OPTIONS_RES[0].first), pSdMod, pSdMod, SID_SD_GRAPHIC_OPTIONS );
const sal_uInt16 nCount = static_cast<sal_uInt16>(SAL_N_ELEMENTS(SID_SD_GRAPHIC_OPTIONS_RES));
for ( sal_uInt16 i = 1; i < nCount; ++i )
@@ -1555,7 +1555,7 @@ void OfaTreeOptionsDialog::Initialize( const Reference< XFrame >& _xFrame )
if ( !lcl_isOptionHidden( SID_SM_EDITOPTIONS, aOptionsDlgOpt ) )
{
SfxModule* pSmMod = SfxApplication::GetModule(SfxToolsModule::Math);
- setGroupName( "Math", CuiResId(SID_SM_EDITOPTIONS_RES[0].first) );
+ setGroupName( u"Math", CuiResId(SID_SM_EDITOPTIONS_RES[0].first) );
nGroup = AddGroup(CuiResId(SID_SM_EDITOPTIONS_RES[0].first), pSmMod, pSmMod, SID_SM_EDITOPTIONS );
for ( size_t i = 1; i < SAL_N_ELEMENTS(SID_SM_EDITOPTIONS_RES); ++i )
{
@@ -1574,7 +1574,7 @@ void OfaTreeOptionsDialog::Initialize( const Reference< XFrame >& _xFrame )
|| aModuleOpt.IsModuleInstalled( SvtModuleOptions::EModule::CALC )
) )
{
- setGroupName( "Base", CuiResId(SID_SB_STARBASEOPTIONS_RES[0].first) );
+ setGroupName( u"Base", CuiResId(SID_SB_STARBASEOPTIONS_RES[0].first) );
nGroup = AddGroup( CuiResId(SID_SB_STARBASEOPTIONS_RES[0].first), nullptr, nullptr, SID_SB_STARBASEOPTIONS );
for ( size_t i = 1; i < SAL_N_ELEMENTS(SID_SB_STARBASEOPTIONS_RES); ++i )
{
@@ -1587,7 +1587,7 @@ void OfaTreeOptionsDialog::Initialize( const Reference< XFrame >& _xFrame )
// Chart options (always installed and active)
if ( !lcl_isOptionHidden( SID_SCH_EDITOPTIONS, aOptionsDlgOpt ) )
{
- setGroupName( "Charts", CuiResId(SID_SCH_EDITOPTIONS_RES[0].first) );
+ setGroupName( u"Charts", CuiResId(SID_SCH_EDITOPTIONS_RES[0].first) );
nGroup = AddGroup( CuiResId(SID_SCH_EDITOPTIONS_RES[0].first), nullptr, nullptr, SID_SCH_EDITOPTIONS );
for ( size_t i = 1; i < SAL_N_ELEMENTS(SID_SCH_EDITOPTIONS_RES); ++i )
{
@@ -1601,7 +1601,7 @@ void OfaTreeOptionsDialog::Initialize( const Reference< XFrame >& _xFrame )
if ( lcl_isOptionHidden( SID_INET_DLG, aOptionsDlgOpt ) )
return;
- setGroupName("Internet", CuiResId(SID_INET_DLG_RES[0].first));
+ setGroupName(u"Internet", CuiResId(SID_INET_DLG_RES[0].first));
nGroup = AddGroup(CuiResId(SID_INET_DLG_RES[0].first), nullptr, nullptr, SID_INET_DLG );
for ( size_t i = 1; i < SAL_N_ELEMENTS(SID_INET_DLG_RES); ++i )
@@ -1645,12 +1645,12 @@ static bool isNodeActive( OptionsNode const * pNode, Module* pModule )
return false;
}
-void OfaTreeOptionsDialog::LoadExtensionOptions( const OUString& rExtensionId )
+void OfaTreeOptionsDialog::LoadExtensionOptions( std::u16string_view rExtensionId )
{
std::unique_ptr<Module> pModule;
// when called by Tools - Options then load nodes of active module
- if ( rExtensionId.isEmpty() )
+ if ( rExtensionId.empty() )
{
pModule = LoadModule( GetModuleIdentifier( Reference< XFrame >() ) );
}
@@ -1691,7 +1691,7 @@ OUString OfaTreeOptionsDialog::GetModuleIdentifier( const Reference< XFrame >& r
}
std::unique_ptr<Module> OfaTreeOptionsDialog::LoadModule(
- const OUString& rModuleIdentifier )
+ std::u16string_view rModuleIdentifier )
{
std::unique_ptr<Module> pModule;
Reference< XNameAccess > xSet(
@@ -1754,7 +1754,7 @@ std::unique_ptr<Module> OfaTreeOptionsDialog::LoadModule(
}
VectorOfNodes OfaTreeOptionsDialog::LoadNodes(
- Module* pModule, const OUString& rExtensionId)
+ Module* pModule, std::u16string_view rExtensionId)
{
VectorOfNodes aOutNodeList;
@@ -1780,12 +1780,12 @@ VectorOfNodes OfaTreeOptionsDialog::LoadNodes(
if ( sLabel.isEmpty() )
sLabel = sGroupName;
- OUString sTemp = getGroupName( sLabel, !rExtensionId.isEmpty() );
+ OUString sTemp = getGroupName( sLabel, !rExtensionId.empty() );
if ( !sTemp.isEmpty() )
sLabel = sTemp;
std::unique_ptr<OptionsNode> pNode(new OptionsNode(sNodeId, sLabel, bAllModules));
- if ( rExtensionId.isEmpty() && !isNodeActive( pNode.get(), pModule ) )
+ if ( rExtensionId.empty() && !isNodeActive( pNode.get(), pModule ) )
{
continue;
}
@@ -1812,7 +1812,7 @@ VectorOfNodes OfaTreeOptionsDialog::LoadNodes(
xLeaveAccess->getByName( "GroupId" ) >>= sLeafGrpId;
xLeaveAccess->getByName( "GroupIndex" ) >>= nLeafGrpIdx;
- if ( rExtensionId.isEmpty() || sId == rExtensionId )
+ if ( rExtensionId.empty() || sId == rExtensionId )
{
std::unique_ptr<OptionsLeaf> pLeaf(new OptionsLeaf(
sLeafLabel, sLeafURL, sEventHdl, sLeafGrpId, nLeafGrpIdx ));
@@ -1883,7 +1883,7 @@ VectorOfNodes OfaTreeOptionsDialog::LoadNodes(
return aOutNodeList;
}
-static sal_uInt16 lcl_getGroupId( const OUString& rGroupName, const weld::TreeView& rTreeLB )
+static sal_uInt16 lcl_getGroupId( std::u16string_view rGroupName, const weld::TreeView& rTreeLB )
{
sal_uInt16 nRet = 0;
diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx
index 2328277eb4d8..9b5ff2e30418 100644
--- a/cui/source/tabpages/autocdlg.cxx
+++ b/cui/source/tabpages/autocdlg.cxx
@@ -1175,7 +1175,7 @@ IMPL_LINK(OfaAutocorrReplacePage, ModifyHdl, weld::Entry&, rEdt, void)
m_xNewReplacePB->set_sensitive(bEnableNew);
}
-static bool lcl_FindInArray(std::vector<OUString>& rStrings, const OUString& rString)
+static bool lcl_FindInArray(std::vector<OUString>& rStrings, std::u16string_view rString)
{
for (auto const& elem : rStrings)
{
diff --git a/cui/source/tabpages/tpbitmap.cxx b/cui/source/tabpages/tpbitmap.cxx
index ebb4426f6ce2..647bcaa105e3 100644
--- a/cui/source/tabpages/tpbitmap.cxx
+++ b/cui/source/tabpages/tpbitmap.cxx
@@ -802,7 +802,7 @@ sal_Int32 SvxBitmapTabPage::SearchBitmapList(const GraphicObject& rGraphicObject
return nPos;
}
-sal_Int32 SvxBitmapTabPage::SearchBitmapList(const OUString& rBitmapName)
+sal_Int32 SvxBitmapTabPage::SearchBitmapList(std::u16string_view rBitmapName)
{
tools::Long nCount = m_pBitmapList->Count();
bool bValidBitmapName = true;
diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx
index c9a6060f8169..6eac86883c99 100644
--- a/cui/source/tabpages/tpcolor.cxx
+++ b/cui/source/tabpages/tpcolor.cxx
@@ -620,7 +620,7 @@ void SvxColorTabPage::UpdateColorValues( bool bUpdatePreset )
}
}
-sal_Int32 SvxColorTabPage::FindInCustomColors(OUString const & aColorName)
+sal_Int32 SvxColorTabPage::FindInCustomColors(std::u16string_view aColorName)
{
css::uno::Sequence< OUString > aCustomColorNameList(officecfg::Office::Common::UserColors::CustomColorName::get());
tools::Long nCount = aCustomColorNameList.getLength();
diff --git a/cui/source/tabpages/tpgradnt.cxx b/cui/source/tabpages/tpgradnt.cxx
index 76b58d775cc0..573659a471aa 100644
--- a/cui/source/tabpages/tpgradnt.cxx
+++ b/cui/source/tabpages/tpgradnt.cxx
@@ -609,7 +609,7 @@ void SvxGradientTabPage::SetControlState_Impl( css::awt::GradientStyle eXGS )
}
}
-sal_Int32 SvxGradientTabPage::SearchGradientList(const OUString& rGradientName)
+sal_Int32 SvxGradientTabPage::SearchGradientList(std::u16string_view rGradientName)
{
tools::Long nCount = m_pGradientList->Count();
bool bValidGradientName = true;
diff --git a/cui/source/tabpages/tphatch.cxx b/cui/source/tabpages/tphatch.cxx
index f2ff5360e73b..ec391dba935d 100644
--- a/cui/source/tabpages/tphatch.cxx
+++ b/cui/source/tabpages/tphatch.cxx
@@ -199,7 +199,7 @@ DeactivateRC SvxHatchTabPage::DeactivatePage( SfxItemSet* _pSet )
return DeactivateRC::LeavePage;
}
-sal_Int32 SvxHatchTabPage::SearchHatchList(const OUString& rHatchName)
+sal_Int32 SvxHatchTabPage::SearchHatchList(std::u16string_view rHatchName)
{
tools::Long nCount = m_pHatchingList->Count();
bool bValidHatchName = true;
diff --git a/cui/source/tabpages/tppattern.cxx b/cui/source/tabpages/tppattern.cxx
index 227100915483..9dfa12799c93 100644
--- a/cui/source/tabpages/tppattern.cxx
+++ b/cui/source/tabpages/tppattern.cxx
@@ -534,7 +534,7 @@ void SvxPatternTabPage::PointChanged(weld::DrawingArea* pDrawingArea, RectPoint)
m_xPatternLB->SetNoSelection();
}
-sal_Int32 SvxPatternTabPage::SearchPatternList(const OUString& rPatternName)
+sal_Int32 SvxPatternTabPage::SearchPatternList(std::u16string_view rPatternName)
{
tools::Long nCount = m_pPatternList->Count();
bool bValidPatternName = true;