diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-04-27 18:08:53 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-04-28 15:41:02 +0200 |
commit | 39c3574b799690d4405d9318a5ba221b5feaccbe (patch) | |
tree | 40cacd124e11dd71b23affec3713c6f0fef27906 /svx/source/gallery2 | |
parent | 9658115370bf33c2fdb68a3b759cf2f9d9e7c6c1 (diff) |
use string_view in INetURLObject::encode
Change-Id: Ib686c6872388b02c8939d3b65f6bd25cda348bc8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114754
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx/source/gallery2')
-rw-r--r-- | svx/source/gallery2/gallery1.cxx | 6 | ||||
-rw-r--r-- | svx/source/gallery2/gallerybinaryengine.cxx | 4 | ||||
-rw-r--r-- | svx/source/gallery2/gallerybinaryengineentry.cxx | 6 | ||||
-rw-r--r-- | svx/source/gallery2/gallerybinarystoragelocations.cxx | 8 |
4 files changed, 12 insertions, 12 deletions
diff --git a/svx/source/gallery2/gallery1.cxx b/svx/source/gallery2/gallery1.cxx index 6b5ab0acfdf5..b6b5b00d9a0f 100644 --- a/svx/source/gallery2/gallery1.cxx +++ b/svx/source/gallery2/gallery1.cxx @@ -311,7 +311,7 @@ void Gallery::ImplLoadSubDirs( const INetURLObject& rBaseURL, bool& rbDirIsReadO // check readonlyness the very hard way INetURLObject aTestURL( rBaseURL ); - aTestURL.Append( "cdefghij.klm" ); + aTestURL.Append( u"cdefghij.klm" ); std::unique_ptr<SvStream> pTestStm(::utl::UcbStreamHelper::CreateStream( aTestURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), StreamMode::WRITE )); if( pTestStm ) @@ -352,8 +352,8 @@ void Gallery::ImplLoadSubDirs( const INetURLObject& rBaseURL, bool& rbDirIsReadO if (aThmURL.GetFileExtension().equalsIgnoreAsciiCase("thm")) { - INetURLObject aSdgURL( aThmURL); aSdgURL.SetExtension( "sdg" ); - INetURLObject aSdvURL( aThmURL ); aSdvURL.SetExtension( "sdv" ); + INetURLObject aSdgURL( aThmURL); aSdgURL.SetExtension( u"sdg" ); + INetURLObject aSdvURL( aThmURL ); aSdvURL.SetExtension( u"sdv" ); try { diff --git a/svx/source/gallery2/gallerybinaryengine.cxx b/svx/source/gallery2/gallerybinaryengine.cxx index 16334e719623..c093d899d756 100644 --- a/svx/source/gallery2/gallerybinaryengine.cxx +++ b/svx/source/gallery2/gallerybinaryengine.cxx @@ -422,10 +422,10 @@ INetURLObject GalleryBinaryEngine::implCreateUniqueURL(SgaObjKind eObjKind, char const* pExt = nullptr; bool bExists; - aDir.Append("dragdrop"); + aDir.Append(u"dragdrop"); CreateDir(aDir); - aInfoFileURL.Append("sdddndx1"); + aInfoFileURL.Append(u"sdddndx1"); // read next possible number if (FileExists(aInfoFileURL)) diff --git a/svx/source/gallery2/gallerybinaryengineentry.cxx b/svx/source/gallery2/gallerybinaryengineentry.cxx index e50e8e605d08..86989271231f 100644 --- a/svx/source/gallery2/gallerybinaryengineentry.cxx +++ b/svx/source/gallery2/gallerybinaryengineentry.cxx @@ -27,7 +27,7 @@ #include <com/sun/star/ucb/ContentCreationException.hpp> -static bool FileExists(const INetURLObject& rURL, const OUString& rExt) +static bool FileExists(const INetURLObject& rURL, std::u16string_view rExt) { INetURLObject aURL(rURL); aURL.setExtension(rExt); @@ -56,11 +56,11 @@ void GalleryBinaryEngineEntry::CreateUniqueURL(const INetURLObject& rBaseURL, IN INetURLObject aBaseNoCase(GalleryBinaryStorageLocations::ImplGetURLIgnoreCase(rBaseURL)); aURL = aBaseNoCase; static sal_Int32 nIdx = 0; - while (FileExists(aURL, "thm")) + while (FileExists(aURL, u"thm")) { // create new URLs nIdx++; aURL = aBaseNoCase; - aURL.setName(aURL.getName() + OUString::number(nIdx)); + aURL.setName(OUString(aURL.getName() + OUString::number(nIdx))); } } diff --git a/svx/source/gallery2/gallerybinarystoragelocations.cxx b/svx/source/gallery2/gallerybinarystoragelocations.cxx index e8aaf88b1fee..dc896f6c3811 100644 --- a/svx/source/gallery2/gallerybinarystoragelocations.cxx +++ b/svx/source/gallery2/gallerybinarystoragelocations.cxx @@ -42,25 +42,25 @@ INetURLObject GalleryBinaryStorageLocations::ImplGetURLIgnoreCase(const INetURLO void GalleryBinaryStorageLocations::SetThmExtension(INetURLObject& aURL) { - aURL.setExtension("thm"); + aURL.setExtension(u"thm"); maThmURL = ImplGetURLIgnoreCase(aURL); } void GalleryBinaryStorageLocations::SetSdgExtension(INetURLObject& aURL) { - aURL.setExtension("sdg"); + aURL.setExtension(u"sdg"); maSdgURL = ImplGetURLIgnoreCase(aURL); } void GalleryBinaryStorageLocations::SetSdvExtension(INetURLObject& aURL) { - aURL.setExtension("sdv"); + aURL.setExtension(u"sdv"); maSdvURL = ImplGetURLIgnoreCase(aURL); } void GalleryBinaryStorageLocations::SetStrExtension(INetURLObject& aURL) { - aURL.setExtension("str"); + aURL.setExtension(u"str"); maStrURL = ImplGetURLIgnoreCase(aURL); } |