From d3849255b76e92a42f653c266b88945708984c4f Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 28 Apr 2022 14:12:35 +0200 Subject: [PATCH] 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 --- avmedia/source/viewer/mediawindow.cxx | 2 +- basctl/source/basicide/baside2b.cxx | 1 + basctl/source/basicide/baside3.cxx | 2 +- .../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 +- .../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 +- .../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 +- .../source/xsltdialog/xmlfiltertestdialog.cxx | 2 +- forms/source/xforms/submission/submission.hxx | 2 +- .../xforms/submission/submission_get.cxx | 2 +- .../xforms/submission/submission_get.hxx | 2 +- .../xforms/submission/submission_post.cxx | 2 +- .../xforms/submission/submission_post.hxx | 2 +- .../xforms/submission/submission_put.cxx | 2 +- .../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 +- .../source/fwe/classes/addonsoptions.cxx | 2 +- framework/source/fwe/helper/titlehelper.cxx | 2 +- framework/source/services/pathsettings.cxx | 4 +- .../uielement/generictoolbarcontroller.cxx | 6 +- .../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 +- .../source/stringresource/stringresource.cxx | 8 +- .../source/stringresource/stringresource.hxx | 8 +- sd/source/filter/ppt/pptin.cxx | 2 +- .../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 +- .../graphicfilter/filters-tiff-test.cxx | 4 +- .../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(-) 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 xPreferredPixelSizeListener) +bool MediaWindow::isMediaURL(std::u16string_view rURL, const OUString& rReferer, bool bDeep, rtl::Reference 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 #include #include +#include #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 #include #include +#include #include #include #include @@ -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 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 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 #include #include +#include #include #include #include @@ -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 pCurrentItem) +void LoadImage(std::u16string_view rPreviewFile, std::shared_ptr 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 && 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 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 m_xBtCreate; std::unique_ptr 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(static_cast(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 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 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& aFragment); virtual SubmissionResult submit(const css::uno::Reference& 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& aFragment); virtual SubmissionResult submit(const css::uno::Reference& 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& lPath) const; void impl_storePath(const PathSettings::PathInfo& aPath); @@ -1228,7 +1228,7 @@ bool PathSettings::impl_isValidPath(const std::vector& 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 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& 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& 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 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