avmedia/source/viewer/mediawindow.cxx | 2 basctl/source/basicide/baside2b.cxx | 1 basctl/source/basicide/baside3.cxx | 2 basic/source/basmgr/basicmanagerrepository.cxx | 5 basic/source/basmgr/basmgr.cxx | 6 basic/source/inc/namecont.hxx | 4 basic/source/runtime/methods.cxx | 2 basic/source/uno/namecont.cxx | 31 ++-- connectivity/source/drivers/dbase/DTable.cxx | 2 connectivity/source/inc/dbase/DTable.hxx | 2 cui/source/dialogs/AdditionsDialog.cxx | 2 cui/source/dialogs/cuigaldlg.cxx | 2 cui/source/dialogs/hldocntp.cxx | 2 cui/source/dialogs/hldoctp.cxx | 2 cui/source/dialogs/scriptdlg.cxx | 4 cui/source/inc/cuigaldlg.hxx | 2 cui/source/inc/hldocntp.hxx | 2 cui/source/inc/hldoctp.hxx | 2 cui/source/inc/scriptdlg.hxx | 2 cui/source/options/personalization.cxx | 2 dbaccess/source/core/dataaccess/databaseregistrations.cxx | 6 dbaccess/source/ui/dlg/ConnectionHelper.cxx | 2 dbaccess/source/ui/dlg/ConnectionHelper.hxx | 2 dbaccess/source/ui/dlg/dbwizsetup.cxx | 2 dbaccess/source/ui/inc/dbwizsetup.hxx | 2 desktop/source/migration/migration.cxx | 6 desktop/source/migration/migration_impl.hxx | 2 drawinglayer/source/tools/emfpimage.cxx | 4 editeng/source/items/frmitems.cxx | 2 editeng/source/items/legacyitem.cxx | 4 extensions/source/propctrlr/defaultforminspection.cxx | 2 extensions/source/propctrlr/pcrcommon.cxx | 4 extensions/source/propctrlr/pcrcommon.hxx | 4 filter/source/graphic/GraphicExportFilter.cxx | 2 filter/source/msfilter/escherex.cxx | 4 filter/source/msfilter/msdffimp.cxx | 2 filter/source/svg/svgfilter.cxx | 2 filter/source/xsltdialog/xmlfilterjar.cxx | 2 filter/source/xsltdialog/xmlfilterjar.hxx | 2 filter/source/xsltdialog/xmlfiltertestdialog.cxx | 2 forms/source/xforms/submission/submission.hxx | 2 forms/source/xforms/submission/submission_get.cxx | 2 forms/source/xforms/submission/submission_get.hxx | 2 forms/source/xforms/submission/submission_post.cxx | 2 forms/source/xforms/submission/submission_post.hxx | 2 forms/source/xforms/submission/submission_put.cxx | 2 forms/source/xforms/submission/submission_put.hxx | 2 fpicker/source/office/fileview.cxx | 4 fpicker/source/office/foldertree.cxx | 2 fpicker/source/office/foldertree.hxx | 2 fpicker/source/office/iodlg.cxx | 4 fpicker/source/office/iodlg.hxx | 2 framework/source/fwe/classes/addonsoptions.cxx | 2 framework/source/fwe/helper/titlehelper.cxx | 2 framework/source/services/pathsettings.cxx | 4 framework/source/uielement/generictoolbarcontroller.cxx | 6 framework/source/uielement/imagebuttontoolbarcontroller.cxx | 2 include/avmedia/mediawindow.hxx | 2 include/basic/basmgr.hxx | 4 include/framework/titlehelper.hxx | 2 include/sfx2/docfile.hxx | 2 include/sfx2/doctempl.hxx | 4 include/sfx2/frmdescr.hxx | 2 include/sfx2/frmhtml.hxx | 2 include/sfx2/objsh.hxx | 2 include/sfx2/sfxhtml.hxx | 6 include/sfx2/templatelocalview.hxx | 6 include/svl/documentlockfile.hxx | 2 include/svl/inethist.hxx | 2 include/svl/lockfilecommon.hxx | 2 include/svl/msodocumentlockfile.hxx | 6 include/svl/sharecontrolfile.hxx | 2 include/svtools/parhtml.hxx | 2 include/svtools/place.hxx | 4 include/svx/gallery.hxx | 4 include/svx/gallery1.hxx | 4 include/svx/langbox.hxx | 2 include/svx/xtable.hxx | 2 include/tools/urlobj.hxx | 32 ++-- include/unotools/ucbhelper.hxx | 2 include/vcl/graphicfilter.hxx | 10 - linguistic/source/convdiclist.cxx | 2 oox/source/drawingml/shape.cxx | 2 sc/inc/externalrefmgr.hxx | 2 sc/source/core/data/global2.cxx | 2 sc/source/filter/excel/xehelper.cxx | 2 sc/source/filter/excel/xepivot.cxx | 2 sc/source/filter/html/htmlexp.cxx | 2 sc/source/filter/inc/htmlexp.hxx | 2 sc/source/filter/inc/xehelper.hxx | 2 sc/source/ui/docshell/docsh8.cxx | 2 sc/source/ui/docshell/externalrefmgr.cxx | 2 scripting/source/dlgprov/dlgprov.cxx | 2 scripting/source/dlgprov/dlgprov.hxx | 2 scripting/source/stringresource/stringresource.cxx | 8 - scripting/source/stringresource/stringresource.hxx | 8 - sd/source/filter/ppt/pptin.cxx | 2 sd/source/ui/animations/SlideTransitionPane.cxx | 4 sd/source/ui/sidebar/MasterPageDescriptor.cxx | 2 sd/source/ui/sidebar/MasterPageDescriptor.hxx | 2 sfx2/source/appl/linkmgr2.cxx | 2 sfx2/source/appl/newhelp.cxx | 7 sfx2/source/appl/newhelp.hxx | 4 sfx2/source/appl/sfxhelp.cxx | 2 sfx2/source/appl/shutdownicon.cxx | 2 sfx2/source/appl/shutdownicon.hxx | 2 sfx2/source/appl/shutdowniconw32.cxx | 2 sfx2/source/bastyp/frmhtml.cxx | 2 sfx2/source/bastyp/helper.cxx | 4 sfx2/source/bastyp/sfxhtml.cxx | 2 sfx2/source/control/listview.cxx | 4 sfx2/source/control/recentdocsviewitem.cxx | 4 sfx2/source/control/templatelocalview.cxx | 6 sfx2/source/doc/docfile.cxx | 12 - sfx2/source/doc/doctempl.cxx | 4 sfx2/source/doc/doctemplates.cxx | 27 +-- sfx2/source/doc/frmdescr.cxx | 2 sfx2/source/doc/guisaveas.cxx | 2 sfx2/source/doc/objserv.cxx | 2 sfx2/source/doc/objstor.cxx | 4 sfx2/source/doc/printhelper.cxx | 2 sfx2/source/inc/helper.hxx | 4 sfx2/source/view/frmload.cxx | 2 svgio/source/svgreader/svgimagenode.cxx | 2 svl/source/fsstor/fsstorage.cxx | 2 svl/source/fsstor/fsstorage.hxx | 2 svl/source/misc/documentlockfile.cxx | 2 svl/source/misc/inethist.cxx | 6 svl/source/misc/lockfilecommon.cxx | 2 svl/source/misc/msodocumentlockfile.cxx | 8 - svl/source/misc/sharecontrolfile.cxx | 2 svl/source/misc/urihelper.cxx | 12 - svtools/source/control/inettbc.cxx | 4 svtools/source/filter/exportdialog.cxx | 2 svtools/source/misc/embedhlp.cxx | 4 svtools/source/svhtml/htmlsupp.cxx | 2 svtools/source/uno/wizard/unowizard.cxx | 2 svx/source/dialog/compressgraphicdialog.cxx | 4 svx/source/dialog/langbox.cxx | 2 svx/source/gallery2/galexpl.cxx | 4 svx/source/gallery2/gallery1.cxx | 9 - svx/source/gengal/gengal.cxx | 4 svx/source/unodraw/UnoGraphicExporter.cxx | 2 svx/source/xml/xmlgrhlp.cxx | 14 - svx/source/xoutdev/xtable.cxx | 2 sw/inc/SwAppletImpl.hxx | 4 sw/inc/dbmgr.hxx | 2 sw/inc/doc.hxx | 2 sw/inc/docsh.hxx | 2 sw/inc/ndgrf.hxx | 2 sw/inc/swunohelper.hxx | 4 sw/qa/unit/uibase.cxx | 2 sw/source/core/doc/visiturl.cxx | 6 sw/source/core/graphic/ndgrf.cxx | 2 sw/source/core/unocore/swunohelper.cxx | 4 sw/source/filter/html/SwAppletImpl.cxx | 4 sw/source/filter/html/htmlgrin.cxx | 2 sw/source/filter/ww8/wrtww8gr.cxx | 4 sw/source/filter/ww8/ww8graf2.cxx | 2 sw/source/uibase/app/docsh2.cxx | 4 sw/source/uibase/dbui/dbmgr.cxx | 2 tools/qa/cppunit/test_urlobj.cxx | 86 ++++++------ tools/source/fsys/urlobj.cxx | 32 ++-- tools/source/inet/inetmsg.cxx | 32 ++-- ucb/source/core/FileAccess.cxx | 4 ucb/source/ucp/cmis/cmis_url.cxx | 2 ucb/source/ucp/cmis/cmis_url.hxx | 2 unotools/source/ucbhelper/ucbhelper.cxx | 2 vcl/inc/unx/fontmanager.hxx | 2 vcl/inc/unx/genpspgraphics.h | 2 vcl/qa/cppunit/GraphicDescriptorTest.cxx | 2 vcl/qa/cppunit/GraphicTest.cxx | 23 +-- vcl/qa/cppunit/graphicfilter/filters-test.cxx | 4 vcl/qa/cppunit/graphicfilter/filters-tiff-test.cxx | 4 vcl/qa/cppunit/graphicfilter/filters-webp-test.cxx | 6 vcl/qa/cppunit/jpeg/JpegWriterTest.cxx | 4 vcl/qa/cppunit/pdfexport/pdfexport.cxx | 6 vcl/source/app/brand.cxx | 4 vcl/source/filter/GraphicNativeTransform.cxx | 6 vcl/source/filter/graphicfilter.cxx | 24 +-- vcl/source/gdi/gfxlink.cxx | 2 vcl/source/gdi/pdfwriter_impl.cxx | 2 vcl/source/treelist/imap.cxx | 2 vcl/source/treelist/imap2.cxx | 4 vcl/source/treelist/transfer.cxx | 2 vcl/unx/generic/fontmanager/fontmanager.cxx | 2 vcl/unx/generic/print/genpspgraphics.cxx | 2 vcl/workben/svpclient.cxx | 2 xmlsecurity/workben/pdfverify.cxx | 2 189 files changed, 430 insertions(+), 423 deletions(-)
New commits: commit d3849255b76e92a42f653c266b88945708984c4f Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Thu Apr 28 14:12:35 2022 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Fri Apr 29 08:53:22 2022 +0200 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.gran...@collabora.co.uk> diff --git a/avmedia/source/viewer/mediawindow.cxx b/avmedia/source/viewer/mediawindow.cxx index c4ad7f0bad35..4db6a93cf553 100644 --- a/avmedia/source/viewer/mediawindow.cxx +++ b/avmedia/source/viewer/mediawindow.cxx @@ -302,7 +302,7 @@ void MediaWindow::executeFormatErrorBox(weld::Window* pParent) xBox->run(); } -bool MediaWindow::isMediaURL(const OUString& rURL, const OUString& rReferer, bool bDeep, rtl::Reference<PlayerListener> xPreferredPixelSizeListener) +bool MediaWindow::isMediaURL(std::u16string_view rURL, const OUString& rReferer, bool bDeep, rtl::Reference<PlayerListener> xPreferredPixelSizeListener) { const INetURLObject aURL( rURL ); diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx index c080ea325807..37bf5f59f57a 100644 --- a/basctl/source/basicide/baside2b.cxx +++ b/basctl/source/basicide/baside2b.cxx @@ -65,6 +65,7 @@ #include <vector> #include <com/sun/star/reflection/theCoreReflection.hpp> #include <unotools/charclass.hxx> +#include <o3tl/string_view.hxx> #include "textwindowpeer.hxx" #include "uiobject.hxx" diff --git a/basctl/source/basicide/baside3.cxx b/basctl/source/basicide/baside3.cxx index 492541001c1c..1424573b0ea5 100644 --- a/basctl/source/basicide/baside3.cxx +++ b/basctl/source/basicide/baside3.cxx @@ -682,7 +682,7 @@ void DialogWindow::SaveDialog() if( bResource ) { - INetURLObject aURLObj(""); + INetURLObject aURLObj(u""); aURLObj.removeExtension(); OUString aDialogName( aURLObj.getName() ); aURLObj.removeSegment(); diff --git a/basic/source/basmgr/basicmanagerrepository.cxx b/basic/source/basmgr/basicmanagerrepository.cxx index 3a0405f472d0..0b34621bfcb8 100644 --- a/basic/source/basmgr/basicmanagerrepository.cxx +++ b/basic/source/basmgr/basicmanagerrepository.cxx @@ -27,6 +27,7 @@ #include <com/sun/star/document/XStorageBasedDocument.hpp> #include <com/sun/star/document/XEmbeddedScripts.hpp> #include <com/sun/star/frame/Desktop.hpp> +#include <o3tl/string_view.hxx> #include <svtools/ehdl.hxx> #include <svtools/sfxecode.hxx> #include <unotools/pathoptions.hxx> @@ -284,7 +285,7 @@ namespace basic // The first dir in the path as destination: OUString aFileName( aAppBasic.getName() ); - aAppBasic = INetURLObject( aAppBasicDir.getToken(1, ';') ); + aAppBasic = INetURLObject( o3tl::getToken(aAppBasicDir, 1, ';') ); DBG_ASSERT(aAppBasic.GetProtocol() != INetProtocol::NotValid, OString("Invalid URL: \"" + OUStringToOString(aAppBasicDir, osl_getThreadTextEncoding()) + @@ -430,7 +431,7 @@ namespace basic // Storage and BaseURL are only needed by binary documents! tools::SvRef<SotStorage> xDummyStor = new SotStorage( OUString() ); - _out_rpBasicManager.reset(new BasicManager( *xDummyStor, OUString() /* TODO/LATER: xStorage */, + _out_rpBasicManager.reset(new BasicManager( *xDummyStor, u"" /* TODO/LATER: xStorage */, pAppBasic, &aAppBasicDir, true )); if ( !_out_rpBasicManager->GetErrors().empty() ) diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx index 013c5eec851f..fec7e5eaa496 100644 --- a/basic/source/basmgr/basmgr.cxx +++ b/basic/source/basmgr/basmgr.cxx @@ -421,7 +421,7 @@ BasicLibInfo* BasicLibInfo::Create( SotStorageStream& rSStream ) return pInfo; } -BasicManager::BasicManager( SotStorage& rStorage, const OUString& rBaseURL, StarBASIC* pParentFromStdLib, OUString const * pLibPath, bool bDocMgr ) : mbDocMgr( bDocMgr ) +BasicManager::BasicManager( SotStorage& rStorage, std::u16string_view rBaseURL, StarBASIC* pParentFromStdLib, OUString const * pLibPath, bool bDocMgr ) : mbDocMgr( bDocMgr ) { if( pLibPath ) { @@ -630,7 +630,7 @@ void BasicManager::ImpCreateStdLib( StarBASIC* pParentFromStdLib ) pStdLib->SetFlag( SbxFlagBits::DontStore | SbxFlagBits::ExtSearch ); } -void BasicManager::LoadBasicManager( SotStorage& rStorage, const OUString& rBaseURL ) +void BasicManager::LoadBasicManager( SotStorage& rStorage, std::u16string_view rBaseURL ) { tools::SvRef<SotStorageStream> xManagerStream = rStorage.OpenSotStream( szManagerStream, eStreamReadMode ); @@ -648,7 +648,7 @@ void BasicManager::LoadBasicManager( SotStorage& rStorage, const OUString& rBase OUString aRealStorageName = maStorageName; // for relative paths, can be modified through BaseURL - if ( !rBaseURL.isEmpty() ) + if ( !rBaseURL.empty() ) { INetURLObject aObj( rBaseURL ); if ( aObj.GetProtocol() == INetProtocol::File ) diff --git a/basic/source/inc/namecont.hxx b/basic/source/inc/namecont.hxx index 5be51b159e95..56f660e52c30 100644 --- a/basic/source/inc/namecont.hxx +++ b/basic/source/inc/namecont.hxx @@ -224,7 +224,7 @@ protected: void implStoreLibrary( SfxLibrary* pLib, std::u16string_view rName, const css::uno::Reference< css::embed::XStorage >& rStorage, - const OUString& rTargetURL, + std::u16string_view rTargetURL, const css::uno::Reference< css::ucb::XSimpleFileAccess3 >& rToUseSFI, const css::uno::Reference< css::task::XInteractionHandler >& rHandler ); @@ -234,7 +234,7 @@ protected: // New variant for library export void implStoreLibraryIndexFile( SfxLibrary* pLib, const ::xmlscript::LibDescriptor& rLib, const css::uno::Reference< css::embed::XStorage >& xStorage, - const OUString& aTargetURL, + std::u16string_view aTargetURL, const css::uno::Reference< css::ucb::XSimpleFileAccess3 >& rToUseSFI ); bool implLoadLibraryIndexFile( SfxLibrary* pLib, diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx index 17b6092a3278..972038744dae 100644 --- a/basic/source/runtime/methods.cxx +++ b/basic/source/runtime/methods.cxx @@ -2582,7 +2582,7 @@ static bool implCheckWildcard(std::u16string_view rName, SbiRTLData const& rRTLD } -static bool isRootDir( const OUString& aDirURLStr ) +static bool isRootDir( std::u16string_view aDirURLStr ) { INetURLObject aDirURLObj( aDirURLStr ); bool bRoot = false; diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx index f7eae5d4ef08..d9a479b7bb99 100644 --- a/basic/source/uno/namecont.cxx +++ b/basic/source/uno/namecont.cxx @@ -31,6 +31,7 @@ #include <com/sun/star/ucb/ContentCreationException.hpp> #include <com/sun/star/xml/sax/SAXException.hpp> #include <vcl/svapp.hxx> +#include <o3tl/string_view.hxx> #include <osl/mutex.hxx> #include <vcl/errinf.hxx> #include <rtl/ustring.hxx> @@ -733,11 +734,11 @@ void SfxLibraryContainer::init_Impl( const OUString& rInitialDocumentURL, { if( nPass == 1 ) { - pLibInfoInetObj.reset(new INetURLObject( maLibraryPath.getToken(0, ';') )); + pLibInfoInetObj.reset(new INetURLObject( o3tl::getToken(maLibraryPath, 0, ';') )); } else { - pLibInfoInetObj.reset(new INetURLObject( maLibraryPath.getToken(1, ';') )); + pLibInfoInetObj.reset(new INetURLObject( o3tl::getToken(maLibraryPath, 1, ';') )); } pLibInfoInetObj->insertName( maInfoFileName, false, INetURLObject::LAST_SEGMENT, INetURLObject::EncodeMechanism::All ); pLibInfoInetObj->setExtension( u"xlc" ); @@ -757,7 +758,7 @@ void SfxLibraryContainer::init_Impl( const OUString& rInitialDocumentURL, // Old variant? if( !xInput.is() && nPass == 0 ) { - INetURLObject aLibInfoInetObj( maLibraryPath.getToken(1, ';') ); + INetURLObject aLibInfoInetObj( o3tl::getToken(maLibraryPath, 1, ';') ); aLibInfoInetObj.insertName( maOldInfoFileName, false, INetURLObject::LAST_SEGMENT, INetURLObject::EncodeMechanism::All ); aLibInfoInetObj.setExtension( u"xli" ); aFileName = aLibInfoInetObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ); @@ -830,7 +831,7 @@ void SfxLibraryContainer::init_Impl( const OUString& rInitialDocumentURL, else if( rLib.bLink ) { // Check "share" path - INetURLObject aShareInetObj( maLibraryPath.getToken(0, ';') ); + INetURLObject aShareInetObj( o3tl::getToken(maLibraryPath, 0, ';') ); aShareInetObj.insertName( rLib.aName, true, INetURLObject::LAST_SEGMENT, INetURLObject::EncodeMechanism::All ); OUString aShareLibDirPath = aShareInetObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ); @@ -972,7 +973,7 @@ void SfxLibraryContainer::init_Impl( const OUString& rInitialDocumentURL, if( meInitMode != DEFAULT ) return; - INetURLObject aUserBasicInetObj( maLibraryPath.getToken(1, ';') ); + INetURLObject aUserBasicInetObj( o3tl::getToken(maLibraryPath, 1, ';') ); OUString aStandardStr("Standard"); INetURLObject aPrevUserBasicInetObj_1( aUserBasicInetObj ); @@ -1320,7 +1321,7 @@ OUString SfxLibraryContainer::createAppLibraryFolder( SfxLibrary* pLib, std::u16 OUString aLibDirPath = pLib->maStorageURL; if( aLibDirPath.isEmpty() ) { - INetURLObject aInetObj( maLibraryPath.getToken(1, ';') ); + INetURLObject aInetObj( o3tl::getToken(maLibraryPath, 1, ';') ); aInetObj.insertName( aName, true, INetURLObject::LAST_SEGMENT, INetURLObject::EncodeMechanism::All ); checkStorageURL( aInetObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ), pLib->maLibInfoFileURL, pLib->maStorageURL, pLib->maUnexpandedStorageURL ); @@ -1347,14 +1348,14 @@ void SfxLibraryContainer::implStoreLibrary( SfxLibrary* pLib, { Reference< XSimpleFileAccess3 > xDummySFA; Reference< XInteractionHandler > xDummyHandler; - implStoreLibrary( pLib, aName, xStorage, OUString(), xDummySFA, xDummyHandler ); + implStoreLibrary( pLib, aName, xStorage, u"", xDummySFA, xDummyHandler ); } // New variant for library export void SfxLibraryContainer::implStoreLibrary( SfxLibrary* pLib, std::u16string_view aName, const uno::Reference< embed::XStorage >& xStorage, - const OUString& aTargetURL, + std::u16string_view aTargetURL, const Reference< XSimpleFileAccess3 >& rToUseSFI, const Reference< XInteractionHandler >& xHandler ) { @@ -1415,7 +1416,7 @@ void SfxLibraryContainer::implStoreLibrary( SfxLibrary* pLib, else { // Export? - bool bExport = !aTargetURL.isEmpty(); + bool bExport = !aTargetURL.empty(); try { Reference< XSimpleFileAccess3 > xSFI = mxSFI; @@ -1499,14 +1500,14 @@ void SfxLibraryContainer::implStoreLibraryIndexFile( SfxLibrary* pLib, const uno::Reference< embed::XStorage >& xStorage ) { Reference< XSimpleFileAccess3 > xDummySFA; - implStoreLibraryIndexFile( pLib, rLib, xStorage, OUString(), xDummySFA ); + implStoreLibraryIndexFile( pLib, rLib, xStorage, u"", xDummySFA ); } // New variant for library export void SfxLibraryContainer::implStoreLibraryIndexFile( SfxLibrary* pLib, const ::xmlscript::LibDescriptor& rLib, const uno::Reference< embed::XStorage >& xStorage, - const OUString& aTargetURL, + std::u16string_view aTargetURL, const Reference< XSimpleFileAccess3 >& rToUseSFI ) { // Create sax writer @@ -1548,7 +1549,7 @@ void SfxLibraryContainer::implStoreLibraryIndexFile( SfxLibrary* pLib, else { // Export? - bool bExport = !aTargetURL.isEmpty(); + bool bExport = !aTargetURL.empty(); Reference< XSimpleFileAccess3 > xSFI = mxSFI; if( rToUseSFI.is() ) { @@ -2053,7 +2054,7 @@ void SfxLibraryContainer::storeLibraries_Impl( const uno::Reference< embed::XSto else { // Create Output stream - INetURLObject aLibInfoInetObj( maLibraryPath.getToken(1, ';') ); + INetURLObject aLibInfoInetObj( o3tl::getToken(maLibraryPath, 1, ';') ); aLibInfoInetObj.insertName( maInfoFileName, false, INetURLObject::LAST_SEGMENT, INetURLObject::EncodeMechanism::All ); aLibInfoInetObj.setExtension( u"xlc" ); OUString aLibInfoPath( aLibInfoInetObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ) ); @@ -2244,7 +2245,7 @@ void SAL_CALL SfxLibraryContainer::removeLibrary( const OUString& Name ) catch(const Exception& ) {} // Delete folder if empty - INetURLObject aInetObj( maLibraryPath.getToken(1, ';') ); + INetURLObject aInetObj( o3tl::getToken(maLibraryPath, 1, ';') ); aInetObj.insertName( Name, true, INetURLObject::LAST_SEGMENT, INetURLObject::EncodeMechanism::All ); OUString aLibDirPath = aInetObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ); @@ -2501,7 +2502,7 @@ void SAL_CALL SfxLibraryContainer::renameLibrary( const OUString& Name, const OU OUString aLibDirPath = pImplLib->maStorageURL; - INetURLObject aDestInetObj( maLibraryPath.getToken(1, ';')); + INetURLObject aDestInetObj( o3tl::getToken(maLibraryPath, 1, ';')); aDestInetObj.insertName( NewName, true, INetURLObject::LAST_SEGMENT, INetURLObject::EncodeMechanism::All ); OUString aDestDirPath = aDestInetObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ); diff --git a/connectivity/source/drivers/dbase/DTable.cxx b/connectivity/source/drivers/dbase/DTable.cxx index c157e795e72b..a7bed6e53642 100644 --- a/connectivity/source/drivers/dbase/DTable.cxx +++ b/connectivity/source/drivers/dbase/DTable.cxx @@ -1418,7 +1418,7 @@ bool ODbaseTable::CreateMemoFile(const INetURLObject& aFile) return true; } -bool ODbaseTable::Drop_Static(const OUString& _sUrl, bool _bHasMemoFields, OCollection* _pIndexes ) +bool ODbaseTable::Drop_Static(std::u16string_view _sUrl, bool _bHasMemoFields, OCollection* _pIndexes ) { INetURLObject aURL; aURL.SetURL(_sUrl); diff --git a/connectivity/source/inc/dbase/DTable.hxx b/connectivity/source/inc/dbase/DTable.hxx index 1ac5eccbb9cf..dd2e833619c1 100644 --- a/connectivity/source/inc/dbase/DTable.hxx +++ b/connectivity/source/inc/dbase/DTable.hxx @@ -182,7 +182,7 @@ namespace connectivity::dbase virtual void dropColumn(sal_Int32 _nPos) override; static OUString getEntry(file::OConnection const * _pConnection, std::u16string_view _sURL ); - static bool Drop_Static(const OUString& _sUrl, bool _bHasMemoFields, sdbcx::OCollection* _pIndexes ); + static bool Drop_Static(std::u16string_view _sUrl, bool _bHasMemoFields, sdbcx::OCollection* _pIndexes ); virtual void refreshHeader() override; diff --git a/cui/source/dialogs/AdditionsDialog.cxx b/cui/source/dialogs/AdditionsDialog.cxx index e1788a42b995..65fe1b2e273c 100644 --- a/cui/source/dialogs/AdditionsDialog.cxx +++ b/cui/source/dialogs/AdditionsDialog.cxx @@ -229,7 +229,7 @@ bool getPreviewFile(const AdditionInfo& aAdditionInfo, OUString& sPreviewFile) return true; } -void LoadImage(const OUString& rPreviewFile, std::shared_ptr<AdditionsItem> pCurrentItem) +void LoadImage(std::u16string_view rPreviewFile, std::shared_ptr<AdditionsItem> pCurrentItem) { const sal_Int8 Margin = 6; diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx index e51f05a44e93..08c34ccc0884 100644 --- a/cui/source/dialogs/cuigaldlg.cxx +++ b/cui/source/dialogs/cuigaldlg.cxx @@ -620,7 +620,7 @@ void TPGalleryThemeProperties::SetXChgData( ExchangeData* _pData ) m_xCbxPreview->set_sensitive(false); } -void TPGalleryThemeProperties::StartSearchFiles( const OUString& _rFolderURL, short _nDlgResult ) +void TPGalleryThemeProperties::StartSearchFiles( std::u16string_view _rFolderURL, short _nDlgResult ) { if ( RET_OK == _nDlgResult ) { diff --git a/cui/source/dialogs/hldocntp.cxx b/cui/source/dialogs/hldocntp.cxx index 966b7cceb483..882d15b0cdf0 100644 --- a/cui/source/dialogs/hldocntp.cxx +++ b/cui/source/dialogs/hldocntp.cxx @@ -66,7 +66,7 @@ struct DocumentTypeData } -bool SvxHyperlinkNewDocTp::ImplGetURLObject( const OUString& rPath, const OUString& rBase, INetURLObject& aURLObject ) const +bool SvxHyperlinkNewDocTp::ImplGetURLObject( const OUString& rPath, std::u16string_view rBase, INetURLObject& aURLObject ) const { bool bIsValidURL = !rPath.isEmpty(); if ( bIsValidURL ) diff --git a/cui/source/dialogs/hldoctp.cxx b/cui/source/dialogs/hldoctp.cxx index 152a7ec7fbc1..5da741202246 100644 --- a/cui/source/dialogs/hldoctp.cxx +++ b/cui/source/dialogs/hldoctp.cxx @@ -304,7 +304,7 @@ void SvxHyperlinkDocTp::SetMarkStr ( const OUString& aStrMark ) |* retrieve kind of pathstr |* |************************************************************************/ -SvxHyperlinkDocTp::EPathType SvxHyperlinkDocTp::GetPathType ( const OUString& rStrPath ) +SvxHyperlinkDocTp::EPathType SvxHyperlinkDocTp::GetPathType ( std::u16string_view rStrPath ) { INetURLObject aURL( rStrPath, INetProtocol::File ); diff --git a/cui/source/dialogs/scriptdlg.cxx b/cui/source/dialogs/scriptdlg.cxx index 0c349367b44d..f7c2ac340c64 100644 --- a/cui/source/dialogs/scriptdlg.cxx +++ b/cui/source/dialogs/scriptdlg.cxx @@ -298,9 +298,9 @@ void SvxScriptOrgDialog::RequestSubEntries(const weld::TreeIter& rRootEntry, Ref void SvxScriptOrgDialog::insertEntry(const OUString& rText, const OUString& rBitmap, const weld::TreeIter* pParent, bool bChildrenOnDemand, std::unique_ptr<SFEntry> && aUserData, - const OUString& factoryURL, bool bSelect) + std::u16string_view factoryURL, bool bSelect) { - if (rBitmap == RID_CUIBMP_DOC && !factoryURL.isEmpty()) + if (rBitmap == RID_CUIBMP_DOC && !factoryURL.empty()) { OUString aImage = SvFileInformationManager::GetFileImageId(INetURLObject(factoryURL)); insertEntry(rText, aImage, pParent, bChildrenOnDemand, std::move(aUserData), bSelect); diff --git a/cui/source/inc/cuigaldlg.hxx b/cui/source/inc/cuigaldlg.hxx index 0850cd0bcb02..b3e02da89d38 100644 --- a/cui/source/inc/cuigaldlg.hxx +++ b/cui/source/inc/cuigaldlg.hxx @@ -268,7 +268,7 @@ public: void SetXChgData( ExchangeData* pData ); const ExchangeData* GetXChgData() const { return pData; } - void StartSearchFiles( const OUString& _rFolderURL, short _nDlgResult ); + void StartSearchFiles( std::u16string_view _rFolderURL, short _nDlgResult ); static std::unique_ptr<SfxTabPage> Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rSet); }; diff --git a/cui/source/inc/hldocntp.hxx b/cui/source/inc/hldocntp.hxx index 227840f68481..6cd6de54d41e 100644 --- a/cui/source/inc/hldocntp.hxx +++ b/cui/source/inc/hldocntp.hxx @@ -34,7 +34,7 @@ private: std::unique_ptr<weld::Button> m_xBtCreate; std::unique_ptr<weld::TreeView> m_xLbDocTypes; - bool ImplGetURLObject( const OUString& rPath, const OUString& rBase, INetURLObject& aURLObject ) const; + bool ImplGetURLObject( const OUString& rPath, std::u16string_view rBase, INetURLObject& aURLObject ) const; void FillDocumentList (); DECL_LINK (ClickNewHdl_Impl, weld::Button&, void ); diff --git a/cui/source/inc/hldoctp.hxx b/cui/source/inc/hldoctp.hxx index 73f6218eabc5..c55c1cd2061f 100644 --- a/cui/source/inc/hldoctp.hxx +++ b/cui/source/inc/hldoctp.hxx @@ -49,7 +49,7 @@ private: DECL_LINK( TimeoutHdl_Impl, Timer *, void ); ///< Handler for timer -timeout enum class EPathType { Invalid, ExistsFile }; - static EPathType GetPathType ( const OUString& rStrPath ); + static EPathType GetPathType ( std::u16string_view rStrPath ); void FillDlgFields(const OUString& rStrURL) override; void GetCurentItemData ( OUString& rStrURL, OUString& aStrName, diff --git a/cui/source/inc/scriptdlg.hxx b/cui/source/inc/scriptdlg.hxx index d2e5cae7f27d..f184f70a73cb 100644 --- a/cui/source/inc/scriptdlg.hxx +++ b/cui/source/inc/scriptdlg.hxx @@ -124,7 +124,7 @@ protected: const weld::TreeIter* pParent, bool bChildrenOnDemand, std::unique_ptr< SFEntry > && aUserData, - const OUString& factoryURL, bool bSelect); + std::u16string_view factoryURL, bool bSelect); void insertEntry(OUString const & rText, OUString const & rBitmap, const weld::TreeIter* pParent, bool bChildrenOnDemand, diff --git a/cui/source/options/personalization.cxx b/cui/source/options/personalization.cxx index 9697237d5dc4..7c6f01a7fe77 100644 --- a/cui/source/options/personalization.cxx +++ b/cui/source/options/personalization.cxx @@ -130,7 +130,7 @@ void SvxPersonalizationTabPage::LoadDefaultImages() m_vDefaultPersonaSettings.push_back(aPersonaSetting); - INetURLObject aURLObj(gallery + aPreviewFile); + INetURLObject aURLObj(rtl::OUStringConcatenation(gallery + aPreviewFile)); aFilter.ImportGraphic(aGraphic, aURLObj); Size aSize(aGraphic.GetSizePixel()); diff --git a/dbaccess/source/core/dataaccess/databaseregistrations.cxx b/dbaccess/source/core/dataaccess/databaseregistrations.cxx index bd215b397852..f5776a7fdf46 100644 --- a/dbaccess/source/core/dataaccess/databaseregistrations.cxx +++ b/dbaccess/source/core/dataaccess/databaseregistrations.cxx @@ -100,7 +100,7 @@ namespace dbaccess ::utl::OConfigurationNode impl_checkValidName_throw_must_not_exist(const OUString& _rName); - void impl_checkValidLocation_throw( const OUString& _rLocation ); + void impl_checkValidLocation_throw( std::u16string_view _rLocation ); /** retrieves the configuration node whose "Name" sub node has the given value @@ -221,9 +221,9 @@ namespace dbaccess return impl_getNodeForName_throw_must_not_exist(_rName); } - void DatabaseRegistrations::impl_checkValidLocation_throw( const OUString& _rLocation ) + void DatabaseRegistrations::impl_checkValidLocation_throw( std::u16string_view _rLocation ) { - if ( _rLocation.isEmpty() ) + if ( _rLocation.empty() ) throw IllegalArgumentException( OUString(), *this, 2 ); INetURLObject aURL( _rLocation ); diff --git a/dbaccess/source/ui/dlg/ConnectionHelper.cxx b/dbaccess/source/ui/dlg/ConnectionHelper.cxx index ae1968a738b9..6642d28956d6 100644 --- a/dbaccess/source/ui/dlg/ConnectionHelper.cxx +++ b/dbaccess/source/ui/dlg/ConnectionHelper.cxx @@ -570,7 +570,7 @@ namespace dbaui commitURL(); } - bool OConnectionHelper::createDirectoryDeep(const OUString& _rPathURL) + bool OConnectionHelper::createDirectoryDeep(std::u16string_view _rPathURL) { // get a URL object analyzing the URL for us ... INetURLObject aParser; diff --git a/dbaccess/source/ui/dlg/ConnectionHelper.hxx b/dbaccess/source/ui/dlg/ConnectionHelper.hxx index 5b765dfa50b1..b4c00548f682 100644 --- a/dbaccess/source/ui/dlg/ConnectionHelper.hxx +++ b/dbaccess/source/ui/dlg/ConnectionHelper.hxx @@ -74,7 +74,7 @@ namespace dbaui sal_Int32 checkPathExistence(const OUString& _rURL); IS_PATH_EXIST pathExists(const OUString& _rURL, bool bIsFile) const; - bool createDirectoryDeep(const OUString& _rPathNormalized); + bool createDirectoryDeep(std::u16string_view _rPathNormalized); bool commitURL(); /** opens the FileOpen dialog and asks for a FileName diff --git a/dbaccess/source/ui/dlg/dbwizsetup.cxx b/dbaccess/source/ui/dlg/dbwizsetup.cxx index f3582e41dbed..8b7273b44d70 100644 --- a/dbaccess/source/ui/dlg/dbwizsetup.cxx +++ b/dbaccess/source/ui/dlg/dbwizsetup.cxx @@ -755,7 +755,7 @@ bool ODbTypeWizDialogSetup::SaveDatabaseDocument() m_pImpl->saveChanges(*m_pOutSet); } - void ODbTypeWizDialogSetup::RegisterDataSourceByLocation(const OUString& _sPath) + void ODbTypeWizDialogSetup::RegisterDataSourceByLocation(std::u16string_view _sPath) { Reference< XPropertySet > xDatasource = m_pImpl->getCurrentDataSource(); Reference< XDatabaseContext > xDatabaseContext( DatabaseContext::create(getORB()) ); diff --git a/dbaccess/source/ui/inc/dbwizsetup.hxx b/dbaccess/source/ui/inc/dbwizsetup.hxx index 424a34534c60..0829b328d2fd 100644 --- a/dbaccess/source/ui/inc/dbwizsetup.hxx +++ b/dbaccess/source/ui/inc/dbwizsetup.hxx @@ -147,7 +147,7 @@ private: */ void declareAuthDepPath( const OUString& _sURL, PathId _nPathId, const vcl::RoadmapWizardTypes::WizardPath& _rPaths); - void RegisterDataSourceByLocation(const OUString& sPath); + void RegisterDataSourceByLocation(std::u16string_view sPath); bool SaveDatabaseDocument(); void activateDatabasePath(); OUString createUniqueFileName(const INetURLObject& rURL); diff --git a/desktop/source/migration/migration.cxx b/desktop/source/migration/migration.cxx index 6014d0e74935..0fbca8565634 100644 --- a/desktop/source/migration/migration.cxx +++ b/desktop/source/migration/migration.cxx @@ -429,7 +429,7 @@ OUString MigrationImpl::preXDGConfigDir(const OUString& rConfigDir) void MigrationImpl::setInstallInfoIfExist( install_info& aInfo, - const OUString& rConfigDir, + std::u16string_view rConfigDir, const OUString& rVersion) { OUString url(INetURLObject(rConfigDir).GetMainURL(INetURLObject::DecodeMechanism::NONE)); @@ -470,11 +470,11 @@ install_info MigrationImpl::findInstallation(const strings_v& rVersions) ( aInfo.userdata.isEmpty() || aProfileName.equalsIgnoreAsciiCase( utl::ConfigManager::getProductName() ) ) ) { - setInstallInfoIfExist(aInfo, aTopConfigDir + aProfileName, aVersion); + setInstallInfoIfExist(aInfo, OUStringConcatenation(aTopConfigDir + aProfileName), aVersion); #if defined UNX && ! defined MACOSX //try preXDG path if the new one does not exist if ( aInfo.userdata.isEmpty()) - setInstallInfoIfExist(aInfo, aPreXDGTopConfigDir + aProfileName, aVersion); + setInstallInfoIfExist(aInfo, OUStringConcatenation(aPreXDGTopConfigDir + aProfileName), aVersion); #endif } } diff --git a/desktop/source/migration/migration_impl.hxx b/desktop/source/migration/migration_impl.hxx index cf2d201d22e6..d06657588e07 100644 --- a/desktop/source/migration/migration_impl.hxx +++ b/desktop/source/migration/migration_impl.hxx @@ -159,7 +159,7 @@ private: #if defined UNX && ! defined MACOSX static OUString preXDGConfigDir(const OUString& rConfigDir); #endif - static void setInstallInfoIfExist(install_info& aInfo, const OUString& rConfigDir, const OUString& rVersion); + static void setInstallInfoIfExist(install_info& aInfo, std::u16string_view rConfigDir, const OUString& rVersion); static install_info findInstallation(const strings_v& rVersions); strings_vr compileFileList(); diff --git a/drawinglayer/source/tools/emfpimage.cxx b/drawinglayer/source/tools/emfpimage.cxx index a3300168e7f6..67a0cef99ed2 100644 --- a/drawinglayer/source/tools/emfpimage.cxx +++ b/drawinglayer/source/tools/emfpimage.cxx @@ -38,7 +38,7 @@ namespace emfplushelper { // non native formats GraphicFilter filter; - filter.ImportGraphic(graphic, OUString(), s); + filter.ImportGraphic(graphic, u"", s); SAL_INFO("drawinglayer.emf", "EMF+\tbitmap width: " << graphic.GetSizePixel().Width() << " height: " << graphic.GetSizePixel().Height()); } } @@ -58,7 +58,7 @@ namespace emfplushelper GraphicFilter filter; // workaround buggy metafiles, which have wrong mfSize set (n#705956 for example) SvMemoryStream mfStream(const_cast<char *>(static_cast<char const *>(s.GetData()) + s.Tell()), dataSize, StreamMode::READ); - filter.ImportGraphic(graphic, OUString(), mfStream); + filter.ImportGraphic(graphic, u"", mfStream); // debug code - write the stream to debug file /tmp/emf-stream.emf #if OSL_DEBUG_LEVEL > 1 diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx index bd9840cfde0a..a31df88ca0f0 100644 --- a/editeng/source/items/frmitems.cxx +++ b/editeng/source/items/frmitems.cxx @@ -3208,7 +3208,7 @@ const GraphicObject* SvxBrushItem::GetGraphicObject(OUString const & referer) co std::unique_ptr<SvMemoryStream> const xMemStream(aGraphicURL.getData()); if (xMemStream) { - if (ERRCODE_NONE == GraphicFilter::GetGraphicFilter().ImportGraphic(aGraphic, "", *xMemStream)) + if (ERRCODE_NONE == GraphicFilter::GetGraphicFilter().ImportGraphic(aGraphic, u"", *xMemStream)) { bGraphicLoaded = true; diff --git a/editeng/source/items/legacyitem.cxx b/editeng/source/items/legacyitem.cxx index d630c4e5f0b3..89c15dd5aa93 100644 --- a/editeng/source/items/legacyitem.cxx +++ b/editeng/source/items/legacyitem.cxx @@ -573,7 +573,7 @@ namespace legacy // TODO/MBA: how can we get a BaseURL here?! OSL_FAIL("No BaseURL!"); - OUString aAbs = INetURLObject::GetAbsURL( "", aRel ); + OUString aAbs = INetURLObject::GetAbsURL( u"", aRel ); DBG_ASSERT( !aAbs.isEmpty(), "Invalid URL!" ); rItem.SetGraphicLink(aAbs); } @@ -616,7 +616,7 @@ namespace legacy { OSL_FAIL("No BaseURL!"); // TODO/MBA: how to get a BaseURL?! - OUString aRel = INetURLObject::GetRelURL( "", rItem.GetGraphicLink() ); + OUString aRel = INetURLObject::GetRelURL( u"", rItem.GetGraphicLink() ); // UNICODE: rStrm << aRel; rStrm.WriteUniOrByteString(aRel, rStrm.GetStreamCharSet()); } diff --git a/extensions/source/propctrlr/defaultforminspection.cxx b/extensions/source/propctrlr/defaultforminspection.cxx index 7de6673f0d2e..1fe8ee60e1dc 100644 --- a/extensions/source/propctrlr/defaultforminspection.cxx +++ b/extensions/source/propctrlr/defaultforminspection.cxx @@ -145,7 +145,7 @@ namespace pcr { pReturn->ProgrammaticName = OUString::createFromAscii( aCategories[i].programmaticName ); pReturn->UIName = PcrRes( aCategories[i].uiNameResId ); - pReturn->HelpURL = HelpIdUrl::getHelpURL( aCategories[i].helpId ); + pReturn->HelpURL = HelpIdUrl::getHelpURL( aCategories[i].helpId.asView() ); } return aReturn; diff --git a/extensions/source/propctrlr/pcrcommon.cxx b/extensions/source/propctrlr/pcrcommon.cxx index b980731380a2..4151e6827506 100644 --- a/extensions/source/propctrlr/pcrcommon.cxx +++ b/extensions/source/propctrlr/pcrcommon.cxx @@ -34,7 +34,7 @@ namespace pcr //= HelpIdUrl - OString HelpIdUrl::getHelpId( const OUString& _rHelpURL ) + OString HelpIdUrl::getHelpId( std::u16string_view _rHelpURL ) { INetURLObject aHID( _rHelpURL ); if ( aHID.GetProtocol() == INetProtocol::Hid ) @@ -44,7 +44,7 @@ namespace pcr } - OUString HelpIdUrl::getHelpURL( const OUString & sHelpId ) + OUString HelpIdUrl::getHelpURL( std::u16string_view sHelpId ) { OUStringBuffer aBuffer; INetURLObject aHID( sHelpId ); diff --git a/extensions/source/propctrlr/pcrcommon.hxx b/extensions/source/propctrlr/pcrcommon.hxx index 4d9b68d8e974..f9ec2838cf16 100644 --- a/extensions/source/propctrlr/pcrcommon.hxx +++ b/extensions/source/propctrlr/pcrcommon.hxx @@ -61,8 +61,8 @@ namespace pcr class HelpIdUrl { public: - static OString getHelpId( const OUString& _rHelpURL ); - static OUString getHelpURL( const OUString& ); + static OString getHelpId( std::u16string_view _rHelpURL ); + static OUString getHelpURL( std::u16string_view ); }; diff --git a/filter/source/graphic/GraphicExportFilter.cxx b/filter/source/graphic/GraphicExportFilter.cxx index e20c56ddf232..b0b93222dfa3 100644 --- a/filter/source/graphic/GraphicExportFilter.cxx +++ b/filter/source/graphic/GraphicExportFilter.cxx @@ -163,7 +163,7 @@ bool GraphicExportFilter::filterRenderDocument() const SvMemoryStream aMemStream; const GraphicConversionParameters aParameters(aTargetSizePixel, true, true); - const ErrCode nResult = rFilter.ExportGraphic( aGraphic.GetBitmapEx(aParameters), OUString(), aMemStream, + const ErrCode nResult = rFilter.ExportGraphic( aGraphic.GetBitmapEx(aParameters), u"", aMemStream, nFilterFormat, &maFilterDataSequence ); if ( nResult == ERRCODE_NONE ) diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx index dc145c1b5ff1..5bbf1c44735f 100644 --- a/filter/source/msfilter/escherex.cxx +++ b/filter/source/msfilter/escherex.cxx @@ -4199,7 +4199,7 @@ sal_uInt32 EscherGraphicProvider::GetBlibID( SvStream& rPicOutStrm, GraphicObjec SvMemoryStream aGIFStream; const char* const pString = "MSOFFICE9.0"; aGIFStream.WriteBytes(pString, strlen(pString)); - nErrCode = rFilter.ExportGraphic( aGraphic, OUString(), aGIFStream, + nErrCode = rFilter.ExportGraphic( aGraphic, u"", aGIFStream, rFilter.GetExportFormatNumberForShortName( u"GIF" ) ); SAL_WARN_IF( nErrCode != ERRCODE_NONE, "filter.ms", @@ -4218,7 +4218,7 @@ sal_uInt32 EscherGraphicProvider::GetBlibID( SvStream& rPicOutStrm, GraphicObjec aFilterProp.Name = "AdditionalChunks"; aFilterProp.Value <<= aAdditionalChunkSequence; uno::Sequence<beans::PropertyValue> aFilterData{ aFilterProp }; - nErrCode = rFilter.ExportGraphic( aGraphic, OUString(), aStream, + nErrCode = rFilter.ExportGraphic( aGraphic, u"", aStream, rFilter.GetExportFormatNumberForShortName( u"PNG" ), &aFilterData ); } } diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx index 7c036227e8b8..f7b8c0aea1e2 100644 --- a/filter/source/msfilter/msdffimp.cxx +++ b/filter/source/msfilter/msdffimp.cxx @@ -6643,7 +6643,7 @@ bool SvxMSDffManager::GetBLIPDirect( SvStream& rBLIPStream, Graphic& rData, tool nRes = ERRCODE_NONE; } else - nRes = rGF.ImportGraphic( rData, "", *pGrStream ); + nRes = rGF.ImportGraphic( rData, u"", *pGrStream ); // SJ: I40472, sometimes the aspect ratio (aMtfSize100) does not match and we get scaling problems, // then it is better to use the prefsize that is stored within the metafile. Bug #72846# for what the diff --git a/filter/source/svg/svgfilter.cxx b/filter/source/svg/svgfilter.cxx index c6677bf0c9dc..4538e50213fc 100644 --- a/filter/source/svg/svgfilter.cxx +++ b/filter/source/svg/svgfilter.cxx @@ -231,7 +231,7 @@ bool SVGFilter::filterImpressOrDraw( const Sequence< PropertyValue >& rDescripto GraphicFilter aGraphicFilter; Graphic aGraphic; const ErrCode nGraphicFilterErrorCode( - aGraphicFilter.ImportGraphic(aGraphic, OUString(), *aStream)); + aGraphicFilter.ImportGraphic(aGraphic, u"", *aStream)); if(ERRCODE_NONE != nGraphicFilterErrorCode) { diff --git a/filter/source/xsltdialog/xmlfilterjar.cxx b/filter/source/xsltdialog/xmlfilterjar.cxx index aa3e17859932..23b2510bb49f 100644 --- a/filter/source/xsltdialog/xmlfilterjar.cxx +++ b/filter/source/xsltdialog/xmlfilterjar.cxx @@ -299,7 +299,7 @@ bool XMLFilterJarHelper::copyFiles( const Reference< XHierarchicalNameAccess >& return bOk; } -bool XMLFilterJarHelper::copyFile( const Reference< XHierarchicalNameAccess >& xIfc, OUString& rURL, const OUString& rTargetURL ) +bool XMLFilterJarHelper::copyFile( const Reference< XHierarchicalNameAccess >& xIfc, OUString& rURL, std::u16string_view rTargetURL ) { if( !rURL.matchIgnoreAsciiCase( sVndSunStarPackage ) ) return true; diff --git a/filter/source/xsltdialog/xmlfilterjar.hxx b/filter/source/xsltdialog/xmlfilterjar.hxx index 1d8e52fc3e18..d634bb6c4d24 100644 --- a/filter/source/xsltdialog/xmlfilterjar.hxx +++ b/filter/source/xsltdialog/xmlfilterjar.hxx @@ -39,7 +39,7 @@ private: /// @throws css::uno::Exception void addFile( css::uno::Reference< css::uno::XInterface > const & xRootFolder, css::uno::Reference< css::lang::XSingleServiceFactory > const & xFactory, const OUString& rSourceFile ); - static bool copyFile( const css::uno::Reference< css::container::XHierarchicalNameAccess >& xIfc, OUString& rURL, const OUString& rTargetURL ); + static bool copyFile( const css::uno::Reference< css::container::XHierarchicalNameAccess >& xIfc, OUString& rURL, std::u16string_view rTargetURL ); bool copyFiles( const css::uno::Reference< css::container::XHierarchicalNameAccess >& xIfc, filter_info_impl* pFilter ); css::uno::Reference< css::uno::XComponentContext > mxContext; diff --git a/filter/source/xsltdialog/xmlfiltertestdialog.cxx b/filter/source/xsltdialog/xmlfiltertestdialog.cxx index c9b30c005fd4..ca38ab547c26 100644 --- a/filter/source/xsltdialog/xmlfiltertestdialog.cxx +++ b/filter/source/xsltdialog/xmlfiltertestdialog.cxx @@ -199,7 +199,7 @@ void XMLFilterTestDialog::test( const filter_info_impl& rFilterInfo ) m_xDialog->run(); } -static OUString getFileNameFromURL( OUString const & rURL ) +static OUString getFileNameFromURL( std::u16string_view rURL ) { INetURLObject aURL( rURL ); OUString aName( aURL.getName(INetURLObject::LAST_SEGMENT, true, INetURLObject::DecodeMechanism::WithCharset) ); diff --git a/forms/source/xforms/submission/submission.hxx b/forms/source/xforms/submission/submission.hxx index bb5a19ee362b..ac80947aad27 100644 --- a/forms/source/xforms/submission/submission.hxx +++ b/forms/source/xforms/submission/submission.hxx @@ -114,7 +114,7 @@ public: UNKNOWN_ERROR }; - CSubmission(const OUString& aURL, const css::uno::Reference< css::xml::dom::XDocumentFragment >& aFragment) + CSubmission(std::u16string_view aURL, const css::uno::Reference< css::xml::dom::XDocumentFragment >& aFragment) : m_aURLObj(aURL) , m_aFragment(aFragment) , m_xContext(::comphelper::getProcessComponentContext()) diff --git a/forms/source/xforms/submission/submission_get.cxx b/forms/source/xforms/submission/submission_get.cxx index 6114daeaf3dc..5a82aeae04d2 100644 --- a/forms/source/xforms/submission/submission_get.cxx +++ b/forms/source/xforms/submission/submission_get.cxx @@ -36,7 +36,7 @@ using namespace osl; using namespace ucbhelper; -CSubmissionGet::CSubmissionGet(const OUString& aURL, const css::uno::Reference< css::xml::dom::XDocumentFragment >& aFragment) +CSubmissionGet::CSubmissionGet(std::u16string_view aURL, const css::uno::Reference< css::xml::dom::XDocumentFragment >& aFragment) : CSubmission(aURL, aFragment) { } diff --git a/forms/source/xforms/submission/submission_get.hxx b/forms/source/xforms/submission/submission_get.hxx index 10375c5b266e..086fab25b2be 100644 --- a/forms/source/xforms/submission/submission_get.hxx +++ b/forms/source/xforms/submission/submission_get.hxx @@ -24,7 +24,7 @@ class CSubmissionGet : public CSubmission { public: - CSubmissionGet(const OUString& aURL, + CSubmissionGet(std::u16string_view aURL, const css::uno::Reference<css::xml::dom::XDocumentFragment>& aFragment); virtual SubmissionResult submit(const css::uno::Reference<css::task::XInteractionHandler>& aInteractionHandler) override; diff --git a/forms/source/xforms/submission/submission_post.cxx b/forms/source/xforms/submission/submission_post.cxx index d5629857f81b..89ffd23230f0 100644 --- a/forms/source/xforms/submission/submission_post.cxx +++ b/forms/source/xforms/submission/submission_post.cxx @@ -36,7 +36,7 @@ using namespace osl; using namespace ucbhelper; -CSubmissionPost::CSubmissionPost(const OUString& aURL, const css::uno::Reference< css::xml::dom::XDocumentFragment >& aFragment) +CSubmissionPost::CSubmissionPost(std::u16string_view aURL, const css::uno::Reference< css::xml::dom::XDocumentFragment >& aFragment) : CSubmission(aURL, aFragment) { } diff --git a/forms/source/xforms/submission/submission_post.hxx b/forms/source/xforms/submission/submission_post.hxx index c3f67443c8df..0fb63472b107 100644 --- a/forms/source/xforms/submission/submission_post.hxx +++ b/forms/source/xforms/submission/submission_post.hxx @@ -24,7 +24,7 @@ class CSubmissionPost : public CSubmission { public: - CSubmissionPost(const OUString& aURL, const css::uno::Reference< css::xml::dom::XDocumentFragment >& aFragment); + CSubmissionPost(std::u16string_view aURL, const css::uno::Reference< css::xml::dom::XDocumentFragment >& aFragment); virtual SubmissionResult submit(const css::uno::Reference< css::task::XInteractionHandler >& aInteractionHandler) override; }; diff --git a/forms/source/xforms/submission/submission_put.cxx b/forms/source/xforms/submission/submission_put.cxx index f49f6680451c..678cd79216ff 100644 --- a/forms/source/xforms/submission/submission_put.cxx +++ b/forms/source/xforms/submission/submission_put.cxx @@ -34,7 +34,7 @@ using namespace osl; using namespace ucbhelper; -CSubmissionPut::CSubmissionPut(const OUString& aURL, const css::uno::Reference< css::xml::dom::XDocumentFragment >& aFragment) +CSubmissionPut::CSubmissionPut(std::u16string_view aURL, const css::uno::Reference< css::xml::dom::XDocumentFragment >& aFragment) : CSubmission(aURL, aFragment) { } diff --git a/forms/source/xforms/submission/submission_put.hxx b/forms/source/xforms/submission/submission_put.hxx index f5e6c2b36ffc..2dce84307bde 100644 --- a/forms/source/xforms/submission/submission_put.hxx +++ b/forms/source/xforms/submission/submission_put.hxx @@ -24,7 +24,7 @@ class CSubmissionPut : public CSubmission { public: - CSubmissionPut(const OUString& aURL, + CSubmissionPut(std::u16string_view aURL, const css::uno::Reference<css::xml::dom::XDocumentFragment>& aFragment); virtual SubmissionResult submit(const css::uno::Reference<css::task::XInteractionHandler>& aInteractionHandler) override; diff --git a/fpicker/source/office/fileview.cxx b/fpicker/source/office/fileview.cxx index a9270e52fdb1..e83b42bd7ecf 100644 --- a/fpicker/source/office/fileview.cxx +++ b/fpicker/source/office/fileview.cxx @@ -287,7 +287,7 @@ public: void Clear(); FileViewResult GetFolderContent_Impl( - const OUString& rFolder, + std::u16string_view rFolder, const FileViewAsyncAction* pAsyncDescriptor, const css::uno::Sequence< OUString >& rDenyList ); @@ -1172,7 +1172,7 @@ void SvtFileView_Impl::Clear() } FileViewResult SvtFileView_Impl::GetFolderContent_Impl( - const OUString& rFolder, + std::u16string_view rFolder, const FileViewAsyncAction* pAsyncDescriptor, const css::uno::Sequence< OUString >& rDenyList ) { diff --git a/fpicker/source/office/foldertree.cxx b/fpicker/source/office/foldertree.cxx index 2c37f25677f2..9b704d6c41d8 100644 --- a/fpicker/source/office/foldertree.cxx +++ b/fpicker/source/office/foldertree.cxx @@ -126,7 +126,7 @@ void FolderTree::FillTreeEntry( const OUString & rUrl, const ::std::vector< std: m_xTreeView->expand_row(*xParent); } -void FolderTree::SetTreePath( OUString const & sUrl ) +void FolderTree::SetTreePath( std::u16string_view sUrl ) { INetURLObject aUrl( sUrl ); aUrl.setFinalSlash(); diff --git a/fpicker/source/office/foldertree.hxx b/fpicker/source/office/foldertree.hxx index 02381fc0bd58..e1ba25699c3b 100644 --- a/fpicker/source/office/foldertree.hxx +++ b/fpicker/source/office/foldertree.hxx @@ -41,7 +41,7 @@ public: void InsertRootEntry(const OUString& rId, const OUString& rRootLabel); void FillTreeEntry(const weld::TreeIter& rEntry); void FillTreeEntry(const OUString & rUrl, const ::std::vector< std::pair< OUString, OUString > >& rFolders); - void SetTreePath(OUString const & sUrl); + void SetTreePath(std::u16string_view sUrl); void SetDenyList(const css::uno::Sequence< OUString >& rDenyList); }; diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx index d41bbab8b252..75b51850bf35 100644 --- a/fpicker/source/office/iodlg.cxx +++ b/fpicker/source/office/iodlg.cxx @@ -253,7 +253,7 @@ namespace } #endif - OUString lcl_ensureFinalSlash( const OUString& _rDir ) + OUString lcl_ensureFinalSlash( std::u16string_view _rDir ) { INetURLObject aWorkPathObj( _rDir, INetProtocol::File ); aWorkPathObj.setFinalSlash(); @@ -1270,7 +1270,7 @@ bool implIsInvalid( const OUString & rURL ) } -OUString SvtFileDialog::implGetInitialURL( const OUString& _rPath, const OUString& _rFallback ) +OUString SvtFileDialog::implGetInitialURL( const OUString& _rPath, std::u16string_view _rFallback ) { // a URL parser for the fallback INetURLObject aURLParser; diff --git a/fpicker/source/office/iodlg.hxx b/fpicker/source/office/iodlg.hxx index 86b707e3aedf..9de9261af2d7 100644 --- a/fpicker/source/office/iodlg.hxx +++ b/fpicker/source/office/iodlg.hxx @@ -230,7 +230,7 @@ private: virtual void enableControl( sal_Int16 _nControlId, bool _bEnable ) override; virtual OUString getCurFilter( ) const override; - OUString implGetInitialURL( const OUString& _rPath, const OUString& _rFallback ); + OUString implGetInitialURL( const OUString& _rPath, std::u16string_view _rFallback ); /// executes a certain FileView action asynchronously void executeAsync( 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(); diff --git a/include/avmedia/mediawindow.hxx b/include/avmedia/mediawindow.hxx index e81630002fd0..f398f7e56427 100644 --- a/include/avmedia/mediawindow.hxx +++ b/include/avmedia/mediawindow.hxx @@ -129,7 +129,7 @@ namespace avmedia /// checkbox and store its state in *o_pbLink static bool executeMediaURLDialog(weld::Window* pParent, OUString& rURL, bool *const o_pbLink); static void executeFormatErrorBox(weld::Window* pParent); - static bool isMediaURL(const OUString& rURL, const OUString& rReferer, bool bDeep = false, + static bool isMediaURL(std::u16string_view rURL, const OUString& rReferer, bool bDeep = false, rtl::Reference<PlayerListener> xPreferredPixelSizeListener = nullptr); static css::uno::Reference< css::media::XPlayer > createPlayer( const OUString& rURL, const OUString& rReferer, const OUString* pMimeType = nullptr ); diff --git a/include/basic/basmgr.hxx b/include/basic/basmgr.hxx index c0d2a77923bb..11c90fea1dfa 100644 --- a/include/basic/basmgr.hxx +++ b/include/basic/basmgr.hxx @@ -124,7 +124,7 @@ private: void ImpCreateStdLib( StarBASIC* pParentFromStdLib ); void ImpMgrNotLoaded( const OUString& rStorageName ); BasicLibInfo* CreateLibInfo(); - void LoadBasicManager( SotStorage& rStorage, const OUString& rBaseURL ); + void LoadBasicManager( SotStorage& rStorage, std::u16string_view rBaseURL ); void LoadOldBasicManager( SotStorage& rStorage ); bool ImplLoadBasic( SvStream& rStrm, StarBASICRef& rOldBasic ) const; static bool ImplEncryptStream( SvStream& rStream ); @@ -132,7 +132,7 @@ private: static void CheckModules( StarBASIC* pBasic, bool bReference ); public: - BasicManager( SotStorage& rStorage, const OUString& rBaseURL, StarBASIC* pParentFromStdLib = nullptr, OUString const * pLibPath = nullptr, bool bDocMgr = false ); + BasicManager( SotStorage& rStorage, std::u16string_view rBaseURL, StarBASIC* pParentFromStdLib = nullptr, OUString const * pLibPath = nullptr, bool bDocMgr = false ); BasicManager( StarBASIC* pStdLib, OUString const * pLibPath = nullptr, bool bDocMgr = false ); virtual ~BasicManager() override; diff --git a/include/framework/titlehelper.hxx b/include/framework/titlehelper.hxx index 888a01e71fc7..d1eb175c88fc 100644 --- a/include/framework/titlehelper.hxx +++ b/include/framework/titlehelper.hxx @@ -140,7 +140,7 @@ class FWK_DLLPUBLIC TitleHelper final : private ::cppu::BaseMutex void impl_setSubTitle (const css::uno::Reference< css::frame::XTitle >& xSubTitle); - OUString impl_convertURL2Title(const OUString& sURL); + OUString impl_convertURL2Title(std::u16string_view sURL); // member diff --git a/include/sfx2/docfile.hxx b/include/sfx2/docfile.hxx index d6c97879e2dd..bc6e0cf1e02c 100644 --- a/include/sfx2/docfile.hxx +++ b/include/sfx2/docfile.hxx @@ -290,7 +290,7 @@ public: static css::uno::Sequence < css::util::RevisionTag > GetVersionList( const css::uno::Reference< css::embed::XStorage >& xStorage ); - static OUString CreateTempCopyWithExt( const OUString& aURL ); + static OUString CreateTempCopyWithExt( std::u16string_view aURL ); static bool CallApproveHandler(const css::uno::Reference< css::task::XInteractionHandler >& xHandler, const css::uno::Any& rRequest, bool bAllowAbort); static bool SetWritableForUserOnly( const OUString& aURL ); diff --git a/include/sfx2/doctempl.hxx b/include/sfx2/doctempl.hxx index d16c93988710..029c8e8b2790 100644 --- a/include/sfx2/doctempl.hxx +++ b/include/sfx2/doctempl.hxx @@ -94,12 +94,12 @@ public: */ bool SetName(const OUString &rName, sal_uInt16 nRegion, sal_uInt16 nIdx); - bool CopyTo(sal_uInt16 nRegion, sal_uInt16 nIdx, const OUString &rName) const; + bool CopyTo(sal_uInt16 nRegion, sal_uInt16 nIdx, std::u16string_view rName) const; bool CopyFrom(sal_uInt16 nRegion, sal_uInt16 nIdx, OUString &rName); bool GetFull( std::u16string_view rRegion, std::u16string_view rName, OUString& rPath ); - bool GetLogicNames( const OUString& rPath, OUString& rRegion, OUString& rName ) const; + bool GetLogicNames( std::u16string_view rPath, OUString& rRegion, OUString& rName ) const; /** updates the configuration where the document templates structure is stored. diff --git a/include/sfx2/frmdescr.hxx b/include/sfx2/frmdescr.hxx index 3901961fb639..67c0c7e38977 100644 --- a/include/sfx2/frmdescr.hxx +++ b/include/sfx2/frmdescr.hxx @@ -65,7 +65,7 @@ public: SfxItemSet* GetArgs(); const INetURLObject& GetURL() const { return aURL; } - void SetURL( const OUString& rURL ); + void SetURL( std::u16string_view rURL ); void SetActualURL(); // FrameName diff --git a/include/sfx2/frmhtml.hxx b/include/sfx2/frmhtml.hxx index 6b6ff228b5c9..205c320fe820 100644 --- a/include/sfx2/frmhtml.hxx +++ b/include/sfx2/frmhtml.hxx @@ -30,7 +30,7 @@ class SfxFrameDescriptor; namespace SfxFrameHTMLParser { // These methods can also be used by other parsers. -SFX2_DLLPUBLIC void ParseFrameOptions(SfxFrameDescriptor*, const HTMLOptions&, const OUString&); +SFX2_DLLPUBLIC void ParseFrameOptions(SfxFrameDescriptor*, const HTMLOptions&, std::u16string_view); }; #endif diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx index 49c2c2325eff..b7f9e1fa0688 100644 --- a/include/sfx2/objsh.hxx +++ b/include/sfx2/objsh.hxx @@ -742,7 +742,7 @@ public: PreDoSaveAs_Impl(const OUString& rFileName, const OUString& rFiltName, SfxItemSet const& rItemSet, const css::uno::Sequence<css::beans::PropertyValue>& rArgs); - SAL_DLLPRIVATE bool APISaveAs_Impl(const OUString& aFileName, SfxItemSet& rItemSet, + SAL_DLLPRIVATE bool APISaveAs_Impl(std::u16string_view aFileName, SfxItemSet& rItemSet, const css::uno::Sequence<css::beans::PropertyValue>& rArgs); SAL_DLLPRIVATE bool CommonSaveAs_Impl(const INetURLObject& aURL, const OUString& aFilterName, SfxItemSet& rItemSet, diff --git a/include/sfx2/sfxhtml.hxx b/include/sfx2/sfxhtml.hxx index af22df207b83..9f5a03f5b250 100644 --- a/include/sfx2/sfxhtml.hxx +++ b/include/sfx2/sfxhtml.hxx @@ -57,11 +57,11 @@ public: static bool ParseMapOptions(ImageMap* pImageMap, const HTMLOptions& rOptions); bool ParseMapOptions(ImageMap * pImageMap) { return ParseMapOptions(pImageMap, GetOptions()); } - static bool ParseAreaOptions(ImageMap * pImageMap, const OUString& rBaseURL, + static bool ParseAreaOptions(ImageMap * pImageMap, std::u16string_view rBaseURL, const HTMLOptions& rOptions, SvMacroItemId nEventMouseOver, SvMacroItemId nEventMouseOut ); - inline bool ParseAreaOptions(ImageMap * pImageMap, const OUString& rBaseURL, + inline bool ParseAreaOptions(ImageMap * pImageMap, std::u16string_view rBaseURL, SvMacroItemId nEventMouseOver, SvMacroItemId nEventMouseOut); @@ -99,7 +99,7 @@ protected: const OUString& GetScriptTypeString( SvKeyValueIterator* ) const; }; -inline bool SfxHTMLParser::ParseAreaOptions(ImageMap * pImageMap, const OUString& rBaseURL, +inline bool SfxHTMLParser::ParseAreaOptions(ImageMap * pImageMap, std::u16string_view rBaseURL, SvMacroItemId nEventMouseOver, SvMacroItemId nEventMouseOut) { diff --git a/include/sfx2/templatelocalview.hxx b/include/sfx2/templatelocalview.hxx index 2ad81391e97d..020ad2ba37e6 100644 --- a/include/sfx2/templatelocalview.hxx +++ b/include/sfx2/templatelocalview.hxx @@ -55,7 +55,7 @@ public: bool operator () (const ThumbnailViewItem *pItem); static bool isFilteredExtension(FILTER_APPLICATION filter, std::u16string_view rExt); - bool isValid (const OUString& rPath) const; + bool isValid (std::u16string_view rPath) const; private: @@ -114,7 +114,7 @@ public: bool copyFrom(TemplateContainerItem *pItem, const OUString &rPath); - bool exportTo (const sal_uInt16 nItemId, const sal_uInt16 nRegionItemId, const OUString &rName); + bool exportTo (const sal_uInt16 nItemId, const sal_uInt16 nRegionItemId, std::u16string_view rName); virtual bool renameItem(ThumbnailViewItem* pItem, const OUString& sNewTitle) override; @@ -152,7 +152,7 @@ public: static BitmapEx scaleImg (const BitmapEx &rImg, tools::Long width, tools::Long height); - static BitmapEx getDefaultThumbnail( const OUString& rPath ); + static BitmapEx getDefaultThumbnail( std::u16string_view rPath ); static BitmapEx fetchThumbnail (const OUString &msURL, tools::Long width, tools::Long height); diff --git a/include/svl/documentlockfile.hxx b/include/svl/documentlockfile.hxx index f35e8a765f13..b4f731db7fc8 100644 --- a/include/svl/documentlockfile.hxx +++ b/include/svl/documentlockfile.hxx @@ -56,7 +56,7 @@ class SVL_DLLPUBLIC DocumentLockFile final : public GenDocumentLockFile virtual void WriteEntryToStream( const LockFileEntry& aEntry, const css::uno::Reference< css::io::XOutputStream >& xStream ) override; public: - DocumentLockFile( const OUString& aOrigURL ); + DocumentLockFile( std::u16string_view aOrigURL ); virtual ~DocumentLockFile() override; virtual LockFileEntry GetLockData() override; diff --git a/include/svl/inethist.hxx b/include/svl/inethist.hxx index fe3398d43572..9f88fd84baa7 100644 --- a/include/svl/inethist.hxx +++ b/include/svl/inethist.hxx @@ -74,7 +74,7 @@ public: return false; } - bool QueryUrl (const OUString &rUrl) const; + bool QueryUrl (std::u16string_view rUrl) const; /** PutUrl. */ diff --git a/include/svl/lockfilecommon.hxx b/include/svl/lockfilecommon.hxx index f94e41b6cb20..054e723ee01d 100644 --- a/include/svl/lockfilecommon.hxx +++ b/include/svl/lockfilecommon.hxx @@ -50,7 +50,7 @@ protected: ::osl::Mutex m_aMutex; /// This method generates the URL of the lock file based on the document URL and the specified prefix. - static OUString GenerateOwnLockFileURL(const OUString& aOrigURL, std::u16string_view aPrefix); + static OUString GenerateOwnLockFileURL(std::u16string_view aOrigURL, std::u16string_view aPrefix); public: LockFileCommon(const OUString& aLockFileURL); diff --git a/include/svl/msodocumentlockfile.hxx b/include/svl/msodocumentlockfile.hxx index 904411cb01ac..f91c7ccffe44 100644 --- a/include/svl/msodocumentlockfile.hxx +++ b/include/svl/msodocumentlockfile.hxx @@ -29,7 +29,7 @@ private: Excel, PowerPoint }; - static AppType getAppType(const OUString& sOrigURL); + static AppType getAppType(std::u16string_view sOrigURL); AppType m_eAppType; virtual void @@ -39,14 +39,14 @@ private: virtual css::uno::Reference<css::io::XInputStream> OpenStream() override; public: - MSODocumentLockFile(const OUString& aOrigURL); + MSODocumentLockFile(std::u16string_view aOrigURL); virtual ~MSODocumentLockFile() override; virtual LockFileEntry GetLockData() override; virtual void RemoveFile() override; - static bool IsMSOSupportedFileFormat(const OUString& aURL); + static bool IsMSOSupportedFileFormat(std::u16string_view aURL); }; } diff --git a/include/svl/sharecontrolfile.hxx b/include/svl/sharecontrolfile.hxx index 97c1c2e4729e..fe717131262b 100644 --- a/include/svl/sharecontrolfile.hxx +++ b/include/svl/sharecontrolfile.hxx @@ -52,7 +52,7 @@ class SVL_DLLPUBLIC ShareControlFile final : public LockFileCommon public: // The constructor will throw exception in case the stream can not be opened - ShareControlFile( const OUString& aOrigURL ); + ShareControlFile( std::u16string_view aOrigURL ); virtual ~ShareControlFile() override; std::vector< LockFileEntry > GetUsersData(); diff --git a/include/svtools/parhtml.hxx b/include/svtools/parhtml.hxx index 02cdc2042645..d05a9e36cc5a 100644 --- a/include/svtools/parhtml.hxx +++ b/include/svtools/parhtml.hxx @@ -257,7 +257,7 @@ public: virtual bool ParseMetaOptions( const css::uno::Reference< css::document::XDocumentProperties>&, SvKeyValueIterator* ); - void ParseScriptOptions( OUString& rLangString, const OUString&, HTMLScriptLanguage& rLang, + void ParseScriptOptions( OUString& rLangString, std::u16string_view rBaseURL, HTMLScriptLanguage& rLang, OUString& rSrc, OUString& rLibrary, OUString& rModule ); // Remove a comment around the content of <SCRIPT> or <STYLE>. diff --git a/include/svtools/place.hxx b/include/svtools/place.hxx index 2cae08bf2e7a..315621c6504a 100644 --- a/include/svtools/place.hxx +++ b/include/svtools/place.hxx @@ -21,13 +21,13 @@ private: public: - Place( const OUString& sName, const OUString& sUrl, bool bEditable = false ) : + Place( const OUString& sName, std::u16string_view sUrl, bool bEditable = false ) : msName( sName ), maUrl( sUrl ), mbEditable( bEditable ) {}; void SetName(const OUString& aName ) { msName = aName; } - void SetUrl(const OUString& aUrl ) { maUrl.SetURL( aUrl ); } + void SetUrl(std::u16string_view aUrl ) { maUrl.SetURL( aUrl ); } OUString& GetName( ) { return msName; } OUString GetUrl( ) const { return maUrl.GetMainURL( INetURLObject::DecodeMechanism::NONE ); } diff --git a/include/svx/gallery.hxx b/include/svx/gallery.hxx index c4a51f4191db..d668bf9e668e 100644 --- a/include/svx/gallery.hxx +++ b/include/svx/gallery.hxx @@ -109,8 +109,8 @@ public: // FillObjTitleList is filling the rList with the title for each gallery object static bool FillObjListTitle( const sal_uInt32 nThemeId, std::vector< OUString >& rList ); - static bool InsertURL( std::u16string_view rThemeName, const OUString& rURL ); - static bool InsertURL( sal_uInt32 nThemeId, const OUString& rURL ); + static bool InsertURL( std::u16string_view rThemeName, std::u16string_view rURL ); + static bool InsertURL( sal_uInt32 nThemeId, std::u16string_view rURL ); static bool GetGraphicObj( std::u16string_view rThemeName, sal_uInt32 nPos, Graphic* pGraphic ); diff --git a/include/svx/gallery1.hxx b/include/svx/gallery1.hxx index 8de817484bd2..708d6fa0d718 100644 --- a/include/svx/gallery1.hxx +++ b/include/svx/gallery1.hxx @@ -102,7 +102,7 @@ private: INetURLObject aUserURL; bool bMultiPath; - SAL_DLLPRIVATE void ImplLoad( const OUString& rMultiPath ); + SAL_DLLPRIVATE void ImplLoad( std::u16string_view rMultiPath ); SAL_DLLPRIVATE void ImplLoadSubDirs( const INetURLObject& rBaseURL, bool& rbIsReadOnly ); GalleryThemeEntry* ImplGetThemeEntry( std::u16string_view rThemeName ); @@ -115,7 +115,7 @@ private: public: // only for gengal utility! - Gallery( const OUString& rMultiPath ); + Gallery( std::u16string_view rMultiPath ); virtual ~Gallery() override; static Gallery* GetGalleryInstance(); diff --git a/include/svx/langbox.hxx b/include/svx/langbox.hxx index ea94f1d78014..e3de9a1ad217 100644 --- a/include/svx/langbox.hxx +++ b/include/svx/langbox.hxx @@ -43,7 +43,7 @@ namespace o3tl } // load language strings from resource -SVXCORE_DLLPUBLIC OUString GetDicInfoStr( const OUString& rName, const LanguageType nLang, bool bNeg ); +SVXCORE_DLLPUBLIC OUString GetDicInfoStr( std::u16string_view rName, const LanguageType nLang, bool bNeg ); class SVXCORE_DLLPUBLIC SvxLanguageBox { diff --git a/include/svx/xtable.hxx b/include/svx/xtable.hxx index c56c6d092688..cb3a4cca496d 100644 --- a/include/svx/xtable.hxx +++ b/include/svx/xtable.hxx @@ -215,7 +215,7 @@ public: const OUString& rReferer); // as above but initializes name as expected static XPropertyListRef CreatePropertyListFromURL(XPropertyListType t, - const OUString & rUrl); + std::u16string_view rUrl); // helper accessors static inline XDashListRef AsDashList( diff --git a/include/tools/urlobj.hxx b/include/tools/urlobj.hxx index cb135497bc88..b99187a1caa3 100644 --- a/include/tools/urlobj.hxx +++ b/include/tools/urlobj.hxx @@ -287,22 +287,22 @@ public: // Strict Parsing: inline explicit INetURLObject( - OUString const & rTheAbsURIRef, + std::u16string_view rTheAbsURIRef, EncodeMechanism eMechanism = EncodeMechanism::WasEncoded, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8); - inline bool SetURL(OUString const & rTheAbsURIRef, + inline bool SetURL(std::u16string_view rTheAbsURIRef, EncodeMechanism eMechanism = EncodeMechanism::WasEncoded, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8); bool ConcatData(INetProtocol eTheScheme, std::u16string_view rTheUser, std::u16string_view rThePassword, std::u16string_view rTheHost, sal_uInt32 nThePort, - OUString const & rThePath); + std::u16string_view rThePath); // Smart Parsing: - inline INetURLObject(OUString const & rTheAbsURIRef, + inline INetURLObject(std::u16string_view rTheAbsURIRef, INetProtocol eTheSmartScheme, EncodeMechanism eMechanism = EncodeMechanism::WasEncoded, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8, @@ -312,7 +312,7 @@ public: { m_eSmartScheme = eTheSmartScheme; } inline bool - SetSmartURL(OUString const & rTheAbsURIRef, + SetSmartURL(std::u16string_view rTheAbsURIRef, EncodeMechanism eMechanism = EncodeMechanism::WasEncoded, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8, FSysStyle eStyle = FSysStyle::Detect); @@ -341,14 +341,14 @@ public: is returned. */ static OUString - GetAbsURL(OUString const & rTheBaseURIRef, + GetAbsURL(std::u16string_view rTheBaseURIRef, OUString const & rTheRelURIRef, EncodeMechanism eEncodeMechanism = EncodeMechanism::WasEncoded, DecodeMechanism eDecodeMechanism = DecodeMechanism::ToIUri, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8); static inline OUString - GetRelURL(OUString const & rTheBaseURIRef, + GetRelURL(std::u16string_view rTheBaseURIRef, OUString const & rTheAbsURIRef, EncodeMechanism eEncodeMechanism = EncodeMechanism::WasEncoded, DecodeMechanism eDecodeMechanism = DecodeMechanism::ToIUri, @@ -458,7 +458,7 @@ public: = RTL_TEXTENCODING_UTF8) const { return decode(m_aPath, eMechanism, eCharset); } - bool SetURLPath(OUString const & rThePath, + bool SetURLPath(std::u16string_view rThePath, EncodeMechanism eMechanism = EncodeMechanism::WasEncoded, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8) { return setPath(rThePath, eMechanism, eCharset); } @@ -971,7 +971,7 @@ private: TOOLS_DLLPRIVATE void setInvalid(); bool setAbsURIRef( - OUString const & rTheAbsURIRef, + std::u16string_view rTheAbsURIRef, EncodeMechanism eMechanism, rtl_TextEncoding eCharset, bool bSmart, FSysStyle eStyle); @@ -1058,7 +1058,7 @@ private: OUStringBuffer &rSynPath); bool setPath( - OUString const & rThePath, + std::u16string_view rThePath, EncodeMechanism eMechanism, rtl_TextEncoding eCharset); // Hierarchical Path: @@ -1140,16 +1140,16 @@ inline OUString INetURLObject::decode(SubString const & rSubString, OUString(); } -inline INetURLObject::INetURLObject(OUString const & rTheAbsURIRef, +inline INetURLObject::INetURLObject(std::u16string_view rTheAbsURIRef, EncodeMechanism eMechanism, rtl_TextEncoding eCharset): - m_aAbsURIRef(rTheAbsURIRef.getLength() * 2), m_eScheme(INetProtocol::NotValid), m_eSmartScheme(INetProtocol::Http) + m_aAbsURIRef(rTheAbsURIRef.size() * 2), m_eScheme(INetProtocol::NotValid), m_eSmartScheme(INetProtocol::Http) { setAbsURIRef(rTheAbsURIRef, eMechanism, eCharset, false, FSysStyle(0)); } -inline bool INetURLObject::SetURL(OUString const & rTheAbsURIRef, +inline bool INetURLObject::SetURL(std::u16string_view rTheAbsURIRef, EncodeMechanism eMechanism, rtl_TextEncoding eCharset) { @@ -1157,7 +1157,7 @@ inline bool INetURLObject::SetURL(OUString const & rTheAbsURIRef, FSysStyle(0)); } -inline INetURLObject::INetURLObject(OUString const & rTheAbsURIRef, +inline INetURLObject::INetURLObject(std::u16string_view rTheAbsURIRef, INetProtocol eTheSmartScheme, EncodeMechanism eMechanism, rtl_TextEncoding eCharset, @@ -1167,7 +1167,7 @@ inline INetURLObject::INetURLObject(OUString const & rTheAbsURIRef, setAbsURIRef(rTheAbsURIRef, eMechanism, eCharset, true, eStyle); } -inline bool INetURLObject::SetSmartURL(OUString const & rTheAbsURIRef, +inline bool INetURLObject::SetSmartURL(std::u16string_view rTheAbsURIRef, EncodeMechanism eMechanism, rtl_TextEncoding eCharset, FSysStyle eStyle) @@ -1208,7 +1208,7 @@ inline bool INetURLObject::GetNewAbsURL(OUString const & rTheRelURIRef, } // static -inline OUString INetURLObject::GetRelURL(OUString const & rTheBaseURIRef, +inline OUString INetURLObject::GetRelURL(std::u16string_view rTheBaseURIRef, OUString const & rTheAbsURIRef, EncodeMechanism eEncodeMechanism, DecodeMechanism eDecodeMechanism, diff --git a/include/unotools/ucbhelper.hxx b/include/unotools/ucbhelper.hxx index ed833580f9ba..76168e1f77d9 100644 --- a/include/unotools/ucbhelper.hxx +++ b/include/unotools/ucbhelper.hxx @@ -63,7 +63,7 @@ UNOTOOLS_DLLPUBLIC bool MakeFolder( UNOTOOLS_DLLPUBLIC bool ensureFolder( const css::uno::Reference< css::uno::XComponentContext >& xCtx, const css::uno::Reference< css::ucb::XCommandEnvironment >& xEnv, - const OUString& rFolder, ucbhelper::Content & result) noexcept; + std::u16string_view rFolder, ucbhelper::Content & result) noexcept; UNOTOOLS_DLLPUBLIC bool IsYounger( OUString const & younger, OUString const & older); diff --git a/include/vcl/graphicfilter.hxx b/include/vcl/graphicfilter.hxx index e420d4dc61ce..7880d1c2e910 100644 --- a/include/vcl/graphicfilter.hxx +++ b/include/vcl/graphicfilter.hxx @@ -295,7 +295,7 @@ public: ErrCode ExportGraphic( const Graphic& rGraphic, const INetURLObject& rPath, sal_uInt16 nFormat, const css::uno::Sequence< css::beans::PropertyValue >* pFilterData = nullptr ); - ErrCode ExportGraphic( const Graphic& rGraphic, const OUString& rPath, + ErrCode ExportGraphic( const Graphic& rGraphic, std::u16string_view rPath, SvStream& rOStm, sal_uInt16 nFormat, const css::uno::Sequence< css::beans::PropertyValue >* pFilterData = nullptr ); @@ -307,11 +307,11 @@ public: sal_uInt16 nFormat = GRFILTER_FORMAT_DONTKNOW, sal_uInt16 * pDeterminedFormat = nullptr, GraphicFilterImportFlags nImportFlags = GraphicFilterImportFlags::NONE ); - ErrCode CanImportGraphic( const OUString& rPath, SvStream& rStream, + ErrCode CanImportGraphic( std::u16string_view rPath, SvStream& rStream, sal_uInt16 nFormat, sal_uInt16 * pDeterminedFormat); - ErrCode ImportGraphic( Graphic& rGraphic, const OUString& rPath, + ErrCode ImportGraphic( Graphic& rGraphic, std::u16string_view rPath, SvStream& rStream, sal_uInt16 nFormat = GRFILTER_FORMAT_DONTKNOW, sal_uInt16 * pDeterminedFormat = nullptr, GraphicFilterImportFlags nImportFlags = GraphicFilterImportFlags::NONE, @@ -328,7 +328,7 @@ public: */ void MakeGraphicsAvailableThreaded(std::vector< Graphic* >& rGraphics); - ErrCode ImportGraphic( Graphic& rGraphic, const OUString& rPath, + ErrCode ImportGraphic( Graphic& rGraphic, std::u16string_view rPath, SvStream& rStream, sal_uInt16 nFormat, sal_uInt16 * pDeterminedFormat, GraphicFilterImportFlags nImportFlags, @@ -387,7 +387,7 @@ private: void ImplInit(); ErrCode ImplSetError( ErrCode nError, const SvStream* pStm = nullptr ); - ErrCode ImpTestOrFindFormat( const OUString& rPath, SvStream& rStream, sal_uInt16& rFormat ); + ErrCode ImpTestOrFindFormat( std::u16string_view rPath, SvStream& rStream, sal_uInt16& rFormat ); DECL_DLLPRIVATE_LINK( FilterCallback, ConvertData&, bool ); diff --git a/linguistic/source/convdiclist.cxx b/linguistic/source/convdiclist.cxx index 54517960f062..0104b36df663 100644 --- a/linguistic/source/convdiclist.cxx +++ b/linguistic/source/convdiclist.cxx @@ -53,7 +53,7 @@ using namespace com::sun::star::container; using namespace com::sun::star::linguistic2; using namespace linguistic; -static OUString GetConvDicMainURL( std::u16string_view rDicName, const OUString &rDirectoryURL ) +static OUString GetConvDicMainURL( std::u16string_view rDicName, std::u16string_view rDirectoryURL ) { // build URL to use for new (persistent) dictionaries diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx index 64ff93fc9bec..ade146ad7bd6 100644 --- a/oox/source/drawingml/shape.cxx +++ b/oox/source/drawingml/shape.cxx @@ -1948,7 +1948,7 @@ Reference < XShape > Shape::renderDiagramToGraphic( XmlFilterBase const & rFilte Graphic aGraphic; GraphicFilter aFilter( false ); - if ( aFilter.ImportGraphic( aGraphic, "", aTempStream, GRFILTER_FORMAT_NOTFOUND, nullptr, GraphicFilterImportFlags::NONE, static_cast < Sequence < PropertyValue >* > ( nullptr ) ) != ERRCODE_NONE ) + if ( aFilter.ImportGraphic( aGraphic, u"", aTempStream, GRFILTER_FORMAT_NOTFOUND, nullptr, GraphicFilterImportFlags::NONE, static_cast < Sequence < PropertyValue >* > ( nullptr ) ) != ERRCODE_NONE ) { SAL_WARN( "oox.drawingml", "Shape::renderDiagramToGraphic: Unable to import rendered stream into graphic object" ); return xShape; diff --git a/sc/inc/externalrefmgr.hxx b/sc/inc/externalrefmgr.hxx index d31145046d52..92188ecea9d6 100644 --- a/sc/inc/externalrefmgr.hxx +++ b/sc/inc/externalrefmgr.hxx @@ -432,7 +432,7 @@ public: OUString maFilterName; OUString maFilterOptions; - void maybeCreateRealFileName(const OUString& rOwnDocName); + void maybeCreateRealFileName(std::u16string_view rOwnDocName); }; public: 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. diff --git a/scripting/source/dlgprov/dlgprov.cxx b/scripting/source/dlgprov/dlgprov.cxx index 5a4e5c7eb124..ade1b6424d91 100644 --- a/scripting/source/dlgprov/dlgprov.cxx +++ b/scripting/source/dlgprov/dlgprov.cxx @@ -63,7 +63,7 @@ using namespace ::sf_misc; namespace dlgprov { - Reference< resource::XStringResourceManager > lcl_getStringResourceManager(const Reference< XComponentContext >& i_xContext,const OUString& i_sURL) + Reference< resource::XStringResourceManager > lcl_getStringResourceManager(const Reference< XComponentContext >& i_xContext, std::u16string_view i_sURL) { INetURLObject aInetObj( i_sURL ); OUString aDlgName = aInetObj.GetBase(); diff --git a/scripting/source/dlgprov/dlgprov.hxx b/scripting/source/dlgprov/dlgprov.hxx index cfd48fd3cd6d..0a5d4483a7bf 100644 --- a/scripting/source/dlgprov/dlgprov.hxx +++ b/scripting/source/dlgprov/dlgprov.hxx @@ -51,7 +51,7 @@ namespace dlgprov css::uno::Reference< css::container::XNameContainer > lcl_createControlModel(const css::uno::Reference< css::uno::XComponentContext >& i_xContext); - css::uno::Reference< css::resource::XStringResourceManager > lcl_getStringResourceManager(const css::uno::Reference< css::uno::XComponentContext >& i_xContext,const OUString& i_sURL); + css::uno::Reference< css::resource::XStringResourceManager > lcl_getStringResourceManager(const css::uno::Reference< css::uno::XComponentContext >& i_xContext, std::u16string_view i_sURL); /// @throws css::uno::Exception css::uno::Reference< css::container::XNameContainer > lcl_createDialogModel( const css::uno::Reference< css::uno::XComponentContext >& i_xContext, diff --git a/scripting/source/stringresource/stringresource.cxx b/scripting/source/stringresource/stringresource.cxx index c6cdf9ba9225..df30d8de1eea 100644 --- a/scripting/source/stringresource/stringresource.cxx +++ b/scripting/source/stringresource/stringresource.cxx @@ -934,7 +934,7 @@ void StringResourcePersistenceImpl::storeToURL( const OUString& URL, void StringResourcePersistenceImpl::implKillRemovedLocaleFiles ( - const OUString& Location, + std::u16string_view Location, const OUString& aNameBase, const css::uno::Reference< css::ucb::XSimpleFileAccess3 >& xFileAccess ) @@ -957,7 +957,7 @@ void StringResourcePersistenceImpl::implKillRemovedLocaleFiles void StringResourcePersistenceImpl::implKillChangedDefaultFiles ( - const OUString& Location, + std::u16string_view Location, const OUString& aNameBase, const css::uno::Reference< css::ucb::XSimpleFileAccess3 >& xFileAccess ) @@ -976,7 +976,7 @@ void StringResourcePersistenceImpl::implKillChangedDefaultFiles void StringResourcePersistenceImpl::implStoreAtLocation ( - const OUString& Location, + std::u16string_view Location, const OUString& aNameBase, const OUString& aComment, const Reference< ucb::XSimpleFileAccess3 >& xFileAccess, @@ -1615,7 +1615,7 @@ OUString StringResourcePersistenceImpl::implGetFileNameForLocaleItem OUString StringResourcePersistenceImpl::implGetPathForLocaleItem ( LocaleItem const * pLocaleItem, const OUString& aNameBase, - const OUString& aLocation, bool bDefaultFile ) + std::u16string_view aLocation, bool bDefaultFile ) { OUString aFileName = implGetFileNameForLocaleItem( pLocaleItem, aNameBase ); INetURLObject aInetObj( aLocation ); diff --git a/scripting/source/stringresource/stringresource.hxx b/scripting/source/stringresource/stringresource.hxx index a2494cda8a6b..7722da62f28d 100644 --- a/scripting/source/stringresource/stringresource.hxx +++ b/scripting/source/stringresource/stringresource.hxx @@ -212,7 +212,7 @@ protected: void implScanLocaleNames( const css::uno::Sequence< OUString >& aContentSeq ); static OUString implGetFileNameForLocaleItem( LocaleItem const * pLocaleItem, const OUString& aNameBase ); static OUString implGetPathForLocaleItem( LocaleItem const * pLocaleItem, const OUString& aNameBase, - const OUString& aLocation, bool bDefaultFile=false ); + std::u16string_view aLocation, bool bDefaultFile=false ); bool implReadPropertiesFile( LocaleItem* pLocaleItem, const css::uno::Reference< css::io::XInputStream >& xInput ); @@ -238,7 +238,7 @@ protected: /// @throws css::uno::RuntimeException void implKillRemovedLocaleFiles ( - const OUString& Location, + std::u16string_view Location, const OUString& aNameBase, const css::uno::Reference< css::ucb::XSimpleFileAccess3 >& xFileAccess ); @@ -247,7 +247,7 @@ protected: /// @throws css::uno::RuntimeException void implKillChangedDefaultFiles ( - const OUString& Location, + std::u16string_view Location, const OUString& aNameBase, const css::uno::Reference< css::ucb::XSimpleFileAccess3 >& xFileAccess ); @@ -256,7 +256,7 @@ protected: /// @throws css::uno::RuntimeException void implStoreAtLocation ( - const OUString& Location, + std::u16string_view Location, const OUString& aNameBase, const OUString& aComment, const css::uno::Reference< css::ucb::XSimpleFileAccess3 >& xFileAccess, diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx index 1e7abd43bdfd..305e1813ae77 100644 --- a/sd/source/filter/ppt/pptin.cxx +++ b/sd/source/filter/ppt/pptin.cxx @@ -1970,7 +1970,7 @@ OUString ImplSdPPTImport::ReadSound(sal_uInt32 nSoundRef) const aGalleryDir = SvtPathOptions().GetGalleryPath(); // Use last token delimited by ';'. copy(lastIndexOf+1) works whether // string is empty or not and whether ';' is there or not. - INetURLObject aGalleryUserSound( aGalleryDir.copy(aGalleryDir.lastIndexOf(';')+1) ); + INetURLObject aGalleryUserSound( aGalleryDir.subView(aGalleryDir.lastIndexOf(';')+1) ); aGalleryUserSound.Append( aRetval ); const auto nRemainingSize = rStCtrl.remainingSize(); diff --git a/sd/source/ui/animations/SlideTransitionPane.cxx b/sd/source/ui/animations/SlideTransitionPane.cxx index b3e7ca647405..846f21c34cd3 100644 --- a/sd/source/ui/animations/SlideTransitionPane.cxx +++ b/sd/source/ui/animations/SlideTransitionPane.cxx @@ -275,7 +275,7 @@ private: // returns -1 if no object was found bool lcl_findSoundInList( const ::std::vector< OUString > & rSoundList, - const OUString & rFileName, + std::u16string_view rFileName, ::std::vector< OUString >::size_type & rOutPosition ) { INetURLObject aURL(rFileName); @@ -315,7 +315,7 @@ struct lcl_AppendSoundToListBox : mrListBox( rListBox ) {} - void operator() ( const OUString & rString ) const + void operator() ( std::u16string_view rString ) const { INetURLObject aURL( rString ); mrListBox.append_text( aURL.GetBase() ); diff --git a/sd/source/ui/sidebar/MasterPageDescriptor.cxx b/sd/source/ui/sidebar/MasterPageDescriptor.cxx index 183ec29e4d1b..2c0c23eb780c 100644 --- a/sd/source/ui/sidebar/MasterPageDescriptor.cxx +++ b/sd/source/ui/sidebar/MasterPageDescriptor.cxx @@ -34,7 +34,7 @@ namespace sd::sidebar { MasterPageDescriptor::MasterPageDescriptor ( MasterPageContainer::Origin eOrigin, const sal_Int32 nTemplateIndex, - const OUString& rsURL, + std::u16string_view rsURL, const OUString& rsPageName, const OUString& rsStyleName, const bool bIsPrecious, diff --git a/sd/source/ui/sidebar/MasterPageDescriptor.hxx b/sd/source/ui/sidebar/MasterPageDescriptor.hxx index 4cf81ba32322..62717e528221 100644 --- a/sd/source/ui/sidebar/MasterPageDescriptor.hxx +++ b/sd/source/ui/sidebar/MasterPageDescriptor.hxx @@ -42,7 +42,7 @@ public: MasterPageDescriptor ( MasterPageContainer::Origin eOrigin, const sal_Int32 nTemplateIndex, - const OUString& rURL, + std::u16string_view rURL, const OUString& rPageName, const OUString& rStyleName, const bool bIsPrecious, diff --git a/sfx2/source/appl/linkmgr2.cxx b/sfx2/source/appl/linkmgr2.cxx index 4b77bcf90fb6..977ed98518fe 100644 --- a/sfx2/source/appl/linkmgr2.cxx +++ b/sfx2/source/appl/linkmgr2.cxx @@ -573,7 +573,7 @@ bool LinkManager::GetGraphicFromAny(const OUString& rMimeType, return bRet; } -static OUString lcl_DDE_RelToAbs( const OUString& rTopic, const OUString& rBaseURL ) +static OUString lcl_DDE_RelToAbs( const OUString& rTopic, std::u16string_view rBaseURL ) { OUString sRet; INetURLObject aURL( rTopic ); diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx index 289a848b4b36..ecba5be38f3a 100644 --- a/sfx2/source/appl/newhelp.cxx +++ b/sfx2/source/appl/newhelp.cxx @@ -1109,7 +1109,8 @@ void BookmarksTabPage_Impl::DoAction(std::string_view rAction) { OUString sURL = m_xBookmarksBox->get_id(nPos); m_xBookmarksBox->remove(nPos); - m_xBookmarksBox->append(sURL, aDlg.GetTitle(), SvFileInformationManager::GetImageId(INetURLObject(IMAGE_URL+INetURLObject(sURL).GetHost()))); + m_xBookmarksBox->append(sURL, aDlg.GetTitle(), + SvFileInformationManager::GetImageId(INetURLObject(rtl::OUStringConcatenation(IMAGE_URL+INetURLObject(sURL).GetHost())))); m_xBookmarksBox->select(m_xBookmarksBox->n_children() - 1); } } @@ -2364,7 +2365,7 @@ IMPL_LINK( SfxHelpWindow_Impl, ChangeHdl, HelpListener_Impl&, rListener, void ) } -void SfxHelpWindow_Impl::openDone(const OUString& sURL , +void SfxHelpWindow_Impl::openDone(std::u16string_view sURL , bool bSuccess) { INetURLObject aObj( sURL ); @@ -2526,7 +2527,7 @@ void SfxHelpWindow_Impl::SetFactory( const OUString& rFactory ) xIndexWin->SetFactory( rFactory, true ); } -void SfxHelpWindow_Impl::SetHelpURL( const OUString& rURL ) +void SfxHelpWindow_Impl::SetHelpURL( std::u16string_view rURL ) { INetURLObject aObj( rURL ); if ( aObj.GetProtocol() == INetProtocol::VndSunStarHelp ) diff --git a/sfx2/source/appl/newhelp.hxx b/sfx2/source/appl/newhelp.hxx index f26bf93379a9..9d5a5e42209a 100644 --- a/sfx2/source/appl/newhelp.hxx +++ b/sfx2/source/appl/newhelp.hxx @@ -468,7 +468,7 @@ public: getTextFrame() const { return pTextWin->getFrame(); } void SetFactory( const OUString& rFactory ); - void SetHelpURL( const OUString& rURL ); + void SetHelpURL( std::u16string_view rURL ); void DoAction(std::string_view rAction); void CloseWindow(); @@ -480,7 +480,7 @@ public: bool HasHistoryPredecessor() const; // forward to interceptor bool HasHistorySuccessor() const; // forward to interceptor - void openDone(const OUString& sURL , + void openDone(std::u16string_view sURL , bool bSuccess); static OUString buildHelpURL(std::u16string_view sFactory , diff --git a/sfx2/source/appl/sfxhelp.cxx b/sfx2/source/appl/sfxhelp.cxx index 5a26931d3f66..d941fc2992e4 100644 --- a/sfx2/source/appl/sfxhelp.cxx +++ b/sfx2/source/appl/sfxhelp.cxx @@ -285,7 +285,7 @@ void AppendConfigToken( OUStringBuffer& rURL, bool bQuestionMark ) rURL.append(utl::ConfigManager::getProductVersion()); } -static bool GetHelpAnchor_Impl( const OUString& _rURL, OUString& _rAnchor ) +static bool GetHelpAnchor_Impl( std::u16string_view _rURL, OUString& _rAnchor ) { bool bRet = false; diff --git a/sfx2/source/appl/shutdownicon.cxx b/sfx2/source/appl/shutdownicon.cxx index 91a97e09c344..8c28c4fa1888 100644 --- a/sfx2/source/appl/shutdownicon.cxx +++ b/sfx2/source/appl/shutdownicon.cxx @@ -232,7 +232,7 @@ void ShutdownIcon::FromTemplate() xDisp->dispatch( aTargetURL, aArgs ); } -OUString ShutdownIcon::GetUrlDescription( const OUString& aUrl ) +OUString ShutdownIcon::GetUrlDescription( std::u16string_view aUrl ) { ::SolarMutexGuard aGuard; diff --git a/sfx2/source/appl/shutdownicon.hxx b/sfx2/source/appl/shutdownicon.hxx index c551a190a01d..51c778e1dd53 100644 --- a/sfx2/source/appl/shutdownicon.hxx +++ b/sfx2/source/appl/shutdownicon.hxx @@ -108,7 +108,7 @@ class ShutdownIcon : public ShutdownIconServiceBase /// @throws css::uno::Exception void init(); - static OUString GetUrlDescription( const OUString& aUrl ); + static OUString GetUrlDescription( std::u16string_view aUrl ); void SetVeto( bool bVeto ) { m_bVeto = bVeto;} diff --git a/sfx2/source/appl/shutdowniconw32.cxx b/sfx2/source/appl/shutdowniconw32.cxx index 13ef8aa07058..2580a8bd126d 100644 --- a/sfx2/source/appl/shutdowniconw32.cxx +++ b/sfx2/source/appl/shutdowniconw32.cxx @@ -181,7 +181,7 @@ static HMENU createSystrayMenu( ) continue; addMenuItem( hMenu, nMenuItemID, nMenuIconID, - ShutdownIcon::GetUrlDescription( sURL ), pos, true, "" ); + ShutdownIcon::GetUrlDescription( sURL.asView() ), pos, true, "" ); } ... etc. - the rest is truncated