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 /sw/source/ui | |
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 'sw/source/ui')
-rw-r--r-- | sw/source/ui/dbui/selectdbtabledialog.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/dbui/selectdbtabledialog.hxx | 2 | ||||
-rw-r--r-- | sw/source/ui/dialog/uiregionsw.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/envelp/label1.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/fldui/changedb.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/fldui/flddb.cxx | 4 | ||||
-rw-r--r-- | sw/source/ui/index/swuiidxmrk.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/misc/glossary.cxx | 6 | ||||
-rw-r--r-- | sw/source/ui/misc/outline.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/vba/vbadocument.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/vba/vbadocument.hxx | 2 |
11 files changed, 14 insertions, 14 deletions
diff --git a/sw/source/ui/dbui/selectdbtabledialog.cxx b/sw/source/ui/dbui/selectdbtabledialog.cxx index 19db636a54bb..e49624e48273 100644 --- a/sw/source/ui/dbui/selectdbtabledialog.cxx +++ b/sw/source/ui/dbui/selectdbtabledialog.cxx @@ -132,7 +132,7 @@ OUString SwSelectDBTableDialog::GetSelectedTable(bool& bIsTable) return OUString(); } -void SwSelectDBTableDialog::SetSelectedTable(const OUString& rTable, bool bIsTable) +void SwSelectDBTableDialog::SetSelectedTable(std::u16string_view rTable, bool bIsTable) { for (int i = 0, nCount = m_xTable->n_children(); i < nCount; ++i) { diff --git a/sw/source/ui/dbui/selectdbtabledialog.hxx b/sw/source/ui/dbui/selectdbtabledialog.hxx index 852a7570d285..01c1edcc49fe 100644 --- a/sw/source/ui/dbui/selectdbtabledialog.hxx +++ b/sw/source/ui/dbui/selectdbtabledialog.hxx @@ -37,7 +37,7 @@ public: virtual ~SwSelectDBTableDialog() override; OUString GetSelectedTable(bool& bIsTable); - void SetSelectedTable(const OUString& rTable, bool bIsTable); + void SetSelectedTable(std::u16string_view rTable, bool bIsTable); }; #endif diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx index 843083c99eb4..14215accd178 100644 --- a/sw/source/ui/dialog/uiregionsw.cxx +++ b/sw/source/ui/dialog/uiregionsw.cxx @@ -535,7 +535,7 @@ SwEditRegionDlg::~SwEditRegionDlg( ) } } -void SwEditRegionDlg::SelectSection(const OUString& rSectionName) +void SwEditRegionDlg::SelectSection(std::u16string_view rSectionName) { std::unique_ptr<weld::TreeIter> xIter(m_xTree->make_iterator()); if (!m_xTree->get_iter_first(*xIter)) diff --git a/sw/source/ui/envelp/label1.cxx b/sw/source/ui/envelp/label1.cxx index 8aa1d8de9fc9..6dd5c5b1d4b7 100644 --- a/sw/source/ui/envelp/label1.cxx +++ b/sw/source/ui/envelp/label1.cxx @@ -184,7 +184,7 @@ void SwLabDlg::GetLabItem(SwLabItem &rItem) } } -SwLabRec* SwLabDlg::GetRecord(const OUString &rRecName, bool bCont) +SwLabRec* SwLabDlg::GetRecord(std::u16string_view rRecName, bool bCont) { SwLabRec* pRec = nullptr; bool bFound = false; diff --git a/sw/source/ui/fldui/changedb.cxx b/sw/source/ui/fldui/changedb.cxx index e4e44316f9ab..6871bd4b6d26 100644 --- a/sw/source/ui/fldui/changedb.cxx +++ b/sw/source/ui/fldui/changedb.cxx @@ -80,7 +80,7 @@ void SwChangeDBDlg::FillDBPopup() Reference< XComponentContext > xContext( ::comphelper::getProcessComponentContext() ); Reference<XDatabaseContext> xDBContext = DatabaseContext::create(xContext); const SwDBData& rDBData = pSh->GetDBData(); - m_xAvailDBTLB->Select(rDBData.sDataSource, rDBData.sCommand, OUString()); + m_xAvailDBTLB->Select(rDBData.sDataSource, rDBData.sCommand, u""); TreeSelect(); Sequence< OUString > aDBNames = xDBContext->getElementNames(); diff --git a/sw/source/ui/fldui/flddb.cxx b/sw/source/ui/fldui/flddb.cxx index 99a7d5f05b3b..267d318d8559 100644 --- a/sw/source/ui/fldui/flddb.cxx +++ b/sw/source/ui/fldui/flddb.cxx @@ -138,7 +138,7 @@ void SwFieldDBPage::Reset(const SfxItemSet*) if(pSh) { SwDBData aTmp(pSh->GetDBData()); - m_xDatabaseTLB->Select(aTmp.sDataSource, aTmp.sCommand, OUString()); + m_xDatabaseTLB->Select(aTmp.sDataSource, aTmp.sCommand, u""); } } } @@ -506,7 +506,7 @@ void SwFieldDBPage::ActivateMailMergeAddress() m_xTypeLB->select_id(OUString::number(static_cast<sal_uInt16>(SwFieldTypesEnum::Database))); TypeListBoxHdl(*m_xTypeLB); const SwDBData& rData = SW_MOD()->GetDBConfig()->GetAddressSource(); - m_xDatabaseTLB->Select(rData.sDataSource, rData.sCommand, OUString()); + m_xDatabaseTLB->Select(rData.sDataSource, rData.sCommand, u""); } void SwFieldDBPage::SetWrtShell(SwWrtShell& rSh) diff --git a/sw/source/ui/index/swuiidxmrk.cxx b/sw/source/ui/index/swuiidxmrk.cxx index 3ea8bb755bbc..cb3339e3c55f 100644 --- a/sw/source/ui/index/swuiidxmrk.cxx +++ b/sw/source/ui/index/swuiidxmrk.cxx @@ -1081,7 +1081,7 @@ const TextInfo aTextInfoArr[] = {AUTH_FIELD_CUSTOM5, HID_AUTH_FIELD_CUSTOM5 } }; -static OUString lcl_FindColumnEntry(const uno::Sequence<beans::PropertyValue>& rFields, const OUString& rColumnTitle) +static OUString lcl_FindColumnEntry(const uno::Sequence<beans::PropertyValue>& rFields, std::u16string_view rColumnTitle) { for(const auto& rField : rFields) { diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx index 21e131891386..7b173f63e449 100644 --- a/sw/source/ui/misc/glossary.cxx +++ b/sw/source/ui/misc/glossary.cxx @@ -339,8 +339,8 @@ void SwGlossaryDlg::EnableShortName(bool bOn) } // does the title exist in the selected group? -std::unique_ptr<weld::TreeIter> SwGlossaryDlg::DoesBlockExist(const OUString& rBlock, - const OUString& rShort) +std::unique_ptr<weld::TreeIter> SwGlossaryDlg::DoesBlockExist(std::u16string_view rBlock, + std::u16string_view rShort) { // look for possible entry in TreeListBox std::unique_ptr<weld::TreeIter> xEntry = m_xCategoryBox->make_iterator(); @@ -353,7 +353,7 @@ std::unique_ptr<weld::TreeIter> SwGlossaryDlg::DoesBlockExist(const OUString& rB do { if (rBlock == m_xCategoryBox->get_text(*xEntry) && - (rShort.isEmpty() || + (rShort.empty() || rShort == m_xCategoryBox->get_id(*xEntry)) ) { diff --git a/sw/source/ui/misc/outline.cxx b/sw/source/ui/misc/outline.cxx index bef52a28777c..bdaa59f9015f 100644 --- a/sw/source/ui/misc/outline.cxx +++ b/sw/source/ui/misc/outline.cxx @@ -291,7 +291,7 @@ IMPL_LINK(SwOutlineTabDialog, MenuSelectHdl, const OString&, rIdent, void) pPage->Reset(GetOutputItemSet()); } -sal_uInt16 SwOutlineTabDialog::GetLevel(const OUString &rFormatName) const +sal_uInt16 SwOutlineTabDialog::GetLevel(std::u16string_view rFormatName) const { for(sal_uInt16 i = 0; i < MAXLEVEL; ++i) { diff --git a/sw/source/ui/vba/vbadocument.cxx b/sw/source/ui/vba/vbadocument.cxx index c7cfe8446cb0..4e305cc100e5 100644 --- a/sw/source/ui/vba/vbadocument.cxx +++ b/sw/source/ui/vba/vbadocument.cxx @@ -542,7 +542,7 @@ SwVbaDocument::SavePreviewPngAs( const uno::Any& FileName ) } uno::Any -SwVbaDocument::getControlShape( const OUString& sName ) +SwVbaDocument::getControlShape( std::u16string_view sName ) { uno::Reference< drawing::XDrawPageSupplier > xDrawPageSupplier( mxTextDocument, uno::UNO_QUERY_THROW ); uno::Reference< container::XIndexAccess > xIndexAccess( xDrawPageSupplier->getDrawPage(), uno::UNO_QUERY_THROW ); diff --git a/sw/source/ui/vba/vbadocument.hxx b/sw/source/ui/vba/vbadocument.hxx index a5e4dabf8452..0d213690a982 100644 --- a/sw/source/ui/vba/vbadocument.hxx +++ b/sw/source/ui/vba/vbadocument.hxx @@ -38,7 +38,7 @@ private: std::vector<css::uno::Reference< ooo::vba::XSink >> mvSinks; void Initialize(); - css::uno::Any getControlShape( const OUString& sName ); + css::uno::Any getControlShape( std::u16string_view sName ); css::uno::Reference< css::container::XNameAccess > getFormControls() const; public: |