diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-09-21 11:07:00 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-09-21 14:21:28 +0200 |
commit | da730a3df0dd8a8b1ac0eca09ccc9bba04830802 (patch) | |
tree | a1181a2d9f70a43568919ba8e97f897977c64ce7 /svtools/source/control | |
parent | bdf346830b735aa484fba0df94be71fd1ea5cdfd (diff) |
use more string_view in svtools
Change-Id: Id0317c400d7bc868916b97cd1c7abae04c4a9e30
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140335
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svtools/source/control')
-rw-r--r-- | svtools/source/control/inettbc.cxx | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/svtools/source/control/inettbc.cxx b/svtools/source/control/inettbc.cxx index cfecf910f94b..0ffad5414c08 100644 --- a/svtools/source/control/inettbc.cxx +++ b/svtools/source/control/inettbc.cxx @@ -40,6 +40,7 @@ #include <comphelper/string.hxx> #include <salhelper/thread.hxx> #include <tools/debug.hxx> +#include <o3tl/string_view.hxx> #include <osl/file.hxx> #include <osl/mutex.hxx> #include <unotools/historyoptions.hxx> @@ -76,7 +77,7 @@ public: SvtURLBox_Impl( ) { - FilterMatch::createWildCardFilterList(OUString(),m_aFilters); + FilterMatch::createWildCardFilterList(u"",m_aFilters); } }; @@ -1079,22 +1080,22 @@ void SvtURLBox::DisableHistory() UpdatePicklistForSmartProtocol_Impl(); } -void SvtURLBox::SetFilter(const OUString& _sFilter) +void SvtURLBox::SetFilter(std::u16string_view _sFilter) { pImpl->m_aFilters.clear(); FilterMatch::createWildCardFilterList(_sFilter,pImpl->m_aFilters); } -void FilterMatch::createWildCardFilterList(const OUString& _rFilterList,::std::vector< WildCard >& _rFilters) +void FilterMatch::createWildCardFilterList(std::u16string_view _rFilterList,::std::vector< WildCard >& _rFilters) { - if( _rFilterList.getLength() ) + if( !_rFilterList.empty() ) { // filter is given sal_Int32 nIndex = 0; OUString sToken; do { - sToken = _rFilterList.getToken( 0, ';', nIndex ); + sToken = o3tl::getToken(_rFilterList, 0, ';', nIndex ); if ( !sToken.isEmpty() ) { _rFilters.emplace_back( sToken.toAsciiUpperCase() ); |