diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-04-28 14:12:35 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-04-29 08:53:22 +0200 |
commit | d3849255b76e92a42f653c266b88945708984c4f (patch) | |
tree | ff1eab21b9e5a1ea00e1573db4b4595ba51b0098 /svx/source/gallery2 | |
parent | f9b6bd6336b35de060f6f5bdd91517caf5e9a56e (diff) |
use more string_view in INetURLObject
Change-Id: I4462f7cf4740fa4d1b129d76a0775f4250f41bbd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133555
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx/source/gallery2')
-rw-r--r-- | svx/source/gallery2/galexpl.cxx | 4 | ||||
-rw-r--r-- | svx/source/gallery2/gallery1.cxx | 9 |
2 files changed, 7 insertions, 6 deletions
diff --git a/svx/source/gallery2/galexpl.cxx b/svx/source/gallery2/galexpl.cxx index c155f4f14613..b1e70919c928 100644 --- a/svx/source/gallery2/galexpl.cxx +++ b/svx/source/gallery2/galexpl.cxx @@ -107,7 +107,7 @@ bool GalleryExplorer::FillObjListTitle( const sal_uInt32 nThemeId, std::vector< return !rList.empty(); } -bool GalleryExplorer::InsertURL( std::u16string_view rThemeName, const OUString& rURL ) +bool GalleryExplorer::InsertURL( std::u16string_view rThemeName, std::u16string_view rURL ) { Gallery* pGal = ::Gallery::GetGalleryInstance(); bool bRet = false; @@ -129,7 +129,7 @@ bool GalleryExplorer::InsertURL( std::u16string_view rThemeName, const OUString& return bRet; } -bool GalleryExplorer::InsertURL( sal_uInt32 nThemeId, const OUString& rURL ) +bool GalleryExplorer::InsertURL( sal_uInt32 nThemeId, std::u16string_view rURL ) { Gallery* pGal = ::Gallery::GetGalleryInstance(); return pGal && InsertURL( pGal->GetThemeName( nThemeId ), rURL ); diff --git a/svx/source/gallery2/gallery1.cxx b/svx/source/gallery2/gallery1.cxx index f307d4b6f61b..3d412eacb307 100644 --- a/svx/source/gallery2/gallery1.cxx +++ b/svx/source/gallery2/gallery1.cxx @@ -31,6 +31,7 @@ #include <comphelper/processfactory.hxx> #include <ucbhelper/content.hxx> #include <com/sun/star/ucb/ContentCreationException.hpp> +#include <o3tl/string_view.hxx> #include <unotools/configmgr.hxx> #include <unotools/ucbstreamhelper.hxx> #include <unotools/pathoptions.hxx> @@ -225,7 +226,7 @@ public: }; -Gallery::Gallery( const OUString& rMultiPath ) +Gallery::Gallery( std::u16string_view rMultiPath ) : bMultiPath ( false ) { ImplLoad( rMultiPath ); @@ -245,11 +246,11 @@ Gallery* Gallery::GetGalleryInstance() return s_pGallery; } -void Gallery::ImplLoad( const OUString& rMultiPath ) +void Gallery::ImplLoad( std::u16string_view rMultiPath ) { bool bIsReadOnlyDir {false}; - bMultiPath = !rMultiPath.isEmpty(); + bMultiPath = !rMultiPath.empty(); INetURLObject aCurURL(SvtPathOptions().GetConfigPath()); ImplLoadSubDirs( aCurURL, bIsReadOnlyDir ); @@ -263,7 +264,7 @@ void Gallery::ImplLoad( const OUString& rMultiPath ) sal_Int32 nIdx {0}; do { - aCurURL = INetURLObject(rMultiPath.getToken(0, ';', nIdx)); + aCurURL = INetURLObject(o3tl::getToken(rMultiPath, 0, ';', nIdx)); if (bIsRelURL) { aRelURL = aCurURL; |