diff options
author | Noel <noelgrandin@gmail.com> | 2020-11-18 10:10:40 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-11-24 09:45:04 +0100 |
commit | bb06f51308428500c9c8d11ae05f0aa03ecc179c (patch) | |
tree | b18620e8572ed6d4c43c8605660d59f5f7a7e531 /basctl/source/basicide | |
parent | 42e8e16cf93dcf944e5c1106f76aaa32057c0397 (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 'basctl/source/basicide')
-rw-r--r-- | basctl/source/basicide/basides1.cxx | 4 | ||||
-rw-r--r-- | basctl/source/basicide/basidesh.cxx | 2 | ||||
-rw-r--r-- | basctl/source/basicide/bastype2.cxx | 4 | ||||
-rw-r--r-- | basctl/source/basicide/bastypes.cxx | 4 | ||||
-rw-r--r-- | basctl/source/basicide/scriptdocument.cxx | 4 |
5 files changed, 9 insertions, 9 deletions
diff --git a/basctl/source/basicide/basides1.cxx b/basctl/source/basicide/basides1.cxx index 25967f4f4ca4..d49060c0719d 100644 --- a/basctl/source/basicide/basides1.cxx +++ b/basctl/source/basicide/basides1.cxx @@ -1250,12 +1250,12 @@ void Shell::ManageToolbars() VclPtr<BaseWindow> Shell::FindApplicationWindow() { - return FindWindow( ScriptDocument::getApplicationScriptDocument(), "", "", TYPE_UNKNOWN ); + return FindWindow( ScriptDocument::getApplicationScriptDocument(), u"", u"", TYPE_UNKNOWN ); } VclPtr<BaseWindow> Shell::FindWindow( ScriptDocument const& rDocument, - OUString const& rLibName, OUString const& rName, + std::u16string_view rLibName, std::u16string_view rName, ItemType eType, bool bFindSuspended ) { diff --git a/basctl/source/basicide/basidesh.cxx b/basctl/source/basicide/basidesh.cxx index 3cf2ed621457..28fea6e3dcc1 100644 --- a/basctl/source/basicide/basidesh.cxx +++ b/basctl/source/basicide/basidesh.cxx @@ -563,7 +563,7 @@ void Shell::CheckWindows() } -void Shell::RemoveWindows( const ScriptDocument& rDocument, const OUString& rLibName ) +void Shell::RemoveWindows( const ScriptDocument& rDocument, std::u16string_view rLibName ) { bool bChangeCurWindow = pCurWin; std::vector<VclPtr<BaseWindow> > aDeleteVec; diff --git a/basctl/source/basicide/bastype2.cxx b/basctl/source/basicide/bastype2.cxx index 904ff8307670..eed521ce3fd6 100644 --- a/basctl/source/basicide/bastype2.cxx +++ b/basctl/source/basicide/bastype2.cxx @@ -475,7 +475,7 @@ void SbTreeListBox::ImpCreateLibSubSubEntriesInVBAMode(const weld::TreeIter& rLi } } -bool SbTreeListBox::ImpFindEntry(weld::TreeIter& rIter, const OUString& rText) +bool SbTreeListBox::ImpFindEntry(weld::TreeIter& rIter, std::u16string_view rText) { bool bValidIter = m_xControl->iter_children(rIter); while (bValidIter) @@ -599,7 +599,7 @@ void SbTreeListBox::RemoveEntry (ScriptDocument const& rDocument) } } -bool SbTreeListBox::FindEntry(const OUString& rText, EntryType eType, weld::TreeIter& rIter) +bool SbTreeListBox::FindEntry(std::u16string_view rText, EntryType eType, weld::TreeIter& rIter) { bool bValidIter = m_xControl->iter_children(rIter); while (bValidIter) diff --git a/basctl/source/basicide/bastypes.cxx b/basctl/source/basicide/bastypes.cxx index eabb6ea12f69..99a54894a3e8 100644 --- a/basctl/source/basicide/bastypes.cxx +++ b/basctl/source/basicide/bastypes.cxx @@ -226,14 +226,14 @@ void BaseWindow::InsertLibInfo () const bool BaseWindow::Is ( ScriptDocument const& rDocument, - OUString const& rLibName, OUString const& rName, + std::u16string_view rLibName, std::u16string_view rName, ItemType eType, bool bFindSuspended ) { if (bFindSuspended || !IsSuspended()) { // any non-suspended window is ok - if (rLibName.isEmpty() || rName.isEmpty() || eType == TYPE_UNKNOWN) + if (rLibName.empty() || rName.empty() || eType == TYPE_UNKNOWN) return true; // ok if the parameters match if (m_aDocument == rDocument && m_aLibName == rLibName && m_aName == rName && GetType() == eType) diff --git a/basctl/source/basicide/scriptdocument.cxx b/basctl/source/basicide/scriptdocument.cxx index d557bd5f31f4..61c2747d5eb3 100644 --- a/basctl/source/basicide/scriptdocument.cxx +++ b/basctl/source/basicide/scriptdocument.cxx @@ -1068,10 +1068,10 @@ namespace basctl } - ScriptDocument ScriptDocument::getDocumentWithURLOrCaption( const OUString& _rUrlOrCaption ) + ScriptDocument ScriptDocument::getDocumentWithURLOrCaption( std::u16string_view _rUrlOrCaption ) { ScriptDocument aDocument( getApplicationScriptDocument() ); - if ( _rUrlOrCaption.isEmpty() ) + if ( _rUrlOrCaption.empty() ) return aDocument; docs::Documents aDocuments; |