summaryrefslogtreecommitdiff
path: root/basctl
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 /basctl
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 'basctl')
-rw-r--r--basctl/source/basicide/basides1.cxx4
-rw-r--r--basctl/source/basicide/basidesh.cxx2
-rw-r--r--basctl/source/basicide/bastype2.cxx4
-rw-r--r--basctl/source/basicide/bastypes.cxx4
-rw-r--r--basctl/source/basicide/scriptdocument.cxx4
-rw-r--r--basctl/source/inc/basidesh.hxx4
-rw-r--r--basctl/source/inc/bastype2.hxx4
-rw-r--r--basctl/source/inc/bastypes.hxx2
-rw-r--r--basctl/source/inc/scriptdocument.hxx2
9 files changed, 15 insertions, 15 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;
diff --git a/basctl/source/inc/basidesh.hxx b/basctl/source/inc/basidesh.hxx
index 6f04b4269a2b..d8fe56feb43c 100644
--- a/basctl/source/inc/basidesh.hxx
+++ b/basctl/source/inc/basidesh.hxx
@@ -93,7 +93,7 @@ private:
void InitTabBar();
void InitScrollBars();
void CheckWindows();
- void RemoveWindows( const ScriptDocument& rDocument, const OUString& rLibName );
+ void RemoveWindows( const ScriptDocument& rDocument, std::u16string_view rLibName );
void UpdateWindows();
static void InvalidateBasicIDESlots();
void StoreAllWindowData( bool bPersistent = true );
@@ -183,7 +183,7 @@ public:
bool CallBasicErrorHdl( StarBASIC const * pBasic );
BasicDebugFlags CallBasicBreakHdl( StarBASIC const * pBasic );
- VclPtr<BaseWindow> FindWindow( const ScriptDocument& rDocument, const OUString& rLibName, const OUString& rName, ItemType nType, bool bFindSuspended = false );
+ VclPtr<BaseWindow> FindWindow( const ScriptDocument& rDocument, std::u16string_view rLibName, std::u16string_view rName, ItemType nType, bool bFindSuspended = false );
VclPtr<DialogWindow> FindDlgWin( const ScriptDocument& rDocument, const OUString& rLibName, const OUString& rName, bool bCreateIfNotExist = false, bool bFindSuspended = false );
VclPtr<ModulWindow> FindBasWin( const ScriptDocument& rDocument, const OUString& rLibName, const OUString& rModName, bool bCreateIfNotExist = false, bool bFindSuspended = false );
VclPtr<BaseWindow> FindApplicationWindow();
diff --git a/basctl/source/inc/bastype2.hxx b/basctl/source/inc/bastype2.hxx
index 5325bb75c1c5..3eb4de6beec9 100644
--- a/basctl/source/inc/bastype2.hxx
+++ b/basctl/source/inc/bastype2.hxx
@@ -189,7 +189,7 @@ protected:
void ImpCreateLibSubEntries(const weld::TreeIter& rLibRootEntry, const ScriptDocument& rDocument, const OUString& rLibName);
void ImpCreateLibSubEntriesInVBAMode(const weld::TreeIter& rLibRootEntry, const ScriptDocument& rDocument, const OUString& rLibName );
void ImpCreateLibSubSubEntriesInVBAMode(const weld::TreeIter& rLibRootEntry, const ScriptDocument& rDocument, const OUString& rLibName);
- bool ImpFindEntry(weld::TreeIter& rIter, const OUString& rText);
+ bool ImpFindEntry(weld::TreeIter& rIter, std::u16string_view rText);
// DocumentEventListener
virtual void onDocumentCreated( const ScriptDocument& _rDocument ) override;
@@ -218,7 +218,7 @@ public:
SbModule* FindModule(const weld::TreeIter* pEntry);
SbxVariable* FindVariable(const weld::TreeIter* pEntry);
bool FindRootEntry(const ScriptDocument& rDocument, LibraryLocation eLocation, weld::TreeIter& rIter);
- bool FindEntry(const OUString& rText, EntryType eType, weld::TreeIter& rIter);
+ bool FindEntry(std::u16string_view rText, EntryType eType, weld::TreeIter& rIter);
EntryDescriptor GetEntryDescriptor(const weld::TreeIter* pEntry);
static ItemType ConvertType (EntryType eType);
diff --git a/basctl/source/inc/bastypes.hxx b/basctl/source/inc/bastypes.hxx
index 052bd2f420c7..21e6c0227a9c 100644
--- a/basctl/source/inc/bastypes.hxx
+++ b/basctl/source/inc/bastypes.hxx
@@ -236,7 +236,7 @@ public:
virtual char const* GetHid () const = 0;
virtual ItemType GetType () const = 0;
void InsertLibInfo () const;
- bool Is (ScriptDocument const&, OUString const&, OUString const&, ItemType, bool bFindSuspended);
+ bool Is (ScriptDocument const&, std::u16string_view, std::u16string_view, ItemType, bool bFindSuspended);
virtual bool HasActiveEditor () const;
};
diff --git a/basctl/source/inc/scriptdocument.hxx b/basctl/source/inc/scriptdocument.hxx
index 6a0bfb2f0f62..da7f2b50d307 100644
--- a/basctl/source/inc/scriptdocument.hxx
+++ b/basctl/source/inc/scriptdocument.hxx
@@ -121,7 +121,7 @@ namespace basctl
@see getApplicationScriptDocument
*/
static ScriptDocument
- getDocumentWithURLOrCaption( const OUString& _rUrlOrCaption );
+ getDocumentWithURLOrCaption( std::u16string_view _rUrlOrCaption );
/** operation mode for getAllScriptDocuments
*/