summaryrefslogtreecommitdiff
path: root/comphelper
diff options
context:
space:
mode:
Diffstat (limited to 'comphelper')
-rw-r--r--comphelper/source/misc/servicedecl.cxx11
1 files changed, 6 insertions, 5 deletions
diff --git a/comphelper/source/misc/servicedecl.cxx b/comphelper/source/misc/servicedecl.cxx
index 1955f6b56251..2b16539d1a55 100644
--- a/comphelper/source/misc/servicedecl.cxx
+++ b/comphelper/source/misc/servicedecl.cxx
@@ -19,6 +19,7 @@
#include <comphelper/servicedecl.hxx>
+#include <o3tl/string_view.hxx>
#include <rtl/string.hxx>
#include <cppuhelper/implbase.hxx>
#include <comphelper/sequence.hxx>
@@ -115,8 +116,8 @@ uno::Sequence<OUString> ServiceDecl::getSupportedServiceNames() const
OString const str(m_pServiceNames);
sal_Int32 nIndex = 0;
do {
- OString const token( str.getToken( 0, cDelim, nIndex ) );
- vec.emplace_back( token.getStr(), token.getLength(),
+ std::string_view const token( o3tl::getToken(str, 0, cDelim, nIndex ) );
+ vec.emplace_back( token.data(), token.size(),
RTL_TEXTENCODING_ASCII_US );
}
while (nIndex >= 0);
@@ -124,13 +125,13 @@ uno::Sequence<OUString> ServiceDecl::getSupportedServiceNames() const
return comphelper::containerToSequence(vec);
}
-bool ServiceDecl::supportsService( OUString const& name ) const
+bool ServiceDecl::supportsService( std::u16string_view name ) const
{
OString const str(m_pServiceNames);
sal_Int32 nIndex = 0;
do {
- OString const token( str.getToken( 0, cDelim, nIndex ) );
- if (name.equalsAsciiL( token.getStr(), token.getLength() ))
+ std::string_view const token( o3tl::getToken(str, 0, cDelim, nIndex ) );
+ if (o3tl::equalsAscii(name, token))
return true;
}
while (nIndex >= 0);