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 /oox/source/ppt/presentationfragmenthandler.cxx | |
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 'oox/source/ppt/presentationfragmenthandler.cxx')
-rw-r--r-- | oox/source/ppt/presentationfragmenthandler.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/oox/source/ppt/presentationfragmenthandler.cxx b/oox/source/ppt/presentationfragmenthandler.cxx index 5f35dbdfdb1c..7a5788259921 100644 --- a/oox/source/ppt/presentationfragmenthandler.cxx +++ b/oox/source/ppt/presentationfragmenthandler.cxx @@ -140,11 +140,11 @@ void PresentationFragmentHandler::importSlideNames(XmlFilterBase& rFilter, const { Reference<XDrawPage> xDrawPage(xDrawPages->getByIndex(i), UNO_QUERY); Reference<container::XNamed> xNamed(xDrawPage, UNO_QUERY_THROW); - OUString sRest; - if (xNamed->getName().startsWith(aTitleText, &sRest) - && (sRest.isEmpty() - || (sRest.startsWith(" (") && sRest.endsWith(")") - && o3tl::toInt32(sRest.subView(2, sRest.getLength() - 3)) > 0))) + std::u16string_view sRest; + if (o3tl::starts_with(xNamed->getName(), aTitleText, &sRest) + && (sRest.empty() + || (o3tl::starts_with(sRest, u" (") && o3tl::ends_with(sRest, u")") + && o3tl::toInt32(sRest.substr(2, sRest.size() - 3)) > 0))) nCount++; } Reference<container::XNamed> xName(rSlidePersist[nPage]->getPage(), UNO_QUERY_THROW); |