summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-04-28 14:12:35 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-04-29 08:53:22 +0200
commitd3849255b76e92a42f653c266b88945708984c4f (patch)
treeff1eab21b9e5a1ea00e1573db4b4595ba51b0098 /svx
parentf9b6bd6336b35de060f6f5bdd91517caf5e9a56e (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')
-rw-r--r--svx/source/dialog/compressgraphicdialog.cxx4
-rw-r--r--svx/source/dialog/langbox.cxx2
-rw-r--r--svx/source/gallery2/galexpl.cxx4
-rw-r--r--svx/source/gallery2/gallery1.cxx9
-rw-r--r--svx/source/gengal/gengal.cxx4
-rw-r--r--svx/source/unodraw/UnoGraphicExporter.cxx2
-rw-r--r--svx/source/xml/xmlgrhlp.cxx14
-rw-r--r--svx/source/xoutdev/xtable.cxx2
8 files changed, 21 insertions, 20 deletions
diff --git a/svx/source/dialog/compressgraphicdialog.cxx b/svx/source/dialog/compressgraphicdialog.cxx
index 1c3cc3be54d9..f4f6e0500131 100644
--- a/svx/source/dialog/compressgraphicdialog.cxx
+++ b/svx/source/dialog/compressgraphicdialog.cxx
@@ -271,7 +271,7 @@ void CompressGraphicsDialog::Compress(SvStream& aStream)
OUString aGraphicFormatName = m_xLosslessRB->get_active() ? OUString( "png" ) : OUString( "jpg" );
sal_uInt16 nFilterFormat = rFilter.GetExportFormatNumberForShortName( aGraphicFormatName );
- rFilter.ExportGraphic( aScaledGraphic, "none", aStream, nFilterFormat, &aFilterData );
+ rFilter.ExportGraphic( aScaledGraphic, u"none", aStream, nFilterFormat, &aFilterData );
}
IMPL_LINK_NOARG( CompressGraphicsDialog, OkayClickHdl, weld::Button&, void )
@@ -417,7 +417,7 @@ Graphic CompressGraphicsDialog::GetCompressedGraphic()
aMemStream.Seek( STREAM_SEEK_TO_BEGIN );
Graphic aResultGraphic;
GraphicFilter& rFilter = GraphicFilter::GetGraphicFilter();
- rFilter.ImportGraphic( aResultGraphic, OUString("import"), aMemStream );
+ rFilter.ImportGraphic( aResultGraphic, u"import", aMemStream );
return aResultGraphic;
}
diff --git a/svx/source/dialog/langbox.cxx b/svx/source/dialog/langbox.cxx
index ca9344f32bc7..43d123b1ebc9 100644
--- a/svx/source/dialog/langbox.cxx
+++ b/svx/source/dialog/langbox.cxx
@@ -44,7 +44,7 @@ using namespace ::com::sun::star::util;
using namespace ::com::sun::star::linguistic2;
using namespace ::com::sun::star::uno;
-OUString GetDicInfoStr( const OUString& rName, const LanguageType nLang, bool bNeg )
+OUString GetDicInfoStr( std::u16string_view rName, const LanguageType nLang, bool bNeg )
{
INetURLObject aURLObj;
aURLObj.SetSmartProtocol( INetProtocol::File );
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;
diff --git a/svx/source/gengal/gengal.cxx b/svx/source/gengal/gengal.cxx
index d57174ff8913..95c415d60a2f 100644
--- a/svx/source/gengal/gengal.cxx
+++ b/svx/source/gengal/gengal.cxx
@@ -55,7 +55,7 @@ protected:
}
-static void createTheme( const OUString& aThemeName, const OUString& aGalleryURL,
+static void createTheme( const OUString& aThemeName, std::u16string_view aGalleryURL,
const OUString& aDestDir, std::vector<INetURLObject> &rFiles,
bool bRelativeURLs )
{
@@ -135,7 +135,7 @@ static int PrintHelp()
return EXIT_SUCCESS;
}
-static INetURLObject Smartify( const OUString &rPath )
+static INetURLObject Smartify( std::u16string_view rPath )
{
INetURLObject aURL;
aURL.SetSmartURL( rPath );
diff --git a/svx/source/unodraw/UnoGraphicExporter.cxx b/svx/source/unodraw/UnoGraphicExporter.cxx
index bc84a56de4cb..3b525789468f 100644
--- a/svx/source/unodraw/UnoGraphicExporter.cxx
+++ b/svx/source/unodraw/UnoGraphicExporter.cxx
@@ -1068,7 +1068,7 @@ sal_Bool SAL_CALL GraphicExporter::filter( const Sequence< PropertyValue >& aDes
// SvOutputStream, or adapt the graphic filter to not seek anymore.
SvMemoryStream aStream( 1024, 1024 );
- nStatus = rFilter.ExportGraphic( aGraphic,"", aStream, nFilter, &aSettings.maFilterData );
+ nStatus = rFilter.ExportGraphic( aGraphic, u"", aStream, nFilter, &aSettings.maFilterData );
// copy temp stream to XOutputStream
SvOutputStream aOutputStream( aSettings.mxOutputStream );
diff --git a/svx/source/xml/xmlgrhlp.cxx b/svx/source/xml/xmlgrhlp.cxx
index b95130a8a658..4a727f348f6f 100644
--- a/svx/source/xml/xmlgrhlp.cxx
+++ b/svx/source/xml/xmlgrhlp.cxx
@@ -133,7 +133,7 @@ GraphicInputStream::GraphicInputStream(GraphicObject const & aGraphicObject, con
else
{
GraphicFilter &rFilter = GraphicFilter::GetGraphicFilter();
- bRet = (rFilter.ExportGraphic(aGraphic, "", *pStream, rFilter.GetExportFormatNumberForMediaType(rMimeType)) == ERRCODE_NONE);
+ bRet = (rFilter.ExportGraphic(aGraphic, u"", *pStream, rFilter.GetExportFormatNumberForMediaType(rMimeType)) == ERRCODE_NONE);
}
}
else
@@ -148,7 +148,7 @@ GraphicInputStream::GraphicInputStream(GraphicObject const & aGraphicObject, con
else if (aFormat.isEmpty())
aFormat = "image/png";
- bRet = (rFilter.ExportGraphic(aGraphic, "", *pStream, rFilter.GetExportFormatNumberForMediaType(aFormat)) == ERRCODE_NONE);
+ bRet = (rFilter.ExportGraphic(aGraphic, u"", *pStream, rFilter.GetExportFormatNumberForMediaType(aFormat)) == ERRCODE_NONE);
}
else if (rMimeType.isEmpty() && aGraphic.GetType() == GraphicType::GdiMetafile)
{
@@ -161,7 +161,7 @@ GraphicInputStream::GraphicInputStream(GraphicObject const & aGraphicObject, con
else if (!rMimeType.isEmpty())
{
GraphicFilter & rFilter = GraphicFilter::GetGraphicFilter();
- bRet = ( rFilter.ExportGraphic( aGraphic, "", *pStream, rFilter.GetExportFormatNumberForMediaType( rMimeType ) ) == ERRCODE_NONE );
+ bRet = ( rFilter.ExportGraphic( aGraphic, u"", *pStream, rFilter.GetExportFormatNumberForMediaType( rMimeType ) ) == ERRCODE_NONE );
}
}
@@ -297,7 +297,7 @@ Graphic SvXMLGraphicOutputStream::GetGraphic()
mpOStm->Seek( 0 );
sal_uInt16 nFormat = GRFILTER_FORMAT_DONTKNOW;
sal_uInt16 nDeterminedFormat = GRFILTER_FORMAT_DONTKNOW;
- GraphicFilter::GetGraphicFilter().ImportGraphic( aGraphic, "", *mpOStm ,nFormat,&nDeterminedFormat);
+ GraphicFilter::GetGraphicFilter().ImportGraphic( aGraphic, u"", *mpOStm ,nFormat,&nDeterminedFormat);
if (nDeterminedFormat == GRFILTER_FORMAT_DONTKNOW)
{
@@ -337,7 +337,7 @@ Graphic SvXMLGraphicOutputStream::GetGraphic()
if (nStreamLen_ > 0)
{
aDest.Seek(0);
- GraphicFilter::GetGraphicFilter().ImportGraphic( aGraphic, "", aDest ,nFormat,&nDeterminedFormat );
+ GraphicFilter::GetGraphicFilter().ImportGraphic( aGraphic, u"", aDest ,nFormat,&nDeterminedFormat );
}
}
}
@@ -506,7 +506,7 @@ Graphic SvXMLGraphicHelper::ImplReadGraphic( const OUString& rPictureStorageName
if (!aGraphic.IsNone())
aReturnGraphic = aGraphic;
else
- rGraphicFilter.ImportGraphic(aReturnGraphic, "", *pStream);
+ rGraphicFilter.ImportGraphic(aReturnGraphic, u"", *pStream);
}
return aReturnGraphic;
@@ -798,7 +798,7 @@ OUString SvXMLGraphicHelper::implSaveGraphic(css::uno::Reference<css::graphic::X
}
rOutSavedMimeType = comphelper::GraphicMimeTypeHelper::GetMimeTypeForExtension(aFormat.toUtf8());
- bSuccess = (rFilter.ExportGraphic(aGraphic, "", *pStream, rFilter.GetExportFormatNumberForShortName(aFormat)) == ERRCODE_NONE);
+ bSuccess = (rFilter.ExportGraphic(aGraphic, u"", *pStream, rFilter.GetExportFormatNumberForShortName(aFormat)) == ERRCODE_NONE);
}
else if (aGraphic.GetType() == GraphicType::GdiMetafile)
{
diff --git a/svx/source/xoutdev/xtable.cxx b/svx/source/xoutdev/xtable.cxx
index 6a0744fe0a3d..016dd261b858 100644
--- a/svx/source/xoutdev/xtable.cxx
+++ b/svx/source/xoutdev/xtable.cxx
@@ -351,7 +351,7 @@ XPropertyListRef XPropertyList::CreatePropertyList( XPropertyListType aType,
XPropertyListRef
XPropertyList::CreatePropertyListFromURL( XPropertyListType t,
- const OUString & rURLStr )
+ std::u16string_view rURLStr )
{
INetURLObject aURL( rURLStr );
INetURLObject aPathURL( aURL );