diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-04-11 22:24:20 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-04-12 12:42:15 +0200 |
commit | cbaf1fbaa6e707d939f815eda360fad68a492aca (patch) | |
tree | 20b3dfeac257130afb01572b2c117b7840d07007 /desktop/source/offacc | |
parent | f751417b77e6573a0c639778e76ec943449f4573 (diff) |
loplugin:stringview more o3tl conversion
look for call sequences that can use string_view and the new o3tl
functions in o3tl/string_view.hxx
Also add a few more wrappers to said #include file
Change-Id: I05d8752cc67a7b55b0b57e8eed803bd06bfcd9ea
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132840
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'desktop/source/offacc')
-rw-r--r-- | desktop/source/offacc/acceptor.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/desktop/source/offacc/acceptor.cxx b/desktop/source/offacc/acceptor.cxx index 7697c18b422f..8c6cdbff0461 100644 --- a/desktop/source/offacc/acceptor.cxx +++ b/desktop/source/offacc/acceptor.cxx @@ -26,6 +26,7 @@ #include <cppuhelper/supportsservice.hxx> #include <sal/log.hxx> #include <tools/diagnose_ex.h> +#include <o3tl/string_view.hxx> using namespace css::bridge; using namespace css::connection; @@ -151,7 +152,7 @@ void Acceptor::initialize( const Sequence<Any>& aArguments ) if (nIndex1 < 0) throw IllegalArgumentException( "Invalid accept-string format", m_rContext, 1); - m_aConnectString = m_aAcceptString.copy( 0 , nIndex1 ).trim(); + m_aConnectString = o3tl::trim(m_aAcceptString.subView( 0 , nIndex1 )); nIndex1++; sal_Int32 nIndex2 = m_aAcceptString.indexOf( ';' , nIndex1 ); if (nIndex2 < 0) nIndex2 = m_aAcceptString.getLength(); |