[Libreoffice-commits] core.git: basctl/source basic/source connectivity/source cui/source dbaccess/source desktop/source editeng/source framework/source include/linguistic include/sfx2 include/svx include/tools linguistic/source sc/qa scripting/source sc/source sd/source sfx2/source sot/source svl/source svtools/source svx/qa svx/source sw/qa sw/source toolkit/source tools/qa tools/source vcl/source vcl/unx writerperfect/source xmlsecurity/source
Noel Grandin (via logerrit)
logerrit at kemper.freedesktop.org
Wed Apr 28 13:41:47 UTC 2021
basctl/source/basicide/moduldl2.cxx | 6 -
basic/source/inc/namecont.hxx | 6 -
basic/source/uno/namecont.cxx | 32 +++---
basic/source/uno/scriptcont.cxx | 6 -
connectivity/source/drivers/dbase/DTable.cxx | 16 +--
connectivity/source/drivers/file/FDatabaseMetaData.cxx | 2
cui/source/dialogs/hlinettp.cxx | 2
cui/source/dialogs/hltpbase.cxx | 2
cui/source/dialogs/screenshotannotationdlg.cxx | 2
cui/source/tabpages/tplnedef.cxx | 2
cui/source/tabpages/tplneend.cxx | 2
dbaccess/source/ui/dlg/dbfindex.cxx | 4
dbaccess/source/ui/dlg/dbwizsetup.cxx | 4
desktop/source/app/dispatchwatcher.cxx | 2
editeng/source/misc/acorrcfg.cxx | 2
editeng/source/misc/svxacorr.cxx | 4
framework/source/services/substitutepathvars.cxx | 2
framework/source/services/urltransformer.cxx | 4
include/linguistic/misc.hxx | 2
include/sfx2/doctempl.hxx | 4
include/svx/nbdtmg.hxx | 4
include/tools/urlobj.hxx | 80 ++++++++---------
linguistic/source/misc2.cxx | 2
sc/qa/unit/dataproviders_test.cxx | 8 -
sc/qa/unit/filters-test.cxx | 2
sc/qa/unit/helper/qahelper.cxx | 4
sc/qa/unit/helper/qahelper.hxx | 2
sc/source/filter/lotus/lotus.cxx | 2
sc/source/ui/docshell/docsh.cxx | 4
sc/source/ui/docshell/externalrefmgr.cxx | 4
scripting/source/stringresource/stringresource.cxx | 4
sd/source/filter/html/htmlex.cxx | 2
sd/source/filter/html/pubdlg.cxx | 4
sd/source/ui/app/sdmod.cxx | 2
sfx2/source/appl/appdde.cxx | 2
sfx2/source/doc/docfile.cxx | 4
sfx2/source/doc/doctempl.cxx | 4
sfx2/source/doc/doctemplates.cxx | 26 ++---
sfx2/source/view/viewsh.cxx | 2
sot/source/sdstor/ucbstorage.cxx | 4
svl/source/misc/lockfilecommon.cxx | 2
svl/source/misc/msodocumentlockfile.cxx | 2
svtools/source/control/inettbc.cxx | 8 -
svtools/source/misc/templatefoldercache.cxx | 2
svx/qa/unit/gallery/test_gallery.cxx | 8 -
svx/source/gallery2/gallery1.cxx | 6 -
svx/source/gallery2/gallerybinaryengine.cxx | 4
svx/source/gallery2/gallerybinaryengineentry.cxx | 6 -
svx/source/gallery2/gallerybinarystoragelocations.cxx | 8 -
svx/source/sidebar/nbdtmg.cxx | 12 +-
sw/qa/extras/htmlexport/htmlexport.cxx | 8 -
sw/source/core/doc/visiturl.cxx | 2
sw/source/core/swg/swblocks.cxx | 2
sw/source/filter/html/htmlflywriter.cxx | 2
sw/source/filter/html/htmlplug.cxx | 6 -
sw/source/ui/dbui/createaddresslistdialog.cxx | 2
sw/source/uibase/app/docsh2.cxx | 2
sw/source/uibase/config/uinums.cxx | 2
sw/source/uibase/dbui/dbmgr.cxx | 2
toolkit/source/awt/animatedimagespeer.cxx | 2
tools/qa/cppunit/test_urlobj.cxx | 12 +-
tools/source/fsys/urlobj.cxx | 36 +++----
vcl/source/gdi/pdfwriter_impl.cxx | 2
vcl/source/image/ImplImageTree.cxx | 2
vcl/unx/generic/printer/printerinfomanager.cxx | 4
writerperfect/source/calc/MSWorksCalcImportFilter.cxx | 2
xmlsecurity/source/gpg/SecurityEnvironment.cxx | 2
67 files changed, 210 insertions(+), 210 deletions(-)
New commits:
commit 39c3574b799690d4405d9318a5ba221b5feaccbe
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Tue Apr 27 18:08:53 2021 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Wed Apr 28 15:41:02 2021 +0200
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 at collabora.co.uk>
diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx
index e04558a42e7f..cd6587dc800d 100644
--- a/basctl/source/basicide/moduldl2.cxx
+++ b/basctl/source/basicide/moduldl2.cxx
@@ -1038,7 +1038,7 @@ void LibPage::ExportAsPackage( const OUString& aLibName )
Sequence< OUString > aFiles = xFP->getSelectedFiles();
INetURLObject aURL( aFiles[0] );
if( aURL.getExtension().isEmpty() )
- aURL.setExtension( "oxt" );
+ aURL.setExtension( u"oxt" );
OUString aPackageURL( aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
@@ -1071,7 +1071,7 @@ void LibPage::ExportAsPackage( const OUString& aLibName )
OUString(), NameClash::OVERWRITE );
INetURLObject aMetaInfInetObj( aTmpPath );
- aMetaInfInetObj.insertName( "META-INF",
+ aMetaInfInetObj.insertName( u"META-INF",
true, INetURLObject::LAST_SEGMENT, INetURLObject::EncodeMechanism::All );
OUString aMetaInfFolder = aMetaInfInetObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
if( xSFA->exists( aMetaInfFolder ) )
@@ -1095,7 +1095,7 @@ void LibPage::ExportAsPackage( const OUString& aLibName )
xPipe, Sequence< Sequence<beans::PropertyValue> >(
manifest.data(), manifest.size() ) );
- aMetaInfInetObj.insertName( "manifest.xml",
+ aMetaInfInetObj.insertName( u"manifest.xml",
true, INetURLObject::LAST_SEGMENT, INetURLObject::EncodeMechanism::All );
// write buffered pipe data to content:
diff --git a/basic/source/inc/namecont.hxx b/basic/source/inc/namecont.hxx
index 169182464fee..d3bed44db854 100644
--- a/basic/source/inc/namecont.hxx
+++ b/basic/source/inc/namecont.hxx
@@ -227,12 +227,12 @@ protected:
} meInitMode;
void implStoreLibrary( SfxLibrary* pLib,
- const OUString& rName,
+ std::u16string_view rName,
const css::uno::Reference< css::embed::XStorage >& rStorage );
// New variant for library export
void implStoreLibrary( SfxLibrary* pLib,
- const OUString& rName,
+ std::u16string_view rName,
const css::uno::Reference< css::embed::XStorage >& rStorage,
const OUString& rTargetURL,
const css::uno::Reference< css::ucb::XSimpleFileAccess3 >& rToUseSFI,
@@ -302,7 +302,7 @@ protected:
// Interface to get the BasicManager (Hack for password implementation)
BasicManager* getBasicManager();
- OUString createAppLibraryFolder( SfxLibrary* pLib, const OUString& aName );
+ OUString createAppLibraryFolder( SfxLibrary* pLib, std::u16string_view aName );
void init( const OUString& rInitialDocumentURL,
const css::uno::Reference< css::embed::XStorage >& _rxInitialStorage );
diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx
index 25be6ca465af..631a7623806e 100644
--- a/basic/source/uno/namecont.cxx
+++ b/basic/source/uno/namecont.cxx
@@ -552,8 +552,8 @@ void SAL_CALL SfxLibraryContainer::storeLibraries( )
static void checkAndCopyFileImpl( const INetURLObject& rSourceFolderInetObj,
const INetURLObject& rTargetFolderInetObj,
- const OUString& rCheckFileName,
- const OUString& rCheckExtension,
+ std::u16string_view rCheckFileName,
+ std::u16string_view rCheckExtension,
const Reference< XSimpleFileAccess3 >& xSFI )
{
INetURLObject aTargetFolderInetObj( rTargetFolderInetObj );
@@ -755,7 +755,7 @@ void SfxLibraryContainer::init_Impl( const OUString& rInitialDocumentURL,
pLibInfoInetObj.reset(new INetURLObject( maLibraryPath.getToken(1, ';') ));
}
pLibInfoInetObj->insertName( maInfoFileName, false, INetURLObject::LAST_SEGMENT, INetURLObject::EncodeMechanism::All );
- pLibInfoInetObj->setExtension( "xlc" );
+ pLibInfoInetObj->setExtension( u"xlc" );
aFileName = pLibInfoInetObj->GetMainURL( INetURLObject::DecodeMechanism::NONE );
}
@@ -774,7 +774,7 @@ void SfxLibraryContainer::init_Impl( const OUString& rInitialDocumentURL,
{
INetURLObject aLibInfoInetObj( maLibraryPath.getToken(1, ';') );
aLibInfoInetObj.insertName( maOldInfoFileName, false, INetURLObject::LAST_SEGMENT, INetURLObject::EncodeMechanism::All );
- aLibInfoInetObj.setExtension( "xli" );
+ aLibInfoInetObj.setExtension( u"xli" );
aFileName = aLibInfoInetObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
try
@@ -993,8 +993,8 @@ void SfxLibraryContainer::init_Impl( const OUString& rInitialDocumentURL,
INetURLObject aPrevUserBasicInetObj_1( aUserBasicInetObj );
aPrevUserBasicInetObj_1.removeSegment();
INetURLObject aPrevUserBasicInetObj_2 = aPrevUserBasicInetObj_1;
- aPrevUserBasicInetObj_1.Append( "__basic_80" );
- aPrevUserBasicInetObj_2.Append( "__basic_80_2" );
+ aPrevUserBasicInetObj_1.Append( u"__basic_80" );
+ aPrevUserBasicInetObj_2.Append( u"__basic_80_2" );
// #i93163
bool bCleanUp = false;
@@ -1033,7 +1033,7 @@ void SfxLibraryContainer::init_Impl( const OUString& rInitialDocumentURL,
aCheckFileName = "Module1";
checkAndCopyFileImpl( aUserBasicStandardInetObj,
aPrevUserBasicStandardInetObj,
- aCheckFileName, "xba", mxSFI );
+ aCheckFileName, u"xba", mxSFI );
}
else
{
@@ -1057,7 +1057,7 @@ void SfxLibraryContainer::init_Impl( const OUString& rInitialDocumentURL,
OUString aFolderUserBasic = aUserBasicInetObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
INetURLObject aUserBasicTmpInetObj( aUserBasicInetObj );
aUserBasicTmpInetObj.removeSegment();
- aUserBasicTmpInetObj.Append( "__basic_tmp" );
+ aUserBasicTmpInetObj.Append( u"__basic_tmp" );
OUString aFolderTmp = aUserBasicTmpInetObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
mxSFI->move( aFolderUserBasic, aFolderTmp );
@@ -1081,7 +1081,7 @@ void SfxLibraryContainer::init_Impl( const OUString& rInitialDocumentURL,
INetURLObject aPrevUserBasicLibInfoInetObj( aUserBasicInetObj );
aPrevUserBasicLibInfoInetObj.insertName( maInfoFileName, false, INetURLObject::LAST_SEGMENT,
INetURLObject::EncodeMechanism::All );
- aPrevUserBasicLibInfoInetObj.setExtension( "xlc");
+ aPrevUserBasicLibInfoInetObj.setExtension( u"xlc");
OUString aLibInfoFileName = aPrevUserBasicLibInfoInetObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
Sequence<Any> aInitSeq( 1 );
aInitSeq.getArray()[0] <<= aLibInfoFileName;
@@ -1181,7 +1181,7 @@ void SfxLibraryContainer::init_Impl( const OUString& rInitialDocumentURL,
INetURLObject aPrevUserBasicInetObj_Err( aUserBasicInetObj );
aPrevUserBasicInetObj_Err.removeSegment();
- aPrevUserBasicInetObj_Err.Append( "__basic_80_err" );
+ aPrevUserBasicInetObj_Err.Append( u"__basic_80_err" );
OUString aPrevFolder_Err = aPrevUserBasicInetObj_Err.GetMainURL( INetURLObject::DecodeMechanism::NONE );
bool bSaved = false;
@@ -1285,7 +1285,7 @@ void SfxLibraryContainer::checkStorageURL( const OUString& aSourceURL,
// URL to library folder
aStorageURL = aExpandedSourceURL;
aInetObj.insertName( maInfoFileName, false, INetURLObject::LAST_SEGMENT, INetURLObject::EncodeMechanism::All );
- aInetObj.setExtension( "xlb" );
+ aInetObj.setExtension( u"xlb" );
aLibInfoFileURL = aInetObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
}
}
@@ -1330,7 +1330,7 @@ bool SfxLibraryContainer::implLoadPasswordLibrary(
return true;
}
-OUString SfxLibraryContainer::createAppLibraryFolder( SfxLibrary* pLib, const OUString& aName )
+OUString SfxLibraryContainer::createAppLibraryFolder( SfxLibrary* pLib, std::u16string_view aName )
{
OUString aLibDirPath = pLib->maStorageURL;
if( aLibDirPath.isEmpty() )
@@ -1357,7 +1357,7 @@ OUString SfxLibraryContainer::createAppLibraryFolder( SfxLibrary* pLib, const OU
// Storing
void SfxLibraryContainer::implStoreLibrary( SfxLibrary* pLib,
- const OUString& aName,
+ std::u16string_view aName,
const uno::Reference< embed::XStorage >& xStorage )
{
Reference< XSimpleFileAccess3 > xDummySFA;
@@ -1367,7 +1367,7 @@ void SfxLibraryContainer::implStoreLibrary( SfxLibrary* pLib,
// New variant for library export
void SfxLibraryContainer::implStoreLibrary( SfxLibrary* pLib,
- const OUString& aName,
+ std::u16string_view aName,
const uno::Reference< embed::XStorage >& xStorage,
const OUString& aTargetURL,
const Reference< XSimpleFileAccess3 >& rToUseSFI,
@@ -1580,7 +1580,7 @@ void SfxLibraryContainer::implStoreLibraryIndexFile( SfxLibrary* pLib,
xSFI->createFolder( aLibDirPath );
}
aInetObj.insertName( maInfoFileName, false, INetURLObject::LAST_SEGMENT, INetURLObject::EncodeMechanism::All );
- aInetObj.setExtension( "xlb" );
+ aInetObj.setExtension( u"xlb" );
aLibInfoPath = aInetObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
}
else
@@ -2070,7 +2070,7 @@ void SfxLibraryContainer::storeLibraries_Impl( const uno::Reference< embed::XSto
// Create Output stream
INetURLObject aLibInfoInetObj( maLibraryPath.getToken(1, ';') );
aLibInfoInetObj.insertName( maInfoFileName, false, INetURLObject::LAST_SEGMENT, INetURLObject::EncodeMechanism::All );
- aLibInfoInetObj.setExtension( "xlc" );
+ aLibInfoInetObj.setExtension( u"xlc" );
OUString aLibInfoPath( aLibInfoInetObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
try
diff --git a/basic/source/uno/scriptcont.cxx b/basic/source/uno/scriptcont.cxx
index cf26443777b6..5ccf6cc0ddfb 100644
--- a/basic/source/uno/scriptcont.cxx
+++ b/basic/source/uno/scriptcont.cxx
@@ -505,7 +505,7 @@ void SAL_CALL SfxScriptLibraryContainer::changeLibraryPassword( const OUString&
}
else
{
- aElementInetObj.setExtension( "pba" );
+ aElementInetObj.setExtension( u"pba" );
}
OUString aElementPath( aElementInetObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
@@ -700,7 +700,7 @@ bool SfxScriptLibraryContainer::implStorePasswordLibrary( SfxLibrary* pLib, cons
aElementInetObj.insertName( aElementName, false,
INetURLObject::LAST_SEGMENT,
INetURLObject::EncodeMechanism::All );
- aElementInetObj.setExtension( "pba" );
+ aElementInetObj.setExtension( u"pba" );
OUString aElementPath = aElementInetObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
if( !isLibraryElementValid( pLib->getByName( aElementName ) ) )
@@ -966,7 +966,7 @@ bool SfxScriptLibraryContainer::implLoadPasswordLibrary
INetURLObject aElementInetObj( aLibDirPath );
aElementInetObj.insertName( aElementName, false,
INetURLObject::LAST_SEGMENT, INetURLObject::EncodeMechanism::All );
- aElementInetObj.setExtension( "pba" );
+ aElementInetObj.setExtension( u"pba" );
OUString aElementPath = aElementInetObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
uno::Reference< embed::XStorage > xElementRootStorage;
diff --git a/connectivity/source/drivers/dbase/DTable.cxx b/connectivity/source/drivers/dbase/DTable.cxx
index 7a571a44b6ef..57b6bee8c43c 100644
--- a/connectivity/source/drivers/dbase/DTable.cxx
+++ b/connectivity/source/drivers/dbase/DTable.cxx
@@ -493,9 +493,9 @@ void ODbaseTable::construct()
// nyi: Ugly for Unix and Mac!
if ( m_aHeader.type == FoxProMemo || m_aHeader.type == VisualFoxPro || m_aHeader.type == VisualFoxProAuto) // foxpro uses another extension
- aURL.SetExtension("fpt");
+ aURL.SetExtension(u"fpt");
else
- aURL.SetExtension("dbt");
+ aURL.SetExtension(u"dbt");
// If the memo file isn't found, the data will be displayed anyhow.
// However, updates can't be done
@@ -656,7 +656,7 @@ void ODbaseTable::refreshIndexes()
INetURLObject aURL;
aURL.SetURL(getEntry(m_pConnection,m_Name));
- aURL.setExtension("inf");
+ aURL.setExtension(u"inf");
Config aInfFile(aURL.getFSysPath(FSysStyle::Detect));
aInfFile.SetGroup(dBASE_III_GROUP);
sal_uInt16 nKeyCnt = aInfFile.GetKeyCount();
@@ -1047,7 +1047,7 @@ bool ODbaseTable::CreateImpl()
if (bMemoFile)
{
OUString aExt = aURL.getExtension();
- aURL.setExtension("dbt"); // extension for memo file
+ aURL.setExtension(u"dbt"); // extension for memo file
bool bMemoAlreadyExists = false;
try
@@ -1394,7 +1394,7 @@ bool ODbaseTable::Drop_Static(const OUString& _sUrl, bool _bHasMemoFields, OColl
{
if (_bHasMemoFields)
{ // delete the memo fields
- aURL.setExtension("dbt");
+ aURL.setExtension(u"dbt");
bDropped = ::utl::UCBContentHelper::Kill(aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE));
}
@@ -1414,7 +1414,7 @@ bool ODbaseTable::Drop_Static(const OUString& _sUrl, bool _bHasMemoFields, OColl
{
}
}
- aURL.setExtension("inf");
+ aURL.setExtension(u"inf");
// as the inf file does not necessarily exist, we aren't allowed to use UCBContentHelper::Kill
try
@@ -2272,7 +2272,7 @@ void SAL_CALL ODbaseTable::rename( const OUString& newName )
namespace
{
void renameFile(file::OConnection const * _pConnection,std::u16string_view oldName,
- const OUString& newName,const OUString& _sExtension)
+ const OUString& newName, std::u16string_view _sExtension)
{
OUString aName = ODbaseTable::getEntry(_pConnection,oldName);
if(aName.isEmpty())
@@ -2319,7 +2319,7 @@ void ODbaseTable::renameImpl( const OUString& newName )
renameFile(m_pConnection,m_Name,newName,m_pConnection->getExtension());
if ( HasMemoFields() )
{ // delete the memo fields
- renameFile(m_pConnection,m_Name,newName,"dbt");
+ renameFile(m_pConnection,m_Name,newName,u"dbt");
}
}
diff --git a/connectivity/source/drivers/file/FDatabaseMetaData.cxx b/connectivity/source/drivers/file/FDatabaseMetaData.cxx
index aa24ef836f15..d6fe54628200 100644
--- a/connectivity/source/drivers/file/FDatabaseMetaData.cxx
+++ b/connectivity/source/drivers/file/FDatabaseMetaData.cxx
@@ -71,7 +71,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getColumns(
namespace
{
- sal_Int16 isCaseSensitiveParentFolder( const OUString& _rFolderOrDoc, const OUString& _rDocName )
+ sal_Int16 isCaseSensitiveParentFolder( const OUString& _rFolderOrDoc, std::u16string_view _rDocName )
{
sal_Int16 nIsCS = 1;
try
diff --git a/cui/source/dialogs/hlinettp.cxx b/cui/source/dialogs/hlinettp.cxx
index 0ed40de94df8..86a3da492a69 100644
--- a/cui/source/dialogs/hlinettp.cxx
+++ b/cui/source/dialogs/hlinettp.cxx
@@ -101,7 +101,7 @@ void SvxHyperlinkInternetTp::FillDlgFields(const OUString& rStrURL)
//do not show password and user in url
if(!aURL.GetUser().isEmpty() || !aURL.GetPass().isEmpty() )
- aURL.SetUserAndPass("", "");
+ aURL.SetUserAndPass(u"", u"");
}
// set URL-field
diff --git a/cui/source/dialogs/hltpbase.cxx b/cui/source/dialogs/hltpbase.cxx
index 5e95ed6c5e6b..9515443e67d7 100644
--- a/cui/source/dialogs/hltpbase.cxx
+++ b/cui/source/dialogs/hltpbase.cxx
@@ -56,7 +56,7 @@ OUString CreateUiNameFromURL( const OUString& aStrURL )
{
//remove password from name
INetURLObject aTmpURL(aURLObj);
- aTmpURL.SetPass("");
+ aTmpURL.SetPass(u"");
aStrUiURL = aTmpURL.GetMainURL( INetURLObject::DecodeMechanism::Unambiguous );
}
break;
diff --git a/cui/source/dialogs/screenshotannotationdlg.cxx b/cui/source/dialogs/screenshotannotationdlg.cxx
index fd378f7686f1..f5f214ca4fa9 100644
--- a/cui/source/dialogs/screenshotannotationdlg.cxx
+++ b/cui/source/dialogs/screenshotannotationdlg.cxx
@@ -322,7 +322,7 @@ IMPL_LINK_NOARG(ScreenshotAnnotationDlg_Impl, saveButtonHandler, weld::Button&,
if (aCurrentExtension.isEmpty())
{
- aConfirmedURL.setExtension("png");
+ aConfirmedURL.setExtension(u"png");
}
// open stream
diff --git a/cui/source/tabpages/tplnedef.cxx b/cui/source/tabpages/tplnedef.cxx
index 23739c287f2a..2d4b04fb79cd 100644
--- a/cui/source/tabpages/tplnedef.cxx
+++ b/cui/source/tabpages/tplnedef.cxx
@@ -759,7 +759,7 @@ IMPL_LINK_NOARG(SvxLineDefTabPage, ClickSaveHdl_Impl, weld::Button&, void)
aFile.Append( pDashList->GetName() );
if( aFile.getExtension().isEmpty() )
- aFile.SetExtension( "sod" );
+ aFile.SetExtension( u"sod" );
}
aDlg.SetDisplayDirectory( aFile.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
diff --git a/cui/source/tabpages/tplneend.cxx b/cui/source/tabpages/tplneend.cxx
index 2d923e166477..d34b016fa7b0 100644
--- a/cui/source/tabpages/tplneend.cxx
+++ b/cui/source/tabpages/tplneend.cxx
@@ -579,7 +579,7 @@ IMPL_LINK_NOARG(SvxLineEndDefTabPage, ClickSaveHdl_Impl, weld::Button&, void)
aFile.Append( pLineEndList->GetName() );
if( aFile.getExtension().isEmpty() )
- aFile.SetExtension( "soe" );
+ aFile.SetExtension( u"soe" );
}
aDlg.SetDisplayDirectory( aFile.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
diff --git a/dbaccess/source/ui/dlg/dbfindex.cxx b/dbaccess/source/ui/dlg/dbfindex.cxx
index d66e48405d00..d12688d2cbd8 100644
--- a/dbaccess/source/ui/dlg/dbfindex.cxx
+++ b/dbaccess/source/ui/dlg/dbfindex.cxx
@@ -276,7 +276,7 @@ void ODbaseIndexDialog::Init()
OTableInfo& rTabInfo = m_aTableInfoList.back();
// open the INF file
- aURL.setExtension("inf");
+ aURL.setExtension(u"inf");
OFileNotation aTransformer(aURL.GetURLNoPass(), OFileNotation::N_URL);
Config aInfFile( aTransformer.get(OFileNotation::N_SYSTEM) );
aInfFile.SetGroup( aGroupIdent );
@@ -363,7 +363,7 @@ void OTableInfo::WriteInfFile( const OUString& rDSN ) const
}
aURL.SetSmartURL(aDsn);
aURL.Append(aTableName);
- aURL.setExtension("inf");
+ aURL.setExtension(u"inf");
OFileNotation aTransformer(aURL.GetURLNoPass(), OFileNotation::N_URL);
Config aInfFile( aTransformer.get(OFileNotation::N_SYSTEM) );
diff --git a/dbaccess/source/ui/dlg/dbwizsetup.cxx b/dbaccess/source/ui/dlg/dbwizsetup.cxx
index d4e7171b448f..1d9f89c8791f 100644
--- a/dbaccess/source/ui/dlg/dbwizsetup.cxx
+++ b/dbaccess/source/ui/dlg/dbwizsetup.cxx
@@ -816,7 +816,7 @@ bool ODbTypeWizDialogSetup::SaveDatabaseDocument()
if (bFolderExists)
{
i++;
- pURL->setName(sLastSegmentName + OUString::number(i));
+ pURL->setName(OUString(sLastSegmentName + OUString::number(i)));
}
}
}
@@ -834,7 +834,7 @@ bool ODbTypeWizDialogSetup::SaveDatabaseDocument()
bElementExists = xSimpleFileAccess->exists( aExistenceCheck.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
if ( bElementExists )
{
- aExistenceCheck.setBase( BaseName + OUString::number( i ) );
+ aExistenceCheck.setBase( OUString(BaseName + OUString::number( i ) ));
++i;
}
}
diff --git a/desktop/source/app/dispatchwatcher.cxx b/desktop/source/app/dispatchwatcher.cxx
index bde83bcd22d4..9dea7779405a 100644
--- a/desktop/source/app/dispatchwatcher.cxx
+++ b/desktop/source/app/dispatchwatcher.cxx
@@ -255,7 +255,7 @@ void batchPrint( const OUString &rPrinterName, const Reference< XPrintable > &xD
aPrinterName=rPrinterName.copy( 0, nPathIndex );
INetURLObject aOutFilename( aObj );
- aOutFilename.SetExtension( "pdf" );
+ aOutFilename.SetExtension( u"pdf" );
FileBase::getFileURLFromSystemPath( aFilterOut, aFilterOut );
OUString aOutFile = aFilterOut + "/" + aOutFilename.getName();
diff --git a/editeng/source/misc/acorrcfg.cxx b/editeng/source/misc/acorrcfg.cxx
index 52f0b6d648e9..5489e7d5011f 100644
--- a/editeng/source/misc/acorrcfg.cxx
+++ b/editeng/source/misc/acorrcfg.cxx
@@ -62,7 +62,7 @@ SvxAutoCorrCfg::SvxAutoCorrCfg() :
for( OUString* pS : { &sSharePath, &sUserPath } )
{
INetURLObject aPath( *pS );
- aPath.insertName("acor");
+ aPath.insertName(u"acor");
*pS = aPath.GetMainURL(INetURLObject::DecodeMechanism::ToIUri);
}
pAutoCorrect.reset( new SvxAutoCorrect( sSharePath, sUserPath ) );
diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index ce1f788f593c..2845c2279b68 100644
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -2530,7 +2530,7 @@ void SvxAutoCorrectLanguageLists::MakeUserStorage_Impl()
aDest = INetURLObject ( sUserAutoCorrFile );
if ( SotStorage::IsOLEStorage ( sShareAutoCorrFile ) )
{
- aDest.SetExtension ( "bak" );
+ aDest.SetExtension ( u"bak" );
bConvert = true;
}
bCopy = true;
@@ -2539,7 +2539,7 @@ void SvxAutoCorrectLanguageLists::MakeUserStorage_Impl()
{
aSource = INetURLObject ( sUserAutoCorrFile );
aDest = INetURLObject ( sUserAutoCorrFile );
- aDest.SetExtension ( "bak" );
+ aDest.SetExtension ( u"bak" );
bCopy = bConvert = true;
}
if (bCopy)
diff --git a/framework/source/services/substitutepathvars.cxx b/framework/source/services/substitutepathvars.cxx
index 2a3cb4994fc6..84725a3a18c4 100644
--- a/framework/source/services/substitutepathvars.cxx
+++ b/framework/source/services/substitutepathvars.cxx
@@ -639,7 +639,7 @@ void SubstitutePathVariables::SetPredefinedPathVariables()
// Set $(prog), $(progpath), $(progurl)
INetURLObject aProgObj(
m_aPreDefVars.m_FixedVar[PREDEFVAR_BRANDBASEURL] );
- if ( !aProgObj.HasError() && aProgObj.insertName( LIBO_BIN_FOLDER ) )
+ if ( !aProgObj.HasError() && aProgObj.insertName( u"" LIBO_BIN_FOLDER ) )
{
m_aPreDefVars.m_FixedVar[ PREDEFVAR_PROGPATH ] = aProgObj.GetMainURL(INetURLObject::DecodeMechanism::NONE);
m_aPreDefVars.m_FixedVar[ PREDEFVAR_PROGURL ] = m_aPreDefVars.m_FixedVar[ PREDEFVAR_PROGPATH ];
diff --git a/framework/source/services/urltransformer.cxx b/framework/source/services/urltransformer.cxx
index b5d319ef8716..a7655ef9b029 100644
--- a/framework/source/services/urltransformer.cxx
+++ b/framework/source/services/urltransformer.cxx
@@ -101,8 +101,8 @@ void lcl_ParserHelper(INetURLObject& _rParser, css::util::URL& _rURL,bool _bUseI
if ( _bUseIntern )
_rURL.Complete = _rURL.Complete.intern();
- _rParser.SetMark ( OUString() );
- _rParser.SetParam( OUString() );
+ _rParser.SetMark( u"" );
+ _rParser.SetParam( u"" );
_rURL.Main = _rParser.GetMainURL( INetURLObject::DecodeMechanism::NONE );
}
diff --git a/include/linguistic/misc.hxx b/include/linguistic/misc.hxx
index aba180066990..1ead38427fdc 100644
--- a/include/linguistic/misc.hxx
+++ b/include/linguistic/misc.hxx
@@ -118,7 +118,7 @@ std::vector< OUString > GetDictionaryPaths();
/// @returns a URL for a new and writable dictionary rDicName.
/// The URL will point to the path given by 'GetDictionaryWriteablePath'
-LNG_DLLPUBLIC OUString GetWritableDictionaryURL( const OUString &rDicName );
+LNG_DLLPUBLIC OUString GetWritableDictionaryURL( std::u16string_view rDicName );
LNG_DLLPUBLIC sal_Int32 GetPosInWordToCheck( const OUString &rTxt, sal_Int32 nPos );
diff --git a/include/sfx2/doctempl.hxx b/include/sfx2/doctempl.hxx
index dbd527eb47b5..d16c93988710 100644
--- a/include/sfx2/doctempl.hxx
+++ b/include/sfx2/doctempl.hxx
@@ -59,8 +59,8 @@ public:
OUString GetPath(sal_uInt16 nRegion, sal_uInt16 nIdx) const;
// Allows to retrieve the target template URL from the UCB
- OUString GetTemplateTargetURLFromComponent( const OUString& aGroupName,
- const OUString& aTitle );
+ OUString GetTemplateTargetURLFromComponent(std::u16string_view aGroupName,
+ std::u16string_view aTitle );
// Convert a resource string - a template name - to its localised pair
// if it exists in sfx2/inc/strings.hxx
diff --git a/include/svx/nbdtmg.hxx b/include/svx/nbdtmg.hxx
index 8b89c82549b4..7892a085ff5e 100644
--- a/include/svx/nbdtmg.hxx
+++ b/include/svx/nbdtmg.hxx
@@ -140,8 +140,8 @@ class SVX_DLLPUBLIC NBOTypeMgrBase
const OUString& GetNumCharFmtName() const { return aNumCharFmtName;}
MapUnit GetMapUnit() const { return eCoreUnit;}
protected:
- void ImplLoad(const OUString& filename);
- void ImplStore(const OUString& filename);
+ void ImplLoad(std::u16string_view filename);
+ void ImplStore(std::u16string_view filename);
};
diff --git a/include/tools/urlobj.hxx b/include/tools/urlobj.hxx
index e323e5049987..667bedbef388 100644
--- a/include/tools/urlobj.hxx
+++ b/include/tools/urlobj.hxx
@@ -295,8 +295,8 @@ public:
EncodeMechanism eMechanism = EncodeMechanism::WasEncoded,
rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8);
- bool ConcatData(INetProtocol eTheScheme, OUString const & rTheUser,
- OUString const & rThePassword,
+ bool ConcatData(INetProtocol eTheScheme, std::u16string_view rTheUser,
+ std::u16string_view rThePassword,
OUString const & rTheHost, sal_uInt32 nThePort,
OUString const & rThePath);
@@ -359,14 +359,14 @@ public:
OUString getExternalURL() const;
- static inline bool translateToExternal(OUString const & rTheIntURIRef,
+ static inline bool translateToExternal(std::u16string_view rTheIntURIRef,
OUString & rTheExtURIRef,
DecodeMechanism eDecodeMechanism
= DecodeMechanism::ToIUri,
rtl_TextEncoding eCharset
= RTL_TEXTENCODING_UTF8);
- static inline bool translateToInternal(OUString const & rTheExtURIRef,
+ static inline bool translateToInternal(std::u16string_view rTheExtURIRef,
OUString & rTheIntURIRef,
DecodeMechanism eDecodeMechanism
= DecodeMechanism::ToIUri,
@@ -423,13 +423,13 @@ public:
= RTL_TEXTENCODING_UTF8) const
{ return decode(m_aAuth, eMechanism, eCharset); }
- bool SetUser(OUString const & rTheUser)
+ bool SetUser(std::u16string_view rTheUser)
{ return setUser(rTheUser, RTL_TEXTENCODING_UTF8); }
- inline bool SetPass(OUString const & rThePassword);
+ inline bool SetPass(std::u16string_view rThePassword);
- inline bool SetUserAndPass(OUString const & rTheUser,
- OUString const & rThePassword);
+ inline bool SetUserAndPass(std::u16string_view rTheUser,
+ std::u16string_view rThePassword);
// Host and Port:
@@ -541,7 +541,7 @@ public:
the specified place to insert the new segment does not exist, false is
returned. If false is returned, the object is not modified.
*/
- bool insertName(OUString const & rTheName,
+ bool insertName(std::u16string_view rTheName,
bool bAppendFinalSlash = false,
sal_Int32 nIndex = LAST_SEGMENT,
EncodeMechanism eMechanism = EncodeMechanism::WasEncoded,
@@ -583,7 +583,7 @@ public:
a last segment does not exist, false is returned. If false is
returned, the object is not modified.
*/
- bool setName(OUString const& rTheName,
+ bool setName(std::u16string_view rTheName,
EncodeMechanism eMechanism = EncodeMechanism::WasEncoded,
rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8);
@@ -627,7 +627,7 @@ public:
the specified segment does not exist, false is returned. If false is
returned, the object is not modified.
*/
- bool setBase(OUString const & rTheBase,
+ bool setBase(std::u16string_view rTheBase,
sal_Int32 nIndex = LAST_SEGMENT,
EncodeMechanism eMechanism = EncodeMechanism::WasEncoded,
rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8);
@@ -680,7 +680,7 @@ public:
the specified segment does not exist, false is returned. If false is
returned, the object is not modified.
*/
- bool setExtension(OUString const & rTheExtension,
+ bool setExtension(std::u16string_view rTheExtension,
sal_Int32 nIndex = LAST_SEGMENT,
bool bIgnoreFinalSlash = true,
rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8);
@@ -736,7 +736,7 @@ public:
= RTL_TEXTENCODING_UTF8) const
{ return decode(m_aQuery, DecodeMechanism::NONE, eCharset); }
- inline bool SetParam(OUString const & rTheQuery,
+ inline bool SetParam(std::u16string_view rTheQuery,
EncodeMechanism eMechanism = EncodeMechanism::WasEncoded,
rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8);
@@ -749,7 +749,7 @@ public:
= RTL_TEXTENCODING_UTF8) const
{ return decode(m_aFragment, eMechanism, eCharset); }
- inline bool SetMark(OUString const & rTheFragment,
+ inline bool SetMark(std::u16string_view rTheFragment,
EncodeMechanism eMechanism = EncodeMechanism::WasEncoded,
rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8);
@@ -823,7 +823,7 @@ public:
@return The text, encoded according to the given mechanism and
charset ('forbidden' characters replaced by escape sequences).
*/
- static inline OUString encode(OUString const & rText, Part ePart,
+ static inline OUString encode(std::u16string_view rText, Part ePart,
EncodeMechanism eMechanism,
rtl_TextEncoding eCharset
= RTL_TEXTENCODING_UTF8);
@@ -889,7 +889,7 @@ public:
*/
OUString GetFileExtension() const;
- bool Append(OUString const & rTheSegment,
+ bool Append(std::u16string_view rTheSegment,
EncodeMechanism eMechanism = EncodeMechanism::WasEncoded,
rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8);
@@ -903,11 +903,11 @@ public:
OUString GetPath() const;
- void SetBase(OUString const & rTheBase);
+ void SetBase(std::u16string_view rTheBase);
OUString GetBase() const;
- void SetExtension(OUString const & rTheExtension);
+ void SetExtension(std::u16string_view rTheExtension);
OUString CutExtension();
@@ -994,12 +994,12 @@ private:
// External URLs:
static bool convertIntToExt(
- OUString const & rTheIntURIRef,
+ std::u16string_view rTheIntURIRef,
OUString & rTheExtURIRef, DecodeMechanism eDecodeMechanism,
rtl_TextEncoding eCharset);
static bool convertExtToInt(
- OUString const & rTheExtURIRef,
+ std::u16string_view rTheExtURIRef,
OUString & rTheIntURIRef, DecodeMechanism eDecodeMechanism,
rtl_TextEncoding eCharset);
@@ -1024,13 +1024,13 @@ private:
// User Info:
bool setUser(
- OUString const & rTheUser,
+ std::u16string_view rTheUser,
rtl_TextEncoding eCharset);
bool clearPassword();
bool setPassword(
- OUString const & rThePassword,
+ std::u16string_view rThePassword,
rtl_TextEncoding eCharset);
// Host and Port:
@@ -1074,7 +1074,7 @@ private:
void clearQuery();
bool setQuery(
- OUString const & rTheQuery,
+ std::u16string_view rTheQuery,
EncodeMechanism eMechanism, rtl_TextEncoding eCharset);
// Fragment:
@@ -1082,7 +1082,7 @@ private:
bool clearFragment();
bool setFragment(
- OUString const & rTheMark,
+ std::u16string_view rTheMark,
EncodeMechanism eMechanism, rtl_TextEncoding eCharset);
// FILE URLs:
@@ -1100,7 +1100,7 @@ private:
bool bKeepVisibleEscapes);
static inline OUString encodeText(
- OUString const & rTheText, Part ePart,
+ std::u16string_view rTheText, Part ePart,
EncodeMechanism eMechanism, rtl_TextEncoding eCharset,
bool bKeepVisibleEscapes);
@@ -1119,14 +1119,14 @@ private:
};
// static
-inline OUString INetURLObject::encodeText(OUString const & rTheText,
+inline OUString INetURLObject::encodeText(std::u16string_view rTheText,
Part ePart,
EncodeMechanism eMechanism,
rtl_TextEncoding eCharset,
bool bKeepVisibleEscapes)
{
- return encodeText(rTheText.getStr(),
- rTheText.getStr() + rTheText.getLength(), ePart,
+ return encodeText(rTheText.data(),
+ rTheText.data() + rTheText.size(), ePart,
eMechanism, eCharset, bKeepVisibleEscapes);
}
@@ -1224,7 +1224,7 @@ inline OUString INetURLObject::GetRelURL(OUString const & rTheBaseURIRef,
}
// static
-inline bool INetURLObject::translateToExternal(OUString const &
+inline bool INetURLObject::translateToExternal(std::u16string_view
rTheIntURIRef,
OUString & rTheExtURIRef,
DecodeMechanism
@@ -1236,7 +1236,7 @@ inline bool INetURLObject::translateToExternal(OUString const &
}
// static
-inline bool INetURLObject::translateToInternal(OUString const &
+inline bool INetURLObject::translateToInternal(std::u16string_view
rTheExtURIRef,
OUString & rTheIntURIRef,
DecodeMechanism
@@ -1247,27 +1247,27 @@ inline bool INetURLObject::translateToInternal(OUString const &
eDecodeMechanism, eCharset);
}
-inline bool INetURLObject::SetPass(OUString const & rThePassword)
+inline bool INetURLObject::SetPass(std::u16string_view rThePassword)
{
- return rThePassword.isEmpty() ?
+ return rThePassword.empty() ?
clearPassword() :
setPassword(rThePassword, RTL_TEXTENCODING_UTF8);
}
-inline bool INetURLObject::SetUserAndPass(OUString const & rTheUser,
- OUString const & rThePassword)
+inline bool INetURLObject::SetUserAndPass(std::u16string_view rTheUser,
+ std::u16string_view rThePassword)
{
return setUser(rTheUser, RTL_TEXTENCODING_UTF8)
- && (rThePassword.isEmpty() ?
+ && (rThePassword.empty() ?
clearPassword() :
setPassword(rThePassword, RTL_TEXTENCODING_UTF8));
}
-inline bool INetURLObject::SetParam(OUString const & rTheQuery,
+inline bool INetURLObject::SetParam(std::u16string_view rTheQuery,
EncodeMechanism eMechanism,
rtl_TextEncoding eCharset)
{
- if (rTheQuery.isEmpty())
+ if (rTheQuery.empty())
{
clearQuery();
return false;
@@ -1275,17 +1275,17 @@ inline bool INetURLObject::SetParam(OUString const & rTheQuery,
return setQuery(rTheQuery, eMechanism, eCharset);
}
-inline bool INetURLObject::SetMark(OUString const & rTheFragment,
+inline bool INetURLObject::SetMark(std::u16string_view rTheFragment,
EncodeMechanism eMechanism,
rtl_TextEncoding eCharset)
{
- return rTheFragment.isEmpty() ?
+ return rTheFragment.empty() ?
clearFragment() :
setFragment(rTheFragment, eMechanism, eCharset);
}
// static
-inline OUString INetURLObject::encode(OUString const & rText, Part ePart,
+inline OUString INetURLObject::encode(std::u16string_view rText, Part ePart,
EncodeMechanism eMechanism,
rtl_TextEncoding eCharset)
{
diff --git a/linguistic/source/misc2.cxx b/linguistic/source/misc2.cxx
index eeccadd5cb4a..86a81e5a1f06 100644
--- a/linguistic/source/misc2.cxx
+++ b/linguistic/source/misc2.cxx
@@ -144,7 +144,7 @@ std::vector< OUString > GetDictionaryPaths()
return GetMultiPaths_Impl( u"Dictionary", PATH_FLAG_ALL );
}
-OUString GetWritableDictionaryURL( const OUString &rDicName )
+OUString GetWritableDictionaryURL( std::u16string_view rDicName )
{
// new user writable dictionaries should be created in the 'writable' path
OUString aDirName( GetDictionaryWriteablePath() );
diff --git a/sc/qa/unit/dataproviders_test.cxx b/sc/qa/unit/dataproviders_test.cxx
index 9dfda0efaa6c..2692671837dc 100644
--- a/sc/qa/unit/dataproviders_test.cxx
+++ b/sc/qa/unit/dataproviders_test.cxx
@@ -54,7 +54,7 @@ void ScDataProvidersTest::testCSVImport()
CPPUNIT_ASSERT(bInserted);
OUString aFileURL;
- createFileURL(u"test1.", "csv", aFileURL);
+ createFileURL(u"test1.", u"csv", aFileURL);
sc::ExternalDataSource aDataSource(aFileURL, "org.libreoffice.calc.csv", m_pDoc);
aDataSource.setDBData(pDBData->GetName());
@@ -82,7 +82,7 @@ void ScDataProvidersTest::testDataLargerThanDB()
CPPUNIT_ASSERT(bInserted);
OUString aFileURL;
- createFileURL(u"test1.", "csv", aFileURL);
+ createFileURL(u"test1.", u"csv", aFileURL);
sc::ExternalDataSource aDataSource(aFileURL, "org.libreoffice.calc.csv", m_pDoc);
aDataSource.setDBData(pDBData->GetName());
@@ -110,7 +110,7 @@ void ScDataProvidersTest::testHTMLImport()
CPPUNIT_ASSERT(bInserted);
OUString aFileURL;
- createFileURL(u"test1.", "html", aFileURL);
+ createFileURL(u"test1.", u"html", aFileURL);
sc::ExternalDataSource aDataSource(aFileURL, "org.libreoffice.calc.html", m_pDoc);
aDataSource.setID("//table");
aDataSource.setDBData(pDBData->GetName());
@@ -160,7 +160,7 @@ void ScDataProvidersTest::testXMLImport()
aRangeLink.maRowGroups.push_back("/bookstore/book");
aParam.maRangeLinks.push_back(aRangeLink);
- createFileURL(u"test1.", "xml", aFileURL);
+ createFileURL(u"test1.", u"xml", aFileURL);
sc::ExternalDataSource aDataSource(aFileURL, "org.libreoffice.calc.xml", m_pDoc);
aDataSource.setDBData("testDB");
aDataSource.setXMLImportParam(aParam);
diff --git a/sc/qa/unit/filters-test.cxx b/sc/qa/unit/filters-test.cxx
index 0595f0be8841..1a888725154c 100644
--- a/sc/qa/unit/filters-test.cxx
+++ b/sc/qa/unit/filters-test.cxx
@@ -307,7 +307,7 @@ void ScFiltersTest::testContentLotus123()
void ScFiltersTest::testContentofz9704()
{
OUString aFileName;
- createFileURL(u"ofz9704.", "123", aFileName);
+ createFileURL(u"ofz9704.", u"123", aFileName);
SvFileStream aFileStream(aFileName, StreamMode::READ);
TestImportWKS(aFileStream);
}
diff --git a/sc/qa/unit/helper/qahelper.cxx b/sc/qa/unit/helper/qahelper.cxx
index 4091a75ef6dd..3774f6b5a27c 100644
--- a/sc/qa/unit/helper/qahelper.cxx
+++ b/sc/qa/unit/helper/qahelper.cxx
@@ -642,7 +642,7 @@ OUString EnsureSeparator(const OUStringBuffer& rFilePath)
}
void ScBootstrapFixture::createFileURL(
- std::u16string_view aFileBase, const OUString& aFileExtension, OUString& rFilePath)
+ std::u16string_view aFileBase, std::u16string_view aFileExtension, OUString& rFilePath)
{
// m_aBaseString and aFileBase may contain multiple segments, so use
// GetNewAbsURL instead of insertName for them:
@@ -650,7 +650,7 @@ void ScBootstrapFixture::createFileURL(
url.setFinalSlash();
url.GetNewAbsURL(m_aBaseString, &url);
url.insertName(aFileExtension, true);
- url.GetNewAbsURL(aFileBase + aFileExtension, &url);
+ url.GetNewAbsURL(OUString::Concat(aFileBase) + aFileExtension, &url);
rFilePath = url.GetMainURL(INetURLObject::DecodeMechanism::NONE);
}
diff --git a/sc/qa/unit/helper/qahelper.hxx b/sc/qa/unit/helper/qahelper.hxx
index 14b7b3b02aca..3533cf82cfa0 100644
--- a/sc/qa/unit/helper/qahelper.hxx
+++ b/sc/qa/unit/helper/qahelper.hxx
@@ -186,7 +186,7 @@ public:
explicit ScBootstrapFixture( const OUString& rsBaseString );
virtual ~ScBootstrapFixture() override;
- void createFileURL(std::u16string_view aFileBase, const OUString& aFileExtension, OUString& rFilePath);
+ void createFileURL(std::u16string_view aFileBase, std::u16string_view aFileExtension, OUString& rFilePath);
void createCSVPath(const char* aFileBase, OUString& rCSVPath);
void createCSVPath(std::u16string_view aFileBase, OUString& rCSVPath);
diff --git a/sc/source/filter/lotus/lotus.cxx b/sc/source/filter/lotus/lotus.cxx
index 7d7dc17f88a3..2ddc7a5d28f9 100644
--- a/sc/source/filter/lotus/lotus.cxx
+++ b/sc/source/filter/lotus/lotus.cxx
@@ -66,7 +66,7 @@ ErrCode ScFormatFilterPluginImpl::ScImportLotus123( SfxMedium& rMedium, ScDocume
{
// try to load *.FM3 file
INetURLObject aURL( rMedium.GetURLObject() );
- aURL.setExtension( "FM3" );
+ aURL.setExtension( u"FM3" );
SfxMedium aMedium( aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE), StreamMode::STD_READ );
pStream = aMedium.GetInStream();
if ( pStream )
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index ec6b1a3b35e5..055f2fdf727a 100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.cxx
@@ -2450,7 +2450,7 @@ bool ScDocShell::ConvertTo( SfxMedium &rMed )
INetURLObject aTmpFile( rMed.GetPhysicalName(), INetProtocol::File );
if ( bHasMemo )
- aTmpFile.setExtension("dbt");
+ aTmpFile.setExtension(u"dbt");
if ( eError != ERRCODE_NONE && !eError.IsWarning() )
{
if (!GetError())
@@ -2465,7 +2465,7 @@ bool ScDocShell::ConvertTo( SfxMedium &rMed )
{
const SfxStringItem* pNameItem = rMed.GetItemSet()->GetItem<SfxStringItem>( SID_FILE_NAME );
INetURLObject aDbtFile( pNameItem->GetValue(), INetProtocol::File );
- aDbtFile.setExtension("dbt");
+ aDbtFile.setExtension(u"dbt");
// tdf#40713: don't lose dbt file
// if aDbtFile corresponds exactly to aTmpFile, we just have to return
diff --git a/sc/source/ui/docshell/externalrefmgr.cxx b/sc/source/ui/docshell/externalrefmgr.cxx
index 176e65836b25..f7e3822b77d7 100644
--- a/sc/source/ui/docshell/externalrefmgr.cxx
+++ b/sc/source/ui/docshell/externalrefmgr.cxx
@@ -2470,7 +2470,7 @@ SfxObjectShellRef ScExternalRefManager::loadSrcDocument(sal_uInt16 nFileId, OUSt
{
// Generate a relative file path.
INetURLObject aBaseURL(getOwnDocumentName());
- aBaseURL.insertName("content.xml");
+ aBaseURL.insertName(u"content.xml");
OUString aStr = URIHelper::simpleNormalizedMakeRelative(
aBaseURL.GetMainURL(INetURLObject::DecodeMechanism::NONE), aFile);
@@ -2657,7 +2657,7 @@ void ScExternalRefManager::SrcFileData::maybeCreateRealFileName(const OUString&
// Formulate the absolute file path from the relative path.
const OUString& rRelPath = maRelativeName;
INetURLObject aBaseURL(rOwnDocName);
- aBaseURL.insertName("content.xml");
+ aBaseURL.insertName(u"content.xml");
bool bWasAbs = false;
maRealFileName = aBaseURL.smartRel2Abs(rRelPath, bWasAbs).GetMainURL(INetURLObject::DecodeMechanism::NONE);
}
diff --git a/scripting/source/stringresource/stringresource.cxx b/scripting/source/stringresource/stringresource.cxx
index f2b9dcd37757..74d491704fcd 100644
--- a/scripting/source/stringresource/stringresource.cxx
+++ b/scripting/source/stringresource/stringresource.cxx
@@ -1644,9 +1644,9 @@ OUString StringResourcePersistenceImpl::implGetPathForLocaleItem
INetURLObject aInetObj( aLocation );
aInetObj.insertName( aFileName, true, INetURLObject::LAST_SEGMENT, INetURLObject::EncodeMechanism::All );
if( bDefaultFile )
- aInetObj.setExtension( "default" );
+ aInetObj.setExtension( u"default" );
else
- aInetObj.setExtension( "properties" );
+ aInetObj.setExtension( u"properties" );
OUString aCompleteFileName = aInetObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
return aCompleteFileName;
}
diff --git a/sd/source/filter/html/htmlex.cxx b/sd/source/filter/html/htmlex.cxx
index 78914a0adf14..9d93365c7b04 100644
--- a/sd/source/filter/html/htmlex.cxx
+++ b/sd/source/filter/html/htmlex.cxx
@@ -2841,7 +2841,7 @@ bool HtmlExport::CopyScript( std::u16string_view rPath, const OUString& rSource,
INetURLObject aURL( SvtPathOptions().GetConfigPath() );
OUStringBuffer aScriptBuf;
- aURL.Append( "webcast" );
+ aURL.Append( u"webcast" );
aURL.Append( rSource );
meEC.SetContext( STR_HTMLEXP_ERROR_OPEN_FILE, rSource );
diff --git a/sd/source/filter/html/pubdlg.cxx b/sd/source/filter/html/pubdlg.cxx
index 47a904bc098e..f156df7d32b6 100644
--- a/sd/source/filter/html/pubdlg.cxx
+++ b/sd/source/filter/html/pubdlg.cxx
@@ -1418,7 +1418,7 @@ void SdPublishingDlg::Load()
m_bDesignListDirty = false;
INetURLObject aURL( SvtPathOptions().GetUserConfigPath() );
- aURL.Append( "designs.sod" );
+ aURL.Append( u"designs.sod" );
// check if file exists, SfxMedium shows an errorbox else
{
@@ -1472,7 +1472,7 @@ void SdPublishingDlg::Load()
bool SdPublishingDlg::Save()
{
INetURLObject aURL( SvtPathOptions().GetUserConfigPath() );
- aURL.Append( "designs.sod" );
+ aURL.Append( u"designs.sod" );
SfxMedium aMedium( aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), StreamMode::WRITE | StreamMode::TRUNC );
SvStream* pStream = aMedium.GetOutStream();
diff --git a/sd/source/ui/app/sdmod.cxx b/sd/source/ui/app/sdmod.cxx
index 482a6d6bca4f..739484e39239 100644
--- a/sd/source/ui/app/sdmod.cxx
+++ b/sd/source/ui/app/sdmod.cxx
@@ -176,7 +176,7 @@ tools::SvRef<SotStorageStream> SdModule::GetOptionStream( std::u16string_view rO
{
INetURLObject aURL( SvtPathOptions().GetUserConfigPath() );
- aURL.Append( "drawing.cfg" );
+ aURL.Append( u"drawing.cfg" );
std::unique_ptr<SvStream> pStm = ::utl::UcbStreamHelper::CreateStream( aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), StreamMode::READWRITE );
diff --git a/sfx2/source/appl/appdde.cxx b/sfx2/source/appl/appdde.cxx
index 0211d8978192..2144cf5d9cc5 100644
--- a/sfx2/source/appl/appdde.cxx
+++ b/sfx2/source/appl/appdde.cxx
@@ -422,7 +422,7 @@ bool SfxApplication::InitializeDde()
// Config path as a topic because of multiple starts
INetURLObject aOfficeLockFile( SvtPathOptions().GetUserConfigPath() );
- aOfficeLockFile.insertName( "soffice.lck" );
+ aOfficeLockFile.insertName( u"soffice.lck" );
OUString aService( SfxDdeServiceName_Impl(
aOfficeLockFile.GetMainURL(INetURLObject::DecodeMechanism::ToIUri) ) );
aService = aService.toAsciiUpperCase();
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index 1d82f11fd329..45aaad485f83 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -2469,7 +2469,7 @@ void SfxMedium::DoBackup_Impl()
// save as ".bak" file
INetURLObject aDest( aBakDir );
aDest.insertName( aSource.getName() );
- aDest.setExtension( "bak" );
+ aDest.setExtension( u"bak" );
OUString aFileName = aDest.getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::DecodeMechanism::WithCharset );
// create a content for the source file
@@ -3370,7 +3370,7 @@ const INetURLObject& SfxMedium::GetURLObject() const
if (!pImpl->m_pURLObj)
{
pImpl->m_pURLObj.reset( new INetURLObject( pImpl->m_aLogicName ) );
- pImpl->m_pURLObj->SetMark("");
+ pImpl->m_pURLObj->SetMark(u"");
}
return *pImpl->m_pURLObj;
diff --git a/sfx2/source/doc/doctempl.cxx b/sfx2/source/doc/doctempl.cxx
index 31aac23c905e..5e6dd0e6260b 100644
--- a/sfx2/source/doc/doctempl.cxx
+++ b/sfx2/source/doc/doctempl.cxx
@@ -423,8 +423,8 @@ OUString SfxDocumentTemplates::GetPath
}
-OUString SfxDocumentTemplates::GetTemplateTargetURLFromComponent( const OUString& aGroupName,
- const OUString& aTitle )
+OUString SfxDocumentTemplates::GetTemplateTargetURLFromComponent( std::u16string_view aGroupName,
+ std::u16string_view aTitle )
{
DocTemplLocker_Impl aLocker( *pImp );
diff --git a/sfx2/source/doc/doctemplates.cxx b/sfx2/source/doc/doctemplates.cxx
index ae7d21d2728f..13aa0f09a2e6 100644
--- a/sfx2/source/doc/doctemplates.cxx
+++ b/sfx2/source/doc/doctemplates.cxx
@@ -291,15 +291,15 @@ public:
bool addTemplate( const OUString& rGroupName,
const OUString& rTemplateName,
const OUString& rSourceURL );
- bool removeTemplate( const OUString& rGroupName,
- const OUString& rTemplateName );
- bool renameTemplate( const OUString& rGroupName,
- const OUString& rOldName,
+ bool removeTemplate( std::u16string_view rGroupName,
+ std::u16string_view rTemplateName );
+ bool renameTemplate( std::u16string_view rGroupName,
+ std::u16string_view rOldName,
const OUString& rNewName );
bool addGroup( const OUString& rGroupName );
- bool removeGroup( const OUString& rGroupName );
- bool renameGroup( const OUString& rOldName,
+ bool removeGroup( std::u16string_view rGroupName );
+ bool renameGroup( std::u16string_view rOldName,
const OUString& rNewName );
void update();
@@ -1197,7 +1197,7 @@ void SfxDocTplService_Impl::doUpdate()
std::vector< beans::StringPair > SfxDocTplService_Impl::ReadUINamesForTemplateDir_Impl( const OUString& aUserPath )
{
INetURLObject aLocObj( aUserPath );
- aLocObj.insertName( "groupuinames.xml", false,
+ aLocObj.insertName( u"groupuinames.xml", false,
INetURLObject::LAST_SEGMENT,
INetURLObject::EncodeMechanism::All );
Content aLocContent;
@@ -1464,7 +1464,7 @@ bool SfxDocTplService_Impl::addGroup( const OUString& rGroupName )
}
-bool SfxDocTplService_Impl::removeGroup( const OUString& rGroupName )
+bool SfxDocTplService_Impl::removeGroup( std::u16string_view rGroupName )
{
// remove all the elements that have the prefix aTargetURL
// if the group does not have other elements remove it
@@ -1570,7 +1570,7 @@ bool SfxDocTplService_Impl::removeGroup( const OUString& rGroupName )
}
-bool SfxDocTplService_Impl::renameGroup( const OUString& rOldName,
+bool SfxDocTplService_Impl::renameGroup( std::u16string_view rOldName,
const OUString& rNewName )
{
::osl::MutexGuard aGuard( maMutex );
@@ -2005,8 +2005,8 @@ OUString SfxDocTplService_Impl::findParentTemplateDir(const OUString& rURL) cons
return OUString();
}
-bool SfxDocTplService_Impl::removeTemplate( const OUString& rGroupName,
- const OUString& rTemplateName )
+bool SfxDocTplService_Impl::removeTemplate( std::u16string_view rGroupName,
+ std::u16string_view rTemplateName )
{
::osl::MutexGuard aGuard( maMutex );
@@ -2054,8 +2054,8 @@ bool SfxDocTplService_Impl::removeTemplate( const OUString& rGroupName,
}
-bool SfxDocTplService_Impl::renameTemplate( const OUString& rGroupName,
- const OUString& rOldName,
+bool SfxDocTplService_Impl::renameTemplate( std::u16string_view rGroupName,
+ std::u16string_view rOldName,
const OUString& rNewName )
{
::osl::MutexGuard aGuard( maMutex );
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index 671e6888e102..9b85b791f7a4 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -620,7 +620,7 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq )
INetURLObject aFilePathObj( aTempDir.GetURL() );
aFilePathObj.insertName( aFileName );
- aFilePathObj.setExtension( "htm" );
+ aFilePathObj.setExtension( u"htm" );
OUString aFileURL = aFilePathObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
diff --git a/sot/source/sdstor/ucbstorage.cxx b/sot/source/sdstor/ucbstorage.cxx
index bb936124a2ff..1db842a557cb 100644
--- a/sot/source/sdstor/ucbstorage.cxx
+++ b/sot/source/sdstor/ucbstorage.cxx
@@ -1567,8 +1567,8 @@ void UCBStorage_Impl::Init()
if ( m_nError == ERRCODE_NONE )
{
// read the manifest.xml file
- aObj.Append( "META-INF" );
- aObj.Append( "manifest.xml" );
+ aObj.Append( u"META-INF" );
+ aObj.Append( u"manifest.xml" );
// create input stream
std::unique_ptr<SvStream> pStream(::utl::UcbStreamHelper::CreateStream( aObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ), StreamMode::STD_READ ));
diff --git a/svl/source/misc/lockfilecommon.cxx b/svl/source/misc/lockfilecommon.cxx
index ed1054d8c03d..7cff508f3290 100644
--- a/svl/source/misc/lockfilecommon.cxx
+++ b/svl/source/misc/lockfilecommon.cxx
@@ -73,7 +73,7 @@ OUString LockFileCommon::GenerateOwnLockFileURL(
const OUString& aOrigURL, std::u16string_view aPrefix)
{
INetURLObject aURL = ResolveLinks(INetURLObject(aOrigURL));
- aURL.setName(aPrefix + aURL.GetLastName() + "%23" /*'#'*/);
+ aURL.setName(OUString(aPrefix + aURL.GetLastName() + "%23" /*'#'*/));
return aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE);
}
diff --git a/svl/source/misc/msodocumentlockfile.cxx b/svl/source/misc/msodocumentlockfile.cxx
index 0c857ffb53ec..fa104dcfbbe2 100644
--- a/svl/source/misc/msodocumentlockfile.cxx
+++ b/svl/source/misc/msodocumentlockfile.cxx
@@ -56,7 +56,7 @@ OUString GenerateMSOLockFileURL(const OUString& aOrigURL)
else if (nFileNameLength == 7)
sFileName = sFileName.copy(1);
}
- aURL.setName("~$" + sFileName);
+ aURL.setName(OUString("~$" + sFileName));
return aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE);
}
}
diff --git a/svtools/source/control/inettbc.cxx b/svtools/source/control/inettbc.cxx
index 8637ba8d9b33..83953ef1a469 100644
--- a/svtools/source/control/inettbc.cxx
+++ b/svtools/source/control/inettbc.cxx
@@ -608,8 +608,8 @@ void SvtMatchContext_Impl::doExecute()
aMatch = aCurObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
else
{
- aCurObj.SetMark( "" );
- aCurObj.SetParam( "" );
+ aCurObj.SetMark( u"" );
+ aCurObj.SetParam( u"" );
aCurObj.SetURLPath( "" );
aMatch = aCurObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
}
@@ -627,8 +627,8 @@ void SvtMatchContext_Impl::doExecute()
aMatch = aCurObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
else
{
- aCurObj.SetMark( "" );
- aCurObj.SetParam( "" );
+ aCurObj.SetMark( u"" );
+ aCurObj.SetParam( u"" );
aCurObj.SetURLPath( "" );
aMatch = aCurObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
}
diff --git a/svtools/source/misc/templatefoldercache.cxx b/svtools/source/misc/templatefoldercache.cxx
index d8aa5bc81afc..df219f93fcf6 100644
--- a/svtools/source/misc/templatefoldercache.cxx
+++ b/svtools/source/misc/templatefoldercache.cxx
@@ -707,7 +707,7 @@ namespace svt
}
// append our name
- aStorageURL.Append( ".templdir.cache" );
+ aStorageURL.Append( u".templdir.cache" );
// open the stream
m_pCacheStream = UcbStreamHelper::CreateStream( aStorageURL.GetMainURL( INetURLObject::DecodeMechanism::ToIUri ),
diff --git a/svx/qa/unit/gallery/test_gallery.cxx b/svx/qa/unit/gallery/test_gallery.cxx
index 072361232dc7..da224b439f3b 100644
--- a/svx/qa/unit/gallery/test_gallery.cxx
+++ b/svx/qa/unit/gallery/test_gallery.cxx
@@ -261,10 +261,10 @@ void GalleryObjTest::TestGalleryThemeEntry()
INetURLObject aURL(aGalleryURL);
aURL.Append(myThemeName);
INetURLObject aThemeURL(aURL), aSdvURL(aURL), aSdgURL(aURL), aStrURL(aURL);
- aThemeURL.setExtension("thm");
- aSdvURL.setExtension("sdv");
- aSdgURL.setExtension("sdg");
- aStrURL.setExtension("str");
+ aThemeURL.setExtension(u"thm");
+ aSdvURL.setExtension(u"sdv");
+ aSdgURL.setExtension(u"sdg");
+ aStrURL.setExtension(u"str");
CPPUNIT_ASSERT_EQUAL_MESSAGE("Theme URL doesn't match",
aGalleryBinaryStorageLocations.GetThmURL().GetMainURL(
INetURLObject::DecodeMechanism::Unambiguous),
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);
}
diff --git a/svx/source/sidebar/nbdtmg.cxx b/svx/source/sidebar/nbdtmg.cxx
index f786738902e0..06a7ea4d207f 100644
--- a/svx/source/sidebar/nbdtmg.cxx
+++ b/svx/source/sidebar/nbdtmg.cxx
@@ -170,7 +170,7 @@ void NBOTypeMgrBase::SetItems(const SfxItemSet* pArg) {
}
}
-void NBOTypeMgrBase::ImplLoad(const OUString& filename)
+void NBOTypeMgrBase::ImplLoad(std::u16string_view filename)
{
bIsLoading = true;
MapUnit eOldCoreUnit=eCoreUnit;
@@ -208,7 +208,7 @@ void NBOTypeMgrBase::ImplLoad(const OUString& filename)
eCoreUnit = eOldCoreUnit;
bIsLoading = false;
}
-void NBOTypeMgrBase::ImplStore(const OUString& filename)
+void NBOTypeMgrBase::ImplStore(std::u16string_view filename)
{
if (bIsLoading) return;
MapUnit eOldCoreUnit=eCoreUnit;
@@ -379,7 +379,7 @@ NumberingTypeMgr::NumberingTypeMgr()
{
Init();
maDefaultNumberSettingsArr = maNumberSettingsArr;
- ImplLoad("standard.syb");
+ ImplLoad(u"standard.syb");
}
NumberingTypeMgr::~NumberingTypeMgr()
@@ -503,7 +503,7 @@ void NumberingTypeMgr::RelplaceNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_
if (!_pSet->bIsCustomized) {
_pSet->sDescription = GetDescription(nIndex,true);
}
- ImplStore("standard.syb");
+ ImplStore(u"standard.syb");
}
void NumberingTypeMgr::ApplyNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uInt16 mLevel, bool isDefault, bool isResetSize)
@@ -572,7 +572,7 @@ OutlineTypeMgr::OutlineTypeMgr()
}
//Initial the first time to store the default value. Then do it again for customized value
Init();
- ImplLoad("standard.syc");
+ ImplLoad(u"standard.syc");
}
namespace {
@@ -764,7 +764,7 @@ void OutlineTypeMgr::RelplaceNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uI
if (!pItemArr->bIsCustomized) {
pItemArr->sDescription = GetDescription(nIndex,true);
}
- ImplStore("standard.syc");
+ ImplStore(u"standard.syc");
}
void OutlineTypeMgr::ApplyNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uInt16 /*mLevel*/, bool isDefault, bool isResetSize)
diff --git a/sw/qa/extras/htmlexport/htmlexport.cxx b/sw/qa/extras/htmlexport/htmlexport.cxx
index 37f92c99dbd4..69dbc5b615b2 100644
--- a/sw/qa/extras/htmlexport/htmlexport.cxx
+++ b/sw/qa/extras/htmlexport/htmlexport.cxx
@@ -280,8 +280,8 @@ OUString SwHtmlDomExportTest::GetOlePath()
OUString aOleSuffix(".ole");
CPPUNIT_ASSERT(aOlePath.endsWith(aOleSuffix));
INetURLObject aUrl(maTempFile.GetURL());
- aUrl.setBase(aOlePath.copy(0, aOlePath.getLength() - aOleSuffix.getLength()));
- aUrl.setExtension("ole");
+ aUrl.setBase(aOlePath.subView(0, aOlePath.getLength() - aOleSuffix.getLength()));
+ aUrl.setExtension(u"ole");
return aUrl.GetMainURL(INetURLObject::DecodeMechanism::NONE);
}
@@ -853,8 +853,8 @@ DECLARE_HTMLEXPORT_ROUNDTRIP_TEST(testReqIfOle2, "reqif-ole2.xhtml")
OUString aOleSuffix(".ole");
CPPUNIT_ASSERT(aOlePath.endsWith(aOleSuffix));
INetURLObject aUrl(maTempFile.GetURL());
- aUrl.setBase(aOlePath.copy(0, aOlePath.getLength() - aOleSuffix.getLength()));
- aUrl.setExtension("ole");
+ aUrl.setBase(aOlePath.subView(0, aOlePath.getLength() - aOleSuffix.getLength()));
+ aUrl.setExtension(u"ole");
OUString aOleUrl = aUrl.GetMainURL(INetURLObject::DecodeMechanism::NONE);
// Search for \result in the RTF data.
diff --git a/sw/source/core/doc/visiturl.cxx b/sw/source/core/doc/visiturl.cxx
index 1f462e06e448..c32e3317dc2d 100644
--- a/sw/source/core/doc/visiturl.cxx
+++ b/sw/source/core/doc/visiturl.cxx
@@ -106,7 +106,7 @@ bool SwDoc::IsVisitedURL( const OUString& rURL )
if( '#' == rURL[0] && mpDocShell && mpDocShell->GetMedium() )
{
INetURLObject aIObj( mpDocShell->GetMedium()->GetURLObject() );
- aIObj.SetMark( rURL.copy( 1 ) );
+ aIObj.SetMark( rURL.subView( 1 ) );
bRet = pHist->QueryUrl( aIObj );
}
else
diff --git a/sw/source/core/swg/swblocks.cxx b/sw/source/core/swg/swblocks.cxx
index eac9494c69fe..e805cf096c0a 100644
--- a/sw/source/core/swg/swblocks.cxx
+++ b/sw/source/core/swg/swblocks.cxx
@@ -87,7 +87,7 @@ SwImpBlocks::SwImpBlocks( const OUString& rFile )
FStatHelper::GetModifiedDateTimeOfFile( rFile,
&m_aDateModified, &m_aTimeModified );
INetURLObject aObj(rFile);
- aObj.setExtension( OUString() );
+ aObj.setExtension( u"" );
m_aName = aObj.GetBase();
}
diff --git a/sw/source/filter/html/htmlflywriter.cxx b/sw/source/filter/html/htmlflywriter.cxx
index 7064622fb7f9..bbc0874a4784 100644
--- a/sw/source/filter/html/htmlflywriter.cxx
+++ b/sw/source/filter/html/htmlflywriter.cxx
@@ -1874,7 +1874,7 @@ static Writer& OutHTML_FrameFormatGrfNode( Writer& rWrt, const SwFrameFormat& rF
aURL.getExtension() + "_" +
OUString::number(aGraphic.GetChecksum(), 16);
aURL.setBase(aName);
- aURL.setExtension("ole");
+ aURL.setExtension(u"ole");
aFileName = aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE);
SvFileStream aOutStream(aFileName, StreamMode::WRITE);
diff --git a/sw/source/filter/html/htmlplug.cxx b/sw/source/filter/html/htmlplug.cxx
index 9e82ac075e83..b18b695d27e8 100644
--- a/sw/source/filter/html/htmlplug.cxx
+++ b/sw/source/filter/html/htmlplug.cxx
@@ -142,7 +142,7 @@ namespace
* itself and a wanted extension.
*/
OUString lcl_CalculateFileName(const OUString* pOrigFileName, const Graphic& rGraphic,
- const OUString& rExtension)
+ std::u16string_view rExtension)
{
OUString aFileName;
@@ -1522,7 +1522,7 @@ Writer& OutHTML_FrameFormatOLENodeGrf( Writer& rWrt, const SwFrameFormat& rFrame
// Calculate the file name, which is meant to be the same as the
// replacement image, just with a .ole extension.
- OUString aFileName = lcl_CalculateFileName(rHTMLWrt.GetOrigFileName(), aGraphic, "ole");
+ OUString aFileName = lcl_CalculateFileName(rHTMLWrt.GetOrigFileName(), aGraphic, u"ole");
// Write the data.
SwOLEObj& rOLEObj = pOLENd->GetOLEObj();
@@ -1631,7 +1631,7 @@ Writer& OutHTML_FrameFormatOLENodeGrf( Writer& rWrt, const SwFrameFormat& rFrame
if (aGraphic.GetType() == GraphicType::NONE)
{
// The OLE Object has no replacement image, write a stub.
- aGraphicURL = lcl_CalculateFileName(rHTMLWrt.GetOrigFileName(), aGraphic, "png");
+ aGraphicURL = lcl_CalculateFileName(rHTMLWrt.GetOrigFileName(), aGraphic, u"png");
osl::File aFile(aGraphicURL);
aFile.open(osl_File_OpenFlag_Create);
aFile.close();
diff --git a/sw/source/ui/dbui/createaddresslistdialog.cxx b/sw/source/ui/dbui/createaddresslistdialog.cxx
index 39a8a1dc8a59..068a8347cfdb 100644
--- a/sw/source/ui/dbui/createaddresslistdialog.cxx
+++ b/sw/source/ui/dbui/createaddresslistdialog.cxx
@@ -431,7 +431,7 @@ IMPL_LINK_NOARG(SwCreateAddressListDialog, OkHdl_Impl, weld::Button&, void)
{
m_sURL = xFP->getSelectedFiles().getConstArray()[0];
INetURLObject aResult( m_sURL );
- aResult.setExtension("csv");
+ aResult.setExtension(u"csv");
m_sURL = aResult.GetMainURL(INetURLObject::DecodeMechanism::NONE);
}
}
diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx
index 6319a253c241..893872b66118 100644
--- a/sw/source/uibase/app/docsh2.cxx
+++ b/sw/source/uibase/app/docsh2.cxx
@@ -1657,7 +1657,7 @@ int SwFindDocShell( SfxObjectShellRef& xDocSh,
// 1. Does the file already exist in the list of all Documents?
INetURLObject aTmpObj( rFileName );
- aTmpObj.SetMark( OUString() );
+ aTmpObj.SetMark( u"" );
// Iterate over the DocShell and get the ones with the name
diff --git a/sw/source/uibase/config/uinums.cxx b/sw/source/uibase/config/uinums.cxx
index 0c2602f48c5f..29b8a1f9a2c3 100644
--- a/sw/source/uibase/config/uinums.cxx
+++ b/sw/source/uibase/config/uinums.cxx
@@ -52,7 +52,7 @@ void SwChapterNumRules::Save()
SvtPathOptions aPathOpt;
aURL.SetSmartURL( aPathOpt.GetUserConfigPath() );
aURL.setFinalSlash();
- aURL.Append(CHAPTER_FILENAME);
+ aURL.Append(u"" CHAPTER_FILENAME);
SfxMedium aMedium( aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE), StreamMode::WRITE );
SvStream* pStream = aMedium.GetOutStream();
diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx
index db181c0bb89b..367647037e4c 100644
--- a/sw/source/uibase/dbui/dbmgr.cxx
+++ b/sw/source/uibase/dbui/dbmgr.cxx
@@ -2761,7 +2761,7 @@ OUString LoadAndRegisterDataSource_Impl(DBConnURIType type, const uno::Reference
}
// Construct vnd.sun.star.pkg:// URL
-OUString ConstructVndSunStarPkgUrl(const OUString& rMainURL, const OUString& rStreamRelPath)
+OUString ConstructVndSunStarPkgUrl(const OUString& rMainURL, std::u16string_view rStreamRelPath)
{
auto xContext(comphelper::getProcessComponentContext());
auto xUri = css::uri::UriReferenceFactory::create(xContext)->parse(rMainURL);
diff --git a/toolkit/source/awt/animatedimagespeer.cxx b/toolkit/source/awt/animatedimagespeer.cxx
index 9eeddc1715dc..bcbf42d62a72 100644
--- a/toolkit/source/awt/animatedimagespeer.cxx
+++ b/toolkit/source/awt/animatedimagespeer.cxx
@@ -111,7 +111,7 @@ namespace toolkit
INetURLObject aURL( i_imageURL );
if ( aURL.GetProtocol() != INetProtocol::PrivSoffice )
{
- OSL_VERIFY( aURL.insertName( "sifr", false, 0 ) );
+ OSL_VERIFY( aURL.insertName( u"sifr", false, 0 ) );
return aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE );
}
// the private: scheme is not considered to be hierarchical by INetURLObject, so manually insert the
diff --git a/tools/qa/cppunit/test_urlobj.cxx b/tools/qa/cppunit/test_urlobj.cxx
index 0e25decab713..255c07137b1c 100644
--- a/tools/qa/cppunit/test_urlobj.cxx
+++ b/tools/qa/cppunit/test_urlobj.cxx
@@ -249,26 +249,26 @@ namespace tools_urlobj
void testSetName() {
{
INetURLObject obj("file:///");
- bool ok = obj.setName("foo");
+ bool ok = obj.setName(u"foo");
CPPUNIT_ASSERT(!ok);
}
{
INetURLObject obj("file:///foo");
- bool ok = obj.setName("bar");
+ bool ok = obj.setName(u"bar");
CPPUNIT_ASSERT(ok);
CPPUNIT_ASSERT_EQUAL(
OUString("file:///bar"), obj.GetMainURL(INetURLObject::DecodeMechanism::NONE));
}
{
INetURLObject obj("file:///foo/");
- bool ok = obj.setName("bar");
+ bool ok = obj.setName(u"bar");
CPPUNIT_ASSERT(ok);
CPPUNIT_ASSERT_EQUAL(
OUString("file:///bar/"), obj.GetMainURL(INetURLObject::DecodeMechanism::NONE));
}
{
INetURLObject obj("file:///foo/bar");
- bool ok = obj.setName("baz");
+ bool ok = obj.setName(u"baz");
CPPUNIT_ASSERT(ok);
CPPUNIT_ASSERT_EQUAL(
OUString("file:///foo/baz"),
@@ -276,7 +276,7 @@ namespace tools_urlobj
}
{
INetURLObject obj("file:///foo/bar/");
- bool ok = obj.setName("baz");
+ bool ok = obj.setName(u"baz");
CPPUNIT_ASSERT(ok);
CPPUNIT_ASSERT_EQUAL(
OUString("file:///foo/baz/"),
@@ -287,7 +287,7 @@ namespace tools_urlobj
void testSetExtension() {
INetURLObject obj("file:///foo/bar.baz/");
bool ok = obj.setExtension(
- "other", INetURLObject::LAST_SEGMENT, false);
+ u"other", INetURLObject::LAST_SEGMENT, false);
CPPUNIT_ASSERT(ok);
CPPUNIT_ASSERT_EQUAL(
OUString("file:///foo/bar.baz/.other"),
diff --git a/tools/source/fsys/urlobj.cxx b/tools/source/fsys/urlobj.cxx
index fc5676de7fbc..c17ce9219a84 100644
--- a/tools/source/fsys/urlobj.cxx
+++ b/tools/source/fsys/urlobj.cxx
@@ -2029,7 +2029,7 @@ bool INetURLObject::convertAbsToRel(OUString const & rTheAbsURIRef,
}
// static
-bool INetURLObject::convertIntToExt(OUString const & rTheIntURIRef,
+bool INetURLObject::convertIntToExt(std::u16string_view rTheIntURIRef,
OUString & rTheExtURIRef,
DecodeMechanism eDecodeMechanism,
rtl_TextEncoding eCharset)
@@ -2052,7 +2052,7 @@ bool INetURLObject::convertIntToExt(OUString const & rTheIntURIRef,
}
// static
-bool INetURLObject::convertExtToInt(OUString const & rTheExtURIRef,
+bool INetURLObject::convertExtToInt(std::u16string_view rTheExtURIRef,
OUString & rTheIntURIRef,
DecodeMechanism eDecodeMechanism,
rtl_TextEncoding eCharset)
@@ -2227,7 +2227,7 @@ INetURLObject::SubString INetURLObject::getAuthority() const
return SubString(nBegin, nEnd - nBegin);
}
-bool INetURLObject::setUser(OUString const & rTheUser,
+bool INetURLObject::setUser(std::u16string_view rTheUser,
rtl_TextEncoding eCharset)
{
if (
@@ -2287,7 +2287,7 @@ bool INetURLObject::clearPassword()
return true;
}
-bool INetURLObject::setPassword(OUString const & rThePassword,
+bool INetURLObject::setPassword(std::u16string_view rThePassword,
rtl_TextEncoding eCharset)
{
if (!getSchemeInfo().m_bPassword)
@@ -3147,7 +3147,7 @@ bool INetURLObject::checkHierarchical() const {
}
}
-bool INetURLObject::Append(OUString const & rTheSegment,
+bool INetURLObject::Append(std::u16string_view rTheSegment,
EncodeMechanism eMechanism,
rtl_TextEncoding eCharset)
{
@@ -3200,7 +3200,7 @@ INetURLObject::SubString INetURLObject::getSegment(sal_Int32 nIndex,
pSegEnd - pSegBegin);
}
-bool INetURLObject::insertName(OUString const & rTheName,
+bool INetURLObject::insertName(std::u16string_view rTheName,
bool bAppendFinalSlash, sal_Int32 nIndex,
EncodeMechanism eMechanism,
rtl_TextEncoding eCharset)
@@ -3298,7 +3298,7 @@ void INetURLObject::clearQuery()
}
}
-bool INetURLObject::setQuery(OUString const & rTheQuery,
+bool INetURLObject::setQuery(std::u16string_view rTheQuery,
EncodeMechanism eMechanism,
rtl_TextEncoding eCharset)
{
@@ -3331,7 +3331,7 @@ bool INetURLObject::clearFragment()
return true;
}
-bool INetURLObject::setFragment(OUString const & rTheFragment,
+bool INetURLObject::setFragment(std::u16string_view rTheFragment,
EncodeMechanism eMechanism,
rtl_TextEncoding eCharset)
{
@@ -3689,8 +3689,8 @@ bool INetURLObject::operator ==(INetURLObject const & rObject) const
}
bool INetURLObject::ConcatData(INetProtocol eTheScheme,
- OUString const & rTheUser,
- OUString const & rThePassword,
+ std::u16string_view rTheUser,
+ std::u16string_view rThePassword,
OUString const & rTheHost,
sal_uInt32 nThePort,
OUString const & rThePath)
@@ -3708,7 +3708,7 @@ bool INetURLObject::ConcatData(INetProtocol eTheScheme,
bool bUserInfo = false;
if (getSchemeInfo().m_bUser)
{
- if (!rTheUser.isEmpty())
+ if (!rTheUser.empty())
{
m_aUser.set(m_aAbsURIRef,
encodeText(rTheUser, PART_USER_PASSWORD,
@@ -3717,12 +3717,12 @@ bool INetURLObject::ConcatData(INetProtocol eTheScheme,
bUserInfo = true;
}
}
- else if (!rTheUser.isEmpty())
+ else if (!rTheUser.empty())
{
setInvalid();
return false;
}
- if (!rThePassword.isEmpty())
+ if (!rThePassword.empty())
{
if (getSchemeInfo().m_bPassword)
{
@@ -4004,7 +4004,7 @@ OUString INetURLObject::getName(sal_Int32 nIndex, bool bIgnoreFinalSlash,
return decode(pSegBegin, p, eMechanism, eCharset);
}
-bool INetURLObject::setName(OUString const& rTheName, EncodeMechanism eMechanism,
+bool INetURLObject::setName(std::u16string_view rTheName, EncodeMechanism eMechanism,
rtl_TextEncoding eCharset)
{
SubString aSegment(getSegment(LAST_SEGMENT, true));
@@ -4077,7 +4077,7 @@ OUString INetURLObject::getBase(sal_Int32 nIndex, bool bIgnoreFinalSlash,
return decode(pSegBegin, pExtension, eMechanism, eCharset);
}
-bool INetURLObject::setBase(OUString const & rTheBase, sal_Int32 nIndex,
+bool INetURLObject::setBase(std::u16string_view rTheBase, sal_Int32 nIndex,
EncodeMechanism eMechanism,
rtl_TextEncoding eCharset)
{
@@ -4139,7 +4139,7 @@ OUString INetURLObject::getExtension(sal_Int32 nIndex,
return decode(pExtension + 1, p, eMechanism, eCharset);
}
-bool INetURLObject::setExtension(OUString const & rTheExtension,
+bool INetURLObject::setExtension(std::u16string_view rTheExtension,
sal_Int32 nIndex, bool bIgnoreFinalSlash,
rtl_TextEncoding eCharset)
{
@@ -4740,7 +4740,7 @@ OUString INetURLObject::GetPath() const
return aTemp.PathToFileName();
}
-void INetURLObject::SetBase(OUString const & rTheBase)
+void INetURLObject::SetBase(std::u16string_view rTheBase)
{
setBase(rTheBase, LAST_SEGMENT, EncodeMechanism::All);
}
@@ -4750,7 +4750,7 @@ OUString INetURLObject::GetBase() const
return getBase(LAST_SEGMENT, true, DecodeMechanism::WithCharset);
}
-void INetURLObject::SetExtension(OUString const & rTheExtension)
+void INetURLObject::SetExtension(std::u16string_view rTheExtension)
{
setExtension(rTheExtension, LAST_SEGMENT, false);
}
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index 99918b8df1b1..6efb3ac3e81a 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -3338,7 +3338,7 @@ we check in the following sequence:
else if( aFileExtension.equalsIgnoreAsciiCase( "ods" ) )
bChangeFileExtensionToPDF = true;
if( bChangeFileExtensionToPDF )
- aTargetURL.setExtension("pdf" );
+ aTargetURL.setExtension(u"pdf" );
}
//check if extension is pdf, see if GoToR should be forced
bTargetHasPDFExtension = aTargetURL.GetFileExtension().equalsIgnoreAsciiCase( "pdf" );
diff --git a/vcl/source/image/ImplImageTree.cxx b/vcl/source/image/ImplImageTree.cxx
index 51f61f1f29b4..227b5981be52 100644
--- a/vcl/source/image/ImplImageTree.cxx
+++ b/vcl/source/image/ImplImageTree.cxx
@@ -488,7 +488,7 @@ void ImplImageTree::createStyle()
INetURLObject aUrl(path);
OSL_ASSERT(!aUrl.HasError());
- bool ok = aUrl.Append("images_" + maCurrentStyle, INetURLObject::EncodeMechanism::All);
+ bool ok = aUrl.Append(OUString("images_" + maCurrentStyle), INetURLObject::EncodeMechanism::All);
OSL_ASSERT(ok);
sThemeUrl = aUrl.GetMainURL(INetURLObject::DecodeMechanism::NONE) + ".zip";
if (urlExists(sThemeUrl))
diff --git a/vcl/unx/generic/printer/printerinfomanager.cxx b/vcl/unx/generic/printer/printerinfomanager.cxx
index 227b185f904e..ddb8f93bcb74 100644
--- a/vcl/unx/generic/printer/printerinfomanager.cxx
+++ b/vcl/unx/generic/printer/printerinfomanager.cxx
@@ -212,7 +212,7 @@ void PrinterInfoManager::initialize()
for (auto const& printDir : aDirList)
{
INetURLObject aFile( printDir, INetProtocol::File, INetURLObject::EncodeMechanism::All );
- aFile.Append( PRINT_FILENAME );
+ aFile.Append( u"" PRINT_FILENAME );
Config aConfig( aFile.PathToFileName() );
if( aConfig.HasGroup( GLOBAL_DEFAULTS_GROUP ) )
{
@@ -282,7 +282,7 @@ void PrinterInfoManager::initialize()
{
INetURLObject aDir( printDir, INetProtocol::File, INetURLObject::EncodeMechanism::All );
INetURLObject aFile( aDir );
- aFile.Append( PRINT_FILENAME );
+ aFile.Append( u"" PRINT_FILENAME );
// check directory validity
OUString aUniPath;
diff --git a/writerperfect/source/calc/MSWorksCalcImportFilter.cxx b/writerperfect/source/calc/MSWorksCalcImportFilter.cxx
index 83035d8b9926..494991878282 100644
--- a/writerperfect/source/calc/MSWorksCalcImportFilter.cxx
+++ b/writerperfect/source/calc/MSWorksCalcImportFilter.cxx
@@ -376,7 +376,7 @@ MSWorksCalcImportFilter::filter(const css::uno::Sequence<css::beans::PropertyVal
INetURLObject aTmpUrl(sUrl);
sWM3Name = aTmpUrl.getName(INetURLObject::LAST_SEGMENT, true,
INetURLObject::DecodeMechanism::WithCharset);
- aTmpUrl.setExtension("FM3");
+ aTmpUrl.setExtension(u"FM3");
const OUString& sTestFM3Name
= aTmpUrl.getName(INetURLObject::LAST_SEGMENT, true,
INetURLObject::DecodeMechanism::WithCharset);
diff --git a/xmlsecurity/source/gpg/SecurityEnvironment.cxx b/xmlsecurity/source/gpg/SecurityEnvironment.cxx
index fac71b6ad472..6660e64f28bb 100644
--- a/xmlsecurity/source/gpg/SecurityEnvironment.cxx
+++ b/xmlsecurity/source/gpg/SecurityEnvironment.cxx
@@ -60,7 +60,7 @@ SecurityEnvironmentGpg::SecurityEnvironmentGpg()
OUString sPath;
osl_getExecutableFile(&sPath.pData);
INetURLObject aPathUrl(sPath);
- aPathUrl.setName("gpgme-w32spawn.exe");
+ aPathUrl.setName(u"gpgme-w32spawn.exe");
if (!accessUrl(aPathUrl))
{
sPath = "$BRAND_BASE_DIR/" LIBO_LIBEXEC_FOLDER "/gpgme-w32spawn.exe";
More information about the Libreoffice-commits
mailing list