diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2023-04-16 21:05:27 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-04-17 07:54:12 +0200 |
commit | e870d996efb4a856f667c601032e02e5b21c5b82 (patch) | |
tree | 1692d68d47018555452bbae484abe9d1b23dd17a /xmloff/source/core | |
parent | 80a0d3b44cd6edb6419ab66588548ba169f2567b (diff) |
use more string_view
Change-Id: If4523dc2c89d1fb1c5e11665ee60044834fcecd4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150458
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmloff/source/core')
-rw-r--r-- | xmloff/source/core/XMLEmbeddedObjectImportContext.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx b/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx index 7f68a11fed20..980dd8e0572d 100644 --- a/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx +++ b/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx @@ -170,7 +170,7 @@ XMLEmbeddedObjectImportContext::XMLEmbeddedObjectImportContext( } } - OUString sClass; + std::u16string_view sClass; static std::u16string_view const prefixes[] = { u"application/vnd.oasis.openoffice.", u"application/x-vnd.oasis.openoffice.", @@ -178,13 +178,13 @@ XMLEmbeddedObjectImportContext::XMLEmbeddedObjectImportContext( u"application/x-vnd.oasis.opendocument."}; for (auto const & p: prefixes) { - if (sMime.startsWith(p, &sClass)) + if (o3tl::starts_with(sMime, p, &sClass)) { break; } } - if( !sClass.isEmpty() ) + if( !sClass.empty() ) { static const std::tuple<XMLTokenEnum, OUString, SvGUID> aServiceMap[] = { { XML_TEXT, XML_IMPORT_FILTER_WRITER, { SO3_SW_CLASSID } }, |