summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--avmedia/source/viewer/mediawindow.cxx2
-rw-r--r--basctl/source/basicide/baside2b.cxx1
-rw-r--r--basctl/source/basicide/baside3.cxx2
-rw-r--r--basic/source/basmgr/basicmanagerrepository.cxx5
-rw-r--r--basic/source/basmgr/basmgr.cxx6
-rw-r--r--basic/source/inc/namecont.hxx4
-rw-r--r--basic/source/runtime/methods.cxx2
-rw-r--r--basic/source/uno/namecont.cxx31
-rw-r--r--connectivity/source/drivers/dbase/DTable.cxx2
-rw-r--r--connectivity/source/inc/dbase/DTable.hxx2
-rw-r--r--cui/source/dialogs/AdditionsDialog.cxx2
-rw-r--r--cui/source/dialogs/cuigaldlg.cxx2
-rw-r--r--cui/source/dialogs/hldocntp.cxx2
-rw-r--r--cui/source/dialogs/hldoctp.cxx2
-rw-r--r--cui/source/dialogs/scriptdlg.cxx4
-rw-r--r--cui/source/inc/cuigaldlg.hxx2
-rw-r--r--cui/source/inc/hldocntp.hxx2
-rw-r--r--cui/source/inc/hldoctp.hxx2
-rw-r--r--cui/source/inc/scriptdlg.hxx2
-rw-r--r--cui/source/options/personalization.cxx2
-rw-r--r--dbaccess/source/core/dataaccess/databaseregistrations.cxx6
-rw-r--r--dbaccess/source/ui/dlg/ConnectionHelper.cxx2
-rw-r--r--dbaccess/source/ui/dlg/ConnectionHelper.hxx2
-rw-r--r--dbaccess/source/ui/dlg/dbwizsetup.cxx2
-rw-r--r--dbaccess/source/ui/inc/dbwizsetup.hxx2
-rw-r--r--desktop/source/migration/migration.cxx6
-rw-r--r--desktop/source/migration/migration_impl.hxx2
-rw-r--r--drawinglayer/source/tools/emfpimage.cxx4
-rw-r--r--editeng/source/items/frmitems.cxx2
-rw-r--r--editeng/source/items/legacyitem.cxx4
-rw-r--r--extensions/source/propctrlr/defaultforminspection.cxx2
-rw-r--r--extensions/source/propctrlr/pcrcommon.cxx4
-rw-r--r--extensions/source/propctrlr/pcrcommon.hxx4
-rw-r--r--filter/source/graphic/GraphicExportFilter.cxx2
-rw-r--r--filter/source/msfilter/escherex.cxx4
-rw-r--r--filter/source/msfilter/msdffimp.cxx2
-rw-r--r--filter/source/svg/svgfilter.cxx2
-rw-r--r--filter/source/xsltdialog/xmlfilterjar.cxx2
-rw-r--r--filter/source/xsltdialog/xmlfilterjar.hxx2
-rw-r--r--filter/source/xsltdialog/xmlfiltertestdialog.cxx2
-rw-r--r--forms/source/xforms/submission/submission.hxx2
-rw-r--r--forms/source/xforms/submission/submission_get.cxx2
-rw-r--r--forms/source/xforms/submission/submission_get.hxx2
-rw-r--r--forms/source/xforms/submission/submission_post.cxx2
-rw-r--r--forms/source/xforms/submission/submission_post.hxx2
-rw-r--r--forms/source/xforms/submission/submission_put.cxx2
-rw-r--r--forms/source/xforms/submission/submission_put.hxx2
-rw-r--r--fpicker/source/office/fileview.cxx4
-rw-r--r--fpicker/source/office/foldertree.cxx2
-rw-r--r--fpicker/source/office/foldertree.hxx2
-rw-r--r--fpicker/source/office/iodlg.cxx4
-rw-r--r--fpicker/source/office/iodlg.hxx2
-rw-r--r--framework/source/fwe/classes/addonsoptions.cxx2
-rw-r--r--framework/source/fwe/helper/titlehelper.cxx2
-rw-r--r--framework/source/services/pathsettings.cxx4
-rw-r--r--framework/source/uielement/generictoolbarcontroller.cxx6
-rw-r--r--framework/source/uielement/imagebuttontoolbarcontroller.cxx2
-rw-r--r--include/avmedia/mediawindow.hxx2
-rw-r--r--include/basic/basmgr.hxx4
-rw-r--r--include/framework/titlehelper.hxx2
-rw-r--r--include/sfx2/docfile.hxx2
-rw-r--r--include/sfx2/doctempl.hxx4
-rw-r--r--include/sfx2/frmdescr.hxx2
-rw-r--r--include/sfx2/frmhtml.hxx2
-rw-r--r--include/sfx2/objsh.hxx2
-rw-r--r--include/sfx2/sfxhtml.hxx6
-rw-r--r--include/sfx2/templatelocalview.hxx6
-rw-r--r--include/svl/documentlockfile.hxx2
-rw-r--r--include/svl/inethist.hxx2
-rw-r--r--include/svl/lockfilecommon.hxx2
-rw-r--r--include/svl/msodocumentlockfile.hxx6
-rw-r--r--include/svl/sharecontrolfile.hxx2
-rw-r--r--include/svtools/parhtml.hxx2
-rw-r--r--include/svtools/place.hxx4
-rw-r--r--include/svx/gallery.hxx4
-rw-r--r--include/svx/gallery1.hxx4
-rw-r--r--include/svx/langbox.hxx2
-rw-r--r--include/svx/xtable.hxx2
-rw-r--r--include/tools/urlobj.hxx32
-rw-r--r--include/unotools/ucbhelper.hxx2
-rw-r--r--include/vcl/graphicfilter.hxx10
-rw-r--r--linguistic/source/convdiclist.cxx2
-rw-r--r--oox/source/drawingml/shape.cxx2
-rw-r--r--sc/inc/externalrefmgr.hxx2
-rw-r--r--sc/source/core/data/global2.cxx2
-rw-r--r--sc/source/filter/excel/xehelper.cxx2
-rw-r--r--sc/source/filter/excel/xepivot.cxx2
-rw-r--r--sc/source/filter/html/htmlexp.cxx2
-rw-r--r--sc/source/filter/inc/htmlexp.hxx2
-rw-r--r--sc/source/filter/inc/xehelper.hxx2
-rw-r--r--sc/source/ui/docshell/docsh8.cxx2
-rw-r--r--sc/source/ui/docshell/externalrefmgr.cxx2
-rw-r--r--scripting/source/dlgprov/dlgprov.cxx2
-rw-r--r--scripting/source/dlgprov/dlgprov.hxx2
-rw-r--r--scripting/source/stringresource/stringresource.cxx8
-rw-r--r--scripting/source/stringresource/stringresource.hxx8
-rw-r--r--sd/source/filter/ppt/pptin.cxx2
-rw-r--r--sd/source/ui/animations/SlideTransitionPane.cxx4
-rw-r--r--sd/source/ui/sidebar/MasterPageDescriptor.cxx2
-rw-r--r--sd/source/ui/sidebar/MasterPageDescriptor.hxx2
-rw-r--r--sfx2/source/appl/linkmgr2.cxx2
-rw-r--r--sfx2/source/appl/newhelp.cxx7
-rw-r--r--sfx2/source/appl/newhelp.hxx4
-rw-r--r--sfx2/source/appl/sfxhelp.cxx2
-rw-r--r--sfx2/source/appl/shutdownicon.cxx2
-rw-r--r--sfx2/source/appl/shutdownicon.hxx2
-rw-r--r--sfx2/source/appl/shutdowniconw32.cxx2
-rw-r--r--sfx2/source/bastyp/frmhtml.cxx2
-rw-r--r--sfx2/source/bastyp/helper.cxx4
-rw-r--r--sfx2/source/bastyp/sfxhtml.cxx2
-rw-r--r--sfx2/source/control/listview.cxx4
-rw-r--r--sfx2/source/control/recentdocsviewitem.cxx4
-rw-r--r--sfx2/source/control/templatelocalview.cxx6
-rw-r--r--sfx2/source/doc/docfile.cxx12
-rw-r--r--sfx2/source/doc/doctempl.cxx4
-rw-r--r--sfx2/source/doc/doctemplates.cxx27
-rw-r--r--sfx2/source/doc/frmdescr.cxx2
-rw-r--r--sfx2/source/doc/guisaveas.cxx2
-rw-r--r--sfx2/source/doc/objserv.cxx2
-rw-r--r--sfx2/source/doc/objstor.cxx4
-rw-r--r--sfx2/source/doc/printhelper.cxx2
-rw-r--r--sfx2/source/inc/helper.hxx4
-rw-r--r--sfx2/source/view/frmload.cxx2
-rw-r--r--svgio/source/svgreader/svgimagenode.cxx2
-rw-r--r--svl/source/fsstor/fsstorage.cxx2
-rw-r--r--svl/source/fsstor/fsstorage.hxx2
-rw-r--r--svl/source/misc/documentlockfile.cxx2
-rw-r--r--svl/source/misc/inethist.cxx6
-rw-r--r--svl/source/misc/lockfilecommon.cxx2
-rw-r--r--svl/source/misc/msodocumentlockfile.cxx8
-rw-r--r--svl/source/misc/sharecontrolfile.cxx2
-rw-r--r--svl/source/misc/urihelper.cxx12
-rw-r--r--svtools/source/control/inettbc.cxx4
-rw-r--r--svtools/source/filter/exportdialog.cxx2
-rw-r--r--svtools/source/misc/embedhlp.cxx4
-rw-r--r--svtools/source/svhtml/htmlsupp.cxx2
-rw-r--r--svtools/source/uno/wizard/unowizard.cxx2
-rw-r--r--svx/source/dialog/compressgraphicdialog.cxx4
-rw-r--r--svx/source/dialog/langbox.cxx2
-rw-r--r--svx/source/gallery2/galexpl.cxx4
-rw-r--r--svx/source/gallery2/gallery1.cxx9
-rw-r--r--svx/source/gengal/gengal.cxx4
-rw-r--r--svx/source/unodraw/UnoGraphicExporter.cxx2
-rw-r--r--svx/source/xml/xmlgrhlp.cxx14
-rw-r--r--svx/source/xoutdev/xtable.cxx2
-rw-r--r--sw/inc/SwAppletImpl.hxx4
-rw-r--r--sw/inc/dbmgr.hxx2
-rw-r--r--sw/inc/doc.hxx2
-rw-r--r--sw/inc/docsh.hxx2
-rw-r--r--sw/inc/ndgrf.hxx2
-rw-r--r--sw/inc/swunohelper.hxx4
-rw-r--r--sw/qa/unit/uibase.cxx2
-rw-r--r--sw/source/core/doc/visiturl.cxx6
-rw-r--r--sw/source/core/graphic/ndgrf.cxx2
-rw-r--r--sw/source/core/unocore/swunohelper.cxx4
-rw-r--r--sw/source/filter/html/SwAppletImpl.cxx4
-rw-r--r--sw/source/filter/html/htmlgrin.cxx2
-rw-r--r--sw/source/filter/ww8/wrtww8gr.cxx4
-rw-r--r--sw/source/filter/ww8/ww8graf2.cxx2
-rw-r--r--sw/source/uibase/app/docsh2.cxx4
-rw-r--r--sw/source/uibase/dbui/dbmgr.cxx2
-rw-r--r--tools/qa/cppunit/test_urlobj.cxx86
-rw-r--r--tools/source/fsys/urlobj.cxx32
-rw-r--r--tools/source/inet/inetmsg.cxx32
-rw-r--r--ucb/source/core/FileAccess.cxx4
-rw-r--r--ucb/source/ucp/cmis/cmis_url.cxx2
-rw-r--r--ucb/source/ucp/cmis/cmis_url.hxx2
-rw-r--r--unotools/source/ucbhelper/ucbhelper.cxx2
-rw-r--r--vcl/inc/unx/fontmanager.hxx2
-rw-r--r--vcl/inc/unx/genpspgraphics.h2
-rw-r--r--vcl/qa/cppunit/GraphicDescriptorTest.cxx2
-rw-r--r--vcl/qa/cppunit/GraphicTest.cxx23
-rw-r--r--vcl/qa/cppunit/graphicfilter/filters-test.cxx4
-rw-r--r--vcl/qa/cppunit/graphicfilter/filters-tiff-test.cxx4
-rw-r--r--vcl/qa/cppunit/graphicfilter/filters-webp-test.cxx6
-rw-r--r--vcl/qa/cppunit/jpeg/JpegWriterTest.cxx4
-rw-r--r--vcl/qa/cppunit/pdfexport/pdfexport.cxx6
-rw-r--r--vcl/source/app/brand.cxx4
-rw-r--r--vcl/source/filter/GraphicNativeTransform.cxx6
-rw-r--r--vcl/source/filter/graphicfilter.cxx24
-rw-r--r--vcl/source/gdi/gfxlink.cxx2
-rw-r--r--vcl/source/gdi/pdfwriter_impl.cxx2
-rw-r--r--vcl/source/treelist/imap.cxx2
-rw-r--r--vcl/source/treelist/imap2.cxx4
-rw-r--r--vcl/source/treelist/transfer.cxx2
-rw-r--r--vcl/unx/generic/fontmanager/fontmanager.cxx2
-rw-r--r--vcl/unx/generic/print/genpspgraphics.cxx2
-rw-r--r--vcl/workben/svpclient.cxx2
-rw-r--r--xmlsecurity/workben/pdfverify.cxx2
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<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, "" );
}
diff --git a/sfx2/source/bastyp/frmhtml.cxx b/sfx2/source/bastyp/frmhtml.cxx
index b7cc2ea127f6..a15a6cc7a022 100644
--- a/sfx2/source/bastyp/frmhtml.cxx
+++ b/sfx2/source/bastyp/frmhtml.cxx
@@ -38,7 +38,7 @@ HTMLOptionEnum<ScrollingMode> const aScrollingTable[] =
namespace SfxFrameHTMLParser
{
void ParseFrameOptions(
- SfxFrameDescriptor *pFrame, const HTMLOptions& rOptions, const OUString& rBaseURL )
+ SfxFrameDescriptor *pFrame, const HTMLOptions& rOptions, std::u16string_view rBaseURL )
{
// Get and set the options
Size aMargin( pFrame->GetMargin() );
diff --git a/sfx2/source/bastyp/helper.cxx b/sfx2/source/bastyp/helper.cxx
index 5138a790e15a..96f3b67f17eb 100644
--- a/sfx2/source/bastyp/helper.cxx
+++ b/sfx2/source/bastyp/helper.cxx
@@ -188,7 +188,7 @@ OUString SfxContentHelper::GetActiveHelpString( const OUString& rURL )
}
-bool SfxContentHelper::IsHelpErrorDocument( const OUString& rURL )
+bool SfxContentHelper::IsHelpErrorDocument( std::u16string_view rURL )
{
bool bRet = false;
try
@@ -209,7 +209,7 @@ bool SfxContentHelper::IsHelpErrorDocument( const OUString& rURL )
}
-sal_Int64 SfxContentHelper::GetSize( const OUString& rContent )
+sal_Int64 SfxContentHelper::GetSize( std::u16string_view rContent )
{
sal_Int64 nSize = 0;
INetURLObject aObj( rContent );
diff --git a/sfx2/source/bastyp/sfxhtml.cxx b/sfx2/source/bastyp/sfxhtml.cxx
index efaab39ff881..5907a660ba73 100644
--- a/sfx2/source/bastyp/sfxhtml.cxx
+++ b/sfx2/source/bastyp/sfxhtml.cxx
@@ -99,7 +99,7 @@ bool SfxHTMLParser::ParseMapOptions(
return !aName.isEmpty();
}
-bool SfxHTMLParser::ParseAreaOptions(ImageMap * pImageMap, const OUString& rBaseURL,
+bool SfxHTMLParser::ParseAreaOptions(ImageMap * pImageMap, std::u16string_view rBaseURL,
const HTMLOptions& rOptions,
SvMacroItemId nEventMouseOver,
SvMacroItemId nEventMouseOut )
diff --git a/sfx2/source/control/listview.cxx b/sfx2/source/control/listview.cxx
index 0aa1781c8f13..a53e85d7157b 100644
--- a/sfx2/source/control/listview.cxx
+++ b/sfx2/source/control/listview.cxx
@@ -42,7 +42,7 @@ static sal_uInt64 getFileSize(const OUString& rURL);
static sal_uInt32 getFileModifyTime(const OUString& rURL);
static OUString getDisplayFileSize(const OUString& rURL);
static OUString getDisplayFileModifyTime(const OUString& rURL);
-static OUString getApplication(const OUString& rURL);
+static OUString getApplication(std::u16string_view rURL);
ListView::ListView(std::unique_ptr<weld::TreeView> xTreeView)
: mxTreeView(std::move(xTreeView))
@@ -416,7 +416,7 @@ static sal_uInt64 getFileSize(const OUString& rURL)
return nSize;
}
-static OUString getApplication(const OUString& rURL)
+static OUString getApplication(std::u16string_view rURL)
{
INetURLObject aUrl(rURL);
OUString aExt = aUrl.getExtension();
diff --git a/sfx2/source/control/recentdocsviewitem.cxx b/sfx2/source/control/recentdocsviewitem.cxx
index e9c53faeffcf..0cdf74418d05 100644
--- a/sfx2/source/control/recentdocsviewitem.cxx
+++ b/sfx2/source/control/recentdocsviewitem.cxx
@@ -73,7 +73,7 @@ bool IsDocEncrypted(const OUString& rURL)
}
using Ext2IconMap = std::map<sfx2::ApplicationType, OUString>;
-BitmapEx Url2Icon(const OUString& rURL, const Ext2IconMap& rExtToIcon, const OUString& sDefault)
+BitmapEx Url2Icon(std::u16string_view rURL, const Ext2IconMap& rExtToIcon, const OUString& sDefault)
{
auto it = std::find_if(rExtToIcon.begin(), rExtToIcon.end(),
[aExt = INetURLObject(rURL).getExtension()](const auto& r)
@@ -106,7 +106,7 @@ BitmapEx getDefaultThumbnail(const OUString& rURL)
return Url2Icon(rURL, rWhichMap, SFX_FILE_THUMBNAIL_DEFAULT);
}
-BitmapEx getModuleOverlay(const OUString& rURL)
+BitmapEx getModuleOverlay(std::u16string_view rURL)
{
static const Ext2IconMap OverlayBitmapForExtension
= { { sfx2::ApplicationType::TYPE_WRITER, SFX_FILE_OVERLAY_TEXT },
diff --git a/sfx2/source/control/templatelocalview.cxx b/sfx2/source/control/templatelocalview.cxx
index d3a355b705b4..a223b62e128a 100644
--- a/sfx2/source/control/templatelocalview.cxx
+++ b/sfx2/source/control/templatelocalview.cxx
@@ -61,7 +61,7 @@ bool ViewFilter_Application::isFilteredExtension(FILTER_APPLICATION filter, std:
return bRet;
}
-bool ViewFilter_Application::isValid (const OUString &rPath) const
+bool ViewFilter_Application::isValid (std::u16string_view rPath) const
{
INetURLObject aUrl(rPath);
return isFilteredExtension(mApp, aUrl.getExtension());
@@ -580,7 +580,7 @@ bool TemplateLocalView::copyFrom (TemplateContainerItem *pItem, const OUString &
return false;
}
-bool TemplateLocalView::exportTo(const sal_uInt16 nItemId, const sal_uInt16 nRegionItemId, const OUString &rName)
+bool TemplateLocalView::exportTo(const sal_uInt16 nItemId, const sal_uInt16 nRegionItemId, std::u16string_view rName)
{
for (auto const & pRegItem : maRegions)
{
@@ -870,7 +870,7 @@ void TemplateLocalView::RemoveDefaultTemplateIcon(std::u16string_view rPath)
}
}
-BitmapEx TemplateLocalView::getDefaultThumbnail( const OUString& rPath )
+BitmapEx TemplateLocalView::getDefaultThumbnail( std::u16string_view rPath )
{
BitmapEx aImg;
INetURLObject aUrl(rPath);
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index 2a1cf03c0601..c5a43f96797c 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -1005,7 +1005,7 @@ void SfxMedium::SetEncryptionDataToStorage_Impl()
namespace
{
-OUString tryMSOwnerFiles(const OUString& sDocURL)
+OUString tryMSOwnerFiles(std::u16string_view sDocURL)
{
svt::MSODocumentLockFile aMSOLockFile(sDocURL);
LockFileEntry aData;
@@ -1026,7 +1026,7 @@ OUString tryMSOwnerFiles(const OUString& sDocURL)
return sUserData;
}
-OUString tryForeignLockfiles(const OUString& sDocURL)
+OUString tryForeignLockfiles(std::u16string_view sDocURL)
{
OUString sUserData = tryMSOwnerFiles(sDocURL);
// here we can test for empty result, and add other known applications' lockfile testing
@@ -4264,14 +4264,14 @@ bool SfxMedium::IsOpen() const
return pImpl->m_pInStream || pImpl->m_pOutStream || pImpl->xStorage.is();
}
-OUString SfxMedium::CreateTempCopyWithExt( const OUString& aURL )
+OUString SfxMedium::CreateTempCopyWithExt( std::u16string_view aURL )
{
OUString aResult;
- if ( !aURL.isEmpty() )
+ if ( !aURL.empty() )
{
- sal_Int32 nPrefixLen = aURL.lastIndexOf( '.' );
- OUString aExt = ( nPrefixLen == -1 ) ? OUString() : aURL.copy( nPrefixLen );
+ size_t nPrefixLen = aURL.rfind( '.' );
+ OUString aExt = ( nPrefixLen == std::u16string_view::npos ) ? OUString() : OUString(aURL.substr( nPrefixLen ));
OUString aNewTempFileURL = ::utl::TempFile( u"", true, &aExt ).GetURL();
if ( !aNewTempFileURL.isEmpty() )
diff --git a/sfx2/source/doc/doctempl.cxx b/sfx2/source/doc/doctempl.cxx
index d24260a0ddbf..cf9d70ceae75 100644
--- a/sfx2/source/doc/doctempl.cxx
+++ b/sfx2/source/doc/doctempl.cxx
@@ -708,7 +708,7 @@ bool SfxDocumentTemplates::CopyTo
(
sal_uInt16 nRegion, // Region of the template to be exported
sal_uInt16 nIdx, // Index of the template to be exported
- const OUString& rName /* File name under which the template is to
+ std::u16string_view rName /* File name under which the template is to
be created */
) const
@@ -1143,7 +1143,7 @@ bool SfxDocumentTemplates::GetFull
bool SfxDocumentTemplates::GetLogicNames
(
- const OUString &rPath, // Full Path to the template
+ std::u16string_view rPath, // Full Path to the template
OUString &rRegion, // Out: Region name
OUString &rName // Out: Template name
) const
diff --git a/sfx2/source/doc/doctemplates.cxx b/sfx2/source/doc/doctemplates.cxx
index ef4c4aa4f7fe..a478158edbe5 100644
--- a/sfx2/source/doc/doctemplates.cxx
+++ b/sfx2/source/doc/doctemplates.cxx
@@ -75,6 +75,7 @@
#include <unotools/ucbhelper.hxx>
#include <i18nlangtag/languagetag.hxx>
#include <ucbhelper/content.hxx>
+#include <o3tl/string_view.hxx>
#include <sfx2/sfxresid.hxx>
#include <sfxurlrelocator.hxx>
@@ -212,24 +213,24 @@ class SfxDocTplService_Impl
bool bFsysFolder,
Content &rNewFolder );
- static bool CreateNewUniqueFolderWithPrefix( const OUString& aPath,
+ static bool CreateNewUniqueFolderWithPrefix( std::u16string_view aPath,
const OUString& aPrefix,
OUString& aNewFolderName,
OUString& aNewFolderURL,
Content& aNewFolder );
- static OUString CreateNewUniqueFileWithPrefix( const OUString& aPath,
+ static OUString CreateNewUniqueFileWithPrefix( std::u16string_view aPath,
const OUString& aPrefix,
const OUString& aExt );
- std::vector< beans::StringPair > ReadUINamesForTemplateDir_Impl( const OUString& aUserPath );
- bool UpdateUINamesForTemplateDir_Impl( const OUString& aUserPath,
+ std::vector< beans::StringPair > ReadUINamesForTemplateDir_Impl( std::u16string_view aUserPath );
+ bool UpdateUINamesForTemplateDir_Impl( std::u16string_view aUserPath,
const OUString& aGroupName,
const OUString& aNewFolderName );
- bool ReplaceUINamesForTemplateDir_Impl( const OUString& aUserPath,
+ bool ReplaceUINamesForTemplateDir_Impl( std::u16string_view aUserPath,
const OUString& aFsysGroupName,
std::u16string_view aOldGroupName,
const OUString& aNewGroupName );
- void RemoveUINamesForTemplateDir_Impl( const OUString& aUserPath,
+ void RemoveUINamesForTemplateDir_Impl( std::u16string_view aUserPath,
std::u16string_view aGroupName );
bool WriteUINamesForTemplateDir_Impl( std::u16string_view aUserPath,
const std::vector< beans::StringPair >& aUINames );
@@ -551,7 +552,7 @@ void SfxDocTplService_Impl::getDirList()
for (auto& rTemplateDir : asNonConstRange(maTemplateDirs))
{
aURL.SetSmartProtocol( INetProtocol::File );
- aURL.SetURL( aDirs.getToken( 0, C_DELIM, nIdx ) );
+ aURL.SetURL( o3tl::getToken(aDirs, 0, C_DELIM, nIdx ) );
rTemplateDir = aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE );
if ( xExpander.is() )
@@ -773,7 +774,7 @@ bool SfxDocTplService_Impl::createFolder( const OUString& rNewFolderURL,
}
-bool SfxDocTplService_Impl::CreateNewUniqueFolderWithPrefix( const OUString& aPath,
+bool SfxDocTplService_Impl::CreateNewUniqueFolderWithPrefix( std::u16string_view aPath,
const OUString& aPrefix,
OUString& aNewFolderName,
OUString& aNewFolderURL,
@@ -826,7 +827,7 @@ bool SfxDocTplService_Impl::CreateNewUniqueFolderWithPrefix( const OUString& aPa
}
-OUString SfxDocTplService_Impl::CreateNewUniqueFileWithPrefix( const OUString& aPath,
+OUString SfxDocTplService_Impl::CreateNewUniqueFileWithPrefix( std::u16string_view aPath,
const OUString& aPrefix,
const OUString& aExt )
{
@@ -1166,7 +1167,7 @@ void SfxDocTplService_Impl::doUpdate()
}
-std::vector< beans::StringPair > SfxDocTplService_Impl::ReadUINamesForTemplateDir_Impl( const OUString& aUserPath )
+std::vector< beans::StringPair > SfxDocTplService_Impl::ReadUINamesForTemplateDir_Impl( std::u16string_view aUserPath )
{
INetURLObject aLocObj( aUserPath );
aLocObj.insertName( u"groupuinames.xml", false,
@@ -1192,7 +1193,7 @@ std::vector< beans::StringPair > SfxDocTplService_Impl::ReadUINamesForTemplateDi
}
-bool SfxDocTplService_Impl::UpdateUINamesForTemplateDir_Impl( const OUString& aUserPath,
+bool SfxDocTplService_Impl::UpdateUINamesForTemplateDir_Impl( std::u16string_view aUserPath,
const OUString& aGroupName,
const OUString& aNewFolderName )
{
@@ -1212,7 +1213,7 @@ bool SfxDocTplService_Impl::UpdateUINamesForTemplateDir_Impl( const OUString& aU
}
-bool SfxDocTplService_Impl::ReplaceUINamesForTemplateDir_Impl( const OUString& aUserPath,
+bool SfxDocTplService_Impl::ReplaceUINamesForTemplateDir_Impl( std::u16string_view aUserPath,
const OUString& aDefaultFsysGroupName,
std::u16string_view aOldGroupName,
const OUString& aNewGroupName )
@@ -1238,7 +1239,7 @@ bool SfxDocTplService_Impl::ReplaceUINamesForTemplateDir_Impl( const OUString& a
}
-void SfxDocTplService_Impl::RemoveUINamesForTemplateDir_Impl( const OUString& aUserPath,
+void SfxDocTplService_Impl::RemoveUINamesForTemplateDir_Impl( std::u16string_view aUserPath,
std::u16string_view aGroupName )
{
std::vector< beans::StringPair > aUINames = ReadUINamesForTemplateDir_Impl( aUserPath );
diff --git a/sfx2/source/doc/frmdescr.cxx b/sfx2/source/doc/frmdescr.cxx
index b97d3b6bbdcc..43183986d233 100644
--- a/sfx2/source/doc/frmdescr.cxx
+++ b/sfx2/source/doc/frmdescr.cxx
@@ -42,7 +42,7 @@ SfxItemSet* SfxFrameDescriptor::GetArgs()
return m_pArgs.get();
}
-void SfxFrameDescriptor::SetURL( const OUString& rURL )
+void SfxFrameDescriptor::SetURL( std::u16string_view rURL )
{
aURL = INetURLObject(rURL);
SetActualURL();
diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx
index d3c862a01ce5..cc26abcb0606 100644
--- a/sfx2/source/doc/guisaveas.cxx
+++ b/sfx2/source/doc/guisaveas.cxx
@@ -1248,7 +1248,7 @@ OUString ModelData_Impl::GetRecommendedName( const OUString& aSuggestedName, con
uno::UNO_QUERY );
if ( xTypeDetection.is() )
{
- INetURLObject aObj( "c:/" + aRecommendedName, INetProtocol::File,
+ INetURLObject aObj( rtl::OUStringConcatenation("c:/" + aRecommendedName), INetProtocol::File,
INetURLObject::EncodeMechanism::All, RTL_TEXTENCODING_UTF8, FSysStyle::Dos );
const OUString aExtension = GetRecommendedExtension( aTypeName );
diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx
index 0c150ece85e6..2fd20952042f 100644
--- a/sfx2/source/doc/objserv.cxx
+++ b/sfx2/source/doc/objserv.cxx
@@ -269,7 +269,7 @@ void SfxObjectShell::PrintState_Impl(SfxItemSet &rSet)
rSet.Put( SfxBoolItem( SID_PRINTOUT, bPrinting ) );
}
-bool SfxObjectShell::APISaveAs_Impl(const OUString& aFileName, SfxItemSet& rItemSet,
+bool SfxObjectShell::APISaveAs_Impl(std::u16string_view aFileName, SfxItemSet& rItemSet,
const css::uno::Sequence<css::beans::PropertyValue>& rArgs)
{
bool bOk = false;
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index 0dc8cb2d1d5b..b86750aef052 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -2679,7 +2679,7 @@ bool SfxObjectShell::CommonSaveAs_Impl(const INetURLObject& aURL, const OUString
return false;
}
- if ( aURL != INetURLObject( OUString( "private:stream" ) ) )
+ if ( aURL != INetURLObject( u"private:stream" ) )
{
// Is there already a Document with this name?
SfxObjectShell* pDoc = nullptr;
@@ -2731,7 +2731,7 @@ bool SfxObjectShell::CommonSaveAs_Impl(const INetURLObject& aURL, const OUString
bool bWasReadonly = IsReadOnly();
- if ( aURL == aActName && aURL != INetURLObject( OUString("private:stream") )
+ if ( aURL == aActName && aURL != INetURLObject( u"private:stream" )
&& IsReadOnly() )
{
SetError(ERRCODE_SFX_DOCUMENTREADONLY);
diff --git a/sfx2/source/doc/printhelper.cxx b/sfx2/source/doc/printhelper.cxx
index d2ac4883ea78..7a18910379d2 100644
--- a/sfx2/source/doc/printhelper.cxx
+++ b/sfx2/source/doc/printhelper.cxx
@@ -507,7 +507,7 @@ class ImplUCBPrintWatcher : public ::osl::Thread
the thread, if finishing of the job was detected outside this thread.
But it must be called without using a corresponding thread for the given parameter!
*/
- static void moveAndDeleteTemp( ::utl::TempFile** ppTempFile, const OUString& sTargetURL )
+ static void moveAndDeleteTemp( ::utl::TempFile** ppTempFile, std::u16string_view sTargetURL )
{
// move the file
try
diff --git a/sfx2/source/inc/helper.hxx b/sfx2/source/inc/helper.hxx
index ca278b07b56b..b2787a3ad146 100644
--- a/sfx2/source/inc/helper.hxx
+++ b/sfx2/source/inc/helper.hxx
@@ -31,9 +31,9 @@ public:
static std::vector<OUString> GetResultSet(const OUString& rURL);
static std::vector<OUString> GetHelpTreeViewContents(const OUString& rURL);
static OUString GetActiveHelpString(const OUString& rURL);
- static bool IsHelpErrorDocument(const OUString& rURL);
+ static bool IsHelpErrorDocument(std::u16string_view rURL);
- static sal_Int64 GetSize(const OUString& rContent);
+ static sal_Int64 GetSize(std::u16string_view rContent);
};
#endif // INCLUDED_SFX2_SOURCE_INC_HELPER_HXX
diff --git a/sfx2/source/view/frmload.cxx b/sfx2/source/view/frmload.cxx
index f45124849241..7c1db6f8b4ac 100644
--- a/sfx2/source/view/frmload.cxx
+++ b/sfx2/source/view/frmload.cxx
@@ -590,7 +590,7 @@ Reference< XController2 > SfxFrameLoader_Impl::impl_createDocumentView( const Re
return xController;
}
-std::shared_ptr<const SfxFilter> getEmptyURLFilter(const OUString& sURL)
+std::shared_ptr<const SfxFilter> getEmptyURLFilter(std::u16string_view sURL)
{
INetURLObject aParser(sURL);
const OUString aExt = aParser.getExtension(INetURLObject::LAST_SEGMENT, true,
diff --git a/svgio/source/svgreader/svgimagenode.cxx b/svgio/source/svgreader/svgimagenode.cxx
index 2390f74dac03..2e8c05b0c9f5 100644
--- a/svgio/source/svgreader/svgimagenode.cxx
+++ b/svgio/source/svgreader/svgimagenode.cxx
@@ -216,7 +216,7 @@ namespace svgio::svgreader
if(ERRCODE_NONE == GraphicFilter::GetGraphicFilter().ImportGraphic(
aGraphic,
- OUString(),
+ u"",
aStream))
{
extractFromGraphic(aGraphic, aNewTarget, aViewBox, aBitmapEx);
diff --git a/svl/source/fsstor/fsstorage.cxx b/svl/source/fsstor/fsstorage.cxx
index 9056b782d3b3..0ae71ab53389 100644
--- a/svl/source/fsstor/fsstorage.cxx
+++ b/svl/source/fsstor/fsstorage.cxx
@@ -83,7 +83,7 @@ FSStorage::~FSStorage()
{}
}
-bool FSStorage::MakeFolderNoUI( const OUString& rFolder )
+bool FSStorage::MakeFolderNoUI( std::u16string_view rFolder )
{
INetURLObject aURL( rFolder );
OUString aTitle = aURL.getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::DecodeMechanism::WithCharset );
diff --git a/svl/source/fsstor/fsstorage.hxx b/svl/source/fsstor/fsstorage.hxx
index 2b0b7bc78c44..1c4ae7030903 100644
--- a/svl/source/fsstor/fsstorage.hxx
+++ b/svl/source/fsstor/fsstorage.hxx
@@ -62,7 +62,7 @@ public:
void CopyContentToStorage_Impl(ucbhelper::Content& rContent,
const css::uno::Reference<css::embed::XStorage>& xDest);
- static bool MakeFolderNoUI( const OUString& rFolder );
+ static bool MakeFolderNoUI( std::u16string_view rFolder );
// XInterface
diff --git a/svl/source/misc/documentlockfile.cxx b/svl/source/misc/documentlockfile.cxx
index 096b1e4e8544..fdbbc90ba465 100644
--- a/svl/source/misc/documentlockfile.cxx
+++ b/svl/source/misc/documentlockfile.cxx
@@ -163,7 +163,7 @@ void GenDocumentLockFile::RemoveFileDirectly()
}
-DocumentLockFile::DocumentLockFile( const OUString& aOrigURL )
+DocumentLockFile::DocumentLockFile( std::u16string_view aOrigURL )
: GenDocumentLockFile(GenerateOwnLockFileURL(aOrigURL, u".~lock."))
{
}
diff --git a/svl/source/misc/inethist.cxx b/svl/source/misc/inethist.cxx
index 2fbd981034ec..dc25d6b0b5a9 100644
--- a/svl/source/misc/inethist.cxx
+++ b/svl/source/misc/inethist.cxx
@@ -309,14 +309,14 @@ void INetURLHistory::NormalizeUrl_Impl (INetURLObject &rUrl)
if (!rUrl.HasPort())
rUrl.SetPort (INETHIST_DEF_HTTP_PORT);
if (!rUrl.HasURLPath())
- rUrl.SetURLPath("/");
+ rUrl.SetURLPath(u"/");
break;
case INetProtocol::Https:
if (!rUrl.HasPort())
rUrl.SetPort (INETHIST_DEF_HTTPS_PORT);
if (!rUrl.HasURLPath())
- rUrl.SetURLPath("/");
+ rUrl.SetURLPath(u"/");
break;
default:
@@ -346,7 +346,7 @@ void INetURLHistory::PutUrl_Impl (const INetURLObject &rUrl)
}
}
-bool INetURLHistory::QueryUrl(const OUString &rUrl) const
+bool INetURLHistory::QueryUrl(std::u16string_view rUrl) const
{
INetProtocol eProto = INetURLObject::CompareProtocolScheme (rUrl);
if (!QueryProtocol (eProto))
diff --git a/svl/source/misc/lockfilecommon.cxx b/svl/source/misc/lockfilecommon.cxx
index 844b446397c7..baed8636ecfb 100644
--- a/svl/source/misc/lockfilecommon.cxx
+++ b/svl/source/misc/lockfilecommon.cxx
@@ -70,7 +70,7 @@ void LockFileCommon::SetURL(const OUString& aURL)
OUString LockFileCommon::GenerateOwnLockFileURL(
- const OUString& aOrigURL, std::u16string_view aPrefix)
+ std::u16string_view aOrigURL, std::u16string_view aPrefix)
{
INetURLObject aURL = ResolveLinks(INetURLObject(aOrigURL));
aURL.setName(OUStringConcatenation(aPrefix + aURL.GetLastName() + "%23" /*'#'*/));
diff --git a/svl/source/misc/msodocumentlockfile.cxx b/svl/source/misc/msodocumentlockfile.cxx
index b240e9c9cbd9..ce1bf287a90c 100644
--- a/svl/source/misc/msodocumentlockfile.cxx
+++ b/svl/source/misc/msodocumentlockfile.cxx
@@ -42,7 +42,7 @@ bool isPowerPointFormat(std::u16string_view sExt)
}
// Need to generate different lock file name for MSO.
-OUString GenerateMSOLockFileURL(const OUString& aOrigURL)
+OUString GenerateMSOLockFileURL(std::u16string_view aOrigURL)
{
INetURLObject aURL = LockFileCommon::ResolveLinks(INetURLObject(aOrigURL));
@@ -64,7 +64,7 @@ OUString GenerateMSOLockFileURL(const OUString& aOrigURL)
}
// static
-MSODocumentLockFile::AppType MSODocumentLockFile::getAppType(const OUString& sOrigURL)
+MSODocumentLockFile::AppType MSODocumentLockFile::getAppType(std::u16string_view sOrigURL)
{
AppType eResult = AppType::PowerPoint;
INetURLObject aDocURL = LockFileCommon::ResolveLinks(INetURLObject(sOrigURL));
@@ -77,7 +77,7 @@ MSODocumentLockFile::AppType MSODocumentLockFile::getAppType(const OUString& sOr
return eResult;
}
-MSODocumentLockFile::MSODocumentLockFile(const OUString& aOrigURL)
+MSODocumentLockFile::MSODocumentLockFile(std::u16string_view aOrigURL)
: GenDocumentLockFile(GenerateMSOLockFileURL(aOrigURL))
, m_eAppType(getAppType(aOrigURL))
{
@@ -260,7 +260,7 @@ void MSODocumentLockFile::RemoveFile()
RemoveFileDirectly();
}
-bool MSODocumentLockFile::IsMSOSupportedFileFormat(const OUString& aURL)
+bool MSODocumentLockFile::IsMSOSupportedFileFormat(std::u16string_view aURL)
{
INetURLObject aDocURL = LockFileCommon::ResolveLinks(INetURLObject(aURL));
const OUString sExt = aDocURL.GetFileExtension();
diff --git a/svl/source/misc/sharecontrolfile.cxx b/svl/source/misc/sharecontrolfile.cxx
index cf474fe459af..d0cdda561876 100644
--- a/svl/source/misc/sharecontrolfile.cxx
+++ b/svl/source/misc/sharecontrolfile.cxx
@@ -44,7 +44,7 @@ using namespace ::com::sun::star;
namespace svt {
-ShareControlFile::ShareControlFile( const OUString& aOrigURL )
+ShareControlFile::ShareControlFile( std::u16string_view aOrigURL )
: LockFileCommon(GenerateOwnLockFileURL(aOrigURL, u".~sharing."))
{
if ( !m_xStream.is() && !GetURL().isEmpty() )
diff --git a/svl/source/misc/urihelper.cxx b/svl/source/misc/urihelper.cxx
index 30dfdc87f387..1cb5c9f7caee 100644
--- a/svl/source/misc/urihelper.cxx
+++ b/svl/source/misc/urihelper.cxx
@@ -553,7 +553,7 @@ OUString URIHelper::FindFirstURLInText(OUString const & rText,
if (nUriEnd != nPrefixEnd
&& isBoundary1(rCharClass, rText, nUriEnd, rEnd))
{
- INetURLObject aUri(rText.copy(nPos, nUriEnd - nPos),
+ INetURLObject aUri(rText.subView(nPos, nUriEnd - nPos),
INetProtocol::File, eMechanism, eCharset,
FSysStyle::Detect);
if (!aUri.HasError())
@@ -584,7 +584,7 @@ OUString URIHelper::FindFirstURLInText(OUString const & rText,
&& (isBoundary1(rCharClass, rText, nUriEnd, rEnd)
|| rText[nUriEnd] == '\\'))
{
- INetURLObject aUri(rText.copy(nPos, nUriEnd - nPos),
+ INetURLObject aUri(rText.subView(nPos, nUriEnd - nPos),
INetProtocol::Http, eMechanism,
eCharset);
if (!aUri.HasError())
@@ -633,7 +633,7 @@ OUString URIHelper::FindFirstURLInText(OUString const & rText,
if (isBoundary1(rCharClass, rText, nUriEnd, rEnd)
|| rText[nUriEnd] == '\\')
{
- INetURLObject aUri(rText.copy(nPos, nUriEnd - nPos),
+ INetURLObject aUri(rText.subView(nPos, nUriEnd - nPos),
INetProtocol::Http, eMechanism,
eCharset);
if (!aUri.HasError())
@@ -657,7 +657,7 @@ OUString URIHelper::FindFirstURLInText(OUString const & rText,
&& checkWChar(rCharClass, rText, &i, &nUriEnd)) ;
if (isBoundary1(rCharClass, rText, nUriEnd, rEnd))
{
- INetURLObject aUri(rText.copy(nPos, nUriEnd - nPos),
+ INetURLObject aUri(rText.subView(nPos, nUriEnd - nPos),
INetProtocol::File,
INetURLObject::EncodeMechanism::All,
RTL_TEXTENCODING_UTF8,
@@ -686,7 +686,7 @@ OUString URIHelper::FindFirstURLInText(OUString const & rText,
nullptr, true)) ;
if (isBoundary1(rCharClass, rText, nUriEnd, rEnd))
{
- INetURLObject aUri(rText.copy(nPos, nUriEnd - nPos),
+ INetURLObject aUri(rText.subView(nPos, nUriEnd - nPos),
INetProtocol::File,
INetURLObject::EncodeMechanism::All,
RTL_TEXTENCODING_UTF8,
@@ -723,7 +723,7 @@ OUString URIHelper::FindFirstURLInText(OUString const & rText,
if (nLabels >= 1
&& isBoundary1(rCharClass, rText, i, rEnd))
{
- INetURLObject aUri(rText.copy(nPos, i - nPos),
+ INetURLObject aUri(rText.subView(nPos, i - nPos),
INetProtocol::Mailto,
INetURLObject::EncodeMechanism::All);
if (!aUri.HasError())
diff --git a/svtools/source/control/inettbc.cxx b/svtools/source/control/inettbc.cxx
index 6f8d52df8247..c4a2b0cf5173 100644
--- a/svtools/source/control/inettbc.cxx
+++ b/svtools/source/control/inettbc.cxx
@@ -591,7 +591,7 @@ void SvtMatchContext_Impl::doExecute()
{
aCurObj.SetMark( u"" );
aCurObj.SetParam( u"" );
- aCurObj.SetURLPath( "" );
+ aCurObj.SetURLPath( u"" );
aMatch = aCurObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
}
@@ -610,7 +610,7 @@ void SvtMatchContext_Impl::doExecute()
{
aCurObj.SetMark( u"" );
aCurObj.SetParam( u"" );
- aCurObj.SetURLPath( "" );
+ aCurObj.SetURLPath( u"" );
aMatch = aCurObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
}
diff --git a/svtools/source/filter/exportdialog.cxx b/svtools/source/filter/exportdialog.cxx
index 2d563e02b274..d48ec013d175 100644
--- a/svtools/source/filter/exportdialog.cxx
+++ b/svtools/source/filter/exportdialog.cxx
@@ -474,7 +474,7 @@ void ExportDialog::GetGraphicStream()
{
mpTempStream->SetResizeOffset(1024);
mpTempStream->SetStreamSize(1024);
- rFilter.ExportGraphic( aGraphic, "", *mpTempStream, nFilter, &aNewFilterData );
+ rFilter.ExportGraphic( aGraphic, u"", *mpTempStream, nFilter, &aNewFilterData );
}
}
else
diff --git a/svtools/source/misc/embedhlp.cxx b/svtools/source/misc/embedhlp.cxx
index f384eb352f90..29e427799c82 100644
--- a/svtools/source/misc/embedhlp.cxx
+++ b/svtools/source/misc/embedhlp.cxx
@@ -484,7 +484,7 @@ void EmbeddedObjectRef::GetReplacement( bool bUpdate )
{
GraphicFilter& rGF = GraphicFilter::GetGraphicFilter();
if( mpImpl->pGraphic )
- rGF.ImportGraphic( *mpImpl->pGraphic, OUString(), *pGraphicStream );
+ rGF.ImportGraphic( *mpImpl->pGraphic, u"", *pGraphicStream );
mpImpl->mnGraphicVersion++;
}
@@ -591,7 +591,7 @@ void EmbeddedObjectRef::SetGraphicStream( const uno::Reference< io::XInputStream
if ( pGraphicStream )
{
GraphicFilter& rGF = GraphicFilter::GetGraphicFilter();
- rGF.ImportGraphic( *mpImpl->pGraphic, "", *pGraphicStream );
+ rGF.ImportGraphic( *mpImpl->pGraphic, u"", *pGraphicStream );
mpImpl->mnGraphicVersion++;
if ( mpImpl->pContainer )
diff --git a/svtools/source/svhtml/htmlsupp.cxx b/svtools/source/svhtml/htmlsupp.cxx
index af9b2b22fd6e..a418d61eb79c 100644
--- a/svtools/source/svhtml/htmlsupp.cxx
+++ b/svtools/source/svhtml/htmlsupp.cxx
@@ -33,7 +33,7 @@ HTMLOptionEnum<HTMLScriptLanguage> const aScriptLangOptEnums[] =
{ nullptr, HTMLScriptLanguage(0) }
};
-void HTMLParser::ParseScriptOptions( OUString& rLangString, const OUString& rBaseURL,
+void HTMLParser::ParseScriptOptions( OUString& rLangString, std::u16string_view rBaseURL,
HTMLScriptLanguage& rLang,
OUString& rSrc,
OUString& rLibrary,
diff --git a/svtools/source/uno/wizard/unowizard.cxx b/svtools/source/uno/wizard/unowizard.cxx
index 9c503d37e114..0a73eb49adf3 100644
--- a/svtools/source/uno/wizard/unowizard.cxx
+++ b/svtools/source/uno/wizard/unowizard.cxx
@@ -235,7 +235,7 @@ namespace {
m_bInitialized = true;
}
- OString lcl_getHelpId( const OUString& _rHelpURL )
+ OString lcl_getHelpId( std::u16string_view _rHelpURL )
{
INetURLObject aHID( _rHelpURL );
if ( aHID.GetProtocol() == INetProtocol::Hid )
diff --git a/svx/source/dialog/compressgraphicdialog.cxx b/svx/source/dialog/compressgraphicdialog.cxx
index 1c3cc3be54d9..f4f6e0500131 100644
--- a/svx/source/dialog/compressgraphicdialog.cxx
+++ b/svx/source/dialog/compressgraphicdialog.cxx
@@ -271,7 +271,7 @@ void CompressGraphicsDialog::Compress(SvStream& aStream)
OUString aGraphicFormatName = m_xLosslessRB->get_active() ? OUString( "png" ) : OUString( "jpg" );
sal_uInt16 nFilterFormat = rFilter.GetExportFormatNumberForShortName( aGraphicFormatName );
- rFilter.ExportGraphic( aScaledGraphic, "none", aStream, nFilterFormat, &aFilterData );
+ rFilter.ExportGraphic( aScaledGraphic, u"none", aStream, nFilterFormat, &aFilterData );
}
IMPL_LINK_NOARG( CompressGraphicsDialog, OkayClickHdl, weld::Button&, void )
@@ -417,7 +417,7 @@ Graphic CompressGraphicsDialog::GetCompressedGraphic()
aMemStream.Seek( STREAM_SEEK_TO_BEGIN );
Graphic aResultGraphic;
GraphicFilter& rFilter = GraphicFilter::GetGraphicFilter();
- rFilter.ImportGraphic( aResultGraphic, OUString("import"), aMemStream );
+ rFilter.ImportGraphic( aResultGraphic, u"import", aMemStream );
return aResultGraphic;
}
diff --git a/svx/source/dialog/langbox.cxx b/svx/source/dialog/langbox.cxx
index ca9344f32bc7..43d123b1ebc9 100644
--- a/svx/source/dialog/langbox.cxx
+++ b/svx/source/dialog/langbox.cxx
@@ -44,7 +44,7 @@ using namespace ::com::sun::star::util;
using namespace ::com::sun::star::linguistic2;
using namespace ::com::sun::star::uno;
-OUString GetDicInfoStr( const OUString& rName, const LanguageType nLang, bool bNeg )
+OUString GetDicInfoStr( std::u16string_view rName, const LanguageType nLang, bool bNeg )
{
INetURLObject aURLObj;
aURLObj.SetSmartProtocol( INetProtocol::File );
diff --git a/svx/source/gallery2/galexpl.cxx b/svx/source/gallery2/galexpl.cxx
index c155f4f14613..b1e70919c928 100644
--- a/svx/source/gallery2/galexpl.cxx
+++ b/svx/source/gallery2/galexpl.cxx
@@ -107,7 +107,7 @@ bool GalleryExplorer::FillObjListTitle( const sal_uInt32 nThemeId, std::vector<
return !rList.empty();
}
-bool GalleryExplorer::InsertURL( std::u16string_view rThemeName, const OUString& rURL )
+bool GalleryExplorer::InsertURL( std::u16string_view rThemeName, std::u16string_view rURL )
{
Gallery* pGal = ::Gallery::GetGalleryInstance();
bool bRet = false;
@@ -129,7 +129,7 @@ bool GalleryExplorer::InsertURL( std::u16string_view rThemeName, const OUString&
return bRet;
}
-bool GalleryExplorer::InsertURL( sal_uInt32 nThemeId, const OUString& rURL )
+bool GalleryExplorer::InsertURL( sal_uInt32 nThemeId, std::u16string_view rURL )
{
Gallery* pGal = ::Gallery::GetGalleryInstance();
return pGal && InsertURL( pGal->GetThemeName( nThemeId ), rURL );
diff --git a/svx/source/gallery2/gallery1.cxx b/svx/source/gallery2/gallery1.cxx
index f307d4b6f61b..3d412eacb307 100644
--- a/svx/source/gallery2/gallery1.cxx
+++ b/svx/source/gallery2/gallery1.cxx
@@ -31,6 +31,7 @@
#include <comphelper/processfactory.hxx>
#include <ucbhelper/content.hxx>
#include <com/sun/star/ucb/ContentCreationException.hpp>
+#include <o3tl/string_view.hxx>
#include <unotools/configmgr.hxx>
#include <unotools/ucbstreamhelper.hxx>
#include <unotools/pathoptions.hxx>
@@ -225,7 +226,7 @@ public:
};
-Gallery::Gallery( const OUString& rMultiPath )
+Gallery::Gallery( std::u16string_view rMultiPath )
: bMultiPath ( false )
{
ImplLoad( rMultiPath );
@@ -245,11 +246,11 @@ Gallery* Gallery::GetGalleryInstance()
return s_pGallery;
}
-void Gallery::ImplLoad( const OUString& rMultiPath )
+void Gallery::ImplLoad( std::u16string_view rMultiPath )
{
bool bIsReadOnlyDir {false};
- bMultiPath = !rMultiPath.isEmpty();
+ bMultiPath = !rMultiPath.empty();
INetURLObject aCurURL(SvtPathOptions().GetConfigPath());
ImplLoadSubDirs( aCurURL, bIsReadOnlyDir );
@@ -263,7 +264,7 @@ void Gallery::ImplLoad( const OUString& rMultiPath )
sal_Int32 nIdx {0};
do
{
- aCurURL = INetURLObject(rMultiPath.getToken(0, ';', nIdx));
+ aCurURL = INetURLObject(o3tl::getToken(rMultiPath, 0, ';', nIdx));
if (bIsRelURL)
{
aRelURL = aCurURL;
diff --git a/svx/source/gengal/gengal.cxx b/svx/source/gengal/gengal.cxx
index d57174ff8913..95c415d60a2f 100644
--- a/svx/source/gengal/gengal.cxx
+++ b/svx/source/gengal/gengal.cxx
@@ -55,7 +55,7 @@ protected:
}
-static void createTheme( const OUString& aThemeName, const OUString& aGalleryURL,
+static void createTheme( const OUString& aThemeName, std::u16string_view aGalleryURL,
const OUString& aDestDir, std::vector<INetURLObject> &rFiles,
bool bRelativeURLs )
{
@@ -135,7 +135,7 @@ static int PrintHelp()
return EXIT_SUCCESS;
}
-static INetURLObject Smartify( const OUString &rPath )
+static INetURLObject Smartify( std::u16string_view rPath )
{
INetURLObject aURL;
aURL.SetSmartURL( rPath );
diff --git a/svx/source/unodraw/UnoGraphicExporter.cxx b/svx/source/unodraw/UnoGraphicExporter.cxx
index bc84a56de4cb..3b525789468f 100644
--- a/svx/source/unodraw/UnoGraphicExporter.cxx
+++ b/svx/source/unodraw/UnoGraphicExporter.cxx
@@ -1068,7 +1068,7 @@ sal_Bool SAL_CALL GraphicExporter::filter( const Sequence< PropertyValue >& aDes
// SvOutputStream, or adapt the graphic filter to not seek anymore.
SvMemoryStream aStream( 1024, 1024 );
- nStatus = rFilter.ExportGraphic( aGraphic,"", aStream, nFilter, &aSettings.maFilterData );
+ nStatus = rFilter.ExportGraphic( aGraphic, u"", aStream, nFilter, &aSettings.maFilterData );
// copy temp stream to XOutputStream
SvOutputStream aOutputStream( aSettings.mxOutputStream );
diff --git a/svx/source/xml/xmlgrhlp.cxx b/svx/source/xml/xmlgrhlp.cxx
index b95130a8a658..4a727f348f6f 100644
--- a/svx/source/xml/xmlgrhlp.cxx
+++ b/svx/source/xml/xmlgrhlp.cxx
@@ -133,7 +133,7 @@ GraphicInputStream::GraphicInputStream(GraphicObject const & aGraphicObject, con
else
{
GraphicFilter &rFilter = GraphicFilter::GetGraphicFilter();
- bRet = (rFilter.ExportGraphic(aGraphic, "", *pStream, rFilter.GetExportFormatNumberForMediaType(rMimeType)) == ERRCODE_NONE);
+ bRet = (rFilter.ExportGraphic(aGraphic, u"", *pStream, rFilter.GetExportFormatNumberForMediaType(rMimeType)) == ERRCODE_NONE);
}
}
else
@@ -148,7 +148,7 @@ GraphicInputStream::GraphicInputStream(GraphicObject const & aGraphicObject, con
else if (aFormat.isEmpty())
aFormat = "image/png";
- bRet = (rFilter.ExportGraphic(aGraphic, "", *pStream, rFilter.GetExportFormatNumberForMediaType(aFormat)) == ERRCODE_NONE);
+ bRet = (rFilter.ExportGraphic(aGraphic, u"", *pStream, rFilter.GetExportFormatNumberForMediaType(aFormat)) == ERRCODE_NONE);
}
else if (rMimeType.isEmpty() && aGraphic.GetType() == GraphicType::GdiMetafile)
{
@@ -161,7 +161,7 @@ GraphicInputStream::GraphicInputStream(GraphicObject const & aGraphicObject, con
else if (!rMimeType.isEmpty())
{
GraphicFilter & rFilter = GraphicFilter::GetGraphicFilter();
- bRet = ( rFilter.ExportGraphic( aGraphic, "", *pStream, rFilter.GetExportFormatNumberForMediaType( rMimeType ) ) == ERRCODE_NONE );
+ bRet = ( rFilter.ExportGraphic( aGraphic, u"", *pStream, rFilter.GetExportFormatNumberForMediaType( rMimeType ) ) == ERRCODE_NONE );
}
}
@@ -297,7 +297,7 @@ Graphic SvXMLGraphicOutputStream::GetGraphic()
mpOStm->Seek( 0 );
sal_uInt16 nFormat = GRFILTER_FORMAT_DONTKNOW;
sal_uInt16 nDeterminedFormat = GRFILTER_FORMAT_DONTKNOW;
- GraphicFilter::GetGraphicFilter().ImportGraphic( aGraphic, "", *mpOStm ,nFormat,&nDeterminedFormat);
+ GraphicFilter::GetGraphicFilter().ImportGraphic( aGraphic, u"", *mpOStm ,nFormat,&nDeterminedFormat);
if (nDeterminedFormat == GRFILTER_FORMAT_DONTKNOW)
{
@@ -337,7 +337,7 @@ Graphic SvXMLGraphicOutputStream::GetGraphic()
if (nStreamLen_ > 0)
{
aDest.Seek(0);
- GraphicFilter::GetGraphicFilter().ImportGraphic( aGraphic, "", aDest ,nFormat,&nDeterminedFormat );
+ GraphicFilter::GetGraphicFilter().ImportGraphic( aGraphic, u"", aDest ,nFormat,&nDeterminedFormat );
}
}
}
@@ -506,7 +506,7 @@ Graphic SvXMLGraphicHelper::ImplReadGraphic( const OUString& rPictureStorageName
if (!aGraphic.IsNone())
aReturnGraphic = aGraphic;
else
- rGraphicFilter.ImportGraphic(aReturnGraphic, "", *pStream);
+ rGraphicFilter.ImportGraphic(aReturnGraphic, u"", *pStream);
}
return aReturnGraphic;
@@ -798,7 +798,7 @@ OUString SvXMLGraphicHelper::implSaveGraphic(css::uno::Reference<css::graphic::X
}
rOutSavedMimeType = comphelper::GraphicMimeTypeHelper::GetMimeTypeForExtension(aFormat.toUtf8());
- bSuccess = (rFilter.ExportGraphic(aGraphic, "", *pStream, rFilter.GetExportFormatNumberForShortName(aFormat)) == ERRCODE_NONE);
+ bSuccess = (rFilter.ExportGraphic(aGraphic, u"", *pStream, rFilter.GetExportFormatNumberForShortName(aFormat)) == ERRCODE_NONE);
}
else if (aGraphic.GetType() == GraphicType::GdiMetafile)
{
diff --git a/svx/source/xoutdev/xtable.cxx b/svx/source/xoutdev/xtable.cxx
index 6a0744fe0a3d..016dd261b858 100644
--- a/svx/source/xoutdev/xtable.cxx
+++ b/svx/source/xoutdev/xtable.cxx
@@ -351,7 +351,7 @@ XPropertyListRef XPropertyList::CreatePropertyList( XPropertyListType aType,
XPropertyListRef
XPropertyList::CreatePropertyListFromURL( XPropertyListType t,
- const OUString & rURLStr )
+ std::u16string_view rURLStr )
{
INetURLObject aURL( rURLStr );
INetURLObject aPathURL( aURL );
diff --git a/sw/inc/SwAppletImpl.hxx b/sw/inc/SwAppletImpl.hxx
index 309b356a2a6f..a1abec7b5f4e 100644
--- a/sw/inc/SwAppletImpl.hxx
+++ b/sw/inc/SwAppletImpl.hxx
@@ -50,9 +50,9 @@ public:
~SwApplet_Impl();
void CreateApplet( const OUString& rCode, const OUString& rName,
bool bMayScript, const OUString& rCodeBase,
- const OUString& rBaseURL );
+ std::u16string_view rBaseURL );
#if HAVE_FEATURE_JAVA
- bool CreateApplet( const OUString& rBaseURL );
+ bool CreateApplet( std::u16string_view rBaseURL );
void AppendParam( const OUString& rName, const OUString& rValue );
#endif
void FinishApplet();
diff --git a/sw/inc/dbmgr.hxx b/sw/inc/dbmgr.hxx
index dca2dbd7bbe5..b2235f214d71 100644
--- a/sw/inc/dbmgr.hxx
+++ b/sw/inc/dbmgr.hxx
@@ -412,7 +412,7 @@ public:
Convenience function, which calls GetDBunoURI and has just one mandatory parameter.
In case of success it returns the registered name, otherwise an empty string.
*/
- static OUString LoadAndRegisterDataSource(const OUString& rURI, const OUString *pDestDir);
+ static OUString LoadAndRegisterDataSource(std::u16string_view rURI, const OUString *pDestDir);
/// Load the embedded data source of the document and also register it.
void LoadAndRegisterEmbeddedDataSource(const SwDBData& rData, const SwDocShell& rDocShell);
diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx
index 5771d0c8925e..3b407440ed61 100644
--- a/sw/inc/doc.hxx
+++ b/sw/inc/doc.hxx
@@ -1384,7 +1384,7 @@ public:
// Query if URL was visited.
// Query via Doc, if only a Bookmark has been given.
// In this case the document name has to be set in front.
- bool IsVisitedURL( const OUString& rURL );
+ bool IsVisitedURL( std::u16string_view rURL );
// Save current values for automatic registration of exceptions in Autocorrection.
void SetAutoCorrExceptWord( std::unique_ptr<SwAutoCorrExceptWord> pNew );
diff --git a/sw/inc/docsh.hxx b/sw/inc/docsh.hxx
index 8794c79948e9..8d051b4fb54a 100644
--- a/sw/inc/docsh.hxx
+++ b/sw/inc/docsh.hxx
@@ -345,7 +345,7 @@ protected:
*/
int SwFindDocShell( SfxObjectShellRef& xDocSh,
SfxObjectShellLock& xLockRef,
- const OUString& rFileName,
+ std::u16string_view rFileName,
const OUString& rPasswd,
const OUString& rFilter,
sal_Int16 nVersion,
diff --git a/sw/inc/ndgrf.hxx b/sw/inc/ndgrf.hxx
index 94569aafe4e1..391dc82d6623 100644
--- a/sw/inc/ndgrf.hxx
+++ b/sw/inc/ndgrf.hxx
@@ -58,7 +58,7 @@ class SW_DLLPUBLIC SwGrfNode final: public SwNoTextNode
SwAttrSet const * pAutoAttr );
///< Ctor for reading (SW/G) without graphics.
SwGrfNode( const SwNodeIndex& rWhere,
- const OUString& rGrfName, const OUString& rFltName,
+ std::u16string_view rGrfName, const OUString& rFltName,
SwGrfFormatColl* pGrfColl,
SwAttrSet const * pAutoAttr );
SwGrfNode( const SwNodeIndex& rWhere,
diff --git a/sw/inc/swunohelper.hxx b/sw/inc/swunohelper.hxx
index 66743d90eb9c..1b718ae41598 100644
--- a/sw/inc/swunohelper.hxx
+++ b/sw/inc/swunohelper.hxx
@@ -40,10 +40,10 @@ sal_Int32 GetEnumAsInt32( const css::uno::Any& rVal );
SW_DLLPUBLIC bool UCB_DeleteFile( const OUString& rURL );
// move the file to a new location
-bool UCB_MoveFile( const OUString& rURL, const OUString& rNewURL );
+bool UCB_MoveFile( const OUString& rURL, std::u16string_view rNewURL );
// is the URL on the current system case sensitive?
-SW_DLLPUBLIC bool UCB_IsCaseSensitiveFileName( const OUString& rURL );
+SW_DLLPUBLIC bool UCB_IsCaseSensitiveFileName( std::u16string_view rURL );
// is the URL readonly?
SW_DLLPUBLIC bool UCB_IsReadOnlyFileName( const OUString& rURL );
diff --git a/sw/qa/unit/uibase.cxx b/sw/qa/unit/uibase.cxx
index 188916da35a2..519510977ce6 100644
--- a/sw/qa/unit/uibase.cxx
+++ b/sw/qa/unit/uibase.cxx
@@ -31,7 +31,7 @@ public:
void Test::testTdf98168()
{
- INetURLObject aURL("file:///tmp/test.xlsx");
+ INetURLObject aURL(u"file:///tmp/test.xlsx");
// This was sw::DBConnURIType::UNKNOWN, xlsx was not recognized.
CPPUNIT_ASSERT_EQUAL(sw::DBConnURIType::CALC, sw::GetDBunoType(aURL));
}
diff --git a/sw/source/core/doc/visiturl.cxx b/sw/source/core/doc/visiturl.cxx
index c32e3317dc2d..24db9230b308 100644
--- a/sw/source/core/doc/visiturl.cxx
+++ b/sw/source/core/doc/visiturl.cxx
@@ -97,16 +97,16 @@ void SwURLStateChanged::Notify( SfxBroadcaster& , const SfxHint& rHint )
// Check if the URL has been visited before. Via the Doc, if only one Bookmark is set
// We need to put the Doc's name before it!
-bool SwDoc::IsVisitedURL( const OUString& rURL )
+bool SwDoc::IsVisitedURL( std::u16string_view rURL )
{
bool bRet = false;
- if( !rURL.isEmpty() )
+ if( !rURL.empty() )
{
INetURLHistory *pHist = INetURLHistory::GetOrCreate();
if( '#' == rURL[0] && mpDocShell && mpDocShell->GetMedium() )
{
INetURLObject aIObj( mpDocShell->GetMedium()->GetURLObject() );
- aIObj.SetMark( rURL.subView( 1 ) );
+ aIObj.SetMark( rURL.substr( 1 ) );
bRet = pHist->QueryUrl( aIObj );
}
else
diff --git a/sw/source/core/graphic/ndgrf.cxx b/sw/source/core/graphic/ndgrf.cxx
index 82cbb57c12f3..14a898cf71eb 100644
--- a/sw/source/core/graphic/ndgrf.cxx
+++ b/sw/source/core/graphic/ndgrf.cxx
@@ -98,7 +98,7 @@ SwGrfNode::SwGrfNode( const SwNodeIndex & rWhere,
* @note Does not read/open the image itself!
*/
SwGrfNode::SwGrfNode( const SwNodeIndex & rWhere,
- const OUString& rGrfName,
+ std::u16string_view rGrfName,
const OUString& rFltName,
SwGrfFormatColl *pGrfColl,
SwAttrSet const * pAutoAttr ) :
diff --git a/sw/source/core/unocore/swunohelper.cxx b/sw/source/core/unocore/swunohelper.cxx
index 6e1e3631dbde..04f0dc0ad4b9 100644
--- a/sw/source/core/unocore/swunohelper.cxx
+++ b/sw/source/core/unocore/swunohelper.cxx
@@ -75,7 +75,7 @@ bool UCB_DeleteFile( const OUString& rURL )
return bRemoved;
}
-bool UCB_MoveFile( const OUString& rURL, const OUString& rNewURL )
+bool UCB_MoveFile( const OUString& rURL, std::u16string_view rNewURL )
{
bool bCopyCompleted = true;
try
@@ -104,7 +104,7 @@ bool UCB_MoveFile( const OUString& rURL, const OUString& rNewURL )
return bCopyCompleted;
}
-bool UCB_IsCaseSensitiveFileName( const OUString& rURL )
+bool UCB_IsCaseSensitiveFileName( std::u16string_view rURL )
{
bool bCaseSensitive;
try
diff --git a/sw/source/filter/html/SwAppletImpl.cxx b/sw/source/filter/html/SwAppletImpl.cxx
index d03f2fbd8092..1b18d54a3f6f 100644
--- a/sw/source/filter/html/SwAppletImpl.cxx
+++ b/sw/source/filter/html/SwAppletImpl.cxx
@@ -115,7 +115,7 @@ SwApplet_Impl::SwApplet_Impl( SfxItemPool& rPool ) :
void SwApplet_Impl::CreateApplet( const OUString& rCode, const OUString& rName,
bool bMayScript, const OUString& rCodeBase,
- const OUString& rDocumentBaseURL )
+ std::u16string_view rDocumentBaseURL )
{
comphelper::EmbeddedObjectContainer aCnt;
OUString aName;
@@ -142,7 +142,7 @@ void SwApplet_Impl::CreateApplet( const OUString& rCode, const OUString& rName,
}
}
#if HAVE_FEATURE_JAVA
-bool SwApplet_Impl::CreateApplet( const OUString& rBaseURL )
+bool SwApplet_Impl::CreateApplet( std::u16string_view rBaseURL )
{
OUString aCode, aName, aCodeBase;
bool bMayScript = false;
diff --git a/sw/source/filter/html/htmlgrin.cxx b/sw/source/filter/html/htmlgrin.cxx
index 1e8c9948b395..5ed465811ed9 100644
--- a/sw/source/filter/html/htmlgrin.cxx
+++ b/sw/source/filter/html/htmlgrin.cxx
@@ -501,7 +501,7 @@ IMAGE_SETEVENT:
if (!sGrfNm.isEmpty())
{
- if (ERRCODE_NONE == rFilter.ImportGraphic(aGraphic, "", *pStream))
+ if (ERRCODE_NONE == rFilter.ImportGraphic(aGraphic, u"", *pStream))
sGrfNm.clear();
}
}
diff --git a/sw/source/filter/ww8/wrtww8gr.cxx b/sw/source/filter/ww8/wrtww8gr.cxx
index 7c8de88defdd..3ad22c34e0ac 100644
--- a/sw/source/filter/ww8/wrtww8gr.cxx
+++ b/sw/source/filter/ww8/wrtww8gr.cxx
@@ -170,12 +170,12 @@ bool WW8Export::TestOleNeedsGraphic(const SwAttrSet& rSet, tools::SvRef<SotStora
{
Graphic aGr1;
GraphicFilter& rGF = GraphicFilter::GetGraphicFilter();
- if( rGF.ImportGraphic( aGr1, OUString(), *pGraphicStream ) == ERRCODE_NONE )
+ if( rGF.ImportGraphic( aGr1, u"", *pGraphicStream ) == ERRCODE_NONE )
{
Graphic aGr2;
pGraphicStream =
::utl::UcbStreamHelper::CreateStream( aCnt.GetGraphicStream( pRet->GetObjRef() ) );
- if( pGraphicStream && rGF.ImportGraphic( aGr2, OUString(), *pGraphicStream ) == ERRCODE_NONE )
+ if( pGraphicStream && rGF.ImportGraphic( aGr2, u"", *pGraphicStream ) == ERRCODE_NONE )
{
if ( aGr1 == aGr2 )
bGraphicNeeded = false;
diff --git a/sw/source/filter/ww8/ww8graf2.cxx b/sw/source/filter/ww8/ww8graf2.cxx
index 68bf9eb1e760..1e70b91a8ffe 100644
--- a/sw/source/filter/ww8/ww8graf2.cxx
+++ b/sw/source/filter/ww8/ww8graf2.cxx
@@ -232,7 +232,7 @@ static void WW8PicShadowToReal( WW8_PIC_SHADOW const * pPicS, WW8_PIC* pPic
bool SwWW8ImplReader::GetPictGrafFromStream(Graphic& rGraphic, SvStream& rSrc)
{
- return ERRCODE_NONE == GraphicFilter::GetGraphicFilter().ImportGraphic(rGraphic, OUString(), rSrc);
+ return ERRCODE_NONE == GraphicFilter::GetGraphicFilter().ImportGraphic(rGraphic, u"", rSrc);
}
bool SwWW8ImplReader::ReadGrafFile(OUString& rFileName, std::unique_ptr<Graphic>& rpGraphic,
diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx
index 2b0b280d14ce..db1f5d86e0dc 100644
--- a/sw/source/uibase/app/docsh2.cxx
+++ b/sw/source/uibase/app/docsh2.cxx
@@ -1686,13 +1686,13 @@ SfxInPlaceClient* SwDocShell::GetIPClient( const ::svt::EmbeddedObjectRef& xObjR
int SwFindDocShell( SfxObjectShellRef& xDocSh,
SfxObjectShellLock& xLockRef,
- const OUString& rFileName,
+ std::u16string_view rFileName,
const OUString& rPasswd,
const OUString& rFilter,
sal_Int16 nVersion,
SwDocShell* pDestSh )
{
- if ( rFileName.isEmpty() )
+ if ( rFileName.empty() )
return 0;
// 1. Does the file already exist in the list of all Documents?
diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx
index 715f3f0d5cbc..332911df9973 100644
--- a/sw/source/uibase/dbui/dbmgr.cxx
+++ b/sw/source/uibase/dbui/dbmgr.cxx
@@ -2854,7 +2854,7 @@ void SwDBManager::StoreEmbeddedDataSource(const uno::Reference<frame::XStorable>
xStorable->storeAsURL(sTmpName, aSequence);
}
-OUString SwDBManager::LoadAndRegisterDataSource(const OUString &rURI, const OUString *pDestDir)
+OUString SwDBManager::LoadAndRegisterDataSource(std::u16string_view rURI, const OUString *pDestDir)
{
return LoadAndRegisterDataSource_Impl( DBConnURIType::UNKNOWN, nullptr, INetURLObject(rURI), pDestDir, nullptr );
}
diff --git a/tools/qa/cppunit/test_urlobj.cxx b/tools/qa/cppunit/test_urlobj.cxx
index abcd2fe1417b..8402fae5ed55 100644
--- a/tools/qa/cppunit/test_urlobj.cxx
+++ b/tools/qa/cppunit/test_urlobj.cxx
@@ -48,7 +48,7 @@ namespace tools_urlobj
// this is only demonstration code
void urlobjTest_001( )
{
- INetURLObject aUrl( OUString( "file://10.10.1.1/sampledir/sample.file" ) );
+ INetURLObject aUrl( u"file://10.10.1.1/sampledir/sample.file" );
CPPUNIT_ASSERT_EQUAL(INetProtocol::File, aUrl.GetProtocol());
CPPUNIT_ASSERT_EQUAL(OUString("10.10.1.1"),
aUrl.GetHost(INetURLObject::DecodeMechanism::NONE));
@@ -62,7 +62,7 @@ namespace tools_urlobj
void urlobjTest_004( )
{
- INetURLObject aUrl( OUString( "smb://10.10.1.1/sampledir/sample.file" ) );
+ INetURLObject aUrl( u"smb://10.10.1.1/sampledir/sample.file" );
CPPUNIT_ASSERT_EQUAL( INetProtocol::Smb, aUrl.GetProtocol( ) );
CPPUNIT_ASSERT_EQUAL(OUString("10.10.1.1"),
aUrl.GetHost(INetURLObject::DecodeMechanism::NONE));
@@ -77,7 +77,7 @@ namespace tools_urlobj
{
// Test with a username part
{
- INetURLObject aUrl( OUString( "vnd.libreoffice.cmis://username@http:%2F%2Ffoo.bar.com:8080%2Fmy%2Fcmis%2Fatom%23repo-id-encoded/path/to/content" ) );
+ INetURLObject aUrl( u"vnd.libreoffice.cmis://username@http:%2F%2Ffoo.bar.com:8080%2Fmy%2Fcmis%2Fatom%23repo-id-encoded/path/to/content" );
CPPUNIT_ASSERT_EQUAL( std::string( "http://foo.bar.com:8080/my/cmis/atom#repo-id-encoded" ),
OUSTR_TO_STDSTR( aUrl.GetHost( INetURLObject::DecodeMechanism::WithCharset ) ) );
CPPUNIT_ASSERT_EQUAL( std::string( "username" ), OUSTR_TO_STDSTR( aUrl.GetUser( ) ) );
@@ -88,8 +88,8 @@ namespace tools_urlobj
// Test without a username part
{
- INetURLObject aUrl( OUString(
- "vnd.libreoffice.cmis://http:%2F%2Ffoo.bar.com:8080%2Fmy%2Fcmis%2Fatom%23repo-id-encoded/path/to/content" ) );
+ INetURLObject aUrl(
+ u"vnd.libreoffice.cmis://http:%2F%2Ffoo.bar.com:8080%2Fmy%2Fcmis%2Fatom%23repo-id-encoded/path/to/content" );
CPPUNIT_ASSERT_EQUAL( std::string( "http://foo.bar.com:8080/my/cmis/atom#repo-id-encoded" ),
OUSTR_TO_STDSTR( aUrl.GetHost( INetURLObject::DecodeMechanism::WithCharset ) ) );
CPPUNIT_ASSERT( !aUrl.HasUserData() );
@@ -101,18 +101,18 @@ namespace tools_urlobj
void urlobjTest_emptyPath() {
{
- INetURLObject url(OUString("http://example.com"));
+ INetURLObject url(u"http://example.com");
CPPUNIT_ASSERT_EQUAL(INetProtocol::Http, url.GetProtocol());
CPPUNIT_ASSERT_EQUAL(OUString("example.com"), url.GetHost());
CPPUNIT_ASSERT_EQUAL(OUString("/"), url.GetURLPath());
}
{
// This is an invalid http URL per RFC 2616:
- INetURLObject url(OUString("http://example.com?query"));
+ INetURLObject url(u"http://example.com?query");
CPPUNIT_ASSERT(url.HasError());
}
{
- INetURLObject url(OUString("http://example.com#fragment"));
+ INetURLObject url(u"http://example.com#fragment");
CPPUNIT_ASSERT_EQUAL(INetProtocol::Http, url.GetProtocol());
CPPUNIT_ASSERT_EQUAL(OUString("example.com"), url.GetHost());
CPPUNIT_ASSERT_EQUAL(OUString("/"), url.GetURLPath());
@@ -125,19 +125,19 @@ namespace tools_urlobj
std::unique_ptr<SvMemoryStream> strm;
unsigned char const * buf;
- url = INetURLObject("data:");
+ url = INetURLObject(u"data:");
//TODO: CPPUNIT_ASSERT(url.HasError());
strm = url.getData();
CPPUNIT_ASSERT(!strm);
- url = INetURLObject("data:,");
+ url = INetURLObject(u"data:,");
CPPUNIT_ASSERT(!url.HasError());
strm = url.getData();
CPPUNIT_ASSERT(strm != nullptr);
CPPUNIT_ASSERT_EQUAL(sal_uInt64(0), strm->GetSize());
strm.reset();
- url = INetURLObject("data:,,%C3%A4%90");
+ url = INetURLObject(u"data:,,%C3%A4%90");
CPPUNIT_ASSERT(!url.HasError());
strm = url.getData();
CPPUNIT_ASSERT(strm != nullptr);
@@ -149,26 +149,26 @@ namespace tools_urlobj
CPPUNIT_ASSERT_EQUAL(0x90, int(buf[3]));
strm.reset();
- url = INetURLObject("data:base64,");
+ url = INetURLObject(u"data:base64,");
//TODO: CPPUNIT_ASSERT(url.HasError());
strm = url.getData();
CPPUNIT_ASSERT(!strm);
- url = INetURLObject("data:;base64,");
+ url = INetURLObject(u"data:;base64,");
CPPUNIT_ASSERT(!url.HasError());
strm = url.getData();
CPPUNIT_ASSERT(strm != nullptr);
CPPUNIT_ASSERT_EQUAL(sal_uInt64(0), strm->GetSize());
strm.reset();
- url = INetURLObject("data:;bAsE64,");
+ url = INetURLObject(u"data:;bAsE64,");
CPPUNIT_ASSERT(!url.HasError());
strm = url.getData();
CPPUNIT_ASSERT(strm != nullptr);
CPPUNIT_ASSERT_EQUAL(sal_uInt64(0), strm->GetSize());
strm.reset();
- url = INetURLObject("data:;base64,YWJjCg==");
+ url = INetURLObject(u"data:;base64,YWJjCg==");
CPPUNIT_ASSERT(!url.HasError());
strm = url.getData();
CPPUNIT_ASSERT(strm != nullptr);
@@ -180,17 +180,17 @@ namespace tools_urlobj
CPPUNIT_ASSERT_EQUAL(0x0A, int(buf[3]));
strm.reset();
- url = INetURLObject("data:;base64,YWJjCg=");
+ url = INetURLObject(u"data:;base64,YWJjCg=");
CPPUNIT_ASSERT(!url.HasError());
strm = url.getData();
CPPUNIT_ASSERT(!strm);
- url = INetURLObject("data:;base64,YWJ$Cg==");
+ url = INetURLObject(u"data:;base64,YWJ$Cg==");
CPPUNIT_ASSERT(!url.HasError());
strm = url.getData();
CPPUNIT_ASSERT(!strm);
- url = INetURLObject("data:text/plain;param=%22;base64,%22,YQ==");
+ url = INetURLObject(u"data:text/plain;param=%22;base64,%22,YQ==");
CPPUNIT_ASSERT(!url.HasError());
strm = url.getData();
CPPUNIT_ASSERT(strm != nullptr);
@@ -202,7 +202,7 @@ namespace tools_urlobj
CPPUNIT_ASSERT_EQUAL(0x3D, int(buf[3]));
strm.reset();
- url = INetURLObject("http://example.com");
+ url = INetURLObject(u"http://example.com");
CPPUNIT_ASSERT(!url.HasError());
strm = url.getData();
CPPUNIT_ASSERT(!strm);
@@ -212,62 +212,62 @@ namespace tools_urlobj
CPPUNIT_ASSERT(INetURLObject().isSchemeEqualTo(INetProtocol::NotValid));
CPPUNIT_ASSERT(!INetURLObject().isSchemeEqualTo(u""));
CPPUNIT_ASSERT(
- INetURLObject("http://example.org").isSchemeEqualTo(
+ INetURLObject(u"http://example.org").isSchemeEqualTo(
INetProtocol::Http));
CPPUNIT_ASSERT(
- !INetURLObject("http://example.org").isSchemeEqualTo(
+ !INetURLObject(u"http://example.org").isSchemeEqualTo(
INetProtocol::Https));
CPPUNIT_ASSERT(
- INetURLObject("http://example.org").isSchemeEqualTo(u"Http"));
+ INetURLObject(u"http://example.org").isSchemeEqualTo(u"Http"));
CPPUNIT_ASSERT(
- !INetURLObject("http://example.org").isSchemeEqualTo(u"dav"));
+ !INetURLObject(u"http://example.org").isSchemeEqualTo(u"dav"));
CPPUNIT_ASSERT(
- INetURLObject("dav://example.org").isSchemeEqualTo(u"dav"));
+ INetURLObject(u"dav://example.org").isSchemeEqualTo(u"dav"));
}
void urlobjTest_isAnyKnownWebDAVScheme() {
CPPUNIT_ASSERT(
- INetURLObject("http://example.org").isAnyKnownWebDAVScheme());
+ INetURLObject(u"http://example.org").isAnyKnownWebDAVScheme());
CPPUNIT_ASSERT(
- INetURLObject("https://example.org").isAnyKnownWebDAVScheme());
+ INetURLObject(u"https://example.org").isAnyKnownWebDAVScheme());
CPPUNIT_ASSERT(
- INetURLObject("vnd.sun.star.webdav://example.org").isAnyKnownWebDAVScheme());
+ INetURLObject(u"vnd.sun.star.webdav://example.org").isAnyKnownWebDAVScheme());
CPPUNIT_ASSERT(
- INetURLObject("vnd.sun.star.webdavs://example.org").isAnyKnownWebDAVScheme());
+ INetURLObject(u"vnd.sun.star.webdavs://example.org").isAnyKnownWebDAVScheme());
CPPUNIT_ASSERT(
- !INetURLObject("ftp://example.org").isAnyKnownWebDAVScheme());
+ !INetURLObject(u"ftp://example.org").isAnyKnownWebDAVScheme());
CPPUNIT_ASSERT(
- !INetURLObject("file://example.org").isAnyKnownWebDAVScheme());
+ !INetURLObject(u"file://example.org").isAnyKnownWebDAVScheme());
CPPUNIT_ASSERT(
- !INetURLObject("dav://example.org").isAnyKnownWebDAVScheme());
+ !INetURLObject(u"dav://example.org").isAnyKnownWebDAVScheme());
CPPUNIT_ASSERT(
- !INetURLObject("davs://example.org").isAnyKnownWebDAVScheme());
+ !INetURLObject(u"davs://example.org").isAnyKnownWebDAVScheme());
CPPUNIT_ASSERT(
- !INetURLObject("vnd.sun.star.pkg://example.org").isAnyKnownWebDAVScheme());
+ !INetURLObject(u"vnd.sun.star.pkg://example.org").isAnyKnownWebDAVScheme());
}
void testSetName() {
{
- INetURLObject obj("file:///");
+ INetURLObject obj(u"file:///");
bool ok = obj.setName(u"foo");
CPPUNIT_ASSERT(!ok);
}
{
- INetURLObject obj("file:///foo");
+ INetURLObject obj(u"file:///foo");
bool ok = obj.setName(u"bar");
CPPUNIT_ASSERT(ok);
CPPUNIT_ASSERT_EQUAL(
OUString("file:///bar"), obj.GetMainURL(INetURLObject::DecodeMechanism::NONE));
}
{
- INetURLObject obj("file:///foo/");
+ INetURLObject obj(u"file:///foo/");
bool ok = obj.setName(u"bar");
CPPUNIT_ASSERT(ok);
CPPUNIT_ASSERT_EQUAL(
OUString("file:///bar/"), obj.GetMainURL(INetURLObject::DecodeMechanism::NONE));
}
{
- INetURLObject obj("file:///foo/bar");
+ INetURLObject obj(u"file:///foo/bar");
bool ok = obj.setName(u"baz");
CPPUNIT_ASSERT(ok);
CPPUNIT_ASSERT_EQUAL(
@@ -275,7 +275,7 @@ namespace tools_urlobj
obj.GetMainURL(INetURLObject::DecodeMechanism::NONE));
}
{
- INetURLObject obj("file:///foo/bar/");
+ INetURLObject obj(u"file:///foo/bar/");
bool ok = obj.setName(u"baz");
CPPUNIT_ASSERT(ok);
CPPUNIT_ASSERT_EQUAL(
@@ -285,7 +285,7 @@ namespace tools_urlobj
}
void testSetExtension() {
- INetURLObject obj("file:///foo/bar.baz/");
+ INetURLObject obj(u"file:///foo/bar.baz/");
bool ok = obj.setExtension(
u"other", INetURLObject::LAST_SEGMENT, false);
CPPUNIT_ASSERT(ok);
@@ -295,7 +295,7 @@ namespace tools_urlobj
}
void testChangeScheme() {
- INetURLObject obj("unknown://example.com/foo/bar");
+ INetURLObject obj(u"unknown://example.com/foo/bar");
CPPUNIT_ASSERT(!obj.HasError());
obj.changeScheme(INetProtocol::Http);
CPPUNIT_ASSERT_EQUAL(
@@ -312,7 +312,7 @@ namespace tools_urlobj
}
void testTd146382() {
- INetURLObject obj("file://share.allotropia.de@SSL/DavWWWRoot/remote.php");
+ INetURLObject obj(u"file://share.allotropia.de@SSL/DavWWWRoot/remote.php");
CPPUNIT_ASSERT(!obj.HasError());
CPPUNIT_ASSERT_EQUAL(
OUString("file://share.allotropia.de@SSL/DavWWWRoot/remote.php"),
@@ -323,7 +323,7 @@ namespace tools_urlobj
{
{
// host:port must not be misinterpreted as scheme:path
- INetURLObject obj("example.com:8080/foo", INetProtocol::Http);
+ INetURLObject obj(u"example.com:8080/foo", INetProtocol::Http);
CPPUNIT_ASSERT(!obj.HasError());
CPPUNIT_ASSERT_EQUAL(OUString("http://example.com:8080/foo"),
obj.GetMainURL(INetURLObject::DecodeMechanism::NONE));
@@ -334,7 +334,7 @@ namespace tools_urlobj
}
{
// port may only contain decimal digits, so this must be treated as unknown scheme
- INetURLObject obj("example.com:80a0/foo", INetProtocol::Http);
+ INetURLObject obj(u"example.com:80a0/foo", INetProtocol::Http);
CPPUNIT_ASSERT(!obj.HasError());
CPPUNIT_ASSERT_EQUAL(OUString("example.com:80a0/foo"),
obj.GetMainURL(INetURLObject::DecodeMechanism::NONE));
diff --git a/tools/source/fsys/urlobj.cxx b/tools/source/fsys/urlobj.cxx
index a4bc5ab0922d..4d7a73999e7f 100644
--- a/tools/source/fsys/urlobj.cxx
+++ b/tools/source/fsys/urlobj.cxx
@@ -719,14 +719,14 @@ OUString parseScheme(
}
-bool INetURLObject::setAbsURIRef(OUString const & rTheAbsURIRef,
+bool INetURLObject::setAbsURIRef(std::u16string_view rTheAbsURIRef,
EncodeMechanism eMechanism,
rtl_TextEncoding eCharset,
bool bSmart,
FSysStyle eStyle)
{
- sal_Unicode const * pPos = rTheAbsURIRef.getStr();
- sal_Unicode const * pEnd = pPos + rTheAbsURIRef.getLength();
+ sal_Unicode const * pPos = rTheAbsURIRef.data();
+ sal_Unicode const * pEnd = pPos + rTheAbsURIRef.size();
setInvalid();
@@ -3200,13 +3200,13 @@ failed:
return false;
}
-bool INetURLObject::setPath(OUString const & rThePath,
+bool INetURLObject::setPath(std::u16string_view rThePath,
EncodeMechanism eMechanism,
rtl_TextEncoding eCharset)
{
OUStringBuffer aSynPath(256);
- sal_Unicode const * p = rThePath.getStr();
- sal_Unicode const * pEnd = p + rThePath.getLength();
+ sal_Unicode const * p = rThePath.data();
+ sal_Unicode const * pEnd = p + rThePath.size();
if (!parsePath(m_eScheme, &p, pEnd, eMechanism, eCharset, false,
'/', 0x80000000, 0x80000000, 0x80000000, aSynPath)
|| p != pEnd)
@@ -3773,7 +3773,7 @@ bool INetURLObject::ConcatData(INetProtocol eTheScheme,
std::u16string_view rThePassword,
std::u16string_view rTheHost,
sal_uInt32 nThePort,
- OUString const & rThePath)
+ std::u16string_view rThePath)
{
setInvalid();
m_eScheme = eTheScheme;
@@ -3885,8 +3885,8 @@ bool INetURLObject::ConcatData(INetProtocol eTheScheme,
}
}
OUStringBuffer aSynPath(256);
- sal_Unicode const * p = rThePath.getStr();
- sal_Unicode const * pEnd = p + rThePath.getLength();
+ sal_Unicode const * p = rThePath.data();
+ sal_Unicode const * pEnd = p + rThePath.size();
if (!parsePath(m_eScheme, &p, pEnd, EncodeMechanism::WasEncoded, RTL_TEXTENCODING_UTF8, false, '/',
0x80000000, 0x80000000, 0x80000000, aSynPath)
|| p != pEnd)
@@ -3900,7 +3900,7 @@ bool INetURLObject::ConcatData(INetProtocol eTheScheme,
}
// static
-OUString INetURLObject::GetAbsURL(OUString const & rTheBaseURIRef,
+OUString INetURLObject::GetAbsURL(std::u16string_view rTheBaseURIRef,
OUString const & rTheRelURIRef,
EncodeMechanism eEncodeMechanism,
DecodeMechanism eDecodeMechanism,
@@ -4102,9 +4102,9 @@ bool INetURLObject::setName(std::u16string_view rTheName, EncodeMechanism eMecha
++p;
return setPath(
- std::u16string_view(pPathBegin, pSegBegin - pPathBegin)
+ rtl::OUStringConcatenation(std::u16string_view(pPathBegin, pSegBegin - pPathBegin)
+ encodeText(rTheName, PART_PCHAR, eMechanism, eCharset, true)
- + std::u16string_view(p, pPathEnd - p),
+ + std::u16string_view(p, pPathEnd - p)),
EncodeMechanism::NotCanonical,
RTL_TEXTENCODING_UTF8);
}
@@ -4179,9 +4179,9 @@ bool INetURLObject::setBase(std::u16string_view rTheBase, sal_Int32 nIndex,
pExtension = p;
return setPath(
- std::u16string_view(pPathBegin, pSegBegin - pPathBegin)
+ rtl::OUStringConcatenation(std::u16string_view(pPathBegin, pSegBegin - pPathBegin)
+ encodeText(rTheBase, PART_PCHAR, eMechanism, eCharset, true)
- + std::u16string_view(pExtension, pPathEnd - pExtension),
+ + std::u16string_view(pExtension, pPathEnd - pExtension)),
EncodeMechanism::NotCanonical,
RTL_TEXTENCODING_UTF8);
}
@@ -4239,9 +4239,9 @@ bool INetURLObject::setExtension(std::u16string_view rTheExtension,
pExtension = p;
return setPath(
- OUString::Concat(std::u16string_view(pPathBegin, pExtension - pPathBegin)) + "."
+ rtl::OUStringConcatenation(OUString::Concat(std::u16string_view(pPathBegin, pExtension - pPathBegin)) + "."
+ encodeText(rTheExtension, PART_PCHAR, EncodeMechanism::WasEncoded, eCharset, true)
- + std::u16string_view(p, pPathEnd - p),
+ + std::u16string_view(p, pPathEnd - p)),
EncodeMechanism::NotCanonical,
RTL_TEXTENCODING_UTF8);
}
diff --git a/tools/source/inet/inetmsg.cxx b/tools/source/inet/inetmsg.cxx
index bb8a700d16f1..d58581e74200 100644
--- a/tools/source/inet/inetmsg.cxx
+++ b/tools/source/inet/inetmsg.cxx
@@ -22,6 +22,8 @@
#include <tools/inetmsg.hxx>
#include <comphelper/string.hxx>
#include <rtl/character.hxx>
+#include <o3tl/safeint.hxx>
+#include <o3tl/string_view.hxx>
#include <map>
@@ -52,32 +54,32 @@ static const char *months[12] =
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
};
-static sal_uInt16 ParseNumber(const OString& rStr, sal_Int32& nIndex)
+static sal_uInt16 ParseNumber(std::string_view rStr, size_t& nIndex)
{
- sal_Int32 n = nIndex;
- while ((n < rStr.getLength())
+ size_t n = nIndex;
+ while ((n < rStr.size())
&& rtl::isAsciiDigit(static_cast<unsigned char>(rStr[n])))
n++;
- OString aNum(rStr.copy(nIndex, (n - nIndex)));
+ std::string_view aNum(rStr.substr(nIndex, (n - nIndex)));
nIndex = n;
- return static_cast<sal_uInt16>(aNum.toInt32());
+ return static_cast<sal_uInt16>(o3tl::toInt32(aNum));
}
-static sal_uInt16 ParseMonth(const OString& rStr, sal_Int32& nIndex)
+static sal_uInt16 ParseMonth(std::string_view rStr, size_t& nIndex)
{
- sal_Int32 n = nIndex;
- while ((n < rStr.getLength())
+ size_t n = nIndex;
+ while ((n < rStr.size())
&& rtl::isAsciiAlpha(static_cast<unsigned char>(rStr[n])))
n++;
- OString aMonth(rStr.copy(nIndex, 3));
+ std::string_view aMonth(rStr.substr(nIndex, 3));
nIndex = n;
sal_uInt16 i;
for (i = 0; i < 12; i++)
- if (aMonth.equalsIgnoreAsciiCase(months[i])) break;
+ if (o3tl::equalsIgnoreAsciiCase(aMonth, months[i])) break;
return (i + 1);
}
@@ -92,20 +94,20 @@ bool INetMIMEMessage::ParseDateField (
if (aDateField.indexOf(':') != -1)
{
// Some DateTime format.
- sal_Int32 nIndex = 0;
+ size_t nIndex = 0;
// Skip over <Wkd> or <Weekday>, leading and trailing space.
- while ((nIndex < aDateField.getLength()) &&
+ while ((nIndex < o3tl::make_unsigned(aDateField.getLength())) &&
(aDateField[nIndex] == ' '))
nIndex++;
while (
- (nIndex < aDateField.getLength()) &&
+ (nIndex < o3tl::make_unsigned(aDateField.getLength())) &&
(rtl::isAsciiAlpha (static_cast<unsigned char>(aDateField[nIndex])) ||
(aDateField[nIndex] == ',') ))
nIndex++;
- while ((nIndex < aDateField.getLength()) &&
+ while ((nIndex < o3tl::make_unsigned(aDateField.getLength())) &&
(aDateField[nIndex] == ' '))
nIndex++;
@@ -143,7 +145,7 @@ bool INetMIMEMessage::ParseDateField (
rDateTime.SetSec (ParseNumber (aDateField, nIndex)); nIndex++;
rDateTime.SetNanoSec (0);
- const char cPossiblePlusMinus = nIndex < aDateField.getLength() ? aDateField[nIndex] : 0;
+ const char cPossiblePlusMinus = nIndex < o3tl::make_unsigned(aDateField.getLength()) ? aDateField[nIndex] : 0;
if (cPossiblePlusMinus == '+' || cPossiblePlusMinus == '-')
{
// Offset from GMT: "(+|-)HHMM".
diff --git a/ucb/source/core/FileAccess.cxx b/ucb/source/core/FileAccess.cxx
index 88dfd9dadc3c..e282d6b10c6d 100644
--- a/ucb/source/core/FileAccess.cxx
+++ b/ucb/source/core/FileAccess.cxx
@@ -84,7 +84,7 @@ class OFileAccess : public FileAccessHelper
/// @throws CommandAbortedException
/// @throws Exception
/// @throws RuntimeException
- void transferImpl( const OUString& rSource, const OUString& rDest, bool bMoveData );
+ void transferImpl( const OUString& rSource, std::u16string_view rDest, bool bMoveData );
/// @throws Exception
bool createNewFile( const OUString & rParentURL,
const OUString & rTitle,
@@ -199,7 +199,7 @@ Reference< XProgressHandler > OCommandEnvironment::getProgressHandler()
}
void OFileAccess::transferImpl( const OUString& rSource,
- const OUString& rDest,
+ std::u16string_view rDest,
bool bMoveData )
{
// SfxContentHelper::Transfer_Impl
diff --git a/ucb/source/ucp/cmis/cmis_url.cxx b/ucb/source/ucp/cmis/cmis_url.cxx
index 66f214f2ab40..eefe32fcb832 100644
--- a/ucb/source/ucp/cmis/cmis_url.cxx
+++ b/ucb/source/ucp/cmis/cmis_url.cxx
@@ -16,7 +16,7 @@
namespace cmis
{
- URL::URL( OUString const & urlStr )
+ URL::URL( std::u16string_view urlStr )
{
INetURLObject aUrl( urlStr );
diff --git a/ucb/source/ucp/cmis/cmis_url.hxx b/ucb/source/ucp/cmis/cmis_url.hxx
index 5c5240ee5d1e..2346bf1e0102 100644
--- a/ucb/source/ucp/cmis/cmis_url.hxx
+++ b/ucb/source/ucp/cmis/cmis_url.hxx
@@ -23,7 +23,7 @@ namespace cmis
OUString m_sPass;
public:
- explicit URL( OUString const & urlStr );
+ explicit URL( std::u16string_view urlStr );
const OUString& getObjectPath() const { return m_sPath; }
const OUString& getObjectId() const { return m_sId; }
diff --git a/unotools/source/ucbhelper/ucbhelper.cxx b/unotools/source/ucbhelper/ucbhelper.cxx
index e6a31ef318bb..9ce532ab3e3e 100644
--- a/unotools/source/ucbhelper/ucbhelper.cxx
+++ b/unotools/source/ucbhelper/ucbhelper.cxx
@@ -388,7 +388,7 @@ bool utl::UCBContentHelper::EqualURLs(
bool utl::UCBContentHelper::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
{
try
{
diff --git a/vcl/inc/unx/fontmanager.hxx b/vcl/inc/unx/fontmanager.hxx
index 6c839b21997b..e7ee08c4c193 100644
--- a/vcl/inc/unx/fontmanager.hxx
+++ b/vcl/inc/unx/fontmanager.hxx
@@ -211,7 +211,7 @@ public:
static PrintFontManager& get(); // one instance only
// There may be multiple font ids for font collections
- std::vector<fontID> addFontFile( const OUString& rFileUrl );
+ std::vector<fontID> addFontFile( std::u16string_view rFileUrl );
void initialize();
diff --git a/vcl/inc/unx/genpspgraphics.h b/vcl/inc/unx/genpspgraphics.h
index 75c1e4cd0852..c55947c8bdb2 100644
--- a/vcl/inc/unx/genpspgraphics.h
+++ b/vcl/inc/unx/genpspgraphics.h
@@ -92,7 +92,7 @@ public:
const OUString& rFileURL,
const OUString& rFontName ) override;
static bool AddTempDevFontHelper( vcl::font::PhysicalFontCollection* pFontCollection,
- const OUString& rFileURL,
+ std::u16string_view rFileURL,
const OUString& rFontName);
virtual bool CreateFontSubset( const OUString& rToFile,
diff --git a/vcl/qa/cppunit/GraphicDescriptorTest.cxx b/vcl/qa/cppunit/GraphicDescriptorTest.cxx
index 865202cedbf5..ace1a6c90a28 100644
--- a/vcl/qa/cppunit/GraphicDescriptorTest.cxx
+++ b/vcl/qa/cppunit/GraphicDescriptorTest.cxx
@@ -61,7 +61,7 @@ void createBitmapAndExportForType(SvStream& rStream, std::u16string_view sType)
uno::Sequence<beans::PropertyValue> aFilterData;
GraphicFilter& rGraphicFilter = GraphicFilter::GetGraphicFilter();
sal_uInt16 nFilterFormat = rGraphicFilter.GetExportFormatNumberForShortName(sType);
- rGraphicFilter.ExportGraphic(aBitmapEx, "none", rStream, nFilterFormat, &aFilterData);
+ rGraphicFilter.ExportGraphic(aBitmapEx, u"none", rStream, nFilterFormat, &aFilterData);
rStream.Seek(STREAM_SEEK_TO_BEGIN);
}
diff --git a/vcl/qa/cppunit/GraphicTest.cxx b/vcl/qa/cppunit/GraphicTest.cxx
index 2e398c544c79..4bdd2854cae8 100644
--- a/vcl/qa/cppunit/GraphicTest.cxx
+++ b/vcl/qa/cppunit/GraphicTest.cxx
@@ -161,7 +161,7 @@ void createBitmapAndExportForType(SvStream& rStream, std::u16string_view sType,
uno::Sequence<beans::PropertyValue> aFilterData;
GraphicFilter& rGraphicFilter = GraphicFilter::GetGraphicFilter();
sal_uInt16 nFilterFormat = rGraphicFilter.GetExportFormatNumberForShortName(sType);
- rGraphicFilter.ExportGraphic(aBitmapEx, "none", rStream, nFilterFormat, &aFilterData);
+ rGraphicFilter.ExportGraphic(aBitmapEx, u"none", rStream, nFilterFormat, &aFilterData);
rStream.Seek(STREAM_SEEK_TO_BEGIN);
}
@@ -250,9 +250,8 @@ Graphic loadGraphic(std::u16string_view const& rFilename)
GraphicFilter& rGraphicFilter = GraphicFilter::GetGraphicFilter();
Graphic aGraphic;
- CPPUNIT_ASSERT_EQUAL(
- ERRCODE_NONE,
- rGraphicFilter.ImportGraphic(aGraphic, OUString(), aFileStream, GRFILTER_FORMAT_DONTKNOW));
+ CPPUNIT_ASSERT_EQUAL(ERRCODE_NONE, rGraphicFilter.ImportGraphic(aGraphic, u"", aFileStream,
+ GRFILTER_FORMAT_DONTKNOW));
return aGraphic;
}
@@ -336,7 +335,7 @@ void GraphicTest::testUnloadedGraphicWmf()
Graphic aGraphic(aBitmapEx);
aGraphic.SetPrefSize(Size(99, 99));
aGraphic.SetPrefMapMode(MapMode(MapUnit::Map100thMM));
- rGraphicFilter.ExportGraphic(aGraphic, "none", aStream, nFilterFormat);
+ rGraphicFilter.ExportGraphic(aGraphic, u"none", aStream, nFilterFormat);
aStream.Seek(STREAM_SEEK_TO_BEGIN);
// Now lazy-load this WMF data, with a custom preferred size of 42x42.
@@ -404,7 +403,7 @@ void GraphicTest::testWMFRoundtrip()
aTempFile.EnableKillingFile();
sal_uInt16 nFormat = rGraphicFilter.GetExportFormatNumberForShortName(u"WMF");
SvStream& rOutStream = *aTempFile.GetStream(StreamMode::READWRITE);
- rGraphicFilter.ExportGraphic(aGraphic, OUString(), rOutStream, nFormat);
+ rGraphicFilter.ExportGraphic(aGraphic, u"", rOutStream, nFormat);
// Check if we preserved the WMF data perfectly.
sal_uInt64 nActualSize = rOutStream.TellEnd();
@@ -470,7 +469,7 @@ void GraphicTest::testWMFWithEmfPlusRoundtrip()
else
{
sal_uInt16 nFormat = rGraphicFilter.GetExportFormatNumberForShortName(u"WMF");
- rGraphicFilter.ExportGraphic(aGraphic, OUString(), rOutStream, nFormat);
+ rGraphicFilter.ExportGraphic(aGraphic, u"", rOutStream, nFormat);
}
CPPUNIT_ASSERT_EQUAL(nExpectedSize, rOutStream.TellEnd());
@@ -502,14 +501,14 @@ void GraphicTest::testEmfToWmfConversion()
// This similar to an application/x-openoffice-wmf mime type in manifest.xml in the ODF case.
sal_uInt16 nFormat = aGraphicFilter.GetImportFormatNumberForShortName(u"WMF");
CPPUNIT_ASSERT_EQUAL(ERRCODE_NONE,
- aGraphicFilter.ImportGraphic(aGraphic, OUString(), aStream, nFormat));
+ aGraphicFilter.ImportGraphic(aGraphic, u"", aStream, nFormat));
CPPUNIT_ASSERT_EQUAL(VectorGraphicDataType::Wmf, aGraphic.getVectorGraphicData()->getType());
// Save as WMF.
sal_uInt16 nFilterType = aGraphicFilter.GetExportFormatNumberForShortName(u"WMF");
SvMemoryStream aGraphicStream;
- CPPUNIT_ASSERT_EQUAL(ERRCODE_NONE, aGraphicFilter.ExportGraphic(aGraphic, OUString(),
- aGraphicStream, nFilterType));
+ CPPUNIT_ASSERT_EQUAL(ERRCODE_NONE,
+ aGraphicFilter.ExportGraphic(aGraphic, u"", aGraphicStream, nFilterType));
aGraphicStream.Seek(0);
vcl::GraphicFormatDetector aDetector(aGraphicStream, OUString());
CPPUNIT_ASSERT(aDetector.detect());
@@ -524,8 +523,8 @@ void GraphicTest::testEmfToWmfConversion()
// Import the WMF result and check for traces of EMF+ in it.
Graphic aWmfGraphic;
aGraphicStream.Seek(0);
- CPPUNIT_ASSERT_EQUAL(ERRCODE_NONE, aGraphicFilter.ImportGraphic(aWmfGraphic, OUString(),
- aGraphicStream, nFormat));
+ CPPUNIT_ASSERT_EQUAL(ERRCODE_NONE,
+ aGraphicFilter.ImportGraphic(aWmfGraphic, u"", aGraphicStream, nFormat));
int nCommentCount = 0;
for (size_t i = 0; i < aWmfGraphic.GetGDIMetaFile().GetActionSize(); ++i)
{
diff --git a/vcl/qa/cppunit/graphicfilter/filters-test.cxx b/vcl/qa/cppunit/graphicfilter/filters-test.cxx
index f10de06fc837..e065cf6b5d09 100644
--- a/vcl/qa/cppunit/graphicfilter/filters-test.cxx
+++ b/vcl/qa/cppunit/graphicfilter/filters-test.cxx
@@ -119,14 +119,14 @@ void VclFiltersTest::checkExportImport(std::u16string_view aFilterShortName)
};
sal_uInt16 aFilterType = mpGraphicFilter->GetExportFormatNumberForShortName(aFilterShortName);
- mpGraphicFilter->ExportGraphic(BitmapEx(aBitmap), OUString(), aStream, aFilterType, &aFilterData );
+ mpGraphicFilter->ExportGraphic(BitmapEx(aBitmap), u"", aStream, aFilterType, &aFilterData );
CPPUNIT_ASSERT(aStream.Tell() > 0);
aStream.Seek( STREAM_SEEK_TO_BEGIN );
Graphic aLoadedGraphic;
- mpGraphicFilter->ImportGraphic( aLoadedGraphic, OUString(), aStream );
+ mpGraphicFilter->ImportGraphic( aLoadedGraphic, u"", aStream );
BitmapEx aLoadedBitmapEx = aLoadedGraphic.GetBitmapEx();
Size aSize = aLoadedBitmapEx.GetSizePixel();
diff --git a/vcl/qa/cppunit/graphicfilter/filters-tiff-test.cxx b/vcl/qa/cppunit/graphicfilter/filters-tiff-test.cxx
index 77e412088bf3..72f12ca565f5 100644
--- a/vcl/qa/cppunit/graphicfilter/filters-tiff-test.cxx
+++ b/vcl/qa/cppunit/graphicfilter/filters-tiff-test.cxx
@@ -193,11 +193,11 @@ void TiffFilterTest::testRoundtrip()
SvMemoryStream aStream;
GraphicFilter& rFilter = GraphicFilter::GetGraphicFilter();
sal_uInt16 nFilterFormat = rFilter.GetExportFormatNumberForShortName(u"tif");
- rFilter.ExportGraphic(Graphic(BitmapEx(aBitmap)), "none", aStream, nFilterFormat);
+ rFilter.ExportGraphic(Graphic(BitmapEx(aBitmap)), u"none", aStream, nFilterFormat);
aStream.Seek(STREAM_SEEK_TO_BEGIN);
Graphic aGraphic;
- ErrCode bResult = rFilter.ImportGraphic(aGraphic, "none", aStream);
+ ErrCode bResult = rFilter.ImportGraphic(aGraphic, u"none", aStream);
CPPUNIT_ASSERT_EQUAL(ERRCODE_NONE, bResult);
CPPUNIT_ASSERT_EQUAL(GfxLinkType::NativeTif, aGraphic.GetGfxLink().GetType());
Bitmap aResultBitmap = aGraphic.GetBitmapEx().GetBitmap();
diff --git a/vcl/qa/cppunit/graphicfilter/filters-webp-test.cxx b/vcl/qa/cppunit/graphicfilter/filters-webp-test.cxx
index 90528199c0ba..f9d0bfa842dc 100644
--- a/vcl/qa/cppunit/graphicfilter/filters-webp-test.cxx
+++ b/vcl/qa/cppunit/graphicfilter/filters-webp-test.cxx
@@ -111,11 +111,11 @@ void WebpFilterTest::testRoundtrip(bool lossy)
comphelper::makePropertyValue("Lossless", !lossy),
comphelper::makePropertyValue("Quality", sal_Int32(100))
};
- rFilter.ExportGraphic(Graphic(aBitmapEx), "none", aStream, nFilterFormat, &aFilterData);
+ rFilter.ExportGraphic(Graphic(aBitmapEx), u"none", aStream, nFilterFormat, &aFilterData);
aStream.Seek(STREAM_SEEK_TO_BEGIN);
Graphic aGraphic;
- ErrCode bResult = rFilter.ImportGraphic(aGraphic, "none", aStream);
+ ErrCode bResult = rFilter.ImportGraphic(aGraphic, u"none", aStream);
CPPUNIT_ASSERT_EQUAL(ERRCODE_NONE, bResult);
CPPUNIT_ASSERT_EQUAL(GfxLinkType::NativeWebp, aGraphic.GetGfxLink().GetType());
BitmapEx aResultBitmap = aGraphic.GetBitmapEx();
@@ -172,7 +172,7 @@ void WebpFilterTest::testRead(bool lossy, bool alpha)
SvFileStream aFileStream(file, StreamMode::READ);
Graphic aGraphic;
GraphicFilter& rFilter = GraphicFilter::GetGraphicFilter();
- ErrCode bResult = rFilter.ImportGraphic(aGraphic, "none", aFileStream);
+ ErrCode bResult = rFilter.ImportGraphic(aGraphic, u"none", aFileStream);
CPPUNIT_ASSERT_EQUAL(ERRCODE_NONE, bResult);
CPPUNIT_ASSERT_EQUAL(GfxLinkType::NativeWebp, aGraphic.GetGfxLink().GetType());
BitmapEx aResultBitmap = aGraphic.GetBitmapEx();
diff --git a/vcl/qa/cppunit/jpeg/JpegWriterTest.cxx b/vcl/qa/cppunit/jpeg/JpegWriterTest.cxx
index f999c018df7c..f9b58c30843b 100644
--- a/vcl/qa/cppunit/jpeg/JpegWriterTest.cxx
+++ b/vcl/qa/cppunit/jpeg/JpegWriterTest.cxx
@@ -60,7 +60,7 @@ BitmapEx JpegWriterTest::roundtripJPG(const BitmapEx& bitmap)
GraphicFilter& rFilter = GraphicFilter::GetGraphicFilter();
sal_uInt16 exportFormatJPG = rFilter.GetExportFormatNumberForShortName(JPG_SHORTNAME);
Graphic aExportGraphic(bitmap);
- ErrCode bResult = rFilter.ExportGraphic(aExportGraphic, "memory", aStream, exportFormatJPG);
+ ErrCode bResult = rFilter.ExportGraphic(aExportGraphic, u"memory", aStream, exportFormatJPG);
CPPUNIT_ASSERT_EQUAL(ERRCODE_NONE, bResult);
//Detect the magic bytes - we need to be sure the file is actually a JPEG
aStream.Seek(0);
@@ -71,7 +71,7 @@ BitmapEx JpegWriterTest::roundtripJPG(const BitmapEx& bitmap)
aStream.Seek(0);
Graphic aImportGraphic;
sal_uInt16 importFormatJPG = rFilter.GetImportFormatNumberForShortName(JPG_SHORTNAME);
- bResult = rFilter.ImportGraphic(aImportGraphic, "memory", aStream, importFormatJPG);
+ bResult = rFilter.ImportGraphic(aImportGraphic, u"memory", aStream, importFormatJPG);
CPPUNIT_ASSERT_EQUAL(ERRCODE_NONE, bResult);
return aImportGraphic.GetBitmapEx();
}
diff --git a/vcl/qa/cppunit/pdfexport/pdfexport.cxx b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
index 42d9e15668e3..0bfebea97464 100644
--- a/vcl/qa/cppunit/pdfexport/pdfexport.cxx
+++ b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
@@ -1747,7 +1747,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf121615)
GraphicFilter& rFilter = GraphicFilter::GetGraphicFilter();
Graphic aGraphic;
sal_uInt16 format;
- ErrCode bResult = rFilter.ImportGraphic(aGraphic, OUString("import"), rObjectStream,
+ ErrCode bResult = rFilter.ImportGraphic(aGraphic, u"import", rObjectStream,
GRFILTER_FORMAT_DONTKNOW, &format);
CPPUNIT_ASSERT_EQUAL(ERRCODE_NONE, bResult);
@@ -1795,7 +1795,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf141171)
GraphicFilter& rFilter = GraphicFilter::GetGraphicFilter();
Graphic aGraphic;
sal_uInt16 format;
- ErrCode bResult = rFilter.ImportGraphic(aGraphic, OUString("import"), rObjectStream,
+ ErrCode bResult = rFilter.ImportGraphic(aGraphic, u"import", rObjectStream,
GRFILTER_FORMAT_DONTKNOW, &format);
CPPUNIT_ASSERT_EQUAL(ERRCODE_NONE, bResult);
@@ -1852,7 +1852,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf129085)
GraphicFilter& rFilter = GraphicFilter::GetGraphicFilter();
Graphic aGraphic;
sal_uInt16 format;
- ErrCode bResult = rFilter.ImportGraphic(aGraphic, OUString("import"), rObjectStream,
+ ErrCode bResult = rFilter.ImportGraphic(aGraphic, u"import", rObjectStream,
GRFILTER_FORMAT_DONTKNOW, &format);
CPPUNIT_ASSERT_EQUAL(ERRCODE_NONE, bResult);
diff --git a/vcl/source/app/brand.cxx b/vcl/source/app/brand.cxx
index d7aee00c19ae..57db30d458e4 100644
--- a/vcl/source/app/brand.cxx
+++ b/vcl/source/app/brand.cxx
@@ -34,7 +34,7 @@
#include <vcl/svapp.hxx>
namespace {
- bool loadPng( const OUString & rPath, BitmapEx &rBitmap)
+ bool loadPng( std::u16string_view rPath, BitmapEx &rBitmap)
{
INetURLObject aObj( rPath );
SvFileStream aStrm( aObj.PathToFileName(), StreamMode::STD_READ );
@@ -48,7 +48,7 @@ namespace {
}
bool tryLoadPng( std::u16string_view rBaseDir, std::u16string_view rName, BitmapEx& rBitmap )
{
- return loadPng( OUString::Concat(rBaseDir) + "/" LIBO_ETC_FOLDER + rName, rBitmap);
+ return loadPng( rtl::OUStringConcatenation(OUString::Concat(rBaseDir) + "/" LIBO_ETC_FOLDER + rName), rBitmap);
}
}
diff --git a/vcl/source/filter/GraphicNativeTransform.cxx b/vcl/source/filter/GraphicNativeTransform.cxx
index f2eaefe9d05b..792dd6a93a8f 100644
--- a/vcl/source/filter/GraphicNativeTransform.cxx
+++ b/vcl/source/filter/GraphicNativeTransform.cxx
@@ -103,12 +103,12 @@ bool GraphicNativeTransform::rotateGeneric(Degree10 aRotation, std::u16string_vi
BitmapEx aBitmap = mrGraphic.GetBitmapEx();
aBitmap.Rotate(aRotation, COL_BLACK);
- rFilter.ExportGraphic(aBitmap, "none", aStream, nFilterFormat, &aFilterData);
+ rFilter.ExportGraphic(aBitmap, u"none", aStream, nFilterFormat, &aFilterData);
aStream.Seek(STREAM_SEEK_TO_BEGIN);
Graphic aGraphic;
- rFilter.ImportGraphic(aGraphic, "import", aStream);
+ rFilter.ImportGraphic(aGraphic, u"import", aStream);
mrGraphic = aGraphic;
return true;
@@ -156,7 +156,7 @@ void GraphicNativeTransform::rotateJPEG(Degree10 aRotation)
Graphic aGraphic;
GraphicFilter& rFilter = GraphicFilter::GetGraphicFilter();
- rFilter.ImportGraphic(aGraphic, "import", aTargetStream);
+ rFilter.ImportGraphic(aGraphic, u"import", aTargetStream);
mrGraphic = aGraphic;
}
}
diff --git a/vcl/source/filter/graphicfilter.cxx b/vcl/source/filter/graphicfilter.cxx
index 758052856f9b..9bc7eea56566 100644
--- a/vcl/source/filter/graphicfilter.cxx
+++ b/vcl/source/filter/graphicfilter.cxx
@@ -157,7 +157,7 @@ sal_uInt8* ImplSearchEntry( sal_uInt8* pSource, sal_uInt8 const * pDest, sal_uLo
return nullptr;
}
-static OUString ImpGetExtension( const OUString &rPath )
+static OUString ImpGetExtension( std::u16string_view rPath )
{
OUString aExt;
INetURLObject aURL( rPath );
@@ -202,7 +202,7 @@ bool isPCT(SvStream& rStream, sal_uLong nStreamPos, sal_uLong nStreamLen)
return false;
}
-ErrCode GraphicFilter::ImpTestOrFindFormat( const OUString& rPath, SvStream& rStream, sal_uInt16& rFormat )
+ErrCode GraphicFilter::ImpTestOrFindFormat( std::u16string_view rPath, SvStream& rStream, sal_uInt16& rFormat )
{
// determine or check the filter/format by reading into it
if( rFormat == GRFILTER_FORMAT_DONTKNOW )
@@ -215,7 +215,7 @@ ErrCode GraphicFilter::ImpTestOrFindFormat( const OUString& rPath, SvStream& rSt
return ERRCODE_NONE;
}
// determine filter by file extension
- if( !rPath.isEmpty() )
+ if( !rPath.empty() )
{
OUString aExt( ImpGetExtension( rPath ) );
rFormat = pConfig->GetImportFormatNumberForExtension( aExt );
@@ -506,7 +506,7 @@ ErrCode GraphicFilter::CanImportGraphic( const INetURLObject& rPath,
return nRetValue;
}
-ErrCode GraphicFilter::CanImportGraphic( const OUString& rMainUrl, SvStream& rIStream,
+ErrCode GraphicFilter::CanImportGraphic( std::u16string_view rMainUrl, SvStream& rIStream,
sal_uInt16 nFormat, sal_uInt16* pDeterminedFormat )
{
sal_uInt64 nStreamPos = rIStream.Tell();
@@ -538,7 +538,7 @@ ErrCode GraphicFilter::ImportGraphic( Graphic& rGraphic, const INetURLObject& rP
ErrCode GraphicFilter::ImportGraphic(
Graphic& rGraphic,
- const OUString& rPath,
+ std::u16string_view rPath,
SvStream& rIStream,
sal_uInt16 nFormat,
sal_uInt16* pDeterminedFormat,
@@ -638,7 +638,7 @@ void GraphicFilter::ImportGraphics(std::vector< std::shared_ptr<Graphic> >& rGra
ResetLastError();
rContext.m_nStreamBegin = rContext.m_pStream->Tell();
sal_uInt16 nFormat = GRFILTER_FORMAT_DONTKNOW;
- rContext.m_nStatus = ImpTestOrFindFormat(OUString(), *rContext.m_pStream, nFormat);
+ rContext.m_nStatus = ImpTestOrFindFormat(u"", *rContext.m_pStream, nFormat);
rContext.m_pStream->Seek(rContext.m_nStreamBegin);
// Import the graphic.
@@ -797,7 +797,7 @@ Graphic GraphicFilter::ImportUnloadedGraphic(SvStream& rIStream, sal_uInt64 size
rIStream.Seek(nStreamBegin);
- ErrCode nStatus = ImpTestOrFindFormat("", rIStream, nFormat);
+ ErrCode nStatus = ImpTestOrFindFormat(u"", rIStream, nFormat);
rIStream.Seek(nStreamBegin);
sal_uInt32 nStreamLength(rIStream.remainingSize());
@@ -1345,7 +1345,7 @@ ErrCode GraphicFilter::readWEBP(SvStream & rStream, Graphic & rGraphic, GfxLinkT
return ERRCODE_GRFILTER_FILTERERROR;
}
-ErrCode GraphicFilter::ImportGraphic( Graphic& rGraphic, const OUString& rPath, SvStream& rIStream,
+ErrCode GraphicFilter::ImportGraphic( Graphic& rGraphic, std::u16string_view rPath, SvStream& rIStream,
sal_uInt16 nFormat, sal_uInt16* pDeterminedFormat, GraphicFilterImportFlags nImportFlags,
const css::uno::Sequence< css::beans::PropertyValue >* /*pFilterData*/,
WmfExternal const *pExtHeader )
@@ -1567,7 +1567,7 @@ ErrCode GraphicFilter::ExportGraphic( const Graphic& rGraphic, const INetURLObje
return nRetValue;
}
-ErrCode GraphicFilter::ExportGraphic( const Graphic& rGraphic, const OUString& rPath,
+ErrCode GraphicFilter::ExportGraphic( const Graphic& rGraphic, std::u16string_view rPath,
SvStream& rOStm, sal_uInt16 nFormat, const css::uno::Sequence< css::beans::PropertyValue >* pFilterData )
{
SAL_INFO( "vcl.filter", "GraphicFilter::ExportGraphic() (thb)" );
@@ -1943,7 +1943,7 @@ IMPL_LINK( GraphicFilter, FilterCallback, ConvertData&, rData, bool )
{
// Import
nFormat = GetImportFormatNumberForShortName( aShortName );
- bRet = ImportGraphic( rData.maGraphic, OUString(), rData.mrStm, nFormat ) == ERRCODE_NONE;
+ bRet = ImportGraphic( rData.maGraphic, u"", rData.mrStm, nFormat ) == ERRCODE_NONE;
}
else if( !aShortName.isEmpty() )
{
@@ -1959,7 +1959,7 @@ IMPL_LINK( GraphicFilter, FilterCallback, ConvertData&, rData, bool )
}
#endif
nFormat = GetExportFormatNumberForShortName( aShortName );
- bRet = ExportGraphic( rData.maGraphic, OUString(), rData.mrStm, nFormat, &aFilterData ) == ERRCODE_NONE;
+ bRet = ExportGraphic( rData.maGraphic, u"", rData.mrStm, nFormat, &aFilterData ) == ERRCODE_NONE;
}
return bRet;
@@ -2040,7 +2040,7 @@ ErrCode GraphicFilter::compressAsPNG(const Graphic& rGraphic, SvStream& rOutputS
"Compression", sal_uInt32(9)) };
sal_uInt16 nFilterFormat = GetExportFormatNumberForShortName(u"PNG");
- return ExportGraphic(rGraphic, OUString(), rOutputStream, nFilterFormat, &aFilterData);
+ return ExportGraphic(rGraphic, u"", rOutputStream, nFilterFormat, &aFilterData);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/gdi/gfxlink.cxx b/vcl/source/gdi/gfxlink.cxx
index 0baddbf931ae..e959e465149a 100644
--- a/vcl/source/gdi/gfxlink.cxx
+++ b/vcl/source/gdi/gfxlink.cxx
@@ -141,7 +141,7 @@ bool GfxLink::LoadNative( Graphic& rGraphic ) const
{
GraphicFilter& rFilter = GraphicFilter::GetGraphicFilter();
sal_uInt16 nFormat = rFilter.GetImportFormatNumberForShortName(aShortName);
- ErrCode nResult = rFilter.ImportGraphic(rGraphic, OUString(), aMemoryStream, nFormat);
+ ErrCode nResult = rFilter.ImportGraphic(rGraphic, u"", aMemoryStream, nFormat);
if (nResult == ERRCODE_NONE)
bRet = true;
}
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index 18f07651528b..c80e5e1c4e81 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -5057,7 +5057,7 @@ sal_Int32 PDFWriterImpl::emitNamedDestinations()
// directly with a reader (provided the reader has the feature) we
// need to set the name of the destination the same way it will be encoded
// in an Internet link
- INetURLObject aLocalURL( "http://ahost.ax" ); //dummy location, won't be used
+ INetURLObject aLocalURL( u"http://ahost.ax" ); //dummy location, won't be used
aLocalURL.SetMark( rDest.m_aDestName );
const OUString aName = aLocalURL.GetMark( INetURLObject::DecodeMechanism::NONE ); //same coding as
diff --git a/vcl/source/treelist/imap.cxx b/vcl/source/treelist/imap.cxx
index c0dd97770a27..84a0717c6252 100644
--- a/vcl/source/treelist/imap.cxx
+++ b/vcl/source/treelist/imap.cxx
@@ -107,7 +107,7 @@ void IMapObject::Read( SvStream& rIStm )
aTarget = read_uInt16_lenPrefixed_uInt8s_ToOUString(rIStm, nTextEncoding);
// make URL absolute
- aURL = URIHelper::SmartRel2Abs( INetURLObject(""), aURL, URIHelper::GetMaybeFileHdl(), true, false, INetURLObject::EncodeMechanism::WasEncoded, INetURLObject::DecodeMechanism::Unambiguous );
+ aURL = URIHelper::SmartRel2Abs( INetURLObject(u""), aURL, URIHelper::GetMaybeFileHdl(), true, false, INetURLObject::EncodeMechanism::WasEncoded, INetURLObject::DecodeMechanism::Unambiguous );
IMapCompat aCompat( rIStm, StreamMode::READ );
ReadIMapObject( rIStm );
diff --git a/vcl/source/treelist/imap2.cxx b/vcl/source/treelist/imap2.cxx
index 889b2c061d92..ef78e86bb42d 100644
--- a/vcl/source/treelist/imap2.cxx
+++ b/vcl/source/treelist/imap2.cxx
@@ -361,7 +361,7 @@ OUString ImageMap::ImpReadCERNURL( const char** ppStr )
aStr = comphelper::string::strip(aStr, ' ');
aStr = comphelper::string::strip(aStr, '\t');
- return INetURLObject::GetAbsURL( "", aStr );
+ return INetURLObject::GetAbsURL( u"", aStr );
}
void ImageMap::ImpReadNCSA( SvStream& rIStm )
@@ -445,7 +445,7 @@ OUString ImageMap::ImpReadNCSAURL( const char** ppStr )
}
}
- return INetURLObject::GetAbsURL( "", aStr.makeStringAndClear() );
+ return INetURLObject::GetAbsURL( u"", aStr.makeStringAndClear() );
}
Point ImageMap::ImpReadNCSACoords( const char** ppStr )
diff --git a/vcl/source/treelist/transfer.cxx b/vcl/source/treelist/transfer.cxx
index 73c3df80015d..91132addfa94 100644
--- a/vcl/source/treelist/transfer.cxx
+++ b/vcl/source/treelist/transfer.cxx
@@ -1557,7 +1557,7 @@ bool TransferableDataHelper::GetBitmapEx( const DataFlavor& rFlavor, BitmapEx& r
// it's a JPEG, import to BitmapEx
GraphicFilter& rFilter = GraphicFilter::GetGraphicFilter();
Graphic aGraphic;
- if (rFilter.ImportGraphic(aGraphic, "", *xStm) == ERRCODE_NONE)
+ if (rFilter.ImportGraphic(aGraphic, u"", *xStm) == ERRCODE_NONE)
rBmpEx = aGraphic.GetBitmapEx();
}
diff --git a/vcl/unx/generic/fontmanager/fontmanager.cxx b/vcl/unx/generic/fontmanager/fontmanager.cxx
index eb2b869217b3..3388c273b974 100644
--- a/vcl/unx/generic/fontmanager/fontmanager.cxx
+++ b/vcl/unx/generic/fontmanager/fontmanager.cxx
@@ -150,7 +150,7 @@ int PrintFontManager::getDirectoryAtom( const OString& rDirectory )
return nAtom;
}
-std::vector<fontID> PrintFontManager::addFontFile( const OUString& rFileUrl )
+std::vector<fontID> PrintFontManager::addFontFile( std::u16string_view rFileUrl )
{
rtl_TextEncoding aEncoding = osl_getThreadTextEncoding();
INetURLObject aPath( rFileUrl );
diff --git a/vcl/unx/generic/print/genpspgraphics.cxx b/vcl/unx/generic/print/genpspgraphics.cxx
index 3e30cb74fce7..41409d7a07a5 100644
--- a/vcl/unx/generic/print/genpspgraphics.cxx
+++ b/vcl/unx/generic/print/genpspgraphics.cxx
@@ -239,7 +239,7 @@ bool GenPspGraphics::AddTempDevFont( vcl::font::PhysicalFontCollection*, const O
}
bool GenPspGraphics::AddTempDevFontHelper( vcl::font::PhysicalFontCollection* pFontCollection,
- const OUString& rFileURL,
+ std::u16string_view rFileURL,
const OUString& rFontName)
{
// inform PSP font manager
diff --git a/vcl/workben/svpclient.cxx b/vcl/workben/svpclient.cxx
index 584ad041d62a..b8774548547f 100644
--- a/vcl/workben/svpclient.cxx
+++ b/vcl/workben/svpclient.cxx
@@ -267,7 +267,7 @@ IMPL_LINK_NOARG( MyWin, SelectHdl, ListBox&, void)
Graphic aGraphicResult;
GraphicFilter &rFilter = GraphicFilter::GetGraphicFilter();
- rFilter.ImportGraphic( aGraphicResult, OUString("import"), aStream );
+ rFilter.ImportGraphic( aGraphicResult, u"import", aStream );
BitmapEx aBitmap = aGraphicResult.GetBitmapEx();
diff --git a/xmlsecurity/workben/pdfverify.cxx b/xmlsecurity/workben/pdfverify.cxx
index 0951eb7c5e65..6a68da04a1a1 100644
--- a/xmlsecurity/workben/pdfverify.cxx
+++ b/xmlsecurity/workben/pdfverify.cxx
@@ -42,7 +42,7 @@ void generatePreview(std::string_view rPdfPath, std::string_view rPngPath)
osl::FileBase::getFileURLFromSystemPath(OUString::fromUtf8(rPdfPath), aInURL);
SvFileStream aInStream(aInURL, StreamMode::READ);
WmfExternal* pExtHeader = nullptr;
- if (rFilter.ImportGraphic(aGraphic, OUString(), aInStream, GRFILTER_FORMAT_DONTKNOW, nullptr,
+ if (rFilter.ImportGraphic(aGraphic, u"", aInStream, GRFILTER_FORMAT_DONTKNOW, nullptr,
GraphicFilterImportFlags::NONE, pExtHeader)
!= ERRCODE_NONE)
return;