summaryrefslogtreecommitdiff
path: root/framework
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 /framework
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 'framework')
-rw-r--r--framework/source/fwe/classes/addonsoptions.cxx2
-rw-r--r--framework/source/fwe/helper/titlehelper.cxx2
-rw-r--r--framework/source/services/pathsettings.cxx4
-rw-r--r--framework/source/uielement/generictoolbarcontroller.cxx6
-rw-r--r--framework/source/uielement/imagebuttontoolbarcontroller.cxx2
5 files changed, 8 insertions, 8 deletions
diff --git a/framework/source/fwe/classes/addonsoptions.cxx b/framework/source/fwe/classes/addonsoptions.cxx
index ad9408291e34..b97a7eac6099 100644
--- a/framework/source/fwe/classes/addonsoptions.cxx
+++ b/framework/source/fwe/classes/addonsoptions.cxx
@@ -1570,7 +1570,7 @@ BitmapEx AddonsOptions_Impl::ReadImageFromURL(const OUString& aImageURL)
Graphic aGraphic;
GraphicFilter& rGF = GraphicFilter::GetGraphicFilter();
- rGF.ImportGraphic( aGraphic, OUString(), *pStream );
+ rGF.ImportGraphic( aGraphic, u"", *pStream );
BitmapEx aBitmapEx = aGraphic.GetBitmapEx();
diff --git a/framework/source/fwe/helper/titlehelper.cxx b/framework/source/fwe/helper/titlehelper.cxx
index 2f63b47bd62c..10ae60667659 100644
--- a/framework/source/fwe/helper/titlehelper.cxx
+++ b/framework/source/fwe/helper/titlehelper.cxx
@@ -656,7 +656,7 @@ void TitleHelper::impl_setSubTitle (const css::uno::Reference< css::frame::XTitl
xNewBroadcaster->addTitleChangeListener (xThis);
}
-OUString TitleHelper::impl_convertURL2Title(const OUString& sURL)
+OUString TitleHelper::impl_convertURL2Title(std::u16string_view sURL)
{
INetURLObject aURL (sURL);
OUString sTitle;
diff --git a/framework/source/services/pathsettings.cxx b/framework/source/services/pathsettings.cxx
index bdffa86b1cea..d092a7102e72 100644
--- a/framework/source/services/pathsettings.cxx
+++ b/framework/source/services/pathsettings.cxx
@@ -395,7 +395,7 @@ private:
const PathSettings::PathInfo* impl_getPathAccessConst(sal_Int32 nHandle) const;
/** it checks, if the given path value seems to be a valid URL or system path. */
- bool impl_isValidPath(const OUString& sPath) const;
+ bool impl_isValidPath(std::u16string_view sPath) const;
bool impl_isValidPath(const std::vector<OUString>& lPath) const;
void impl_storePath(const PathSettings::PathInfo& aPath);
@@ -1228,7 +1228,7 @@ bool PathSettings::impl_isValidPath(const std::vector<OUString>& lPath) const
return true;
}
-bool PathSettings::impl_isValidPath(const OUString& sPath) const
+bool PathSettings::impl_isValidPath(std::u16string_view sPath) const
{
// allow empty path to reset a path.
// idea by LLA to support empty paths
diff --git a/framework/source/uielement/generictoolbarcontroller.cxx b/framework/source/uielement/generictoolbarcontroller.cxx
index ad5de098cc71..25f2e0157e9e 100644
--- a/framework/source/uielement/generictoolbarcontroller.cxx
+++ b/framework/source/uielement/generictoolbarcontroller.cxx
@@ -44,7 +44,7 @@ using namespace ::com::sun::star::frame::status;
namespace framework
{
-static bool isEnumCommand( const OUString& rCommand )
+static bool isEnumCommand( std::u16string_view rCommand )
{
INetURLObject aURL( rCommand );
@@ -52,7 +52,7 @@ static bool isEnumCommand( const OUString& rCommand )
( aURL.GetURLPath().indexOf( '.' ) != -1);
}
-static OUString getEnumCommand( const OUString& rCommand )
+static OUString getEnumCommand( std::u16string_view rCommand )
{
INetURLObject aURL( rCommand );
@@ -74,7 +74,7 @@ static OUString getMasterCommand( const OUString& rCommand )
sal_Int32 nIndex = aURL.GetURLPath().indexOf( '.' );
if ( nIndex )
{
- aURL.SetURLPath( aURL.GetURLPath().copy( 0, nIndex ) );
+ aURL.SetURLPath( aURL.GetURLPath().subView( 0, nIndex ) );
aMasterCommand = aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE );
}
}
diff --git a/framework/source/uielement/imagebuttontoolbarcontroller.cxx b/framework/source/uielement/imagebuttontoolbarcontroller.cxx
index 350b2190dc84..f375e318106b 100644
--- a/framework/source/uielement/imagebuttontoolbarcontroller.cxx
+++ b/framework/source/uielement/imagebuttontoolbarcontroller.cxx
@@ -124,7 +124,7 @@ bool ImageButtonToolbarController::ReadImageFromURL( bool bBigImage, const OUStr
Graphic aGraphic;
GraphicFilter& rGF = GraphicFilter::GetGraphicFilter();
- rGF.ImportGraphic( aGraphic, OUString(), *pStream );
+ rGF.ImportGraphic( aGraphic, u"", *pStream );
BitmapEx aBitmapEx = aGraphic.GetBitmapEx();