summaryrefslogtreecommitdiff
path: root/sc/source
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 /sc/source
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 'sc/source')
-rw-r--r--sc/source/core/data/global2.cxx2
-rw-r--r--sc/source/filter/excel/xehelper.cxx2
-rw-r--r--sc/source/filter/excel/xepivot.cxx2
-rw-r--r--sc/source/filter/html/htmlexp.cxx2
-rw-r--r--sc/source/filter/inc/htmlexp.hxx2
-rw-r--r--sc/source/filter/inc/xehelper.hxx2
-rw-r--r--sc/source/ui/docshell/docsh8.cxx2
-rw-r--r--sc/source/ui/docshell/externalrefmgr.cxx2
8 files changed, 8 insertions, 8 deletions
diff --git a/sc/source/core/data/global2.cxx b/sc/source/core/data/global2.cxx
index d10d87c39a49..ab731b2a923d 100644
--- a/sc/source/core/data/global2.cxx
+++ b/sc/source/core/data/global2.cxx
@@ -297,7 +297,7 @@ OUString ScGlobal::GetAbsDocName( const OUString& rFileName,
aObj.setFinalSlash(); // it IS a path
}
else
- aObj.SetSmartURL("file:///tmp/document");
+ aObj.SetSmartURL(u"file:///tmp/document");
bool bWasAbs = true;
aAbsName = aObj.smartRel2Abs( rFileName, bWasAbs ).GetMainURL(INetURLObject::DecodeMechanism::NONE);
// returned string must be encoded because it's used directly to create SfxMedium
diff --git a/sc/source/filter/excel/xehelper.cxx b/sc/source/filter/excel/xehelper.cxx
index d45bf0c2cf6a..eaa196eac5e9 100644
--- a/sc/source/filter/excel/xehelper.cxx
+++ b/sc/source/filter/excel/xehelper.cxx
@@ -968,7 +968,7 @@ OUString lclEncodeDosUrl(
} // namespace
-OUString XclExpUrlHelper::EncodeUrl( const XclExpRoot& rRoot, const OUString& rAbsUrl, const OUString* pTableName )
+OUString XclExpUrlHelper::EncodeUrl( const XclExpRoot& rRoot, std::u16string_view rAbsUrl, const OUString* pTableName )
{
OUString aDosUrl = INetURLObject(rAbsUrl).getFSysPath(FSysStyle::Dos);
OUString aDosBase = INetURLObject(rRoot.GetBasePath()).getFSysPath(FSysStyle::Dos);
diff --git a/sc/source/filter/excel/xepivot.cxx b/sc/source/filter/excel/xepivot.cxx
index 3c0656703be2..34564e30ef17 100644
--- a/sc/source/filter/excel/xepivot.cxx
+++ b/sc/source/filter/excel/xepivot.cxx
@@ -789,7 +789,7 @@ void XclExpPivotCache::AddGroupFields( const ScDPObject& rDPObj )
void XclExpPivotCache::WriteDconref( XclExpStream& rStrm ) const
{
- XclExpString aRef( XclExpUrlHelper::EncodeUrl( GetRoot(), OUString(), &maTabName ) );
+ XclExpString aRef( XclExpUrlHelper::EncodeUrl( GetRoot(), u"", &maTabName ) );
rStrm.StartRecord( EXC_ID_DCONREF, 7 + aRef.GetSize() );
rStrm << static_cast< sal_uInt16 >( maExpSrcRange.aStart.Row() )
<< static_cast< sal_uInt16 >( maExpSrcRange.aEnd.Row() )
diff --git a/sc/source/filter/html/htmlexp.cxx b/sc/source/filter/html/htmlexp.cxx
index 5bf84c498843..9c9f8745fac0 100644
--- a/sc/source/filter/html/htmlexp.cxx
+++ b/sc/source/filter/html/htmlexp.cxx
@@ -1312,7 +1312,7 @@ bool ScHTMLExport::WriteFieldText( const EditTextObject* pData )
}
void ScHTMLExport::CopyLocalFileToINet( OUString& rFileNm,
- const OUString& rTargetNm )
+ std::u16string_view rTargetNm )
{
INetURLObject aFileUrl, aTargetUrl;
aFileUrl.SetSmartURL( rFileNm );
diff --git a/sc/source/filter/inc/htmlexp.hxx b/sc/source/filter/inc/htmlexp.hxx
index 01f184cd99d1..29d5b3b1b81b 100644
--- a/sc/source/filter/inc/htmlexp.hxx
+++ b/sc/source/filter/inc/htmlexp.hxx
@@ -146,7 +146,7 @@ class ScHTMLExport : public ScExportBase
bool WriteFieldText( const EditTextObject* pData );
// copy a local file to internet if needed
- void CopyLocalFileToINet( OUString& rFileNm, const OUString& rTargetNm );
+ void CopyLocalFileToINet( OUString& rFileNm, std::u16string_view rTargetNm );
void PrepareGraphics( ScDrawLayer*, SCTAB nTab,
SCCOL nStartCol, SCROW nStartRow,
diff --git a/sc/source/filter/inc/xehelper.hxx b/sc/source/filter/inc/xehelper.hxx
index b608f65b3ea3..fac6b3bb24ae 100644
--- a/sc/source/filter/inc/xehelper.hxx
+++ b/sc/source/filter/inc/xehelper.hxx
@@ -409,7 +409,7 @@ public:
/** Encodes and returns the URL passed in rAbsUrl to an Excel like URL.
@param pTableName Optional pointer to a table name to be encoded in this URL. */
- static OUString EncodeUrl( const XclExpRoot& rRoot, const OUString& rAbsUrl, const OUString* pTableName = nullptr );
+ static OUString EncodeUrl( const XclExpRoot& rRoot, std::u16string_view rAbsUrl, const OUString* pTableName = nullptr );
/** Encodes and returns the passed DDE link to an Excel like DDE link. */
static OUString EncodeDde( std::u16string_view rApplic, std::u16string_view rTopic );
};
diff --git a/sc/source/ui/docshell/docsh8.cxx b/sc/source/ui/docshell/docsh8.cxx
index 2b1b7bad57bb..630856607c79 100644
--- a/sc/source/ui/docshell/docsh8.cxx
+++ b/sc/source/ui/docshell/docsh8.cxx
@@ -102,7 +102,7 @@ constexpr OUStringLiteral SC_DBPROP_CHARSET = u"CharSet";
namespace
{
- ErrCode lcl_getDBaseConnection(uno::Reference<sdbc::XDriverManager2>& _rDrvMgr, uno::Reference<sdbc::XConnection>& _rConnection, OUString& _rTabName, const OUString& rFullFileName, rtl_TextEncoding eCharSet)
+ ErrCode lcl_getDBaseConnection(uno::Reference<sdbc::XDriverManager2>& _rDrvMgr, uno::Reference<sdbc::XConnection>& _rConnection, OUString& _rTabName, std::u16string_view rFullFileName, rtl_TextEncoding eCharSet)
{
INetURLObject aURL;
aURL.SetSmartProtocol( INetProtocol::File );
diff --git a/sc/source/ui/docshell/externalrefmgr.cxx b/sc/source/ui/docshell/externalrefmgr.cxx
index f03815fdaa16..b3933bfbf817 100644
--- a/sc/source/ui/docshell/externalrefmgr.cxx
+++ b/sc/source/ui/docshell/externalrefmgr.cxx
@@ -2717,7 +2717,7 @@ void ScExternalRefManager::addFilesToLinkManager()
maybeLinkExternalFile( nFileId, true);
}
-void ScExternalRefManager::SrcFileData::maybeCreateRealFileName(const OUString& rOwnDocName)
+void ScExternalRefManager::SrcFileData::maybeCreateRealFileName(std::u16string_view rOwnDocName)
{
if (maRelativeName.isEmpty())
// No relative path given. Nothing to do.