summaryrefslogtreecommitdiff
path: root/sd/source/ui/unoidl/unopage.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-04-14 11:48:13 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-04-14 21:13:00 +0200
commit4475483b92da89f6ab7fa503c6db920b7b50d1b7 (patch)
treefb881733ddaba22fff30e2246c9b860068969da0 /sd/source/ui/unoidl/unopage.cxx
parent003e2873e4463974e59e1f909f9250cde743851f (diff)
use more string_view in sd
Change-Id: I301f3d8a6634df8be5fdd42649c0c265da8f9099 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133004 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd/source/ui/unoidl/unopage.cxx')
-rw-r--r--sd/source/ui/unoidl/unopage.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx
index d5576855f923..bc042babe8d5 100644
--- a/sd/source/ui/unoidl/unopage.cxx
+++ b/sd/source/ui/unoidl/unopage.cxx
@@ -1553,17 +1553,17 @@ OUString SdGenericDrawPage::getBookmarkURL() const
return aRet.makeStringAndClear();
}
-void SdGenericDrawPage::setBookmarkURL( OUString const & rURL )
+void SdGenericDrawPage::setBookmarkURL( std::u16string_view rURL )
{
if( !SvxFmDrawPage::mpPage )
return;
- sal_Int32 nIndex = rURL.indexOf( '#' );
- if( nIndex == -1 )
+ size_t nIndex = rURL.find( '#' );
+ if( nIndex == std::u16string_view::npos )
return;
- const OUString aFileName( rURL.copy( 0, nIndex ) );
- const OUString aBookmarkName( SdDrawPage::getUiNameFromPageApiName( rURL.copy( nIndex+1 ) ) );
+ const OUString aFileName( rURL.substr( 0, nIndex ) );
+ const OUString aBookmarkName( SdDrawPage::getUiNameFromPageApiName( OUString(rURL.substr( nIndex+1 )) ) );
if( !aFileName.isEmpty() && !aBookmarkName.isEmpty() )
{