summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2016-12-05 08:47:18 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2016-12-05 12:49:02 +0200
commitbfde4866e07746eafa2f0d6173c29d805cc35ad0 (patch)
treebe939a44eb70c7187fa5536089b782326b160013
parent803215142efa6437515348f63bd70ffdcf5d45f1 (diff)
convert DecodeMechanism to scoped enum
Change-Id: I5c56634b1bca8e37fa73d02d2428645301b6c547
-rw-r--r--avmedia/source/gstreamer/gstmanager.cxx2
-rw-r--r--avmedia/source/macavf/manager.mm2
-rw-r--r--avmedia/source/quicktime/manager.mm2
-rw-r--r--avmedia/source/viewer/mediawindow.cxx4
-rw-r--r--avmedia/source/viewer/mediawindow_impl.cxx2
-rw-r--r--avmedia/source/win/manager.cxx2
-rw-r--r--basctl/source/basicide/baside3.cxx2
-rw-r--r--basctl/source/basicide/moduldl2.cxx16
-rw-r--r--basic/source/basmgr/basmgr.cxx14
-rw-r--r--basic/source/runtime/methods.cxx10
-rw-r--r--basic/source/runtime/methods1.cxx2
-rw-r--r--basic/source/uno/namecont.cxx70
-rw-r--r--basic/source/uno/scriptcont.cxx8
-rw-r--r--comphelper/source/misc/documentinfo.cxx2
-rw-r--r--connectivity/source/drivers/calc/CConnection.cxx2
-rw-r--r--connectivity/source/drivers/dbase/DTable.cxx30
-rw-r--r--connectivity/source/drivers/file/FConnection.cxx2
-rw-r--r--connectivity/source/drivers/file/FDatabaseMetaData.cxx6
-rw-r--r--connectivity/source/drivers/flat/ETable.cxx2
-rw-r--r--cui/source/dialogs/cuigaldlg.cxx10
-rw-r--r--cui/source/dialogs/hldocntp.cxx12
-rw-r--r--cui/source/dialogs/hlinettp.cxx4
-rw-r--r--cui/source/dialogs/hlmailtp.cxx2
-rw-r--r--cui/source/dialogs/hltpbase.cxx6
-rw-r--r--cui/source/dialogs/insdlg.cxx6
-rw-r--r--cui/source/dialogs/linkdlg.cxx6
-rw-r--r--cui/source/dialogs/multipat.cxx4
-rw-r--r--cui/source/options/doclinkdialog.cxx2
-rw-r--r--cui/source/options/optjava.cxx4
-rw-r--r--cui/source/options/optlingu.cxx2
-rw-r--r--cui/source/options/optpath.cxx2
-rw-r--r--cui/source/tabpages/numpages.cxx2
-rw-r--r--cui/source/tabpages/tplnedef.cxx8
-rw-r--r--cui/source/tabpages/tplneend.cxx8
-rw-r--r--dbaccess/source/core/dataaccess/databasecontext.cxx2
-rw-r--r--dbaccess/source/core/dataaccess/databasedocument.cxx2
-rw-r--r--dbaccess/source/core/dataaccess/datasource.cxx2
-rw-r--r--dbaccess/source/ext/macromigration/macromigrationpages.cxx2
-rw-r--r--dbaccess/source/filter/xml/xmlfilter.cxx4
-rw-r--r--dbaccess/source/ui/app/AppController.cxx6
-rw-r--r--dbaccess/source/ui/browser/dbloader.cxx2
-rw-r--r--dbaccess/source/ui/browser/unodatbr.cxx6
-rw-r--r--dbaccess/source/ui/control/opendoccontrols.cxx4
-rw-r--r--dbaccess/source/ui/dlg/ConnectionHelper.cxx8
-rw-r--r--dbaccess/source/ui/dlg/dbfindex.cxx2
-rw-r--r--dbaccess/source/ui/dlg/dbwizsetup.cxx14
-rw-r--r--dbaccess/source/ui/misc/TableCopyHelper.cxx2
-rw-r--r--dbaccess/source/ui/misc/UITools.cxx4
-rw-r--r--desktop/source/app/app.cxx2
-rw-r--r--desktop/source/migration/migration.cxx6
-rw-r--r--desktop/source/migration/services/basicmigration.cxx4
-rw-r--r--desktop/source/migration/services/oo3extensionmigration.cxx4
-rw-r--r--desktop/source/migration/services/wordbookmigration.cxx4
-rw-r--r--editeng/source/editeng/eehtml.cxx2
-rw-r--r--editeng/source/items/flditem.cxx8
-rw-r--r--editeng/source/misc/acorrcfg.cxx2
-rw-r--r--editeng/source/misc/svxacorr.cxx8
-rw-r--r--extensions/source/abpilot/abpfinalpage.cxx2
-rw-r--r--extensions/source/abpilot/datasourcehandling.cxx2
-rw-r--r--extensions/source/dbpilots/controlwizard.cxx2
-rw-r--r--extensions/source/propctrlr/formcomponenthandler.cxx2
-rw-r--r--filter/source/config/cache/filtercache.cxx2
-rw-r--r--filter/source/config/cache/typedetection.cxx2
-rw-r--r--filter/source/msfilter/escherex.cxx2
-rw-r--r--filter/source/msfilter/msdffimp.cxx4
-rw-r--r--filter/source/pdf/pdfexport.cxx2
-rw-r--r--filter/source/storagefilterdetect/filterdetect.cxx2
-rw-r--r--filter/source/textfilterdetect/filterdetect.cxx2
-rw-r--r--filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx4
-rw-r--r--filter/source/xsltdialog/xmlfiltertestdialog.cxx2
-rw-r--r--filter/source/xsltfilter/XSLTFilter.cxx4
-rw-r--r--forms/source/component/Button.cxx2
-rw-r--r--forms/source/component/DatabaseForm.cxx10
-rw-r--r--forms/source/component/ImageButton.cxx2
-rw-r--r--forms/source/richtext/richtextvclcontrol.cxx2
-rw-r--r--forms/source/xforms/submission/replace.cxx2
-rw-r--r--forms/source/xforms/submission/submission_get.cxx2
-rw-r--r--forms/source/xforms/submission/submission_post.cxx2
-rw-r--r--forms/source/xforms/submission/submission_put.cxx2
-rw-r--r--fpicker/source/office/OfficeFilePicker.cxx6
-rw-r--r--fpicker/source/office/OfficeFolderPicker.cxx2
-rw-r--r--fpicker/source/office/RemoteFilesDialog.cxx14
-rw-r--r--fpicker/source/office/iodlg.cxx42
-rw-r--r--fpicker/source/office/iodlgimp.cxx2
-rw-r--r--framework/source/fwe/helper/titlehelper.cxx8
-rw-r--r--framework/source/services/substitutepathvars.cxx6
-rw-r--r--framework/source/services/uriabbreviation.cxx2
-rw-r--r--framework/source/services/urltransformer.cxx24
-rw-r--r--framework/source/uielement/generictoolbarcontroller.cxx2
-rw-r--r--framework/source/uielement/recentfilesmenucontroller.cxx2
-rw-r--r--include/svl/urihelper.hxx4
-rw-r--r--include/svtools/place.hxx2
-rw-r--r--include/tools/urlobj.hxx50
-rw-r--r--linguistic/source/convdiclist.cxx6
-rw-r--r--linguistic/source/dlistimp.cxx2
-rw-r--r--linguistic/source/misc2.cxx4
-rw-r--r--sc/source/core/data/documen2.cxx2
-rw-r--r--sc/source/core/data/documen8.cxx2
-rw-r--r--sc/source/core/data/document.cxx6
-rw-r--r--sc/source/core/data/global2.cxx6
-rw-r--r--sc/source/core/data/globalx.cxx2
-rw-r--r--sc/source/core/tool/autoform.cxx4
-rw-r--r--sc/source/core/tool/compiler.cxx4
-rw-r--r--sc/source/core/tool/formulalogger.cxx2
-rw-r--r--sc/source/core/tool/interpr1.cxx2
-rw-r--r--sc/source/filter/excel/xecontent.cxx4
-rw-r--r--sc/source/filter/excel/xicontent.cxx2
-rw-r--r--sc/source/filter/lotus/lotus.cxx2
-rw-r--r--sc/source/filter/xcl97/xcl97rec.cxx2
-rw-r--r--sc/source/ui/app/drwtrans.cxx2
-rw-r--r--sc/source/ui/app/inputhdl.cxx2
-rw-r--r--sc/source/ui/docshell/docsh.cxx2
-rw-r--r--sc/source/ui/docshell/docsh8.cxx12
-rw-r--r--sc/source/ui/docshell/externalrefmgr.cxx6
-rw-r--r--sc/source/ui/formdlg/formula.cxx2
-rw-r--r--sc/source/ui/vba/vbaworkbook.cxx4
-rw-r--r--sc/source/ui/view/gridwin5.cxx2
-rw-r--r--sc/source/ui/view/prevwsh.cxx4
-rw-r--r--sc/source/ui/view/printfun.cxx4
-rw-r--r--sc/source/ui/view/tabvwsh3.cxx2
-rw-r--r--sc/source/ui/view/tabvwsh4.cxx4
-rw-r--r--sc/source/ui/view/viewfun4.cxx2
-rw-r--r--sc/source/ui/xmlsource/xmlsourcedlg.cxx2
-rw-r--r--scripting/source/dlgprov/dlgprov.cxx2
-rw-r--r--scripting/source/provider/MasterScriptProvider.cxx2
-rw-r--r--scripting/source/stringresource/stringresource.cxx2
-rw-r--r--sd/source/filter/cgm/sdcgmfilter.cxx2
-rw-r--r--sd/source/filter/eppt/epptso.cxx4
-rw-r--r--sd/source/filter/grf/sdgrffilter.cxx2
-rw-r--r--sd/source/filter/html/htmlex.cxx4
-rw-r--r--sd/source/filter/html/pubdlg.cxx8
-rw-r--r--sd/source/filter/ppt/pptin.cxx10
-rw-r--r--sd/source/ui/app/sdmod.cxx2
-rw-r--r--sd/source/ui/dlg/PhotoAlbumDialog.cxx6
-rw-r--r--sd/source/ui/dlg/navigatr.cxx2
-rw-r--r--sd/source/ui/dlg/sdtreelb.cxx2
-rw-r--r--sd/source/ui/dlg/tpaction.cxx4
-rw-r--r--sd/source/ui/func/fudraw.cxx10
-rw-r--r--sd/source/ui/func/fuinsert.cxx2
-rw-r--r--sd/source/ui/func/fusel.cxx4
-rw-r--r--sd/source/ui/func/futext.cxx2
-rw-r--r--sd/source/ui/sidebar/MasterPageDescriptor.cxx2
-rw-r--r--sd/source/ui/slideshow/slideshowimpl.cxx4
-rw-r--r--sd/source/ui/unoidl/UnoDocumentSettings.cxx2
-rw-r--r--sd/source/ui/view/drviews3.cxx2
-rw-r--r--sd/source/ui/view/drviewse.cxx2
-rw-r--r--sd/source/ui/view/sdview4.cxx2
-rw-r--r--sfx2/source/appl/appdde.cxx8
-rw-r--r--sfx2/source/appl/appopen.cxx2
-rw-r--r--sfx2/source/appl/macroloader.cxx6
-rw-r--r--sfx2/source/appl/newhelp.cxx2
-rw-r--r--sfx2/source/appl/opengrf.cxx6
-rw-r--r--sfx2/source/appl/sfxhelp.cxx2
-rw-r--r--sfx2/source/appl/sfxpicklist.cxx4
-rw-r--r--sfx2/source/appl/shutdowniconaqua.mm2
-rw-r--r--sfx2/source/bastyp/fltfnc.cxx4
-rw-r--r--sfx2/source/bastyp/frmhtmlw.cxx2
-rw-r--r--sfx2/source/bastyp/helper.cxx4
-rw-r--r--sfx2/source/control/recentdocsview.cxx2
-rw-r--r--sfx2/source/control/recentdocsviewitem.cxx2
-rw-r--r--sfx2/source/control/unoctitm.cxx2
-rw-r--r--sfx2/source/dialog/dinfdlg.cxx6
-rw-r--r--sfx2/source/dialog/filedlghelper.cxx24
-rw-r--r--sfx2/source/dialog/mailmodel.cxx8
-rw-r--r--sfx2/source/doc/docfile.cxx76
-rw-r--r--sfx2/source/doc/docinsert.cxx2
-rw-r--r--sfx2/source/doc/docmacromode.cxx2
-rw-r--r--sfx2/source/doc/doctempl.cxx22
-rw-r--r--sfx2/source/doc/doctemplates.cxx74
-rw-r--r--sfx2/source/doc/frmdescr.cxx2
-rw-r--r--sfx2/source/doc/guisaveas.cxx22
-rw-r--r--sfx2/source/doc/iframe.cxx4
-rw-r--r--sfx2/source/doc/objcont.cxx2
-rw-r--r--sfx2/source/doc/objmisc.cxx26
-rw-r--r--sfx2/source/doc/objstor.cxx8
-rw-r--r--sfx2/source/doc/objxtor.cxx2
-rw-r--r--sfx2/source/doc/printhelper.cxx4
-rw-r--r--sfx2/source/doc/sfxbasemodel.cxx2
-rw-r--r--sfx2/source/doc/templatedlg.cxx4
-rw-r--r--sfx2/source/inet/inettbc.cxx2
-rw-r--r--sfx2/source/notify/eventsupplier.cxx2
-rw-r--r--sfx2/source/view/viewfrm.cxx8
-rw-r--r--sfx2/source/view/viewfrm2.cxx2
-rw-r--r--sfx2/source/view/viewsh.cxx4
-rw-r--r--slideshow/source/engine/shapes/shapeimporter.cxx2
-rw-r--r--slideshow/source/engine/soundplayer.cxx2
-rw-r--r--sot/source/sdstor/storage.cxx4
-rw-r--r--sot/source/sdstor/ucbstorage.cxx6
-rw-r--r--svgio/source/svgreader/svgnode.cxx2
-rw-r--r--svl/source/fsstor/fsstorage.cxx74
-rw-r--r--svl/source/misc/filenotation.cxx2
-rw-r--r--svl/source/misc/inethist.cxx10
-rw-r--r--svl/source/misc/lockfilecommon.cxx4
-rw-r--r--svl/source/misc/urihelper.cxx12
-rw-r--r--svtools/source/contnr/fileview.cxx12
-rw-r--r--svtools/source/contnr/foldertree.cxx4
-rw-r--r--svtools/source/control/breadcrumb.cxx4
-rw-r--r--svtools/source/control/inettbc.cxx42
-rw-r--r--svtools/source/dialogs/PlaceEditDialog.cxx10
-rw-r--r--svtools/source/dialogs/ServerDetailsControls.cxx4
-rw-r--r--svtools/source/dialogs/addresstemplate.cxx4
-rw-r--r--svtools/source/misc/imagemgr.cxx6
-rw-r--r--svtools/source/misc/imap.cxx2
-rw-r--r--svtools/source/misc/templatefoldercache.cxx6
-rw-r--r--svtools/source/misc/transfer.cxx2
-rw-r--r--svx/source/core/graphichelper.cxx4
-rw-r--r--svx/source/dialog/docrecovery.cxx6
-rw-r--r--svx/source/dialog/imapdlg.cxx6
-rw-r--r--svx/source/dialog/imapwnd.cxx2
-rw-r--r--svx/source/form/databaselocationinput.cxx2
-rw-r--r--svx/source/form/datanavi.cxx2
-rw-r--r--svx/source/form/fmpage.cxx2
-rw-r--r--svx/source/gallery2/galbrws1.cxx2
-rw-r--r--svx/source/gallery2/galbrws2.cxx6
-rw-r--r--svx/source/gallery2/galctrl.cxx4
-rw-r--r--svx/source/gallery2/galexpl.cxx2
-rw-r--r--svx/source/gallery2/galini.cxx2
-rw-r--r--svx/source/gallery2/gallery1.cxx12
-rw-r--r--svx/source/gallery2/galmisc.cxx24
-rw-r--r--svx/source/gallery2/galobj.cxx2
-rw-r--r--svx/source/gallery2/galtheme.cxx66
-rw-r--r--svx/source/gengal/gengal.cxx6
-rw-r--r--svx/source/sidebar/nbdtmg.cxx4
-rw-r--r--svx/source/svdraw/svdomedia.cxx2
-rw-r--r--svx/source/svdraw/svdotxln.cxx6
-rw-r--r--svx/source/unogallery/unogalitem.cxx2
-rw-r--r--svx/source/xoutdev/_xoutbmp.cxx18
-rw-r--r--svx/source/xoutdev/xtable.cxx6
-rw-r--r--sw/qa/core/uwriter.cxx6
-rw-r--r--sw/source/core/doc/DocumentLinksAdministrationManager.cxx2
-rw-r--r--sw/source/core/doc/docglbl.cxx2
-rw-r--r--sw/source/core/doc/notxtfrm.cxx2
-rw-r--r--sw/source/core/doc/visiturl.cxx2
-rw-r--r--sw/source/core/draw/dpage.cxx4
-rw-r--r--sw/source/core/edit/edglss.cxx4
-rw-r--r--sw/source/core/fields/docufld.cxx8
-rw-r--r--sw/source/core/graphic/ndgrf.cxx2
-rw-r--r--sw/source/core/swg/SwXMLTextBlocks.cxx2
-rw-r--r--sw/source/core/swg/swblocks.cxx2
-rw-r--r--sw/source/core/text/EnhancedPDFExportHelper.cxx2
-rw-r--r--sw/source/core/unocore/swunohelper.cxx6
-rw-r--r--sw/source/filter/basflt/iodetect.cxx2
-rw-r--r--sw/source/filter/basflt/shellio.cxx4
-rw-r--r--sw/source/filter/html/SwAppletImpl.cxx2
-rw-r--r--sw/source/filter/html/htmlgrin.cxx2
-rw-r--r--sw/source/filter/html/htmlplug.cxx2
-rw-r--r--sw/source/filter/html/wrthtml.cxx2
-rw-r--r--sw/source/filter/ww8/wrtw8esh.cxx2
-rw-r--r--sw/source/filter/ww8/wrtw8nds.cxx6
-rw-r--r--sw/source/filter/ww8/ww8par.cxx6
-rw-r--r--sw/source/filter/xml/xmltexti.cxx4
-rw-r--r--sw/source/ui/chrdlg/chardlg.cxx2
-rw-r--r--sw/source/ui/dbui/addresslistdialog.cxx2
-rw-r--r--sw/source/ui/dbui/createaddresslistdialog.cxx2
-rw-r--r--sw/source/ui/dbui/mmresultdialogs.cxx6
-rw-r--r--sw/source/ui/dialog/uiregionsw.cxx12
-rw-r--r--sw/source/ui/frmdlg/frmpage.cxx4
-rw-r--r--sw/source/ui/index/cnttab.cxx2
-rw-r--r--sw/source/ui/misc/glosbib.cxx2
-rw-r--r--sw/source/ui/vba/vbatemplate.cxx2
-rw-r--r--sw/source/uibase/app/docsh.cxx2
-rw-r--r--sw/source/uibase/app/docsh2.cxx2
-rw-r--r--sw/source/uibase/config/uinums.cxx2
-rw-r--r--sw/source/uibase/dbui/dbmgr.cxx26
-rw-r--r--sw/source/uibase/dochdl/gloshdl.cxx2
-rw-r--r--sw/source/uibase/dochdl/swdtflvr.cxx10
-rw-r--r--sw/source/uibase/docvw/edtwin2.cxx2
-rw-r--r--sw/source/uibase/shells/grfsh.cxx2
-rw-r--r--sw/source/uibase/uiview/view2.cxx4
-rw-r--r--sw/source/uibase/uno/unoatxt.cxx2
-rw-r--r--sw/source/uibase/uno/unomailmerge.cxx4
-rw-r--r--sw/source/uibase/utlui/content.cxx4
-rw-r--r--sw/source/uibase/utlui/glbltree.cxx10
-rw-r--r--sw/source/uibase/utlui/navipi.cxx2
-rw-r--r--toolkit/source/awt/animatedimagespeer.cxx2
-rw-r--r--toolkit/source/controls/controlmodelcontainerbase.cxx2
-rw-r--r--tools/qa/cppunit/test_urlobj.cxx56
-rw-r--r--tools/source/fsys/urlobj.cxx42
-rw-r--r--ucb/source/core/FileAccess.cxx46
-rw-r--r--ucb/source/ucp/cmis/cmis_content.cxx8
-rw-r--r--ucb/source/ucp/cmis/cmis_url.cxx10
-rw-r--r--unotools/source/config/pathoptions.cxx16
-rw-r--r--unotools/source/ucbhelper/ucbhelper.cxx14
-rw-r--r--uui/source/fltdlg.cxx2
-rw-r--r--uui/source/passworddlg.cxx2
-rw-r--r--vbahelper/source/vbahelper/vbadocumentbase.cxx2
-rw-r--r--vcl/source/filter/graphicfilter.cxx8
-rw-r--r--vcl/source/filter/graphicfilter2.cxx2
-rw-r--r--vcl/source/filter/sgvmain.cxx4
-rw-r--r--vcl/source/gdi/impgraph.cxx10
-rw-r--r--vcl/source/gdi/pdfwriter_impl.cxx12
-rw-r--r--vcl/source/image/ImplImageTree.cxx2
-rw-r--r--vcl/unx/generic/fontmanager/fontmanager.cxx4
-rw-r--r--vcl/unx/generic/fontmanager/helper.cxx2
-rw-r--r--vcl/unx/generic/printer/ppdparser.cxx6
-rw-r--r--vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx4
-rw-r--r--xmloff/source/core/xmlexp.cxx4
-rw-r--r--xmloff/source/core/xmlimp.cxx6
-rw-r--r--xmloff/source/draw/eventimp.cxx2
299 files changed, 989 insertions, 989 deletions
diff --git a/avmedia/source/gstreamer/gstmanager.cxx b/avmedia/source/gstreamer/gstmanager.cxx
index d12a66e34f88..f064cb13a388 100644
--- a/avmedia/source/gstreamer/gstmanager.cxx
+++ b/avmedia/source/gstreamer/gstmanager.cxx
@@ -46,7 +46,7 @@ uno::Reference< media::XPlayer > SAL_CALL Manager::createPlayer( const OUString&
uno::Reference< media::XPlayer > xRet( pPlayer );
const INetURLObject aURL( rURL );
- if( !pPlayer->create( aURL.GetMainURL( INetURLObject::DECODE_UNAMBIGUOUS ) ) )
+ if( !pPlayer->create( aURL.GetMainURL( INetURLObject::DecodeMechanism::Unambiguous ) ) )
xRet.clear();
return xRet;
diff --git a/avmedia/source/macavf/manager.mm b/avmedia/source/macavf/manager.mm
index 1283cb54101e..a8ff2ec2928d 100644
--- a/avmedia/source/macavf/manager.mm
+++ b/avmedia/source/macavf/manager.mm
@@ -46,7 +46,7 @@ uno::Reference< media::XPlayer > SAL_CALL Manager::createPlayer( const ::rtl::OU
OSL_TRACE( "avmediamacavf: Manager::createPlayer" );
- if( !pPlayer->create( aURL.GetMainURL( INetURLObject::DECODE_UNAMBIGUOUS ) ) )
+ if( !pPlayer->create( aURL.GetMainURL( INetURLObject::DecodeMechanism::Unambiguous ) ) )
xRet.clear();
return xRet;
diff --git a/avmedia/source/quicktime/manager.mm b/avmedia/source/quicktime/manager.mm
index 0b2ac8ded0e5..bcb27b6d4073 100644
--- a/avmedia/source/quicktime/manager.mm
+++ b/avmedia/source/quicktime/manager.mm
@@ -47,7 +47,7 @@ uno::Reference< media::XPlayer > SAL_CALL Manager::createPlayer( const ::rtl::OU
SAL_INFO( "avmedia.quicktime", "Manager::createPlayer" );
- if( !pPlayer->create( aURL.GetMainURL( INetURLObject::DECODE_UNAMBIGUOUS ) ) )
+ if( !pPlayer->create( aURL.GetMainURL( INetURLObject::DecodeMechanism::Unambiguous ) ) )
xRet.clear();
return xRet;
diff --git a/avmedia/source/viewer/mediawindow.cxx b/avmedia/source/viewer/mediawindow.cxx
index 9ae9070190b9..312bf09b868d 100644
--- a/avmedia/source/viewer/mediawindow.cxx
+++ b/avmedia/source/viewer/mediawindow.cxx
@@ -276,7 +276,7 @@ bool MediaWindow::executeMediaURLDialog(vcl::Window*,
if( aDlg.Execute() == ERRCODE_NONE )
{
const INetURLObject aURL( aDlg.GetPath() );
- rURL = aURL.GetMainURL( INetURLObject::DECODE_UNAMBIGUOUS );
+ rURL = aURL.GetMainURL( INetURLObject::DecodeMechanism::Unambiguous );
if (o_pbLink)
{
@@ -317,7 +317,7 @@ bool MediaWindow::isMediaURL( const OUString& rURL, const OUString& rReferer, bo
try
{
uno::Reference< media::XPlayer > xPlayer( priv::MediaWindowImpl::createPlayer(
- aURL.GetMainURL( INetURLObject::DECODE_UNAMBIGUOUS ),
+ aURL.GetMainURL( INetURLObject::DecodeMechanism::Unambiguous ),
rReferer, nullptr ) );
if( xPlayer.is() )
diff --git a/avmedia/source/viewer/mediawindow_impl.cxx b/avmedia/source/viewer/mediawindow_impl.cxx
index d0028011c53a..5566251e9f48 100644
--- a/avmedia/source/viewer/mediawindow_impl.cxx
+++ b/avmedia/source/viewer/mediawindow_impl.cxx
@@ -285,7 +285,7 @@ void MediaWindowImpl::setURL( const OUString& rURL,
INetURLObject aURL( rURL );
if (aURL.GetProtocol() != INetProtocol::NotValid)
- maFileURL = aURL.GetMainURL(INetURLObject::DECODE_UNAMBIGUOUS);
+ maFileURL = aURL.GetMainURL(INetURLObject::DecodeMechanism::Unambiguous);
else
maFileURL = rURL;
}
diff --git a/avmedia/source/win/manager.cxx b/avmedia/source/win/manager.cxx
index b829190f6622..c024f7ff19a7 100644
--- a/avmedia/source/win/manager.cxx
+++ b/avmedia/source/win/manager.cxx
@@ -48,7 +48,7 @@ uno::Reference< media::XPlayer > SAL_CALL Manager::createPlayer( const OUString&
uno::Reference< media::XPlayer > xRet( pPlayer );
const INetURLObject aURL( rURL );
- if( !pPlayer->create( aURL.GetMainURL( INetURLObject::DECODE_UNAMBIGUOUS ) ) )
+ if( !pPlayer->create( aURL.GetMainURL( INetURLObject::DecodeMechanism::Unambiguous ) ) )
xRet.clear();
return xRet;
diff --git a/basctl/source/basicide/baside3.cxx b/basctl/source/basicide/baside3.cxx
index a7ef0e09f2e5..2d6587300d7a 100644
--- a/basctl/source/basicide/baside3.cxx
+++ b/basctl/source/basicide/baside3.cxx
@@ -761,7 +761,7 @@ void DialogWindow::SaveDialog()
aURLObj.removeExtension();
OUString aDialogName( aURLObj.getName() );
aURLObj.removeSegment();
- OUString aURL( aURLObj.GetMainURL( INetURLObject::NO_DECODE ) );
+ OUString aURL( aURLObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
bool bReadOnly = false;
OUString aComment = "# " + aDialogName + " strings" ;
Reference< task::XInteractionHandler > xDummyHandler;
diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx
index cb821f5b1d3e..605897b920c1 100644
--- a/basctl/source/basicide/moduldl2.cxx
+++ b/basctl/source/basicide/moduldl2.cxx
@@ -797,13 +797,13 @@ void LibPage::InsertLib()
Reference< XSimpleFileAccess3 > xSFA( SimpleFileAccess::create(comphelper::getProcessComponentContext()) );
- OUString aModURL( aModURLObj.GetMainURL( INetURLObject::NO_DECODE ) );
+ OUString aModURL( aModURLObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
if ( xSFA->exists( aModURL ) )
{
xModLibContImport.set( script::DocumentScriptLibraryContainer::createWithURL(xContext, aModURL), UNO_QUERY );
}
- OUString aDlgURL( aDlgURLObj.GetMainURL( INetURLObject::NO_DECODE ) );
+ OUString aDlgURL( aDlgURLObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
if ( xSFA->exists( aDlgURL ) )
{
xDlgLibContImport.set( script::DocumentDialogLibraryContainer::createWithURL(xContext, aDlgURL), UNO_QUERY );
@@ -959,7 +959,7 @@ void LibPage::InsertLib()
aModStorageURLObj.setExtension( aLibExtension );
aModStorageURLObj.setFinalSlash();
}
- OUString aModStorageURL( aModStorageURLObj.GetMainURL( INetURLObject::NO_DECODE ) );
+ OUString aModStorageURL( aModStorageURLObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
// create library link
xModLib.set( xModLibContainer->createLibraryLink( aLibName, aModStorageURL, true ), UNO_QUERY);
@@ -1027,7 +1027,7 @@ void LibPage::InsertLib()
aDlgStorageURLObj.setExtension( aLibExtension );
aDlgStorageURLObj.setFinalSlash();
}
- OUString aDlgStorageURL( aDlgStorageURLObj.GetMainURL( INetURLObject::NO_DECODE ) );
+ OUString aDlgStorageURL( aDlgStorageURLObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
// create library link
xDlgLib.set( xDlgLibContainer->createLibraryLink( aLibName, aDlgStorageURL, true ), UNO_QUERY);
@@ -1213,12 +1213,12 @@ void LibPage::ExportAsPackage( const OUString& aLibName )
if( aURL.getExtension().isEmpty() )
aURL.setExtension( "oxt" );
- OUString aPackageURL( aURL.GetMainURL( INetURLObject::NO_DECODE ) );
+ OUString aPackageURL( aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
OUString aTmpPath = SvtPathOptions().GetTempPath();
INetURLObject aInetObj( aTmpPath );
aInetObj.insertName( aLibName, true, INetURLObject::LAST_SEGMENT, INetURLObject::EncodeMechanism::All );
- OUString aSourcePath = aInetObj.GetMainURL( INetURLObject::NO_DECODE );
+ OUString aSourcePath = aInetObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
if( xSFA->exists( aSourcePath ) )
xSFA->kill( aSourcePath );
Reference< task::XInteractionHandler > xDummyHandler( new DummyInteractionHandler( xHandler ) );
@@ -1250,7 +1250,7 @@ void LibPage::ExportAsPackage( const OUString& aLibName )
INetURLObject aMetaInfInetObj( aTmpPath );
aMetaInfInetObj.insertName( "META-INF",
true, INetURLObject::LAST_SEGMENT, INetURLObject::EncodeMechanism::All );
- OUString aMetaInfFolder = aMetaInfInetObj.GetMainURL( INetURLObject::NO_DECODE );
+ OUString aMetaInfFolder = aMetaInfInetObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
if( xSFA->exists( aMetaInfFolder ) )
xSFA->kill( aMetaInfFolder );
xSFA->createFolder( aMetaInfFolder );
@@ -1279,7 +1279,7 @@ void LibPage::ExportAsPackage( const OUString& aLibName )
true, INetURLObject::LAST_SEGMENT, INetURLObject::EncodeMechanism::All );
// write buffered pipe data to content:
- ::ucbhelper::Content manifestContent( aMetaInfInetObj.GetMainURL( INetURLObject::NO_DECODE ), xCmdEnv, comphelper::getProcessComponentContext() );
+ ::ucbhelper::Content manifestContent( aMetaInfInetObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ), xCmdEnv, comphelper::getProcessComponentContext() );
manifestContent.writeStream( Reference<io::XInputStream>( xPipe, UNO_QUERY_THROW ), true );
::ucbhelper::Content MetaInfContent( aMetaInfFolder, xCmdEnv, comphelper::getProcessComponentContext() );
diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx
index 10efa072f9c3..f7ee7b1e6af0 100644
--- a/basic/source/basmgr/basmgr.cxx
+++ b/basic/source/basmgr/basmgr.cxx
@@ -468,7 +468,7 @@ BasicManager::BasicManager( SotStorage& rStorage, const OUString& rBaseURL, Star
mpImpl->aBasicLibPath = *pLibPath;
}
OUString aStorName( rStorage.GetName() );
- maStorageName = INetURLObject(aStorName, INetProtocol::File).GetMainURL( INetURLObject::NO_DECODE );
+ maStorageName = INetURLObject(aStorName, INetProtocol::File).GetMainURL( INetURLObject::DecodeMechanism::NONE );
// If there is no Manager Stream, no further actions are necessary
@@ -688,7 +688,7 @@ void BasicManager::LoadBasicManager( SotStorage& rStorage, const OUString& rBase
return;
}
- maStorageName = INetURLObject(aStorName, INetProtocol::File).GetMainURL( INetURLObject::NO_DECODE );
+ maStorageName = INetURLObject(aStorName, INetProtocol::File).GetMainURL( INetURLObject::DecodeMechanism::NONE );
// #i13114 removed, DBG_ASSERT(aStorageName.Len() != 0, "Bad storage name");
OUString aRealStorageName = maStorageName; // for relative paths, can be modified through BaseURL
@@ -828,10 +828,10 @@ void BasicManager::LoadOldBasicManager( SotStorage& rStorage )
else
{
xStorageRef = new SotStorage( false, aLibAbsStorage.GetMainURL
- ( INetURLObject::NO_DECODE ), eStorageReadMode );
+ ( INetURLObject::DecodeMechanism::NONE ), eStorageReadMode );
if ( xStorageRef->GetError() != ERRCODE_NONE )
xStorageRef = new SotStorage( false, aLibRelStorage.
- GetMainURL( INetURLObject::NO_DECODE ), eStorageReadMode );
+ GetMainURL( INetURLObject::DecodeMechanism::NONE ), eStorageReadMode );
}
if ( xStorageRef.Is() )
{
@@ -903,10 +903,10 @@ bool BasicManager::ImpLoadLibrary( BasicLibInfo* pLibInfo, SotStorage* pCurStora
// #i13114 removed, DBG_ASSERT( aStorName.Len(), "No Storage Name!" );
INetURLObject aCurStorageEntry(aStorName, INetProtocol::File);
- // #i13114 removed, DBG_ASSERT(aCurStorageEntry.GetMainURL( INetURLObject::NO_DECODE ).Len() != 0, "Bad storage name");
+ // #i13114 removed, DBG_ASSERT(aCurStorageEntry.GetMainURL( INetURLObject::DecodeMechanism::NONE ).Len() != 0, "Bad storage name");
INetURLObject aStorageEntry(aStorageName, INetProtocol::File);
- // #i13114 removed, DBG_ASSERT(aCurStorageEntry.GetMainURL( INetURLObject::NO_DECODE ).Len() != 0, "Bad storage name");
+ // #i13114 removed, DBG_ASSERT(aCurStorageEntry.GetMainURL( INetURLObject::DecodeMechanism::NONE ).Len() != 0, "Bad storage name");
if ( aCurStorageEntry == aStorageEntry )
{
@@ -1068,7 +1068,7 @@ StarBASIC* BasicManager::AddLib( SotStorage& rStorage, const OUString& rLibName,
OUString aStorName( rStorage.GetName() );
DBG_ASSERT( !aStorName.isEmpty(), "No Storage Name!" );
- OUString aStorageName = INetURLObject(aStorName, INetProtocol::File).GetMainURL( INetURLObject::NO_DECODE );
+ OUString aStorageName = INetURLObject(aStorName, INetProtocol::File).GetMainURL( INetURLObject::DecodeMechanism::NONE );
DBG_ASSERT(!aStorageName.isEmpty(), "Bad storage name");
OUString aNewLibName( rLibName );
diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index d93c95aade98..1fa46b1123c6 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -152,7 +152,7 @@ OUString getFullPath( const OUString& aRelPath )
// #80204 Try first if it already is a valid URL
INetURLObject aURLObj( aRelPath );
- aFileURL = aURLObj.GetMainURL( INetURLObject::NO_DECODE );
+ aFileURL = aURLObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
if( aFileURL.isEmpty() )
{
@@ -642,7 +642,7 @@ RTLFUNC(MkDir)
aURLObj.SetURL( sCurPathURL );
aURLObj.Append( aPath );
- File::getSystemPathFromFileURL(aURLObj.GetMainURL( INetURLObject::DECODE_TO_IURI ),aPath ) ;
+ File::getSystemPathFromFileURL(aURLObj.GetMainURL( INetURLObject::DecodeMechanism::ToIUri ),aPath ) ;
}
}
@@ -2813,7 +2813,7 @@ bool isRootDir( const OUString& aDirURLStr )
else if( nCount == 1 )
{
OUString aSeg1 = aDirURLObj.getName( 0, true,
- INetURLObject::DECODE_WITH_CHARSET );
+ INetURLObject::DecodeMechanism::WithCharset );
if( aSeg1[1] == (sal_Unicode)':' )
{
bRoot = true;
@@ -2868,7 +2868,7 @@ RTLFUNC(Dir)
{
INetURLObject aFileURL( aFileURLStr );
aNameOnlyStr = aFileURL.getName( INetURLObject::LAST_SEGMENT,
- true, INetURLObject::DECODE_WITH_CHARSET );
+ true, INetURLObject::DecodeMechanism::WithCharset );
}
rPar.Get(0)->PutString( aNameOnlyStr );
return;
@@ -2979,7 +2979,7 @@ RTLFUNC(Dir)
INetURLObject aURL( aFile );
aPath = aURL.getName( INetURLObject::LAST_SEGMENT, true,
- INetURLObject::DECODE_WITH_CHARSET );
+ INetURLObject::DecodeMechanism::WithCharset );
}
bool bMatch = implCheckWildcard( aPath, pRTLData );
diff --git a/basic/source/runtime/methods1.cxx b/basic/source/runtime/methods1.cxx
index a93e988bafb4..34ead7fe4b43 100644
--- a/basic/source/runtime/methods1.cxx
+++ b/basic/source/runtime/methods1.cxx
@@ -1643,7 +1643,7 @@ RTLFUNC(ConvertToUrl)
{
OUString aStr = rPar.Get(1)->GetOUString();
INetURLObject aURLObj( aStr, INetProtocol::File );
- OUString aFileURL = aURLObj.GetMainURL( INetURLObject::NO_DECODE );
+ OUString aFileURL = aURLObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
if( aFileURL.isEmpty() )
{
::osl::File::getFileURLFromSystemPath( aFileURL, aFileURL );
diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx
index 26a20365fc10..1d39158dbad0 100644
--- a/basic/source/uno/namecont.cxx
+++ b/basic/source/uno/namecont.cxx
@@ -587,14 +587,14 @@ static void checkAndCopyFileImpl( const INetURLObject& rSourceFolderInetObj,
aTargetFolderInetObj.insertName( rCheckFileName, true, INetURLObject::LAST_SEGMENT,
INetURLObject::EncodeMechanism::All );
aTargetFolderInetObj.setExtension( rCheckExtension );
- OUString aTargetFile = aTargetFolderInetObj.GetMainURL( INetURLObject::NO_DECODE );
+ OUString aTargetFile = aTargetFolderInetObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
if( !xSFI->exists( aTargetFile ) )
{
INetURLObject aSourceFolderInetObj( rSourceFolderInetObj );
aSourceFolderInetObj.insertName( rCheckFileName, true, INetURLObject::LAST_SEGMENT,
INetURLObject::EncodeMechanism::All );
aSourceFolderInetObj.setExtension( rCheckExtension );
- OUString aSourceFile = aSourceFolderInetObj.GetMainURL( INetURLObject::NO_DECODE );
+ OUString aSourceFile = aSourceFolderInetObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
xSFI->copy( aSourceFile, aTargetFile );
}
}
@@ -636,7 +636,7 @@ void SfxLibraryContainer::init_Impl( const OUString& rInitialDocumentURL,
meInitMode = DEFAULT;
INetURLObject aInitUrlInetObj( maInitialDocumentURL );
- OUString aInitFileName = aInitUrlInetObj.GetMainURL( INetURLObject::NO_DECODE );
+ OUString aInitFileName = aInitUrlInetObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
if( !aInitFileName.isEmpty() )
{
// We need a BasicManager to avoid problems
@@ -650,7 +650,7 @@ void SfxLibraryContainer::init_Impl( const OUString& rInitialDocumentURL,
meInitMode = CONTAINER_INIT_FILE;
INetURLObject aLibPathInetObj( aInitUrlInetObj );
aLibPathInetObj.removeSegment();
- maLibraryPath = aLibPathInetObj.GetMainURL( INetURLObject::NO_DECODE );
+ maLibraryPath = aLibPathInetObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
}
else if( aExtension == "xlb" )
{
@@ -783,7 +783,7 @@ void SfxLibraryContainer::init_Impl( const OUString& rInitialDocumentURL,
}
pLibInfoInetObj->insertName( maInfoFileName, false, INetURLObject::LAST_SEGMENT, INetURLObject::EncodeMechanism::All );
pLibInfoInetObj->setExtension( "xlc" );
- aFileName = pLibInfoInetObj->GetMainURL( INetURLObject::NO_DECODE );
+ aFileName = pLibInfoInetObj->GetMainURL( INetURLObject::DecodeMechanism::NONE );
}
try
@@ -802,7 +802,7 @@ void SfxLibraryContainer::init_Impl( const OUString& rInitialDocumentURL,
INetURLObject aLibInfoInetObj( maLibraryPath.getToken(1, (sal_Unicode)';') );
aLibInfoInetObj.insertName( maOldInfoFileName, false, INetURLObject::LAST_SEGMENT, INetURLObject::EncodeMechanism::All );
aLibInfoInetObj.setExtension( "xli" );
- aFileName = aLibInfoInetObj.GetMainURL( INetURLObject::NO_DECODE );
+ aFileName = aLibInfoInetObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
try
{
@@ -863,7 +863,7 @@ void SfxLibraryContainer::init_Impl( const OUString& rInitialDocumentURL,
aInetObj.insertName( rLib.aName, true, INetURLObject::LAST_SEGMENT,
INetURLObject::EncodeMechanism::All );
- OUString aLibDirPath = aInetObj.GetMainURL( INetURLObject::NO_DECODE );
+ OUString aLibDirPath = aInetObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
if( mxSFI->isFolder( aLibDirPath ) )
{
createVariableURL( rLib.aStorageURL, rLib.aName, maInfoFileName, true );
@@ -875,7 +875,7 @@ void SfxLibraryContainer::init_Impl( const OUString& rInitialDocumentURL,
INetURLObject aShareInetObj( maLibraryPath.getToken(0, (sal_Unicode)';') );
aShareInetObj.insertName( rLib.aName, true, INetURLObject::LAST_SEGMENT,
INetURLObject::EncodeMechanism::All );
- OUString aShareLibDirPath = aShareInetObj.GetMainURL( INetURLObject::NO_DECODE );
+ OUString aShareLibDirPath = aShareInetObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
if( mxSFI->isFolder( aShareLibDirPath ) )
{
createVariableURL( rLib.aStorageURL, rLib.aName, maInfoFileName, false );
@@ -1031,7 +1031,7 @@ void SfxLibraryContainer::init_Impl( const OUString& rInitialDocumentURL,
try
{
INetURLObject aPrevUserBasicInetObj = aPrevUserBasicInetObj_1;
- OUString aPrevFolder = aPrevUserBasicInetObj.GetMainURL( INetURLObject::NO_DECODE );
+ OUString aPrevFolder = aPrevUserBasicInetObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
if( mxSFI->isFolder( aPrevFolder ) )
{
// Check if Standard folder exists and is complete
@@ -1041,7 +1041,7 @@ void SfxLibraryContainer::init_Impl( const OUString& rInitialDocumentURL,
INetURLObject aPrevUserBasicStandardInetObj( aPrevUserBasicInetObj );
aPrevUserBasicStandardInetObj.insertName( aStandardStr, true, INetURLObject::LAST_SEGMENT,
INetURLObject::EncodeMechanism::All );
- OUString aPrevStandardFolder = aPrevUserBasicStandardInetObj.GetMainURL( INetURLObject::NO_DECODE );
+ OUString aPrevStandardFolder = aPrevUserBasicStandardInetObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
if( mxSFI->isFolder( aPrevStandardFolder ) )
{
OUString aXlbExtension( "xlb" );
@@ -1068,17 +1068,17 @@ void SfxLibraryContainer::init_Impl( const OUString& rInitialDocumentURL,
}
else
{
- OUString aStandardFolder = aUserBasicStandardInetObj.GetMainURL( INetURLObject::NO_DECODE );
+ OUString aStandardFolder = aUserBasicStandardInetObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
mxSFI->copy( aStandardFolder, aPrevStandardFolder );
}
- OUString aPrevCopyToFolder = aPrevUserBasicInetObj_2.GetMainURL( INetURLObject::NO_DECODE );
+ OUString aPrevCopyToFolder = aPrevUserBasicInetObj_2.GetMainURL( INetURLObject::DecodeMechanism::NONE );
mxSFI->copy( aPrevFolder, aPrevCopyToFolder );
}
else
{
aPrevUserBasicInetObj = aPrevUserBasicInetObj_2;
- aPrevFolder = aPrevUserBasicInetObj.GetMainURL( INetURLObject::NO_DECODE );
+ aPrevFolder = aPrevUserBasicInetObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
}
if( mxSFI->isFolder( aPrevFolder ) )
{
@@ -1086,11 +1086,11 @@ void SfxLibraryContainer::init_Impl( const OUString& rInitialDocumentURL,
Reference< XInterface > xRef = static_cast< XInterface* >( static_cast< OWeakObject* >(pPrevCont) );
// Rename previous basic folder to make storage URLs correct during initialisation
- OUString aFolderUserBasic = aUserBasicInetObj.GetMainURL( INetURLObject::NO_DECODE );
+ OUString aFolderUserBasic = aUserBasicInetObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
INetURLObject aUserBasicTmpInetObj( aUserBasicInetObj );
aUserBasicTmpInetObj.removeSegment();
aUserBasicTmpInetObj.Append( "__basic_tmp" );
- OUString aFolderTmp = aUserBasicTmpInetObj.GetMainURL( INetURLObject::NO_DECODE );
+ OUString aFolderTmp = aUserBasicTmpInetObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
mxSFI->move( aFolderUserBasic, aFolderTmp );
try
@@ -1114,7 +1114,7 @@ void SfxLibraryContainer::init_Impl( const OUString& rInitialDocumentURL,
aPrevUserBasicLibInfoInetObj.insertName( maInfoFileName, false, INetURLObject::LAST_SEGMENT,
INetURLObject::EncodeMechanism::All );
aPrevUserBasicLibInfoInetObj.setExtension( "xlc");
- OUString aLibInfoFileName = aPrevUserBasicLibInfoInetObj.GetMainURL( INetURLObject::NO_DECODE );
+ OUString aLibInfoFileName = aPrevUserBasicLibInfoInetObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
Sequence<Any> aInitSeq( 1 );
aInitSeq.getArray()[0] <<= aLibInfoFileName;
GbMigrationSuppressErrors = true;
@@ -1173,11 +1173,11 @@ void SfxLibraryContainer::init_Impl( const OUString& rInitialDocumentURL,
// Move folder if not already done
INetURLObject aUserBasicLibFolderInetObj( aUserBasicInetObj );
aUserBasicLibFolderInetObj.Append( aLibName );
- OUString aLibFolder = aUserBasicLibFolderInetObj.GetMainURL( INetURLObject::NO_DECODE );
+ OUString aLibFolder = aUserBasicLibFolderInetObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
INetURLObject aPrevUserBasicLibFolderInetObj( aPrevUserBasicInetObj );
aPrevUserBasicLibFolderInetObj.Append( aLibName );
- OUString aPrevLibFolder = aPrevUserBasicLibFolderInetObj.GetMainURL( INetURLObject::NO_DECODE );
+ OUString aPrevLibFolder = aPrevUserBasicLibFolderInetObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
if( mxSFI->isFolder( aPrevLibFolder ) && !mxSFI->isFolder( aLibFolder ) )
{
@@ -1218,12 +1218,12 @@ void SfxLibraryContainer::init_Impl( const OUString& rInitialDocumentURL,
INetURLObject aPrevUserBasicInetObj_Err( aUserBasicInetObj );
aPrevUserBasicInetObj_Err.removeSegment();
aPrevUserBasicInetObj_Err.Append( "__basic_80_err" );
- OUString aPrevFolder_Err = aPrevUserBasicInetObj_Err.GetMainURL( INetURLObject::NO_DECODE );
+ OUString aPrevFolder_Err = aPrevUserBasicInetObj_Err.GetMainURL( INetURLObject::DecodeMechanism::NONE );
bool bSaved = false;
try
{
- OUString aPrevFolder_1 = aPrevUserBasicInetObj_1.GetMainURL( INetURLObject::NO_DECODE );
+ OUString aPrevFolder_1 = aPrevUserBasicInetObj_1.GetMainURL( INetURLObject::DecodeMechanism::NONE );
if( mxSFI->isFolder( aPrevFolder_1 ) )
{
mxSFI->move( aPrevFolder_1, aPrevFolder_Err );
@@ -1234,7 +1234,7 @@ void SfxLibraryContainer::init_Impl( const OUString& rInitialDocumentURL,
{}
try
{
- OUString aPrevFolder_2 = aPrevUserBasicInetObj_2.GetMainURL( INetURLObject::NO_DECODE );
+ OUString aPrevFolder_2 = aPrevUserBasicInetObj_2.GetMainURL( INetURLObject::DecodeMechanism::NONE );
if( !bSaved && mxSFI->isFolder( aPrevFolder_2 ) )
{
mxSFI->move( aPrevFolder_2, aPrevFolder_Err );
@@ -1312,7 +1312,7 @@ void SfxLibraryContainer::checkStorageURL( const OUString& aSourceURL,
// URL to xlb file
aLibInfoFileURL = aExpandedSourceURL;
aInetObj.removeSegment();
- aStorageURL = aInetObj.GetMainURL( INetURLObject::NO_DECODE );
+ aStorageURL = aInetObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
}
else
{
@@ -1320,7 +1320,7 @@ void SfxLibraryContainer::checkStorageURL( const OUString& aSourceURL,
aStorageURL = aExpandedSourceURL;
aInetObj.insertName( maInfoFileName, false, INetURLObject::LAST_SEGMENT, INetURLObject::EncodeMechanism::All );
aInetObj.setExtension( "xlb" );
- aLibInfoFileURL = aInetObj.GetMainURL( INetURLObject::NO_DECODE );
+ aLibInfoFileURL = aInetObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
}
}
@@ -1372,7 +1372,7 @@ OUString SfxLibraryContainer::createAppLibraryFolder( SfxLibrary* pLib, const OU
{
INetURLObject aInetObj( maLibraryPath.getToken(1, (sal_Unicode)';') );
aInetObj.insertName( aName, true, INetURLObject::LAST_SEGMENT, INetURLObject::EncodeMechanism::All );
- checkStorageURL( aInetObj.GetMainURL( INetURLObject::NO_DECODE ), pLib->maLibInfoFileURL,
+ checkStorageURL( aInetObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ), pLib->maLibInfoFileURL,
pLib->maStorageURL, pLib->maUnexpandedStorageURL );
aLibDirPath = pLib->maStorageURL;
}
@@ -1481,7 +1481,7 @@ void SfxLibraryContainer::implStoreLibrary( SfxLibrary* pLib,
{
INetURLObject aInetObj( aTargetURL );
aInetObj.insertName( aName, true, INetURLObject::LAST_SEGMENT, INetURLObject::EncodeMechanism::All );
- aLibDirPath = aInetObj.GetMainURL( INetURLObject::NO_DECODE );
+ aLibDirPath = aInetObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
if( !xSFI->isFolder( aLibDirPath ) )
{
@@ -1504,7 +1504,7 @@ void SfxLibraryContainer::implStoreLibrary( SfxLibrary* pLib,
INetURLObject::LAST_SEGMENT,
INetURLObject::EncodeMechanism::All );
aElementInetObj.setExtension( maLibElementFileExtension );
- OUString aElementPath( aElementInetObj.GetMainURL( INetURLObject::NO_DECODE ) );
+ OUString aElementPath( aElementInetObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
if( !isLibraryElementValid( pLib->getByName( aElementName ) ) )
{
@@ -1614,14 +1614,14 @@ void SfxLibraryContainer::implStoreLibraryIndexFile( SfxLibrary* pLib,
{
INetURLObject aInetObj( aTargetURL );
aInetObj.insertName( rLib.aName, true, INetURLObject::LAST_SEGMENT, INetURLObject::EncodeMechanism::All );
- OUString aLibDirPath = aInetObj.GetMainURL( INetURLObject::NO_DECODE );
+ OUString aLibDirPath = aInetObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
if( !xSFI->isFolder( aLibDirPath ) )
{
xSFI->createFolder( aLibDirPath );
}
aInetObj.insertName( maInfoFileName, false, INetURLObject::LAST_SEGMENT, INetURLObject::EncodeMechanism::All );
aInetObj.setExtension( "xlb" );
- aLibInfoPath = aInetObj.GetMainURL( INetURLObject::NO_DECODE );
+ aLibInfoPath = aInetObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
}
else
{
@@ -2126,7 +2126,7 @@ void SfxLibraryContainer::storeLibraries_Impl( const uno::Reference< embed::XSto
INetURLObject aLibInfoInetObj( maLibraryPath.getToken(1, (sal_Unicode)';') );
aLibInfoInetObj.insertName( maInfoFileName, false, INetURLObject::LAST_SEGMENT, INetURLObject::EncodeMechanism::All );
aLibInfoInetObj.setExtension( "xlc" );
- OUString aLibInfoPath( aLibInfoInetObj.GetMainURL( INetURLObject::NO_DECODE ) );
+ OUString aLibInfoPath( aLibInfoInetObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
try
{
@@ -2334,7 +2334,7 @@ void SAL_CALL SfxLibraryContainer::removeLibrary( const OUString& Name )
INetURLObject aInetObj( maLibraryPath.getToken(1, (sal_Unicode)';') );
aInetObj.insertName( Name, true, INetURLObject::LAST_SEGMENT,
INetURLObject::EncodeMechanism::All );
- OUString aLibDirPath = aInetObj.GetMainURL( INetURLObject::NO_DECODE );
+ OUString aLibDirPath = aInetObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
try
{
@@ -2482,7 +2482,7 @@ void SAL_CALL SfxLibraryContainer::loadLibrary( const OUString& Name )
INetURLObject::LAST_SEGMENT,
INetURLObject::EncodeMechanism::All );
aElementInetObj.setExtension( maLibElementFileExtension );
- aFile = aElementInetObj.GetMainURL( INetURLObject::NO_DECODE );
+ aFile = aElementInetObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
}
Reference< XNameContainer > xLib( pImplLib );
@@ -2600,7 +2600,7 @@ void SAL_CALL SfxLibraryContainer::renameLibrary( const OUString& Name, const OU
INetURLObject aDestInetObj( maLibraryPath.getToken(1, (sal_Unicode)';'));
aDestInetObj.insertName( NewName, true, INetURLObject::LAST_SEGMENT,
INetURLObject::EncodeMechanism::All );
- OUString aDestDirPath = aDestInetObj.GetMainURL( INetURLObject::NO_DECODE );
+ OUString aDestDirPath = aDestInetObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
// Store new URL
OUString aLibInfoFileURL = pImplLib->maLibInfoFileURL;
@@ -2639,14 +2639,14 @@ void SAL_CALL SfxLibraryContainer::renameLibrary( const OUString& Name, const OU
aElementInetObj.insertName( aElementName, false,
INetURLObject::LAST_SEGMENT, INetURLObject::EncodeMechanism::All );
aElementInetObj.setExtension( maLibElementFileExtension );
- OUString aElementPath( aElementInetObj.GetMainURL( INetURLObject::NO_DECODE ) );
+ OUString aElementPath( aElementInetObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
INetURLObject aElementDestInetObj( aDestDirPath );
aElementDestInetObj.insertName( aElementName, false,
INetURLObject::LAST_SEGMENT,
INetURLObject::EncodeMechanism::All );
aElementDestInetObj.setExtension( maLibElementFileExtension );
- OUString aDestElementPath( aElementDestInetObj.GetMainURL( INetURLObject::NO_DECODE ) );
+ OUString aDestElementPath( aElementDestInetObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
try
{
@@ -3180,7 +3180,7 @@ void SfxLibrary::impl_removeWithoutChecks( const OUString& _rElementName )
INetURLObject::LAST_SEGMENT,
INetURLObject::EncodeMechanism::All );
aElementInetObj.setExtension( maLibElementFileExtension );
- OUString aFile = aElementInetObj.GetMainURL( INetURLObject::NO_DECODE );
+ OUString aFile = aElementInetObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
try
{
diff --git a/basic/source/uno/scriptcont.cxx b/basic/source/uno/scriptcont.cxx
index 0107e422c5e9..7e17ba9cccd1 100644
--- a/basic/source/uno/scriptcont.cxx
+++ b/basic/source/uno/scriptcont.cxx
@@ -533,7 +533,7 @@ void SAL_CALL SfxScriptLibraryContainer::changeLibraryPassword( const OUString&
{
aElementInetObj.setExtension( "pba" );
}
- OUString aElementPath( aElementInetObj.GetMainURL( INetURLObject::NO_DECODE ) );
+ OUString aElementPath( aElementInetObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
if( mxSFI->exists( aElementPath ) )
{
@@ -719,7 +719,7 @@ bool SfxScriptLibraryContainer::implStorePasswordLibrary( SfxLibrary* pLib, cons
INetURLObject aInetObj( aTargetURL );
aInetObj.insertName( aName, true, INetURLObject::LAST_SEGMENT,
INetURLObject::EncodeMechanism::All );
- aLibDirPath = aInetObj.GetMainURL( INetURLObject::NO_DECODE );
+ aLibDirPath = aInetObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
if( !xSFI->isFolder( aLibDirPath ) )
{
@@ -740,7 +740,7 @@ bool SfxScriptLibraryContainer::implStorePasswordLibrary( SfxLibrary* pLib, cons
INetURLObject::LAST_SEGMENT,
INetURLObject::EncodeMechanism::All );
aElementInetObj.setExtension( "pba" );
- OUString aElementPath = aElementInetObj.GetMainURL( INetURLObject::NO_DECODE );
+ OUString aElementPath = aElementInetObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
if( !isLibraryElementValid( pLib->getByName( aElementName ) ) )
{
@@ -1034,7 +1034,7 @@ bool SfxScriptLibraryContainer::implLoadPasswordLibrary
aElementInetObj.insertName( aElementName, false,
INetURLObject::LAST_SEGMENT, INetURLObject::EncodeMechanism::All );
aElementInetObj.setExtension( "pba" );
- OUString aElementPath = aElementInetObj.GetMainURL( INetURLObject::NO_DECODE );
+ OUString aElementPath = aElementInetObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
uno::Reference< embed::XStorage > xElementRootStorage;
try
diff --git a/comphelper/source/misc/documentinfo.cxx b/comphelper/source/misc/documentinfo.cxx
index b4cf505c96eb..4c2700c3f2f5 100644
--- a/comphelper/source/misc/documentinfo.cxx
+++ b/comphelper/source/misc/documentinfo.cxx
@@ -114,7 +114,7 @@ namespace comphelper {
return sTitle;
// 5. try the last segment of the document URL
- // this formerly was an INetURLObject::getName( LAST_SEGMENT, true, DECODE_WITH_CHARSET ),
+ // this formerly was an INetURLObject::getName( LAST_SEGMENT, true, DecodeMechanism::WithCharset ),
// but since we moved this code to comphelper, we do not have access to an INetURLObject anymore
// This heuristics here should be sufficient - finally, we will get an UNO title API in a not
// too distant future (hopefully), then this complete class is superfluous)
diff --git a/connectivity/source/drivers/calc/CConnection.cxx b/connectivity/source/drivers/calc/CConnection.cxx
index a315bc6b7c45..97f8e333b1d8 100644
--- a/connectivity/source/drivers/calc/CConnection.cxx
+++ b/connectivity/source/drivers/calc/CConnection.cxx
@@ -81,7 +81,7 @@ void OCalcConnection::construct(const OUString& url,const Sequence< PropertyValu
// don't pass invalid URL to loadComponentFromURL
throw SQLException();
}
- m_aFileName = aURL.GetMainURL(INetURLObject::NO_DECODE);
+ m_aFileName = aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE);
m_sPassword.clear();
const char* pPwd = "password";
diff --git a/connectivity/source/drivers/dbase/DTable.cxx b/connectivity/source/drivers/dbase/DTable.cxx
index 11d35d1359a1..13cfc685ee3f 100644
--- a/connectivity/source/drivers/dbase/DTable.cxx
+++ b/connectivity/source/drivers/dbase/DTable.cxx
@@ -525,10 +525,10 @@ void ODbaseTable::construct()
// If the memo file isn't found, the data will be displayed anyhow.
// However, updates can't be done
// but the operation is executed
- m_pMemoStream = createStream_simpleError( aURL.GetMainURL(INetURLObject::NO_DECODE), StreamMode::READWRITE | StreamMode::NOCREATE | StreamMode::SHARE_DENYWRITE);
+ m_pMemoStream = createStream_simpleError( aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE), StreamMode::READWRITE | StreamMode::NOCREATE | StreamMode::SHARE_DENYWRITE);
if ( !m_pMemoStream )
{
- m_pMemoStream = createStream_simpleError( aURL.GetMainURL(INetURLObject::NO_DECODE), StreamMode::READ | StreamMode::NOCREATE | StreamMode::SHARE_DENYNONE);
+ m_pMemoStream = createStream_simpleError( aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE), StreamMode::READ | StreamMode::NOCREATE | StreamMode::SHARE_DENYNONE);
}
if (m_pMemoStream)
ReadMemoHeader();
@@ -701,7 +701,7 @@ void ODbaseTable::refreshIndexes()
aURL.setName(OStringToOUString(aIndexName, m_eEncoding));
try
{
- Content aCnt(aURL.GetMainURL(INetURLObject::NO_DECODE),Reference<XCommandEnvironment>(), comphelper::getProcessComponentContext());
+ Content aCnt(aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE),Reference<XCommandEnvironment>(), comphelper::getProcessComponentContext());
if (aCnt.isDocument())
{
aVector.push_back(aURL.getBase());
@@ -1048,11 +1048,11 @@ bool ODbaseTable::CreateImpl()
try
{
- Content aContent(aURL.GetMainURL(INetURLObject::NO_DECODE),Reference<XCommandEnvironment>(), comphelper::getProcessComponentContext());
+ Content aContent(aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE),Reference<XCommandEnvironment>(), comphelper::getProcessComponentContext());
if (aContent.isDocument())
{
// Only if the file exists with length > 0 raise an error
- SvStream* pFileStream = createStream_simpleError( aURL.GetMainURL(INetURLObject::NO_DECODE), StreamMode::READ);
+ SvStream* pFileStream = createStream_simpleError( aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE), StreamMode::READ);
if (pFileStream && pFileStream->Seek(STREAM_SEEK_TO_END))
{
@@ -1075,7 +1075,7 @@ bool ODbaseTable::CreateImpl()
{
try
{
- Content aContent(aURL.GetMainURL(INetURLObject::NO_DECODE),Reference<XCommandEnvironment>(), comphelper::getProcessComponentContext());
+ Content aContent(aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE),Reference<XCommandEnvironment>(), comphelper::getProcessComponentContext());
aContent.executeCommand( "delete", css::uno::Any( true ) );
}
catch(const Exception&) // an exception is thrown when no file exists
@@ -1092,7 +1092,7 @@ bool ODbaseTable::CreateImpl()
bool bMemoAlreadyExists = false;
try
{
- Content aMemo1Content(aURL.GetMainURL(INetURLObject::NO_DECODE),Reference<XCommandEnvironment>(), comphelper::getProcessComponentContext());
+ Content aMemo1Content(aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE),Reference<XCommandEnvironment>(), comphelper::getProcessComponentContext());
bMemoAlreadyExists = aMemo1Content.isDocument();
}
catch(const Exception&) // an exception is thrown when no file exists
@@ -1103,7 +1103,7 @@ bool ODbaseTable::CreateImpl()
aURL.setExtension(aExt); // kill dbf file
try
{
- Content aMemoContent(aURL.GetMainURL(INetURLObject::NO_DECODE),Reference<XCommandEnvironment>(), comphelper::getProcessComponentContext());
+ Content aMemoContent(aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE),Reference<XCommandEnvironment>(), comphelper::getProcessComponentContext());
aMemoContent.executeCommand( "delete", css::uno::Any( true ) );
}
catch(const Exception&)
@@ -1121,7 +1121,7 @@ bool ODbaseTable::CreateImpl()
aURL.setExtension(aExt); // kill dbf file
try
{
- Content aMemoContent(aURL.GetMainURL(INetURLObject::NO_DECODE),Reference<XCommandEnvironment>(), comphelper::getProcessComponentContext());
+ Content aMemoContent(aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE),Reference<XCommandEnvironment>(), comphelper::getProcessComponentContext());
aMemoContent.executeCommand( "delete", css::uno::Any( true ) );
}
catch(const ContentCreationException&)
@@ -1166,7 +1166,7 @@ bool ODbaseTable::CreateFile(const INetURLObject& aFile, bool& bCreateMemo)
bCreateMemo = false;
Date aDate( Date::SYSTEM ); // current date
- m_pFileStream = createStream_simpleError( aFile.GetMainURL(INetURLObject::NO_DECODE),StreamMode::READWRITE | StreamMode::SHARE_DENYWRITE | StreamMode::TRUNC );
+ m_pFileStream = createStream_simpleError( aFile.GetMainURL(INetURLObject::DecodeMechanism::NONE),StreamMode::READWRITE | StreamMode::SHARE_DENYWRITE | StreamMode::TRUNC );
if (!m_pFileStream)
return false;
@@ -1412,7 +1412,7 @@ bool ODbaseTable::CreateFile(const INetURLObject& aFile, bool& bCreateMemo)
bool ODbaseTable::CreateMemoFile(const INetURLObject& aFile)
{
// filehandling macro for table creation
- m_pMemoStream = createStream_simpleError( aFile.GetMainURL(INetURLObject::NO_DECODE),StreamMode::READWRITE | StreamMode::SHARE_DENYWRITE);
+ m_pMemoStream = createStream_simpleError( aFile.GetMainURL(INetURLObject::DecodeMechanism::NONE),StreamMode::READWRITE | StreamMode::SHARE_DENYWRITE);
if (!m_pMemoStream)
return false;
@@ -1433,14 +1433,14 @@ bool ODbaseTable::Drop_Static(const OUString& _sUrl, bool _bHasMemoFields, OColl
INetURLObject aURL;
aURL.SetURL(_sUrl);
- bool bDropped = ::utl::UCBContentHelper::Kill(aURL.GetMainURL(INetURLObject::NO_DECODE));
+ bool bDropped = ::utl::UCBContentHelper::Kill(aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE));
if(bDropped)
{
if (_bHasMemoFields)
{ // delete the memo fields
aURL.setExtension("dbt");
- bDropped = ::utl::UCBContentHelper::Kill(aURL.GetMainURL(INetURLObject::NO_DECODE));
+ bDropped = ::utl::UCBContentHelper::Kill(aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE));
}
if(bDropped)
@@ -1464,7 +1464,7 @@ bool ODbaseTable::Drop_Static(const OUString& _sUrl, bool _bHasMemoFields, OColl
// as the inf file does not necessarily exist, we aren't allowed to use UCBContentHelper::Kill
try
{
- ::ucbhelper::Content aDeleteContent( aURL.GetMainURL( INetURLObject::NO_DECODE ), Reference< XCommandEnvironment >(), comphelper::getProcessComponentContext() );
+ ::ucbhelper::Content aDeleteContent( aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), Reference< XCommandEnvironment >(), comphelper::getProcessComponentContext() );
aDeleteContent.executeCommand( "delete", makeAny( true ) );
}
catch(const Exception&)
@@ -2339,7 +2339,7 @@ namespace
try
{
- Content aContent(aURL.GetMainURL(INetURLObject::NO_DECODE),Reference<XCommandEnvironment>(), comphelper::getProcessComponentContext());
+ Content aContent(aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE),Reference<XCommandEnvironment>(), comphelper::getProcessComponentContext());
Sequence< PropertyValue > aProps( 1 );
aProps[0].Name = "Title";
diff --git a/connectivity/source/drivers/file/FConnection.cxx b/connectivity/source/drivers/file/FConnection.cxx
index 745c1121ca9c..8937d104e8ab 100644
--- a/connectivity/source/drivers/file/FConnection.cxx
+++ b/connectivity/source/drivers/file/FConnection.cxx
@@ -145,7 +145,7 @@ void OConnection::construct(const OUString& url,const Sequence< PropertyValue >&
aURL.SetSmartURL(aFileName);
- setURL(aURL.GetMainURL(INetURLObject::NO_DECODE));
+ setURL(aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE));
}
if ( m_nTextEncoding == RTL_TEXTENCODING_DONTKNOW )
diff --git a/connectivity/source/drivers/file/FDatabaseMetaData.cxx b/connectivity/source/drivers/file/FDatabaseMetaData.cxx
index f734fbb9924a..e3bc0d7ae89f 100644
--- a/connectivity/source/drivers/file/FDatabaseMetaData.cxx
+++ b/connectivity/source/drivers/file/FDatabaseMetaData.cxx
@@ -89,7 +89,7 @@ namespace
{
aContentURL = INetURLObject( _rFolderOrDoc, INetURLObject::EncodeMechanism::WasEncoded );
aContentURL.Append( _rDocName );
- aContent1 = ::ucbhelper::Content( aContentURL.GetMainURL( INetURLObject::NO_DECODE ), Reference< XCommandEnvironment >(), comphelper::getProcessComponentContext() );
+ aContent1 = ::ucbhelper::Content( aContentURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), Reference< XCommandEnvironment >(), comphelper::getProcessComponentContext() );
}
}
@@ -106,7 +106,7 @@ namespace
INetURLObject aURL2( aContentURL );
if (!sExtension2.isEmpty())
aURL2.SetExtension( sExtension2 );
- if ( aURL2.GetMainURL(INetURLObject::NO_DECODE) == aContentURL.GetMainURL(INetURLObject::NO_DECODE) )
+ if ( aURL2.GetMainURL(INetURLObject::DecodeMechanism::NONE) == aContentURL.GetMainURL(INetURLObject::DecodeMechanism::NONE) )
return -1;
// the second context
@@ -114,7 +114,7 @@ namespace
::ucbhelper::Content aContent2;
try
{
- aContent2 = ::ucbhelper::Content( aURL2.GetMainURL( INetURLObject::NO_DECODE ), Reference< XCommandEnvironment >(), comphelper::getProcessComponentContext() );
+ aContent2 = ::ucbhelper::Content( aURL2.GetMainURL( INetURLObject::DecodeMechanism::NONE ), Reference< XCommandEnvironment >(), comphelper::getProcessComponentContext() );
bCanAccess = aContent2.isDocument();
}
catch( const Exception& )
diff --git a/connectivity/source/drivers/flat/ETable.cxx b/connectivity/source/drivers/flat/ETable.cxx
index 034aa77487ee..54b93c825dee 100644
--- a/connectivity/source/drivers/flat/ETable.cxx
+++ b/connectivity/source/drivers/flat/ETable.cxx
@@ -426,7 +426,7 @@ void OFlatTable::construct()
if(aURL.getExtension() != m_pConnection->getExtension())
aURL.setExtension(m_pConnection->getExtension());
- OUString aFileName = aURL.GetMainURL(INetURLObject::NO_DECODE);
+ OUString aFileName = aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE);
m_pFileStream = createStream_simpleError( aFileName, StreamMode::READWRITE | StreamMode::NOCREATE | StreamMode::SHARE_DENYWRITE);
diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx
index b41dd0052a89..a4946e40a429 100644
--- a/cui/source/dialogs/cuigaldlg.cxx
+++ b/cui/source/dialogs/cuigaldlg.cxx
@@ -118,7 +118,7 @@ void SearchThread::ImplSearch( const INetURLObject& rStartURL,
try
{
css::uno::Reference< XCommandEnvironment > xEnv;
- Content aCnt( rStartURL.GetMainURL( INetURLObject::NO_DECODE ), xEnv, comphelper::getProcessComponentContext() );
+ Content aCnt( rStartURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), xEnv, comphelper::getProcessComponentContext() );
Sequence< OUString > aProps( 2 );
aProps.getArray()[ 0 ] = "IsFolder";
@@ -166,7 +166,7 @@ void SearchThread::ImplSearch( const INetURLObject& rStartURL,
SolarMutexGuard aGuard;
mpBrowser->aFoundList.push_back(
- aFoundURL.GetMainURL( INetURLObject::NO_DECODE )
+ aFoundURL.GetMainURL( INetURLObject::DecodeMechanism::NONE )
);
mpBrowser->m_pLbxFound->InsertEntry(
GetReducedString( aFoundURL, 50 ),
@@ -661,7 +661,7 @@ void TPGalleryThemeGeneral::SetXChgData( ExchangeData* _pData )
aType += CUI_RES( RID_SVXSTR_GALLERY_READONLY );
m_pFtMSShowType->SetText( aType );
- m_pFtMSShowPath->SetText( pThm->GetSdgURL().GetMainURL( INetURLObject::DECODE_UNAMBIGUOUS ) );
+ m_pFtMSShowPath->SetText( pThm->GetSdgURL().GetMainURL( INetURLObject::DecodeMechanism::Unambiguous ) );
// singular or plural?
if ( 1 == pThm->GetObjectCount() )
@@ -1075,9 +1075,9 @@ void TPGalleryThemeProperties::DoPreview()
ErrorHandler::HandleError( ERRCODE_IO_NOTEXISTSPATH );
GetParent()->EnterWait();
}
- else if( ::avmedia::MediaWindow::isMediaURL( _aURL.GetMainURL( INetURLObject::DECODE_UNAMBIGUOUS ), "" ) )
+ else if( ::avmedia::MediaWindow::isMediaURL( _aURL.GetMainURL( INetURLObject::DecodeMechanism::Unambiguous ), "" ) )
{
- xMediaPlayer = ::avmedia::MediaWindow::createPlayer( _aURL.GetMainURL( INetURLObject::NO_DECODE ), "" );
+ xMediaPlayer = ::avmedia::MediaWindow::createPlayer( _aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), "" );
if( xMediaPlayer.is() )
xMediaPlayer->start();
}
diff --git a/cui/source/dialogs/hldocntp.cxx b/cui/source/dialogs/hldocntp.cxx
index 1c61efb91c20..b4bac2b0574e 100644
--- a/cui/source/dialogs/hldocntp.cxx
+++ b/cui/source/dialogs/hldocntp.cxx
@@ -233,7 +233,7 @@ void SvxHyperlinkNewDocTp::GetCurentItemData ( OUString& rStrURL, OUString& aStr
INetURLObject aURL;
if ( ImplGetURLObject( rStrURL, m_pCbbPath->GetBaseURL(), aURL ) )
{
- rStrURL = aURL.GetMainURL( INetURLObject::NO_DECODE );
+ rStrURL = aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE );
}
GetDataFromCommonFields( aStrName, aStrIntName, aStrFrame, eMode );
@@ -305,7 +305,7 @@ void SvxHyperlinkNewDocTp::DoApply ()
// create Document
- aStrNewName = aURL.GetURLPath( INetURLObject::NO_DECODE );
+ aStrNewName = aURL.GetURLPath( INetURLObject::DecodeMechanism::NONE );
SfxViewFrame *pViewFrame = nullptr;
try
{
@@ -313,7 +313,7 @@ void SvxHyperlinkNewDocTp::DoApply ()
// check if file exists, warn before we overwrite it
{
- SvStream* pIStm = ::utl::UcbStreamHelper::CreateStream( aURL.GetMainURL( INetURLObject::NO_DECODE ), StreamMode::READ );
+ SvStream* pIStm = ::utl::UcbStreamHelper::CreateStream( aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), StreamMode::READ );
bool bOk = pIStm && ( pIStm->GetError() == 0);
@@ -364,7 +364,7 @@ void SvxHyperlinkNewDocTp::DoApply ()
pViewFrame = pItem->GetFrame();
if (pViewFrame)
{
- SfxStringItem aNewName( SID_FILE_NAME, aURL.GetMainURL( INetURLObject::NO_DECODE ) );
+ SfxStringItem aNewName( SID_FILE_NAME, aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
pViewFrame->GetDispatcher()->ExecuteList(
SID_SAVEASDOC, SfxCallMode::SYNCHRON,
@@ -454,11 +454,11 @@ IMPL_LINK_NOARG(SvxHyperlinkNewDocTp, ClickNewHdl_Impl, Button*, void)
if( aNewURL.GetProtocol() == INetProtocol::File )
{
- osl::FileBase::getSystemPathFromFileURL(aNewURL.GetMainURL( INetURLObject::NO_DECODE ), aStrTmp);
+ osl::FileBase::getSystemPathFromFileURL(aNewURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), aStrTmp);
}
else
{
- aStrTmp = aNewURL.GetMainURL( INetURLObject::DECODE_UNAMBIGUOUS );
+ aStrTmp = aNewURL.GetMainURL( INetURLObject::DecodeMechanism::Unambiguous );
}
m_pCbbPath->SetText ( aStrTmp );
diff --git a/cui/source/dialogs/hlinettp.cxx b/cui/source/dialogs/hlinettp.cxx
index 0f6d2c6efd30..402fb9c6246b 100644
--- a/cui/source/dialogs/hlinettp.cxx
+++ b/cui/source/dialogs/hlinettp.cxx
@@ -118,7 +118,7 @@ void SvxHyperlinkInternetTp::FillDlgFields(const OUString& rStrURL)
// set URL-field
// Show the scheme, #72740
if ( aURL.GetProtocol() != INetProtocol::NotValid )
- m_pCbbTarget->SetText( aURL.GetMainURL( INetURLObject::DECODE_UNAMBIGUOUS ) );
+ m_pCbbTarget->SetText( aURL.GetMainURL( INetURLObject::DecodeMechanism::Unambiguous ) );
else
m_pCbbTarget->SetText(rStrURL);
@@ -182,7 +182,7 @@ OUString SvxHyperlinkInternetTp::CreateAbsoluteURL() const
aURL.SetUserAndPass ( m_pEdLogin->GetText(), m_pEdPassword->GetText() );
if ( aURL.GetProtocol() != INetProtocol::NotValid )
- return aURL.GetMainURL( INetURLObject::DECODE_TO_IURI );
+ return aURL.GetMainURL( INetURLObject::DecodeMechanism::ToIUri );
else //#105788# always create a URL even if it is not valid
return aStrURL;
}
diff --git a/cui/source/dialogs/hlmailtp.cxx b/cui/source/dialogs/hlmailtp.cxx
index 73dd0b7e8719..3050e15ebe7d 100644
--- a/cui/source/dialogs/hlmailtp.cxx
+++ b/cui/source/dialogs/hlmailtp.cxx
@@ -161,7 +161,7 @@ OUString SvxHyperlinkMailTp::CreateAbsoluteURL() const
}
if ( aURL.GetProtocol() != INetProtocol::NotValid )
- return aURL.GetMainURL( INetURLObject::DECODE_WITH_CHARSET );
+ return aURL.GetMainURL( INetURLObject::DecodeMechanism::WithCharset );
else //#105788# always create a URL even if it is not valid
return aStrURL;
}
diff --git a/cui/source/dialogs/hltpbase.cxx b/cui/source/dialogs/hltpbase.cxx
index f6d48add9a56..c8a73f663764 100644
--- a/cui/source/dialogs/hltpbase.cxx
+++ b/cui/source/dialogs/hltpbase.cxx
@@ -45,19 +45,19 @@ OUString CreateUiNameFromURL( const OUString& aStrURL )
switch(aURLObj.GetProtocol())
{
case INetProtocol::File:
- osl::FileBase::getSystemPathFromFileURL(aURLObj.GetMainURL(INetURLObject::NO_DECODE), aStrUiURL);
+ osl::FileBase::getSystemPathFromFileURL(aURLObj.GetMainURL(INetURLObject::DecodeMechanism::NONE), aStrUiURL);
break;
case INetProtocol::Ftp :
{
//remove password from name
INetURLObject aTmpURL(aURLObj);
aTmpURL.SetPass("");
- aStrUiURL = aTmpURL.GetMainURL( INetURLObject::DECODE_UNAMBIGUOUS );
+ aStrUiURL = aTmpURL.GetMainURL( INetURLObject::DecodeMechanism::Unambiguous );
}
break;
default :
{
- aStrUiURL = aURLObj.GetMainURL(INetURLObject::DECODE_UNAMBIGUOUS);
+ aStrUiURL = aURLObj.GetMainURL(INetURLObject::DecodeMechanism::Unambiguous);
}
}
if(aStrUiURL.isEmpty())
diff --git a/cui/source/dialogs/insdlg.cxx b/cui/source/dialogs/insdlg.cxx
index 47af4955c749..189193706409 100644
--- a/cui/source/dialogs/insdlg.cxx
+++ b/cui/source/dialogs/insdlg.cxx
@@ -296,7 +296,7 @@ short SvInsertOleDlg::Execute()
INetURLObject aURL;
aURL.SetSmartProtocol( INetProtocol::File );
aURL.SetSmartURL( aFileName );
- aFileName = aURL.GetMainURL( INetURLObject::NO_DECODE );
+ aFileName = aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE );
bool bLink = m_pCbFilelink->IsChecked();
if ( !aFileName.isEmpty() )
@@ -522,7 +522,7 @@ short SfxInsertFloatingFrameDialog::Execute()
INetURLObject aObj;
aObj.SetSmartProtocol( INetProtocol::File );
if ( aObj.SetSmartURL( m_pEDURL->GetText() ) )
- aURL = aObj.GetMainURL( INetURLObject::NO_DECODE );
+ aURL = aObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
}
if ( !m_xObj.is() && !aURL.isEmpty() )
@@ -626,7 +626,7 @@ IMPL_LINK_NOARG( SfxInsertFloatingFrameDialog, OpenHdl, Button*, void)
// show the dialog
if ( aFileDlg.Execute() == ERRCODE_NONE )
m_pEDURL->SetText(
- INetURLObject( aFileDlg.GetPath() ).GetMainURL( INetURLObject::DECODE_WITH_CHARSET ) );
+ INetURLObject( aFileDlg.GetPath() ).GetMainURL( INetURLObject::DecodeMechanism::WithCharset ) );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/dialogs/linkdlg.cxx b/cui/source/dialogs/linkdlg.cxx
index d8201ba0e89a..bba24a8e707c 100644
--- a/cui/source/dialogs/linkdlg.cxx
+++ b/cui/source/dialogs/linkdlg.cxx
@@ -243,7 +243,7 @@ IMPL_LINK( SvBaseLinksDlg, LinksSelectHdl, SvTreeListBox *, pSvTabListBox, void
OUString aFileName;
sfx2::LinkManager::GetDisplayNames( pLink, &sType, &aFileName, pLinkNm, pFilter );
- aFileName = INetURLObject::decode(aFileName, INetURLObject::DECODE_UNAMBIGUOUS);
+ aFileName = INetURLObject::decode(aFileName, INetURLObject::DecodeMechanism::Unambiguous);
m_pFtFullFileName->SetText( aFileName );
m_pFtFullSourceName->SetText( sLink );
m_pFtFullTypeName->SetText( sType );
@@ -389,7 +389,7 @@ IMPL_LINK_NOARG( SvBaseLinksDlg, ChangeSourceClickHdl, Button *, void )
aUrl2.insertName( aUrl_.getName() );
OUString sNewLinkName;
MakeLnkName( sNewLinkName, nullptr ,
- aUrl2.GetMainURL(INetURLObject::DECODE_TO_IURI), sLinkName, &sFilter);
+ aUrl2.GetMainURL(INetURLObject::DecodeMechanism::ToIUri), sLinkName, &sFilter);
pLink->SetLinkSourceName( sNewLinkName );
pLink->Update();
}
@@ -631,7 +631,7 @@ void SvBaseLinksDlg::InsertEntry( const SvBaseLink& rLink, sal_uLong nPos, bool
OUString aTxt = m_pTbLinks->GetEllipsisString( sFileNm, nWidthPixel, DrawTextFlags::PathEllipsis );
INetURLObject aPath( sFileNm, INetProtocol::File );
OUString aFileName = aPath.getName();
- aFileName = INetURLObject::decode(aFileName, INetURLObject::DECODE_UNAMBIGUOUS);
+ aFileName = INetURLObject::decode(aFileName, INetURLObject::DecodeMechanism::Unambiguous);
if( aFileName.getLength() > aTxt.getLength() )
aTxt = aFileName;
diff --git a/cui/source/dialogs/multipat.cxx b/cui/source/dialogs/multipat.cxx
index f20db7a4583c..145077bd5c89 100644
--- a/cui/source/dialogs/multipat.cxx
+++ b/cui/source/dialogs/multipat.cxx
@@ -75,7 +75,7 @@ IMPL_LINK_NOARG(SvxMultiPathDialog, AddHdl_Impl, Button*, void)
{
INetURLObject aPath( xFolderPicker->getDirectory() );
aPath.removeFinalSlash();
- OUString aURL = aPath.GetMainURL( INetURLObject::NO_DECODE );
+ OUString aURL = aPath.GetMainURL( INetURLObject::DecodeMechanism::NONE );
OUString sInsPath;
osl::FileBase::getSystemPathFromFileURL(aURL, sInsPath);
@@ -108,7 +108,7 @@ IMPL_LINK_NOARG(SvxPathSelectDialog, AddHdl_Impl, Button*, void)
{
INetURLObject aPath( xFolderPicker->getDirectory() );
aPath.removeFinalSlash();
- OUString aURL = aPath.GetMainURL( INetURLObject::NO_DECODE );
+ OUString aURL = aPath.GetMainURL( INetURLObject::DecodeMechanism::NONE );
OUString sInsPath;
osl::FileBase::getSystemPathFromFileURL(aURL, sInsPath);
diff --git a/cui/source/options/doclinkdialog.cxx b/cui/source/options/doclinkdialog.cxx
index 600d6cb3f871..34b961a6e56d 100644
--- a/cui/source/options/doclinkdialog.cxx
+++ b/cui/source/options/doclinkdialog.cxx
@@ -188,7 +188,7 @@ namespace svx
aParser.SetSmartProtocol(INetProtocol::File);
aParser.SetSmartURL(aFileDlg.GetPath());
- m_pName->SetText(aParser.getBase(INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET));
+ m_pName->SetText(aParser.getBase(INetURLObject::LAST_SEGMENT, true, INetURLObject::DecodeMechanism::WithCharset));
m_pName->SetSelection(Selection(0,m_pName->GetText().getLength()));
m_pName->GrabFocus();
diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx
index c8bb0cb241eb..0f2005c68b20 100644
--- a/cui/source/options/optjava.cxx
+++ b/cui/source/options/optjava.cxx
@@ -1005,7 +1005,7 @@ IMPL_LINK_NOARG(SvxJavaClassPathDlg, AddArchiveHdl_Impl, Button*, void)
if ( m_pPathList->GetSelectEntryCount() > 0 )
{
INetURLObject aObj( m_pPathList->GetSelectEntry(), INetURLObject::FSYS_DETECT );
- sFolder = aObj.GetMainURL( INetURLObject::NO_DECODE );
+ sFolder = aObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
}
else
sFolder = SvtPathOptions().GetWorkPath();
@@ -1040,7 +1040,7 @@ IMPL_LINK_NOARG(SvxJavaClassPathDlg, AddPathHdl_Impl, Button*, void)
if ( m_pPathList->GetSelectEntryCount() > 0 )
{
INetURLObject aObj( m_pPathList->GetSelectEntry(), INetURLObject::FSYS_DETECT );
- sOldFolder = aObj.GetMainURL( INetURLObject::NO_DECODE );
+ sOldFolder = aObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
}
else
sOldFolder = SvtPathOptions().GetWorkPath();
diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx
index 599072104551..ad88c6032571 100644
--- a/cui/source/options/optlingu.cxx
+++ b/cui/source/options/optlingu.cxx
@@ -1630,7 +1630,7 @@ IMPL_LINK( SvxLinguTabPage, ClickHdl_Impl, Button *, pBtn, void )
"non-file URLs cannot be deleted" );
if ( aObj.GetProtocol() == INetProtocol::File )
{
- KillFile_Impl( aObj.GetMainURL( INetURLObject::NO_DECODE ) );
+ KillFile_Impl( aObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
}
}
diff --git a/cui/source/options/optpath.cxx b/cui/source/options/optpath.cxx
index 7c624a75cfb7..f6129224312d 100644
--- a/cui/source/options/optpath.cxx
+++ b/cui/source/options/optpath.cxx
@@ -625,7 +625,7 @@ IMPL_LINK_NOARG(SvxPathTabPage, PathHdl_Impl, Button*, void)
xFolderPicker = FolderPicker::create(xContext);
INetURLObject aURL( sWritable, INetProtocol::File );
- xFolderPicker->setDisplayDirectory( aURL.GetMainURL( INetURLObject::NO_DECODE ) );
+ xFolderPicker->setDisplayDirectory( aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
Reference< XAsynchronousExecutableDialog > xAsyncDlg( xFolderPicker, UNO_QUERY );
if ( xAsyncDlg.is() )
diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx
index 49564a9e1716..4d765ab6b4b1 100644
--- a/cui/source/tabpages/numpages.cxx
+++ b/cui/source/tabpages/numpages.cxx
@@ -1012,7 +1012,7 @@ IMPL_LINK_NOARG(SvxBitmapPickTabPage, ClickAddBrowseHdl_Impl, Button*, void)
xSimpleFileAccess->copy( aUserImageURL, aUserGalleryURL );
INetURLObject gURL( aUserGalleryURL );
std::unique_ptr<SvStream> pIn(::utl::UcbStreamHelper::CreateStream(
- gURL.GetMainURL( INetURLObject::NO_DECODE ), StreamMode::READ ));
+ gURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), StreamMode::READ ));
if ( pIn )
{
Graphic aGraphic;
diff --git a/cui/source/tabpages/tplnedef.cxx b/cui/source/tabpages/tplnedef.cxx
index 984a1c6e25f4..c32917ac71ef 100644
--- a/cui/source/tabpages/tplnedef.cxx
+++ b/cui/source/tabpages/tplnedef.cxx
@@ -743,7 +743,7 @@ IMPL_LINK_NOARG(SvxLineDefTabPage, ClickLoadHdl_Impl, Button*, void)
while (nIndex >= 0);
INetURLObject aFile(aLastDir);
- aDlg.SetDisplayDirectory( aFile.GetMainURL( INetURLObject::NO_DECODE ) );
+ aDlg.SetDisplayDirectory( aFile.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
if( aDlg.Execute() == ERRCODE_NONE )
{
@@ -753,7 +753,7 @@ IMPL_LINK_NOARG(SvxLineDefTabPage, ClickLoadHdl_Impl, Button*, void)
aPathURL.removeSegment();
aPathURL.removeFinalSlash();
- XDashListRef pDshLst = XPropertyList::AsDashList(XPropertyList::CreatePropertyList( XPropertyListType::Dash, aPathURL.GetMainURL( INetURLObject::NO_DECODE ), "" ));
+ XDashListRef pDshLst = XPropertyList::AsDashList(XPropertyList::CreatePropertyList( XPropertyListType::Dash, aPathURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), "" ));
pDshLst->SetName( aURL.getName() );
if( pDshLst->Load() )
@@ -820,7 +820,7 @@ IMPL_LINK_NOARG(SvxLineDefTabPage, ClickSaveHdl_Impl, Button*, void)
aFile.SetExtension( "sod" );
}
- aDlg.SetDisplayDirectory( aFile.GetMainURL( INetURLObject::NO_DECODE ) );
+ aDlg.SetDisplayDirectory( aFile.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
if ( aDlg.Execute() == ERRCODE_NONE )
{
INetURLObject aURL( aDlg.GetPath() );
@@ -830,7 +830,7 @@ IMPL_LINK_NOARG(SvxLineDefTabPage, ClickSaveHdl_Impl, Button*, void)
aPathURL.removeFinalSlash();
pDashList->SetName( aURL.getName() );
- pDashList->SetPath( aPathURL.GetMainURL( INetURLObject::NO_DECODE ) );
+ pDashList->SetPath( aPathURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
if( pDashList->Save() )
{
diff --git a/cui/source/tabpages/tplneend.cxx b/cui/source/tabpages/tplneend.cxx
index 9c5741a3dde6..8ac0b7a99763 100644
--- a/cui/source/tabpages/tplneend.cxx
+++ b/cui/source/tabpages/tplneend.cxx
@@ -555,7 +555,7 @@ IMPL_LINK_NOARG(SvxLineEndDefTabPage, ClickLoadHdl_Impl, Button*, void)
while (nIndex >= 0);
INetURLObject aFile(aLastDir);
- aDlg.SetDisplayDirectory( aFile.GetMainURL( INetURLObject::NO_DECODE ) );
+ aDlg.SetDisplayDirectory( aFile.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
if( aDlg.Execute() == ERRCODE_NONE )
{
@@ -568,7 +568,7 @@ IMPL_LINK_NOARG(SvxLineEndDefTabPage, ClickLoadHdl_Impl, Button*, void)
XLineEndListRef pLeList = XPropertyList::AsLineEndList(
XPropertyList::CreatePropertyList(
XPropertyListType::LineEnd,
- aPathURL.GetMainURL(INetURLObject::NO_DECODE), ""));
+ aPathURL.GetMainURL(INetURLObject::DecodeMechanism::NONE), ""));
pLeList->SetName( aURL.getName() );
if( pLeList->Load() )
{
@@ -632,7 +632,7 @@ IMPL_LINK_NOARG(SvxLineEndDefTabPage, ClickSaveHdl_Impl, Button*, void)
aFile.SetExtension( "soe" );
}
- aDlg.SetDisplayDirectory( aFile.GetMainURL( INetURLObject::NO_DECODE ) );
+ aDlg.SetDisplayDirectory( aFile.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
if ( aDlg.Execute() == ERRCODE_NONE )
{
INetURLObject aURL( aDlg.GetPath() );
@@ -642,7 +642,7 @@ IMPL_LINK_NOARG(SvxLineEndDefTabPage, ClickSaveHdl_Impl, Button*, void)
aPathURL.removeFinalSlash();
pLineEndList->SetName( aURL.getName() );
- pLineEndList->SetPath( aPathURL.GetMainURL( INetURLObject::NO_DECODE ) );
+ pLineEndList->SetPath( aPathURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
if( pLineEndList->Save() )
{
diff --git a/dbaccess/source/core/dataaccess/databasecontext.cxx b/dbaccess/source/core/dataaccess/databasecontext.cxx
index 0a59b428aa26..28984584f66e 100644
--- a/dbaccess/source/core/dataaccess/databasecontext.cxx
+++ b/dbaccess/source/core/dataaccess/databasecontext.cxx
@@ -364,7 +364,7 @@ Reference< XInterface > ODatabaseContext::loadObjectFromURL(const OUString& _rNa
if (bEmbeddedDataSource)
{
// In this case the host contains the real path, and the path is the embedded stream name.
- OUString sBaseURI = aURL.GetHost(INetURLObject::DECODE_WITH_CHARSET) + aURL.GetURLPath(INetURLObject::DECODE_WITH_CHARSET);
+ OUString sBaseURI = aURL.GetHost(INetURLObject::DecodeMechanism::WithCharset) + aURL.GetURLPath(INetURLObject::DecodeMechanism::WithCharset);
aArgs.put("BaseURI", sBaseURI);
}
diff --git a/dbaccess/source/core/dataaccess/databasedocument.cxx b/dbaccess/source/core/dataaccess/databasedocument.cxx
index 4d28b3756ea7..6ced98863c4a 100644
--- a/dbaccess/source/core/dataaccess/databasedocument.cxx
+++ b/dbaccess/source/core/dataaccess/databasedocument.cxx
@@ -1656,7 +1656,7 @@ void ODatabaseDocument::impl_writeStorage_throw( const Reference< XStorage >& _r
{
// In this case the host contains the real path, and the path is the embedded stream name.
INetURLObject aURL(sURL);
- sStreamRelPath = aURL.GetURLPath(INetURLObject::DECODE_WITH_CHARSET);
+ sStreamRelPath = aURL.GetURLPath(INetURLObject::DecodeMechanism::WithCharset);
if (sStreamRelPath.startsWith("/"))
sStreamRelPath = sStreamRelPath.copy(1);
}
diff --git a/dbaccess/source/core/dataaccess/datasource.cxx b/dbaccess/source/core/dataaccess/datasource.cxx
index fbd4bc6fb137..6d6771c2be88 100644
--- a/dbaccess/source/core/dataaccess/datasource.cxx
+++ b/dbaccess/source/core/dataaccess/datasource.cxx
@@ -1054,7 +1054,7 @@ Reference< XConnection > SAL_CALL ODatabaseSource::connectWithCompletion( const
OUString sServerName( m_pImpl->m_sName );
INetURLObject aURLCheck( sServerName );
if ( aURLCheck.GetProtocol() != INetProtocol::NotValid )
- sServerName = aURLCheck.getBase( INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_UNAMBIGUOUS );
+ sServerName = aURLCheck.getBase( INetURLObject::LAST_SEGMENT, true, INetURLObject::DecodeMechanism::Unambiguous );
// the request
AuthenticationRequest aRequest;
diff --git a/dbaccess/source/ext/macromigration/macromigrationpages.cxx b/dbaccess/source/ext/macromigration/macromigrationpages.cxx
index c8d58bcdbe07..dd1f49942698 100644
--- a/dbaccess/source/ext/macromigration/macromigrationpages.cxx
+++ b/dbaccess/source/ext/macromigration/macromigrationpages.cxx
@@ -132,7 +132,7 @@ namespace dbmm
aBaseName.append( ".backup" );
aURLParser.setBase( aBaseName.makeStringAndClear() );
- m_pLocationController->setURL( aURLParser.GetMainURL( INetURLObject::NO_DECODE ) );
+ m_pLocationController->setURL( aURLParser.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
impl_updateLocationDependentItems();
}
catch( const Exception& )
diff --git a/dbaccess/source/filter/xml/xmlfilter.cxx b/dbaccess/source/filter/xml/xmlfilter.cxx
index 43f4e01c9079..134ad6492982 100644
--- a/dbaccess/source/filter/xml/xmlfilter.cxx
+++ b/dbaccess/source/filter/xml/xmlfilter.cxx
@@ -305,8 +305,8 @@ bool ODBFilter::implImport( const Sequence< PropertyValue >& rDescriptor )
{
// In this case the host contains the real path, and the path is the embedded stream name.
INetURLObject aURL(sFileName);
- sFileName = aURL.GetHost(INetURLObject::DECODE_WITH_CHARSET);
- sStreamRelPath = aURL.GetURLPath(INetURLObject::DECODE_WITH_CHARSET);
+ sFileName = aURL.GetHost(INetURLObject::DecodeMechanism::WithCharset);
+ sStreamRelPath = aURL.GetURLPath(INetURLObject::DecodeMechanism::WithCharset);
if (sStreamRelPath.startsWith("/"))
sStreamRelPath = sStreamRelPath.copy(1);
}
diff --git a/dbaccess/source/ui/app/AppController.cxx b/dbaccess/source/ui/app/AppController.cxx
index 2c7f63ff70e6..0ff17e83ba5d 100644
--- a/dbaccess/source/ui/app/AppController.cxx
+++ b/dbaccess/source/ui/app/AppController.cxx
@@ -388,7 +388,7 @@ void SAL_CALL OApplicationController::disposing()
// add to svtool history options
SvtHistoryOptions().AppendItem( ePICKLIST,
- aURL.GetURLNoPass( INetURLObject::NO_DECODE ),
+ aURL.GetURLNoPass( INetURLObject::DecodeMechanism::NONE ),
aFilter,
getStrippedDatabaseName(),
OUString(),
@@ -396,7 +396,7 @@ void SAL_CALL OApplicationController::disposing()
// add to recent document list
if ( aURL.GetProtocol() == INetProtocol::File )
- Application::AddToRecentDocumentList( aURL.GetURLNoPass( INetURLObject::NO_DECODE ),
+ Application::AddToRecentDocumentList( aURL.GetURLNoPass( INetURLObject::DecodeMechanism::NONE ),
(pFilter) ? pFilter->GetMimeType() : OUString(),
(pFilter) ? pFilter->GetServiceName() : OUString() );
}
@@ -1141,7 +1141,7 @@ void OApplicationController::Execute(sal_uInt16 _nId, const Sequence< PropertyVa
INetURLObject aURL( aFileDlg.GetPath() );
try
{
- xStore->storeAsURL( aURL.GetMainURL( INetURLObject::NO_DECODE ), Sequence< PropertyValue >() );
+ xStore->storeAsURL( aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), Sequence< PropertyValue >() );
}
catch( const Exception& )
{
diff --git a/dbaccess/source/ui/browser/dbloader.cxx b/dbaccess/source/ui/browser/dbloader.cxx
index bfe6a76842c0..198b4a74941c 100644
--- a/dbaccess/source/ui/browser/dbloader.cxx
+++ b/dbaccess/source/ui/browser/dbloader.cxx
@@ -167,7 +167,7 @@ void SAL_CALL DBContentLoader::load(const Reference< XFrame > & rFrame, const OU
INetURLObject aParser( rURL );
Reference< XController2 > xController;
- const OUString sComponentURL( aParser.GetMainURL( INetURLObject::DECODE_TO_IURI ) );
+ const OUString sComponentURL( aParser.GetMainURL( INetURLObject::DecodeMechanism::ToIUri ) );
for (const ServiceNameToImplName& aImplementation : aImplementations)
{
if ( sComponentURL.equalsAscii( aImplementation.pAsciiServiceName ) )
diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx
index 6a60cec27c96..52b043cd50db 100644
--- a/dbaccess/source/ui/browser/unodatbr.cxx
+++ b/dbaccess/source/ui/browser/unodatbr.cxx
@@ -1083,8 +1083,8 @@ namespace
INetURLObject aURL( _rDS );
if ( aURL.GetProtocol() != INetProtocol::NotValid )
{
- _rDisplayName = aURL.getBase(INetURLObject::LAST_SEGMENT,true,INetURLObject::DECODE_WITH_CHARSET);
- _rUniqueId = aURL.GetMainURL( INetURLObject::NO_DECODE );
+ _rDisplayName = aURL.getBase(INetURLObject::LAST_SEGMENT,true,INetURLObject::DecodeMechanism::WithCharset);
+ _rUniqueId = aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE );
return true;
}
_rDisplayName = _rDS;
@@ -3644,7 +3644,7 @@ OUString SbaTableQueryBrowser::getPrivateTitle() const
sTitle = GetEntryText( pConnection );
INetURLObject aURL(sTitle);
if ( aURL.GetProtocol() != INetProtocol::NotValid )
- sTitle = aURL.getBase(INetURLObject::LAST_SEGMENT,true,INetURLObject::DECODE_WITH_CHARSET);
+ sTitle = aURL.getBase(INetURLObject::LAST_SEGMENT,true,INetURLObject::DecodeMechanism::WithCharset);
if ( !sName.isEmpty() )
{
sName += " - ";
diff --git a/dbaccess/source/ui/control/opendoccontrols.cxx b/dbaccess/source/ui/control/opendoccontrols.cxx
index 0eadbf03fc21..daac412787e3 100644
--- a/dbaccess/source/ui/control/opendoccontrols.cxx
+++ b/dbaccess/source/ui/control/opendoccontrols.cxx
@@ -178,9 +178,9 @@ namespace dbaui
aURL.SetPass( sPassword );
if ( sTitle.isEmpty() )
- sTitle = aURL.getBase( INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_UNAMBIGUOUS );
+ sTitle = aURL.getBase( INetURLObject::LAST_SEGMENT, true, INetURLObject::DecodeMechanism::Unambiguous );
- OUString sDecodedURL = aURL.GetMainURL( INetURLObject::NO_DECODE );
+ OUString sDecodedURL = aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE );
sal_Int32 nPos = InsertEntry( sTitle );
m_aURLs.insert( MapIndexToStringPair::value_type( nPos, StringPair( sDecodedURL, sFilter ) ) );
diff --git a/dbaccess/source/ui/dlg/ConnectionHelper.cxx b/dbaccess/source/ui/dlg/ConnectionHelper.cxx
index 1226b532d8f8..bb0ec8c1404e 100644
--- a/dbaccess/source/ui/dlg/ConnectionHelper.cxx
+++ b/dbaccess/source/ui/dlg/ConnectionHelper.cxx
@@ -201,7 +201,7 @@ namespace dbaui
INetURLObject aSelectedDirectory( sSelectedDirectory, INetURLObject::EncodeMechanism::WasEncoded, RTL_TEXTENCODING_UTF8 );
// for UI purpose, we don't want to have the path encoded
- sSelectedDirectory = aSelectedDirectory.GetMainURL( INetURLObject::DECODE_WITH_CHARSET );
+ sSelectedDirectory = aSelectedDirectory.GetMainURL( INetURLObject::DecodeMechanism::WithCharset );
setURLNoPrefix( sSelectedDirectory );
SetRoadmapStateValue(true);
@@ -429,7 +429,7 @@ namespace dbaui
// encode the URL
INetURLObject aFileURL( sFileURLDecoded, INetURLObject::EncodeMechanism::All, RTL_TEXTENCODING_UTF8 );
- sFileURLDecoded = aFileURL.GetMainURL( INetURLObject::NO_DECODE );
+ sFileURLDecoded = aFileURL.GetMainURL( INetURLObject::DecodeMechanism::NONE );
}
}
return sURL;
@@ -583,7 +583,7 @@ namespace dbaui
{
aToBeCreated.push_back(aParser.getName()); // remember the local name for creation
aParser.removeSegment(); // cut the local name
- eParentExists = pathExists(aParser.GetMainURL(INetURLObject::NO_DECODE), false);
+ eParentExists = pathExists(aParser.GetMainURL(INetURLObject::DecodeMechanism::NONE), false);
}
if (!aParser.getSegmentCount())
@@ -594,7 +594,7 @@ namespace dbaui
{
// the parent content
Reference< XCommandEnvironment > xEmptyEnv;
- ::ucbhelper::Content aParent(aParser.GetMainURL(INetURLObject::NO_DECODE), xEmptyEnv, comphelper::getProcessComponentContext());
+ ::ucbhelper::Content aParent(aParser.GetMainURL(INetURLObject::DecodeMechanism::NONE), xEmptyEnv, comphelper::getProcessComponentContext());
OUString sContentType;
if ( INetProtocol::File == eProtocol )
diff --git a/dbaccess/source/ui/dlg/dbfindex.cxx b/dbaccess/source/ui/dlg/dbfindex.cxx
index 2495ff2316df..18dce51c1dbd 100644
--- a/dbaccess/source/ui/dlg/dbfindex.cxx
+++ b/dbaccess/source/ui/dlg/dbfindex.cxx
@@ -280,7 +280,7 @@ void ODbaseIndexDialog::Init()
aURL.SetSmartURL(m_aDSN);
// String aFileName = aURL.PathToFileName();
- m_aDSN = aURL.GetMainURL(INetURLObject::NO_DECODE);
+ m_aDSN = aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE);
::ucbhelper::Content aFile;
bool bFolder=true;
try
diff --git a/dbaccess/source/ui/dlg/dbwizsetup.cxx b/dbaccess/source/ui/dlg/dbwizsetup.cxx
index 9e33bc439e79..cede9081fa8f 100644
--- a/dbaccess/source/ui/dlg/dbwizsetup.cxx
+++ b/dbaccess/source/ui/dlg/dbwizsetup.cxx
@@ -763,7 +763,7 @@ bool ODbTypeWizDialogSetup::SaveDatabaseDocument()
INetURLObject aDBPathURL(m_sWorkPath);
aDBPathURL.Append(m_aDocURL.getBase());
createUniqueFolderName(&aDBPathURL);
- sUrl = aDBPathURL.GetMainURL( INetURLObject::NO_DECODE);
+ sUrl = aDBPathURL.GetMainURL( INetURLObject::DecodeMechanism::NONE);
xSimpleFileAccess->createFolder(sUrl);
sUrl = eType.concat(sUrl);
}
@@ -776,7 +776,7 @@ bool ODbTypeWizDialogSetup::SaveDatabaseDocument()
Reference< XPropertySet > xDatasource = m_pImpl->getCurrentDataSource();
Reference< XDatabaseContext > xDatabaseContext( DatabaseContext::create(getORB()) );
INetURLObject aURL( _sPath );
- OUString sFilename = aURL.getBase( INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET );
+ OUString sFilename = aURL.getBase( INetURLObject::LAST_SEGMENT, true, INetURLObject::DecodeMechanism::WithCharset );
OUString sDatabaseName = ::dbtools::createUniqueName(xDatabaseContext, sFilename, false);
xDatabaseContext->registerObject(sDatabaseName, xDatasource);
}
@@ -791,7 +791,7 @@ bool ODbTypeWizDialogSetup::SaveDatabaseDocument()
if ( pFilter )
{
INetURLObject aWorkURL( m_sWorkPath );
- aFileDlg.SetDisplayFolder( aWorkURL.GetMainURL( INetURLObject::NO_DECODE ));
+ aFileDlg.SetDisplayFolder( aWorkURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ));
OUString sDefaultName = ModuleRes( STR_DATABASEDEFAULTNAME );
OUString sExtension = pFilter->GetDefaultExtension();
@@ -809,7 +809,7 @@ bool ODbTypeWizDialogSetup::SaveDatabaseDocument()
if( m_aDocURL.GetProtocol() != INetProtocol::NotValid )
{
- OUString sFileName = m_aDocURL.GetMainURL( INetURLObject::NO_DECODE );
+ OUString sFileName = m_aDocURL.GetMainURL( INetURLObject::DecodeMechanism::NONE );
if ( ::utl::UCBContentHelper::IsDocument(sFileName) )
::utl::UCBContentHelper::Kill(sFileName);
m_pOutSet->Put(SfxStringItem(DSID_DOCUMENT_URL, sFileName));
@@ -827,7 +827,7 @@ bool ODbTypeWizDialogSetup::SaveDatabaseDocument()
sal_Int32 i = 1;
while (bFolderExists)
{
- bFolderExists = xSimpleFileAccess->isFolder(pURL->GetMainURL( INetURLObject::NO_DECODE ));
+ bFolderExists = xSimpleFileAccess->isFolder(pURL->GetMainURL( INetURLObject::DecodeMechanism::NONE ));
if (bFolderExists)
{
i++;
@@ -846,14 +846,14 @@ bool ODbTypeWizDialogSetup::SaveDatabaseDocument()
INetURLObject aExistenceCheck( _rURL );
for ( sal_Int32 i = 1; bElementExists; )
{
- bElementExists = xSimpleFileAccess->exists( aExistenceCheck.GetMainURL( INetURLObject::NO_DECODE ) );
+ bElementExists = xSimpleFileAccess->exists( aExistenceCheck.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
if ( bElementExists )
{
aExistenceCheck.setBase( BaseName.concat( OUString::number( i ) ) );
++i;
}
}
- return aExistenceCheck.getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET );
+ return aExistenceCheck.getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::DecodeMechanism::WithCharset );
}
IWizardPageController* ODbTypeWizDialogSetup::getPageController( TabPage* _pCurrentPage ) const
{
diff --git a/dbaccess/source/ui/misc/TableCopyHelper.cxx b/dbaccess/source/ui/misc/TableCopyHelper.cxx
index 40ce52a4a74a..d7b3864001d0 100644
--- a/dbaccess/source/ui/misc/TableCopyHelper.cxx
+++ b/dbaccess/source/ui/misc/TableCopyHelper.cxx
@@ -309,7 +309,7 @@ void OTableCopyHelper::asyncCopyTagTable( DropDescriptor& _rDesc
// we now have to delete the temp file created in executeDrop
INetURLObject aURL;
aURL.SetURL(_rDesc.aUrl);
- ::utl::UCBContentHelper::Kill(aURL.GetMainURL(INetURLObject::NO_DECODE));
+ ::utl::UCBContentHelper::Kill(aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE));
}
else if ( !_rDesc.bError )
pasteTable(_rDesc.aDroppedData,i_rDestDataSource,_xConnection);
diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx
index 44859bfaebed..b1788d888755 100644
--- a/dbaccess/source/ui/misc/UITools.cxx
+++ b/dbaccess/source/ui/misc/UITools.cxx
@@ -1079,7 +1079,7 @@ OUString getStrippedDatabaseName(const Reference<XPropertySet>& _xDataSource,OUS
OUString sName = _rsDatabaseName;
INetURLObject aURL(sName);
if ( aURL.GetProtocol() != INetProtocol::NotValid )
- sName = aURL.getBase(INetURLObject::LAST_SEGMENT,true,INetURLObject::DECODE_UNAMBIGUOUS);
+ sName = aURL.getBase(INetURLObject::LAST_SEGMENT,true,INetURLObject::DecodeMechanism::Unambiguous);
return sName;
}
@@ -1110,7 +1110,7 @@ namespace
try
{
- ::ucbhelper::Content aCnt( INetURLObject( _rURL ).GetMainURL( INetURLObject::NO_DECODE ),
+ ::ucbhelper::Content aCnt( INetURLObject( _rURL ).GetMainURL( INetURLObject::DecodeMechanism::NONE ),
Reference< css::ucb::XCommandEnvironment >(),
comphelper::getProcessComponentContext() );
if ( ( aCnt.getPropertyValue("AnchorName") >>= sAnchor ) )
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 0a5fd7d9ddf9..eba8bf6e1488 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -2337,7 +2337,7 @@ OUString GetURL_Impl(
bool bWasAbsolute;
INetURLObject aURL = aObj.smartRel2Abs( rName, bWasAbsolute, false, INetURLObject::EncodeMechanism::WasEncoded,
RTL_TEXTENCODING_UTF8, true );
- OUString aFileURL = aURL.GetMainURL(INetURLObject::NO_DECODE);
+ OUString aFileURL = aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE);
::osl::FileStatus aStatus( osl_FileStatus_Mask_FileURL );
::osl::DirectoryItem aItem;
diff --git a/desktop/source/migration/migration.cxx b/desktop/source/migration/migration.cxx
index 880bf029fbdb..2efae5aa59d3 100644
--- a/desktop/source/migration/migration.cxx
+++ b/desktop/source/migration/migration.cxx
@@ -458,12 +458,12 @@ migrations_vr MigrationImpl::readMigrationSteps(const OUString& rMigrationName)
static FileBase::RC _checkAndCreateDirectory(INetURLObject& dirURL)
{
- FileBase::RC result = Directory::create(dirURL.GetMainURL(INetURLObject::DECODE_TO_IURI));
+ FileBase::RC result = Directory::create(dirURL.GetMainURL(INetURLObject::DecodeMechanism::ToIUri));
if (result == FileBase::E_NOENT) {
INetURLObject baseURL(dirURL);
baseURL.removeSegment();
_checkAndCreateDirectory(baseURL);
- return Directory::create(dirURL.GetMainURL(INetURLObject::DECODE_TO_IURI));
+ return Directory::create(dirURL.GetMainURL(INetURLObject::DecodeMechanism::ToIUri));
} else
return result;
}
@@ -507,7 +507,7 @@ void MigrationImpl::setInstallInfoIfExist(
const OUString& rConfigDir,
const OUString& rVersion)
{
- OUString url(INetURLObject(rConfigDir).GetMainURL(INetURLObject::NO_DECODE));
+ OUString url(INetURLObject(rConfigDir).GetMainURL(INetURLObject::DecodeMechanism::NONE));
osl::DirectoryItem item;
osl::FileStatus stat(osl_FileStatus_Mask_Type);
diff --git a/desktop/source/migration/services/basicmigration.cxx b/desktop/source/migration/services/basicmigration.cxx
index fb7c7afeb7bc..a71ca5b0ebaf 100644
--- a/desktop/source/migration/services/basicmigration.cxx
+++ b/desktop/source/migration/services/basicmigration.cxx
@@ -102,13 +102,13 @@ namespace migration
void BasicMigration::checkAndCreateDirectory( INetURLObject& rDirURL )
{
- ::osl::FileBase::RC aResult = ::osl::Directory::create( rDirURL.GetMainURL( INetURLObject::DECODE_TO_IURI ) );
+ ::osl::FileBase::RC aResult = ::osl::Directory::create( rDirURL.GetMainURL( INetURLObject::DecodeMechanism::ToIUri ) );
if ( aResult == ::osl::FileBase::E_NOENT )
{
INetURLObject aBaseURL( rDirURL );
aBaseURL.removeSegment();
checkAndCreateDirectory( aBaseURL );
- ::osl::Directory::create( rDirURL.GetMainURL( INetURLObject::DECODE_TO_IURI ) );
+ ::osl::Directory::create( rDirURL.GetMainURL( INetURLObject::DecodeMechanism::ToIUri ) );
}
}
diff --git a/desktop/source/migration/services/oo3extensionmigration.cxx b/desktop/source/migration/services/oo3extensionmigration.cxx
index b8b067735f68..a0caafb4ea9a 100644
--- a/desktop/source/migration/services/oo3extensionmigration.cxx
+++ b/desktop/source/migration/services/oo3extensionmigration.cxx
@@ -80,13 +80,13 @@ OO3ExtensionMigration::~OO3ExtensionMigration()
void OO3ExtensionMigration::checkAndCreateDirectory( INetURLObject& rDirURL )
{
- ::osl::FileBase::RC aResult = ::osl::Directory::create( rDirURL.GetMainURL( INetURLObject::DECODE_TO_IURI ) );
+ ::osl::FileBase::RC aResult = ::osl::Directory::create( rDirURL.GetMainURL( INetURLObject::DecodeMechanism::ToIUri ) );
if ( aResult == ::osl::FileBase::E_NOENT )
{
INetURLObject aBaseURL( rDirURL );
aBaseURL.removeSegment();
checkAndCreateDirectory( aBaseURL );
- ::osl::Directory::create( rDirURL.GetMainURL( INetURLObject::DECODE_TO_IURI ) );
+ ::osl::Directory::create( rDirURL.GetMainURL( INetURLObject::DecodeMechanism::ToIUri ) );
}
}
diff --git a/desktop/source/migration/services/wordbookmigration.cxx b/desktop/source/migration/services/wordbookmigration.cxx
index bf6816d0295b..df8a30f57082 100644
--- a/desktop/source/migration/services/wordbookmigration.cxx
+++ b/desktop/source/migration/services/wordbookmigration.cxx
@@ -95,13 +95,13 @@ namespace migration
void WordbookMigration::checkAndCreateDirectory( INetURLObject& rDirURL )
{
- ::osl::FileBase::RC aResult = ::osl::Directory::create( rDirURL.GetMainURL( INetURLObject::DECODE_TO_IURI ) );
+ ::osl::FileBase::RC aResult = ::osl::Directory::create( rDirURL.GetMainURL( INetURLObject::DecodeMechanism::ToIUri ) );
if ( aResult == ::osl::FileBase::E_NOENT )
{
INetURLObject aBaseURL( rDirURL );
aBaseURL.removeSegment();
checkAndCreateDirectory( aBaseURL );
- ::osl::Directory::create( rDirURL.GetMainURL( INetURLObject::DECODE_TO_IURI ) );
+ ::osl::Directory::create( rDirURL.GetMainURL( INetURLObject::DecodeMechanism::ToIUri ) );
}
}
diff --git a/editeng/source/editeng/eehtml.cxx b/editeng/source/editeng/eehtml.cxx
index 4f7f99bba563..44aabf82c9ed 100644
--- a/editeng/source/editeng/eehtml.cxx
+++ b/editeng/source/editeng/eehtml.cxx
@@ -778,7 +778,7 @@ void EditHTMLParser::AnchorStart()
INetURLObject aTargetURL;
INetURLObject aRootURL( aBaseURL );
aRootURL.GetNewAbsURL( aRef, &aTargetURL );
- aURL = aTargetURL.GetMainURL( INetURLObject::DECODE_TO_IURI );
+ aURL = aTargetURL.GetMainURL( INetURLObject::DecodeMechanism::ToIUri );
}
pCurAnchor = new AnchorInfo;
pCurAnchor->aHRef = aURL;
diff --git a/editeng/source/items/flditem.cxx b/editeng/source/items/flditem.cxx
index 30e742b0a79d..f235b5ea8f6e 100644
--- a/editeng/source/items/flditem.cxx
+++ b/editeng/source/items/flditem.cxx
@@ -996,11 +996,11 @@ OUString SvxExtFileField::GetFormatted() const
break;
case SVXFILEFORMAT_NAME:
- aString = aURLObj.getBase(INetURLObject::LAST_SEGMENT,true,INetURLObject::DECODE_UNAMBIGUOUS);
+ aString = aURLObj.getBase(INetURLObject::LAST_SEGMENT,true,INetURLObject::DecodeMechanism::Unambiguous);
break;
case SVXFILEFORMAT_NAME_EXT:
- aString = aURLObj.getName(INetURLObject::LAST_SEGMENT,true,INetURLObject::DECODE_UNAMBIGUOUS);
+ aString = aURLObj.getName(INetURLObject::LAST_SEGMENT,true,INetURLObject::DecodeMechanism::Unambiguous);
break;
}
}
@@ -1009,14 +1009,14 @@ OUString SvxExtFileField::GetFormatted() const
switch( eFormat )
{
case SVXFILEFORMAT_FULLPATH:
- aString = aURLObj.GetMainURL( INetURLObject::DECODE_TO_IURI );
+ aString = aURLObj.GetMainURL( INetURLObject::DecodeMechanism::ToIUri );
break;
case SVXFILEFORMAT_PATH:
aURLObj.removeSegment(INetURLObject::LAST_SEGMENT, false);
// #101742# Leave trailing slash at the pathname
aURLObj.setFinalSlash();
- aString = aURLObj.GetMainURL( INetURLObject::DECODE_TO_IURI );
+ aString = aURLObj.GetMainURL( INetURLObject::DecodeMechanism::ToIUri );
break;
case SVXFILEFORMAT_NAME:
diff --git a/editeng/source/misc/acorrcfg.cxx b/editeng/source/misc/acorrcfg.cxx
index a07187d55bcb..fd227fc171ea 100644
--- a/editeng/source/misc/acorrcfg.cxx
+++ b/editeng/source/misc/acorrcfg.cxx
@@ -64,7 +64,7 @@ SvxAutoCorrCfg::SvxAutoCorrCfg() :
{
INetURLObject aPath( *pS );
aPath.insertName("acor");
- *pS = aPath.GetMainURL(INetURLObject::DECODE_TO_IURI);
+ *pS = aPath.GetMainURL(INetURLObject::DecodeMechanism::ToIUri);
}
pAutoCorrect = new SvxAutoCorrect( sSharePath, sUserPath );
diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index cb64cbb47974..03e90b37eb60 100644
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -2369,7 +2369,7 @@ void SvxAutoCorrectLanguageLists::MakeUserStorage_Impl()
{
try
{
- OUString sMain(aDest.GetMainURL( INetURLObject::DECODE_TO_IURI ));
+ OUString sMain(aDest.GetMainURL( INetURLObject::DecodeMechanism::ToIUri ));
sal_Unicode cSlash = '/';
sal_Int32 nSlashPos = sMain.lastIndexOf(cSlash);
sMain = sMain.copy(0, nSlashPos);
@@ -2377,7 +2377,7 @@ void SvxAutoCorrectLanguageLists::MakeUserStorage_Impl()
TransferInfo aInfo;
aInfo.NameClash = NameClash::OVERWRITE;
aInfo.NewTitle = aDest.GetName();
- aInfo.SourceURL = aSource.GetMainURL( INetURLObject::DECODE_TO_IURI );
+ aInfo.SourceURL = aSource.GetMainURL( INetURLObject::DecodeMechanism::ToIUri );
aInfo.MoveData = false;
aNewContent.executeCommand( "transfer", Any(aInfo));
}
@@ -2388,7 +2388,7 @@ void SvxAutoCorrectLanguageLists::MakeUserStorage_Impl()
}
if (bConvert && !bError)
{
- tools::SvRef<SotStorage> xSrcStg = new SotStorage( aDest.GetMainURL( INetURLObject::DECODE_TO_IURI ), StreamMode::READ );
+ tools::SvRef<SotStorage> xSrcStg = new SotStorage( aDest.GetMainURL( INetURLObject::DecodeMechanism::ToIUri ), StreamMode::READ );
tools::SvRef<SotStorage> xDstStg = new SotStorage( sUserAutoCorrFile, StreamMode::WRITE );
if( xSrcStg.Is() && xDstStg.Is() )
@@ -2423,7 +2423,7 @@ void SvxAutoCorrectLanguageLists::MakeUserStorage_Impl()
xDstStg = nullptr;
try
{
- ::ucbhelper::Content aContent ( aDest.GetMainURL( INetURLObject::DECODE_TO_IURI ), uno::Reference < XCommandEnvironment >(), comphelper::getProcessComponentContext() );
+ ::ucbhelper::Content aContent ( aDest.GetMainURL( INetURLObject::DecodeMechanism::ToIUri ), uno::Reference < XCommandEnvironment >(), comphelper::getProcessComponentContext() );
aContent.executeCommand ( "delete", makeAny ( true ) );
}
catch (...)
diff --git a/extensions/source/abpilot/abpfinalpage.cxx b/extensions/source/abpilot/abpfinalpage.cxx
index de43b117c49e..efd0227d2944 100644
--- a/extensions/source/abpilot/abpfinalpage.cxx
+++ b/extensions/source/abpilot/abpfinalpage.cxx
@@ -121,7 +121,7 @@ namespace abp
aURL.SetURL(sPath);
}
OSL_ENSURE( aURL.GetProtocol() != INetProtocol::NotValid ,"No valid file name!");
- rSettings.sDataSourceName = aURL.GetMainURL( INetURLObject::NO_DECODE );
+ rSettings.sDataSourceName = aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE );
m_pLocationController->setURL( rSettings.sDataSourceName );
OUString sName = aURL.getName( );
sal_Int32 nPos = sName.indexOf(aURL.GetExtension());
diff --git a/extensions/source/abpilot/datasourcehandling.cxx b/extensions/source/abpilot/datasourcehandling.cxx
index 5b287d0de0de..d8d5ec7d03b1 100644
--- a/extensions/source/abpilot/datasourcehandling.cxx
+++ b/extensions/source/abpilot/datasourcehandling.cxx
@@ -63,7 +63,7 @@ OUString lcl_getOwnURL(SfxObjectShell* pObjectShell)
return aRet;
const INetURLObject& rURLObject = pObjectShell->GetMedium()->GetURLObject();
- aRet = rURLObject.GetMainURL(INetURLObject::DECODE_WITH_CHARSET);
+ aRet = rURLObject.GetMainURL(INetURLObject::DecodeMechanism::WithCharset);
return aRet;
}
diff --git a/extensions/source/dbpilots/controlwizard.cxx b/extensions/source/dbpilots/controlwizard.cxx
index ad1d236921c3..eb42d78be697 100644
--- a/extensions/source/dbpilots/controlwizard.cxx
+++ b/extensions/source/dbpilots/controlwizard.cxx
@@ -212,7 +212,7 @@ namespace dbp
INetURLObject aURL( sDataSource );
if( aURL.GetProtocol() != INetProtocol::NotValid )
- sDataSource = aURL.GetName(INetURLObject::DECODE_WITH_CHARSET);
+ sDataSource = aURL.GetName(INetURLObject::DecodeMechanism::WithCharset);
m_pFormDatasource->SetText(sDataSource);
m_pFormTable->SetText(sCommand);
diff --git a/extensions/source/propctrlr/formcomponenthandler.cxx b/extensions/source/propctrlr/formcomponenthandler.cxx
index 43fdf3ed956e..18420096a470 100644
--- a/extensions/source/propctrlr/formcomponenthandler.cxx
+++ b/extensions/source/propctrlr/formcomponenthandler.cxx
@@ -2408,7 +2408,7 @@ namespace pcr
// additional info about what happened
INetURLObject aParser( sDataSourceName );
if ( aParser.GetProtocol() != INetProtocol::NotValid )
- sDataSourceName = aParser.getBase( INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET );
+ sDataSourceName = aParser.getBase( INetURLObject::LAST_SEGMENT, true, INetURLObject::DecodeMechanism::WithCharset );
OUString sInfo(PcrRes(RID_STR_UNABLETOCONNECT).toString().replaceAll("$name$", sDataSourceName));
SQLContext aContext;
aContext.Message = sInfo;
diff --git a/filter/source/config/cache/filtercache.cxx b/filter/source/config/cache/filtercache.cxx
index d1a56b7997a3..86d092e73b1a 100644
--- a/filter/source/config/cache/filtercache.cxx
+++ b/filter/source/config/cache/filtercache.cxx
@@ -688,7 +688,7 @@ void FilterCache::detectFlatForURL(const css::util::URL& aURL ,
INetURLObject aParser (aURL.Main);
OUString sExtension = aParser.getExtension(INetURLObject::LAST_SEGMENT ,
true ,
- INetURLObject::DECODE_WITH_CHARSET);
+ INetURLObject::DecodeMechanism::WithCharset);
sExtension = sExtension.toAsciiLowerCase();
// SAFE -> ----------------------------------
diff --git a/filter/source/config/cache/typedetection.cxx b/filter/source/config/cache/typedetection.cxx
index 92c10074d454..4638e290e17f 100644
--- a/filter/source/config/cache/typedetection.cxx
+++ b/filter/source/config/cache/typedetection.cxx
@@ -674,7 +674,7 @@ bool TypeDetection::impl_getPreselectionForType(
INetURLObject aParser (aParsedURL.Main);
OUString sExtension = aParser.getExtension(INetURLObject::LAST_SEGMENT ,
true ,
- INetURLObject::DECODE_WITH_CHARSET);
+ INetURLObject::DecodeMechanism::WithCharset);
sExtension = sExtension.toAsciiLowerCase();
// otherwise we must know, if it matches to the given URL really.
diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx
index d6c8ce30403c..8810f9fd57d1 100644
--- a/filter/source/msfilter/escherex.cxx
+++ b/filter/source/msfilter/escherex.cxx
@@ -1584,7 +1584,7 @@ bool EscherPropertyContainer::CreateGraphicProperties(
nFormat != GraphicFileFormat::EMF) )
{
std::unique_ptr<SvStream> pIn(::utl::UcbStreamHelper::CreateStream(
- aTmp.GetMainURL( INetURLObject::NO_DECODE ), StreamMode::READ ));
+ aTmp.GetMainURL( INetURLObject::DecodeMechanism::NONE ), StreamMode::READ ));
if ( pIn )
{
Graphic aGraphic;
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index c498cdb862e4..517a7e5b4fc1 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -3967,7 +3967,7 @@ SdrObject* SvxMSDffManager::ImportGraphic( SvStream& rSt, SfxItemSet& rSet, cons
GraphicFilter &rGrfFilter = GraphicFilter::GetGraphicFilter();
aLinkFilterName = rGrfFilter.GetImportFormatName(
rGrfFilter.GetImportFormatNumberForShortName( aAbsURL.getExtension() ) );
- aLinkFileName = aAbsURL.GetMainURL( INetURLObject::DECODE_TO_IURI );
+ aLinkFileName = aAbsURL.GetMainURL( INetURLObject::DecodeMechanism::ToIUri );
}
else
aLinkFileName = aFileName;
@@ -6417,7 +6417,7 @@ bool SvxMSDffManager::GetBLIPDirect( SvStream& rBLIPStream, Graphic& rData, Rect
aURL.removeFinalSlash();
aURL.Append( aFileName );
- aURLStr = aURL.GetMainURL( INetURLObject::NO_DECODE );
+ aURLStr = aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE );
SAL_INFO("filter.ms", "dumping " << aURLStr);
diff --git a/filter/source/pdf/pdfexport.cxx b/filter/source/pdf/pdfexport.cxx
index 99d1b4dccf81..e36eb5c7ff47 100644
--- a/filter/source/pdf/pdfexport.cxx
+++ b/filter/source/pdf/pdfexport.cxx
@@ -554,7 +554,7 @@ bool PDFExport::Export( const OUString& rFile, const Sequence< PropertyValue >&
rFilterData[ nData ].Value >>= mbExportPlaceholders;
}
- aContext.URL = aURL.GetMainURL(INetURLObject::DECODE_TO_IURI);
+ aContext.URL = aURL.GetMainURL(INetURLObject::DecodeMechanism::ToIUri);
// set the correct version, depending on user request
switch( mnPDFTypeSelection )
diff --git a/filter/source/storagefilterdetect/filterdetect.cxx b/filter/source/storagefilterdetect/filterdetect.cxx
index fa10c3c4e77a..a549ec64f19a 100644
--- a/filter/source/storagefilterdetect/filterdetect.cxx
+++ b/filter/source/storagefilterdetect/filterdetect.cxx
@@ -121,7 +121,7 @@ OUString SAL_CALL StorageFilterDetect::detect(uno::Sequence<beans::PropertyValue
if ( xInteraction.is() )
{
INetURLObject aParser( aMediaDesc.getUnpackedValueOrDefault( MediaDescriptor::PROP_URL(), OUString() ) );
- OUString aDocumentTitle = aParser.getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET );
+ OUString aDocumentTitle = aParser.getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::DecodeMechanism::WithCharset );
bool bRepairPackage = aMediaDesc.getUnpackedValueOrDefault( "RepairPackage", false );
// fdo#46310 Don't try to repair if the user rejected it once.
bool bRepairAllowed = aMediaDesc.getUnpackedValueOrDefault( "RepairAllowed", true );
diff --git a/filter/source/textfilterdetect/filterdetect.cxx b/filter/source/textfilterdetect/filterdetect.cxx
index 3368af1e79aa..b8f9cab62cba 100644
--- a/filter/source/textfilterdetect/filterdetect.cxx
+++ b/filter/source/textfilterdetect/filterdetect.cxx
@@ -168,7 +168,7 @@ OUString SAL_CALL PlainTextFilterDetect::detect(uno::Sequence<beans::PropertyVal
}
// Get the file name extension.
INetURLObject aParser(aMediaDesc.getUnpackedValueOrDefault(MediaDescriptor::PROP_URL(), OUString() ) );
- OUString aExt = aParser.getExtension(INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET);
+ OUString aExt = aParser.getExtension(INetURLObject::LAST_SEGMENT, true, INetURLObject::DecodeMechanism::WithCharset);
aExt = aExt.toAsciiLowerCase();
OUString aName = aParser.getName().toAsciiLowerCase();
diff --git a/filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx b/filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx
index 88d829dead0b..13cfb4a27606 100644
--- a/filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx
+++ b/filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx
@@ -89,7 +89,7 @@ bool SAL_CALL XmlFilterAdaptor::importImpl( const Sequence< css::beans::Property
INetURLObject aURLObj(aBaseURI);
// base URI in this case is the URI of the actual saving location
// aURLObj.removeSegment();
- aBaseURI = aURLObj.GetMainURL(INetURLObject::NO_DECODE);
+ aBaseURI = aURLObj.GetMainURL(INetURLObject::DecodeMechanism::NONE);
}
// create an XProperty set to configure the exporter for pretty printing
@@ -242,7 +242,7 @@ bool SAL_CALL XmlFilterAdaptor::exportImpl( const Sequence< css::beans::Property
INetURLObject aURLObj(aBaseURI);
// base URI in this case is the URI of the actual saving location
// aURLObj.removeSegment();
- aBaseURI = aURLObj.GetMainURL(INetURLObject::NO_DECODE);
+ aBaseURI = aURLObj.GetMainURL(INetURLObject::DecodeMechanism::NONE);
}
// create an XProperty set to configure the exporter for pretty printing
diff --git a/filter/source/xsltdialog/xmlfiltertestdialog.cxx b/filter/source/xsltdialog/xmlfiltertestdialog.cxx
index 686d1427cf78..eb6900a2b661 100644
--- a/filter/source/xsltdialog/xmlfiltertestdialog.cxx
+++ b/filter/source/xsltdialog/xmlfiltertestdialog.cxx
@@ -226,7 +226,7 @@ void XMLFilterTestDialog::test( const filter_info_impl& rFilterInfo )
static OUString getFileNameFromURL( OUString& rURL )
{
INetURLObject aURL( rURL );
- OUString aName( aURL.getName(INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET) );
+ OUString aName( aURL.getName(INetURLObject::LAST_SEGMENT, true, INetURLObject::DecodeMechanism::WithCharset) );
return aName;
}
diff --git a/filter/source/xsltfilter/XSLTFilter.cxx b/filter/source/xsltfilter/XSLTFilter.cxx
index 1deb70ff6286..38dbb8ae7dc9 100644
--- a/filter/source/xsltfilter/XSLTFilter.cxx
+++ b/filter/source/xsltfilter/XSLTFilter.cxx
@@ -261,7 +261,7 @@ namespace XSLT
bool bWasAbsolute;
INetURLObject aURL = aObj.smartRel2Abs(s, bWasAbsolute, false,
INetURLObject::EncodeMechanism::WasEncoded, RTL_TEXTENCODING_UTF8, true);
- return aURL.GetMainURL(INetURLObject::NO_DECODE);
+ return aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE);
}
sal_Bool
@@ -461,7 +461,7 @@ namespace XSLT
nv.Name = "TargetBaseURL";
INetURLObject ineturl(sURL);
ineturl.removeSegment();
- m_aExportBaseUrl = ineturl.GetMainURL(INetURLObject::NO_DECODE);
+ m_aExportBaseUrl = ineturl.GetMainURL(INetURLObject::DecodeMechanism::NONE);
nv.Value <<= m_aExportBaseUrl;
args[3] <<= nv;
diff --git a/forms/source/component/Button.cxx b/forms/source/component/Button.cxx
index d5c4b8e9221b..15944189adb2 100644
--- a/forms/source/component/Button.cxx
+++ b/forms/source/component/Button.cxx
@@ -145,7 +145,7 @@ void OButtonModel::write(const Reference<XObjectOutputStream>& _rxOutStream) thr
_rxOutStream->writeShort( (sal_uInt16)m_eButtonType );
- OUString sTmp = INetURLObject::decode( m_sTargetURL, INetURLObject::DECODE_UNAMBIGUOUS);
+ OUString sTmp = INetURLObject::decode( m_sTargetURL, INetURLObject::DecodeMechanism::Unambiguous);
_rxOutStream << sTmp;
_rxOutStream << m_sTargetFrame;
writeHelpTextCompatibly(_rxOutStream);
diff --git a/forms/source/component/DatabaseForm.cxx b/forms/source/component/DatabaseForm.cxx
index b98374b5b80d..d61c7a70a490 100644
--- a/forms/source/component/DatabaseForm.cxx
+++ b/forms/source/component/DatabaseForm.cxx
@@ -466,7 +466,7 @@ OUString ODatabaseForm::GetDataEncoded(bool _bURLEncoded,const Reference<XContro
aURL.SetSmartProtocol(INetProtocol::File);
aURL.SetSmartURL(aValue);
if( INetProtocol::File == aURL.GetProtocol() )
- aValue = INetURLObject::decode(aURL.PathToFileName(), INetURLObject::DECODE_UNAMBIGUOUS);
+ aValue = INetURLObject::decode(aURL.PathToFileName(), INetURLObject::DecodeMechanism::Unambiguous);
}
Encode( aName );
Encode( aValue );
@@ -1008,7 +1008,7 @@ bool ODatabaseForm::InsertFilePart( INetMIMEMessage& rParent, const OUString& rN
aURL.SetSmartURL(rFileName);
if( INetProtocol::File == aURL.GetProtocol() )
{
- aFileName = INetURLObject::decode(aURL.PathToFileName(), INetURLObject::DECODE_UNAMBIGUOUS);
+ aFileName = INetURLObject::decode(aURL.PathToFileName(), INetURLObject::DecodeMechanism::Unambiguous);
pStream = ::utl::UcbStreamHelper::CreateStream(aFileName, StreamMode::READ);
if (!pStream || (pStream->GetError() != ERRCODE_NONE))
{
@@ -2191,7 +2191,7 @@ void ODatabaseForm::submit_impl(const Reference<XControl>& Control, const css::a
{
INetURLObject aUrlObj( aURLStr, INetURLObject::EncodeMechanism::WasEncoded );
aUrlObj.SetParam( aData, INetURLObject::EncodeMechanism::All );
- aURL.Complete = aUrlObj.GetMainURL( INetURLObject::DECODE_UNAMBIGUOUS );
+ aURL.Complete = aUrlObj.GetMainURL( INetURLObject::DecodeMechanism::Unambiguous );
if (xTransformer.is())
xTransformer->parseStrict(aURL);
@@ -3823,7 +3823,7 @@ void SAL_CALL ODatabaseForm::write(const Reference<XObjectOutputStream>& _rxOutS
_rxOutStream->writeBoolean(m_bAllowDelete);
// html form stuff
- OUString sTmp = INetURLObject::decode( m_aTargetURL, INetURLObject::DECODE_UNAMBIGUOUS);
+ OUString sTmp = INetURLObject::decode( m_aTargetURL, INetURLObject::DecodeMechanism::Unambiguous);
_rxOutStream << sTmp;
_rxOutStream->writeShort( (sal_Int16)m_eSubmitMethod );
_rxOutStream->writeShort( (sal_Int16)m_eSubmitEncoding );
@@ -3933,7 +3933,7 @@ void SAL_CALL ODatabaseForm::read(const Reference<XObjectInputStream>& _rxInStre
// html stuff
OUString sTmp;
_rxInStream >> sTmp;
- m_aTargetURL = INetURLObject::decode( sTmp, INetURLObject::DECODE_UNAMBIGUOUS);
+ m_aTargetURL = INetURLObject::decode( sTmp, INetURLObject::DecodeMechanism::Unambiguous);
m_eSubmitMethod = (FormSubmitMethod)_rxInStream->readShort();
m_eSubmitEncoding = (FormSubmitEncoding)_rxInStream->readShort();
_rxInStream >> m_aTargetFrame;
diff --git a/forms/source/component/ImageButton.cxx b/forms/source/component/ImageButton.cxx
index 1bde517002f4..4b2fec5dd410 100644
--- a/forms/source/component/ImageButton.cxx
+++ b/forms/source/component/ImageButton.cxx
@@ -96,7 +96,7 @@ void OImageButtonModel::write(const Reference<XObjectOutputStream>& _rxOutStream
_rxOutStream->writeShort(0x0003);
_rxOutStream->writeShort((sal_uInt16)m_eButtonType);
- OUString sTmp(INetURLObject::decode( m_sTargetURL, INetURLObject::DECODE_UNAMBIGUOUS));
+ OUString sTmp(INetURLObject::decode( m_sTargetURL, INetURLObject::DecodeMechanism::Unambiguous));
_rxOutStream << sTmp;
_rxOutStream << m_sTargetFrame;
writeHelpTextCompatibly(_rxOutStream);
diff --git a/forms/source/richtext/richtextvclcontrol.cxx b/forms/source/richtext/richtextvclcontrol.cxx
index 253ffa074626..5ea1f430ef49 100644
--- a/forms/source/richtext/richtextvclcontrol.cxx
+++ b/forms/source/richtext/richtextvclcontrol.cxx
@@ -266,7 +266,7 @@ namespace frm
{
INetURLObject aURL( sFileName );
aURL.removeSegment();
- getEngine().Read( *pStream, aURL.GetMainURL( INetURLObject::NO_DECODE ), eFormat );
+ getEngine().Read( *pStream, aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), eFormat );
}
else
{
diff --git a/forms/source/xforms/submission/replace.cxx b/forms/source/xforms/submission/replace.cxx
index fa39715b0a1c..dc9a857e9395 100644
--- a/forms/source/xforms/submission/replace.cxx
+++ b/forms/source/xforms/submission/replace.cxx
@@ -69,7 +69,7 @@ CSubmission::SubmissionResult CSubmission::replace(const OUString& aReplace, con
descriptor[1] = PropertyValue(OUString("ReadOnly"),
-1, makeAny(true), PropertyState_DIRECT_VALUE);
- OUString aURL = m_aURLObj.GetMainURL(INetURLObject::NO_DECODE);
+ OUString aURL = m_aURLObj.GetMainURL(INetURLObject::DecodeMechanism::NONE);
OUString aTarget = "_default";
xLoader->loadComponentFromURL(aURL, aTarget, FrameSearchFlag::ALL, descriptor);
diff --git a/forms/source/xforms/submission/submission_get.cxx b/forms/source/xforms/submission/submission_get.cxx
index da266d39e2cc..14652d4d28f8 100644
--- a/forms/source/xforms/submission/submission_get.cxx
+++ b/forms/source/xforms/submission/submission_get.cxx
@@ -70,7 +70,7 @@ CSubmission::SubmissionResult CSubmissionGet::submit(const css::uno::Reference<
// append query string to the URL
try {
- OStringBuffer aUTF8QueryURL(OUStringToOString(m_aURLObj.GetMainURL(INetURLObject::NO_DECODE),
+ OStringBuffer aUTF8QueryURL(OUStringToOString(m_aURLObj.GetMainURL(INetURLObject::DecodeMechanism::NONE),
RTL_TEXTENCODING_UTF8));
OStringBuffer aQueryString;
diff --git a/forms/source/xforms/submission/submission_post.cxx b/forms/source/xforms/submission/submission_post.cxx
index 0580cf5eba5f..db9b868b26fc 100644
--- a/forms/source/xforms/submission/submission_post.cxx
+++ b/forms/source/xforms/submission/submission_post.cxx
@@ -50,7 +50,7 @@ CSubmission::SubmissionResult CSubmissionPost::submit(const css::uno::Reference<
unique_ptr< CSerialization > apSerialization(createSerialization(aInteractionHandler,aEnvironment));
try {
- ucbhelper::Content aContent(m_aURLObj.GetMainURL(INetURLObject::NO_DECODE), aEnvironment, comphelper::getProcessComponentContext());
+ ucbhelper::Content aContent(m_aURLObj.GetMainURL(INetURLObject::DecodeMechanism::NONE), aEnvironment, comphelper::getProcessComponentContext());
// use post command
OUString aCommandName("post");
diff --git a/forms/source/xforms/submission/submission_put.cxx b/forms/source/xforms/submission/submission_put.cxx
index 3d7284cf69cf..dfafa8f949f7 100644
--- a/forms/source/xforms/submission/submission_put.cxx
+++ b/forms/source/xforms/submission/submission_put.cxx
@@ -48,7 +48,7 @@ CSubmission::SubmissionResult CSubmissionPut::submit(const css::uno::Reference<
unique_ptr< CSerialization > apSerialization(createSerialization(aInteractionHandler,aEnvironment));
try {
- ucbhelper::Content aContent(m_aURLObj.GetMainURL(INetURLObject::NO_DECODE), aEnvironment, comphelper::getProcessComponentContext());
+ ucbhelper::Content aContent(m_aURLObj.GetMainURL(INetURLObject::DecodeMechanism::NONE), aEnvironment, comphelper::getProcessComponentContext());
// insert serialized data to content -> PUT
css::uno::Reference< XInputStream > aInStream = apSerialization->getInputStream();
diff --git a/fpicker/source/office/OfficeFilePicker.cxx b/fpicker/source/office/OfficeFilePicker.cxx
index 64ec384d72a6..0177748a01fa 100644
--- a/fpicker/source/office/OfficeFilePicker.cxx
+++ b/fpicker/source/office/OfficeFilePicker.cxx
@@ -158,7 +158,7 @@ void SvtFilePicker::prepareExecute()
aPath.insertName( m_aDefaultName );
getDialog()->SetHasFilename( true );
}
- getDialog()->SetPath( aPath.GetMainURL( INetURLObject::NO_DECODE ) );
+ getDialog()->SetPath( aPath.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
isFileSet = true;
}
if ( !isFileSet && !m_aDefaultName.isEmpty() )
@@ -171,7 +171,7 @@ void SvtFilePicker::prepareExecute()
{
// Default-Standard-Dir setzen
INetURLObject aStdDirObj( SvtPathOptions().GetWorkPath() );
- getDialog()->SetPath( aStdDirObj.GetMainURL( INetURLObject::NO_DECODE ) );
+ getDialog()->SetPath( aStdDirObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
}
// set the control values and set the control labels, too
@@ -570,7 +570,7 @@ OUString SAL_CALL SvtFilePicker::getDisplayDirectory() throw( RuntimeException,
{
INetURLObject aFolder( aPath );
aFolder.CutLastName();
- aPath = aFolder.GetMainURL( INetURLObject::NO_DECODE );
+ aPath = aFolder.GetMainURL( INetURLObject::DecodeMechanism::NONE );
}
m_aOldDisplayDirectory = aPath;
return aPath;
diff --git a/fpicker/source/office/OfficeFolderPicker.cxx b/fpicker/source/office/OfficeFolderPicker.cxx
index ad09f8dcf89c..ec1f8a8e0f35 100644
--- a/fpicker/source/office/OfficeFolderPicker.cxx
+++ b/fpicker/source/office/OfficeFolderPicker.cxx
@@ -92,7 +92,7 @@ void SvtFolderPicker::prepareExecute()
{
// Default-Standard-Dir setzen
INetURLObject aStdDirObj( SvtPathOptions().GetWorkPath() );
- getDialog()->SetPath( aStdDirObj.GetMainURL( INetURLObject::NO_DECODE) );
+ getDialog()->SetPath( aStdDirObj.GetMainURL( INetURLObject::DecodeMechanism::NONE) );
}
}
diff --git a/fpicker/source/office/RemoteFilesDialog.cxx b/fpicker/source/office/RemoteFilesDialog.cxx
index 7f154ffd896a..f598eaee7d51 100644
--- a/fpicker/source/office/RemoteFilesDialog.cxx
+++ b/fpicker/source/office/RemoteFilesDialog.cxx
@@ -412,7 +412,7 @@ OUString lcl_GetServiceType( const ServicePtr& pService )
return OUString( "FTP" );
case INetProtocol::Cmis:
{
- OUString sHost = pService->GetUrlObject().GetHost( INetURLObject::DECODE_WITH_CHARSET );
+ OUString sHost = pService->GetUrlObject().GetHost( INetURLObject::DecodeMechanism::WithCharset );
if( sHost.startsWith( GDRIVE_BASE_URL ) )
return OUString( "Google Drive" );
@@ -988,9 +988,9 @@ IMPL_LINK_NOARG( RemoteFilesDialog, SelectHdl, SvTreeListBox*, void )
INetURLObject aCurrentURL( m_sLastServiceUrl );
aURL.SetUser( aCurrentURL.GetUser() );
- m_sPath = aURL.GetMainURL( INetURLObject::NO_DECODE );
+ m_sPath = aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE );
- m_pName_ed->SetText( INetURLObject::decode( aURL.GetLastName(), INetURLObject::DECODE_WITH_CHARSET ) );
+ m_pName_ed->SetText( INetURLObject::decode( aURL.GetLastName(), INetURLObject::DecodeMechanism::WithCharset ) );
}
else
{
@@ -1143,7 +1143,7 @@ IMPL_LINK_NOARG ( RemoteFilesDialog, OkHdl, Button*, void )
INetURLObject aCurrentURL( m_sLastServiceUrl );
aURL.SetUser( aCurrentURL.GetUser() );
- m_sPath = aURL.GetMainURL( INetURLObject::NO_DECODE );
+ m_sPath = aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE );
}
bool bExists = false;
@@ -1236,7 +1236,7 @@ void RemoteFilesDialog::SetPath( const OUString& rNewURL )
if( m_eMode == REMOTEDLG_MODE_SAVE )
{
INetURLObject aUrl( m_sPath );
- OUString sFileName = aUrl.GetLastName( INetURLObject::DECODE_WITH_CHARSET );
+ OUString sFileName = aUrl.GetLastName( INetURLObject::DecodeMechanism::WithCharset );
m_pName_ed->SetText( sFileName );
}
@@ -1370,7 +1370,7 @@ void RemoteFilesDialog::UpdateControls( const OUString& rURL )
{
OUString sTitle( INetURLObject::decode(
aFolderName.copy( nTitleStart + 1 ),
- INetURLObject::DECODE_WITH_CHARSET ) );
+ INetURLObject::DecodeMechanism::WithCharset ) );
if( rFolder.mbIsFolder )
{
@@ -1414,7 +1414,7 @@ std::vector<OUString> RemoteFilesDialog::GetPathList() const
INetURLObject aCurrentURL( m_sLastServiceUrl );
aURL.SetUser( aCurrentURL.GetUser() );
- aList.push_back( aURL.GetMainURL( INetURLObject::NO_DECODE ) );
+ aList.push_back( aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
pEntry = m_pFileView->NextSelected( pEntry );
}
diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx
index b820f60df0d5..9ed27530a468 100644
--- a/fpicker/source/office/iodlg.cxx
+++ b/fpicker/source/office/iodlg.cxx
@@ -216,7 +216,7 @@ namespace
{
try
{
- bRealExtensions = !_pDialog->ContentIsFolder( aURL.GetMainURL( INetURLObject::NO_DECODE ) );
+ bRealExtensions = !_pDialog->ContentIsFolder( aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
}
catch( const css::uno::Exception& )
{
@@ -275,7 +275,7 @@ namespace
{
INetURLObject aWorkPathObj( _rDir, INetProtocol::File );
aWorkPathObj.setFinalSlash();
- return aWorkPathObj.GetMainURL( INetURLObject::NO_DECODE );
+ return aWorkPathObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
}
@@ -582,7 +582,7 @@ void SvtFileDialog::Init_Impl
// Set the directory for the "back to the default dir" button
INetURLObject aStdDirObj( SvtPathOptions().GetWorkPath() );
- SetStandardDir( aStdDirObj.GetMainURL( INetURLObject::NO_DECODE ) );
+ SetStandardDir( aStdDirObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
// Create control element, the order defines the tab control.
pImpl->_pEdFileName->SetSelectHdl( LINK( this, SvtFileDialog, EntrySelectHdl_Impl ) );
@@ -1066,12 +1066,12 @@ void SvtFileDialog::OpenHdl_Impl(void* pVoid)
{
case FILEDLG_MODE_SAVE:
{
- if ( ::utl::UCBContentHelper::Exists( aFileObj.GetMainURL( INetURLObject::NO_DECODE ) ) )
+ if ( ::utl::UCBContentHelper::Exists( aFileObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ) ) )
{
OUString aMsg = SVT_RESSTR( STR_SVT_ALREADYEXISTOVERWRITE );
aMsg = aMsg.replaceFirst(
"$filename$",
- aFileObj.getName(INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET)
+ aFileObj.getName(INetURLObject::LAST_SEGMENT, true, INetURLObject::DecodeMechanism::WithCharset)
);
ScopedVclPtrInstance< MessageDialog > aBox(this, aMsg, VclMessageType::Question, VCL_BUTTONS_YES_NO);
if ( aBox->Execute() != RET_YES )
@@ -1085,7 +1085,7 @@ void SvtFileDialog::OpenHdl_Impl(void* pVoid)
// if content does not exist: at least its path must exist
INetURLObject aPathObj = aFileObj;
aPathObj.removeSegment();
- bool bFolder = m_aContent.isFolder( aPathObj.GetMainURL( INetURLObject::NO_DECODE ) );
+ bool bFolder = m_aContent.isFolder( aPathObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
if ( !bFolder )
{
ErrorHandler::HandleError( ERRCODE_IO_NOTEXISTSPATH );
@@ -1102,13 +1102,13 @@ void SvtFileDialog::OpenHdl_Impl(void* pVoid)
if ( INetProtocol::File == aFileObj.GetProtocol( ) )
{
- bool bExists = m_aContent.is( aFileObj.GetMainURL( INetURLObject::NO_DECODE ) );
+ bool bExists = m_aContent.is( aFileObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
if ( !bExists )
{
OUString sError( SVT_RESSTR( RID_FILEOPEN_NOTEXISTENTFILE ) );
- OUString sInvalidFile( aFileObj.GetMainURL( INetURLObject::DECODE_TO_IURI ) );
+ OUString sInvalidFile( aFileObj.GetMainURL( INetURLObject::DecodeMechanism::ToIUri ) );
if ( INetProtocol::File == aFileObj.GetProtocol() )
{ // if it's a file URL, transform the URL into system notation
OUString sURL( sInvalidFile );
@@ -1267,7 +1267,7 @@ IMPL_LINK_NOARG ( SvtFileDialog, AddPlacePressed_Hdl, Button*, void )
// there is an ux choice to make we did not make...
INetURLObject aURLObj( _pFileView->GetViewURL() );
PlacePtr newPlace(
- new Place( aURLObj.GetLastName(INetURLObject::DECODE_WITH_CHARSET),
+ new Place( aURLObj.GetLastName(INetURLObject::DecodeMechanism::WithCharset),
OUString(_pFileView->GetViewURL()), true));
pImpl->_pPlaces->AppendPlace(newPlace);
}
@@ -1398,7 +1398,7 @@ void SvtFileDialog::UpdateControls( const OUString& rURL )
if ( aObj.hasFinalSlash() )
{
aObj.removeFinalSlash();
- OUString sURL( aObj.GetMainURL( INetURLObject::NO_DECODE ) );
+ OUString sURL( aObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
if (osl::FileBase::getSystemPathFromFileURL(sURL, sText) != osl::FileBase::E_None)
sText = sURL;
}
@@ -1603,7 +1603,7 @@ OUString SvtFileDialog::implGetInitialURL( const OUString& _rPath, const OUStrin
aURLParser = aURLParser.smartRel2Abs( _rPath, bWasAbsolute );
// is it a valid folder?
- m_aContent.bindTo( aURLParser.GetMainURL( INetURLObject::NO_DECODE ) );
+ m_aContent.bindTo( aURLParser.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
bool bIsFolder = m_aContent.isFolder( ); // do this _before_ asking isInvalid!
bool bIsInvalid = m_aContent.isInvalid();
@@ -1612,13 +1612,13 @@ OUString SvtFileDialog::implGetInitialURL( const OUString& _rPath, const OUStrin
INetURLObject aParent( aURLParser );
aParent.removeSegment( );
aParent.setFinalSlash( );
- bIsInvalid = implIsInvalid( aParent.GetMainURL( INetURLObject::NO_DECODE ) );
+ bIsInvalid = implIsInvalid( aParent.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
}
if ( bIsInvalid )
{
INetURLObject aFallback( _rFallback );
- bIsInvalid = implIsInvalid( aFallback.GetMainURL( INetURLObject::NO_DECODE ) );
+ bIsInvalid = implIsInvalid( aFallback.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
if ( !bIsInvalid )
aURLParser = aFallback;
@@ -1630,7 +1630,7 @@ OUString SvtFileDialog::implGetInitialURL( const OUString& _rPath, const OUStrin
while ( bIsInvalid && aParent.removeSegment() )
{
aParent.setFinalSlash( );
- bIsInvalid = implIsInvalid( aParent.GetMainURL( INetURLObject::NO_DECODE ) );
+ bIsInvalid = implIsInvalid( aParent.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
}
if ( !bIsInvalid )
@@ -1641,7 +1641,7 @@ OUString SvtFileDialog::implGetInitialURL( const OUString& _rPath, const OUStrin
{
aURLParser.setFinalSlash();
}
- return aURLParser.GetMainURL( INetURLObject::NO_DECODE );
+ return aURLParser.GetMainURL( INetURLObject::DecodeMechanism::NONE );
}
@@ -1667,7 +1667,7 @@ short SvtFileDialog::Execute()
{
// remember the selected directory only for file URLs not for virtual folders
sal_Int32 nLevel = aURL.getSegmentCount();
- bool bDir = m_aContent.isFolder( aURL.GetMainURL( INetURLObject::NO_DECODE ) );
+ bool bDir = m_aContent.isFolder( aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
if ( nLevel > 1 && ( FILEDLG_TYPE_FILEDLG == pImpl->_eDlgType || !bDir ) )
aURL.removeSegment();
}
@@ -1801,7 +1801,7 @@ short SvtFileDialog::PrepareExecute()
{
INetURLObject aStdDir( GetStandardDir() );
::ucbhelper::Content aCnt( OUString( aStdDir.GetMainURL(
- INetURLObject::NO_DECODE ) ),
+ INetURLObject::DecodeMechanism::NONE ) ),
Reference< XCommandEnvironment >(),
comphelper::getProcessComponentContext() );
Sequence< OUString > aProps(2);
@@ -1946,7 +1946,7 @@ short SvtFileDialog::PrepareExecute()
bool bFileToSelect = nFileNameLen != 0;
if ( bFileToSelect && aFileName[ nFileNameLen - 1 ] != '/' )
{
- OUString aDecodedName = aFolderURL.getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET );
+ OUString aDecodedName = aFolderURL.getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::DecodeMechanism::WithCharset );
pImpl->_pEdFileName->SetText( aDecodedName );
aFolderURL.removeSegment();
}
@@ -1958,12 +1958,12 @@ short SvtFileDialog::PrepareExecute()
aObj.setFinalSlash();
}
- UpdateControls( aObj.GetMainURL( INetURLObject::NO_DECODE ) );
+ UpdateControls( aObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
// Somebody might want to enable some controls according to the current filter
FilterSelect();
- OpenURL_Impl( aObj.GetMainURL( INetURLObject::NO_DECODE ) );
+ OpenURL_Impl( aObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
_pFileView->Show();
_pSplitter->Show();
@@ -2022,7 +2022,7 @@ void SvtFileDialog::SetStandardDir( const OUString& rStdDir )
INetURLObject aObj( rStdDir );
SAL_WARN_IF( aObj.GetProtocol() == INetProtocol::NotValid, "fpicker.office", "Invalid protocol!" );
aObj.setFinalSlash();
- pImpl->SetStandardDir( aObj.GetMainURL( INetURLObject::NO_DECODE ) );
+ pImpl->SetStandardDir( aObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
}
void SvtFileDialog::SetBlackList( const css::uno::Sequence< OUString >& rBlackList )
diff --git a/fpicker/source/office/iodlgimp.cxx b/fpicker/source/office/iodlgimp.cxx
index 43539fdc5197..62ed95d92af8 100644
--- a/fpicker/source/office/iodlgimp.cxx
+++ b/fpicker/source/office/iodlgimp.cxx
@@ -157,7 +157,7 @@ void SvtUpButton_Impl::FillURLMenu( PopupMenu* _pMenu )
while ( nCount >= 1 )
{
aObject.removeSegment();
- OUString aParentURL(aObject.GetMainURL(INetURLObject::NO_DECODE));
+ OUString aParentURL(aObject.GetMainURL(INetURLObject::DecodeMechanism::NONE));
OUString aTitle;
if (!GetDialogParent()->ContentGetTitle(aParentURL, aTitle) || aTitle.isEmpty())
diff --git a/framework/source/fwe/helper/titlehelper.cxx b/framework/source/fwe/helper/titlehelper.cxx
index 1e7e797590f8..16ad4b3dafb4 100644
--- a/framework/source/fwe/helper/titlehelper.cxx
+++ b/framework/source/fwe/helper/titlehelper.cxx
@@ -651,18 +651,18 @@ OUString TitleHelper::impl_convertURL2Title(const OUString& sURL)
if (aURL.HasMark())
aURL = INetURLObject(aURL.GetURLNoMark());
- sTitle = aURL.getName(INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET);
+ sTitle = aURL.getName(INetURLObject::LAST_SEGMENT, true, INetURLObject::DecodeMechanism::WithCharset);
}
else
{
if (aURL.hasExtension())
- sTitle = aURL.getName(INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET);
+ sTitle = aURL.getName(INetURLObject::LAST_SEGMENT, true, INetURLObject::DecodeMechanism::WithCharset);
if ( sTitle.isEmpty() )
- sTitle = aURL.GetHostPort(INetURLObject::DECODE_WITH_CHARSET);
+ sTitle = aURL.GetHostPort(INetURLObject::DecodeMechanism::WithCharset);
if ( sTitle.isEmpty() )
- sTitle = aURL.GetURLNoPass(INetURLObject::DECODE_WITH_CHARSET);
+ sTitle = aURL.GetURLNoPass(INetURLObject::DecodeMechanism::WithCharset);
}
return sTitle;
diff --git a/framework/source/services/substitutepathvars.cxx b/framework/source/services/substitutepathvars.cxx
index b946b37d7420..9eac3e48156a 100644
--- a/framework/source/services/substitutepathvars.cxx
+++ b/framework/source/services/substitutepathvars.cxx
@@ -514,14 +514,14 @@ throw ( RuntimeException )
INetURLObject aUrl( rURL );
if ( !aUrl.HasError() )
- aURL = aUrl.GetMainURL( INetURLObject::NO_DECODE );
+ aURL = aUrl.GetMainURL( INetURLObject::DecodeMechanism::NONE );
else
{
// Convert a system path to a UCB compliant URL before resubstitution
OUString aTemp;
if ( osl::FileBase::getFileURLFromSystemPath( rURL, aTemp ) == osl::FileBase::E_None )
{
- aURL = INetURLObject( aTemp ).GetMainURL( INetURLObject::NO_DECODE );
+ aURL = INetURLObject( aTemp ).GetMainURL( INetURLObject::DecodeMechanism::NONE );
if( aURL.isEmpty() )
return rURL;
}
@@ -656,7 +656,7 @@ void SubstitutePathVariables::SetPredefinedPathVariables()
m_aPreDefVars.m_FixedVar[PREDEFVAR_BRANDBASEURL] );
if ( !aProgObj.HasError() && aProgObj.insertName( LIBO_BIN_FOLDER ) )
{
- m_aPreDefVars.m_FixedVar[ PREDEFVAR_PROGPATH ] = aProgObj.GetMainURL(INetURLObject::NO_DECODE);
+ m_aPreDefVars.m_FixedVar[ PREDEFVAR_PROGPATH ] = aProgObj.GetMainURL(INetURLObject::DecodeMechanism::NONE);
m_aPreDefVars.m_FixedVar[ PREDEFVAR_PROGURL ] = m_aPreDefVars.m_FixedVar[ PREDEFVAR_PROGPATH ];
m_aPreDefVars.m_FixedVar[ PREDEFVAR_PROG ] = m_aPreDefVars.m_FixedVar[ PREDEFVAR_PROGPATH ];
}
diff --git a/framework/source/services/uriabbreviation.cxx b/framework/source/services/uriabbreviation.cxx
index f9c81d7bace6..5c924f1ae5bc 100644
--- a/framework/source/services/uriabbreviation.cxx
+++ b/framework/source/services/uriabbreviation.cxx
@@ -55,7 +55,7 @@ OUString SAL_CALL UriAbbreviation::abbreviateString(const css::uno::Reference< c
{
// Use INetURLObject to abbreviate URLs
INetURLObject aURL( aString );
- aResult = aURL.getAbbreviated( xStringWidth, nWidth, INetURLObject::DECODE_UNAMBIGUOUS );
+ aResult = aURL.getAbbreviated( xStringWidth, nWidth, INetURLObject::DecodeMechanism::Unambiguous );
}
return aResult;
diff --git a/framework/source/services/urltransformer.cxx b/framework/source/services/urltransformer.cxx
index c19eaac4518d..5078747a264f 100644
--- a/framework/source/services/urltransformer.cxx
+++ b/framework/source/services/urltransformer.cxx
@@ -74,9 +74,9 @@ namespace
{
// Get all information about this URL.
_rURL.Protocol = INetURLObject::GetScheme( _rParser.GetProtocol() );
- _rURL.User = _rParser.GetUser ( INetURLObject::DECODE_WITH_CHARSET );
- _rURL.Password = _rParser.GetPass ( INetURLObject::DECODE_WITH_CHARSET );
- _rURL.Server = _rParser.GetHost ( INetURLObject::DECODE_WITH_CHARSET );
+ _rURL.User = _rParser.GetUser ( INetURLObject::DecodeMechanism::WithCharset );
+ _rURL.Password = _rParser.GetPass ( INetURLObject::DecodeMechanism::WithCharset );
+ _rURL.Server = _rParser.GetHost ( INetURLObject::DecodeMechanism::WithCharset );
_rURL.Port = (sal_Int16)_rParser.GetPort();
sal_Int32 nCount = _rParser.getSegmentCount( false );
@@ -89,34 +89,34 @@ namespace
for ( sal_Int32 nIndex = 0; nIndex < nCount; nIndex++ )
{
aPath.append( '/');
- aPath.append( _rParser.getName( nIndex, false, INetURLObject::NO_DECODE ));
+ aPath.append( _rParser.getName( nIndex, false, INetURLObject::DecodeMechanism::NONE ));
}
if ( nCount > 0 )
aPath.append( '/' ); // final slash!
_rURL.Path = aPath.makeStringAndClear();
- _rURL.Name = _rParser.getName( INetURLObject::LAST_SEGMENT, false, INetURLObject::NO_DECODE );
+ _rURL.Name = _rParser.getName( INetURLObject::LAST_SEGMENT, false, INetURLObject::DecodeMechanism::NONE );
}
else
{
- _rURL.Path = _rParser.GetURLPath( INetURLObject::NO_DECODE );
+ _rURL.Path = _rParser.GetURLPath( INetURLObject::DecodeMechanism::NONE );
_rURL.Name = _rParser.GetName ( );
}
_rURL.Arguments = _rParser.GetParam();
- _rURL.Mark = _rParser.GetMark( INetURLObject::DECODE_WITH_CHARSET );
+ _rURL.Mark = _rParser.GetMark( INetURLObject::DecodeMechanism::WithCharset );
// INetURLObject supports only an intelligent method of parsing URL's. So write
// back Complete to have a valid encoded URL in all cases!
- _rURL.Complete = _rParser.GetMainURL( INetURLObject::NO_DECODE );
+ _rURL.Complete = _rParser.GetMainURL( INetURLObject::DecodeMechanism::NONE );
if ( _bUseIntern )
_rURL.Complete = _rURL.Complete.intern();
_rParser.SetMark ( OUString() );
_rParser.SetParam( OUString() );
- _rURL.Main = _rParser.GetMainURL( INetURLObject::NO_DECODE );
+ _rURL.Main = _rParser.GetMainURL( INetURLObject::DecodeMechanism::NONE );
}
}
@@ -259,11 +259,11 @@ sal_Bool SAL_CALL URLTransformer::assemble( css::util::URL& aURL ) throw( css::u
return false;
// First parse URL WITHOUT ...
- aURL.Main = aParser.GetMainURL( INetURLObject::NO_DECODE );
+ aURL.Main = aParser.GetMainURL( INetURLObject::DecodeMechanism::NONE );
// ...and then WITH parameter and mark.
aParser.SetParam( aURL.Arguments);
aParser.SetMark ( aURL.Mark, INetURLObject::EncodeMechanism::All );
- aURL.Complete = aParser.GetMainURL( INetURLObject::NO_DECODE );
+ aURL.Complete = aParser.GetMainURL( INetURLObject::DecodeMechanism::NONE );
// Return "URL is assembled".
return true;
@@ -306,7 +306,7 @@ OUString SAL_CALL URLTransformer::getPresentation( const css::util::URL& aURL,
// Convert internal URLs to "praesentation"-URLs!
OUString sPraesentationURL;
- INetURLObject::translateToExternal( aTestURL.Complete, sPraesentationURL, INetURLObject::DECODE_UNAMBIGUOUS );
+ INetURLObject::translateToExternal( aTestURL.Complete, sPraesentationURL, INetURLObject::DecodeMechanism::Unambiguous );
return sPraesentationURL;
}
diff --git a/framework/source/uielement/generictoolbarcontroller.cxx b/framework/source/uielement/generictoolbarcontroller.cxx
index d76aaab12640..fe601ab72f96 100644
--- a/framework/source/uielement/generictoolbarcontroller.cxx
+++ b/framework/source/uielement/generictoolbarcontroller.cxx
@@ -85,7 +85,7 @@ static OUString getMasterCommand( const OUString& rCommand )
if ( nIndex )
{
aURL.SetURLPath( aURL.GetURLPath().copy( 0, nIndex ) );
- aMasterCommand = aURL.GetMainURL( INetURLObject::NO_DECODE );
+ aMasterCommand = aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE );
}
}
return aMasterCommand;
diff --git a/framework/source/uielement/recentfilesmenucontroller.cxx b/framework/source/uielement/recentfilesmenucontroller.cxx
index 5d573586aa8a..c651b2e02a16 100644
--- a/framework/source/uielement/recentfilesmenucontroller.cxx
+++ b/framework/source/uielement/recentfilesmenucontroller.cxx
@@ -189,7 +189,7 @@ void RecentFilesMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >
if ( aURL.GetProtocol() == INetProtocol::File )
{
// Do handle file URL differently: don't show the protocol, just the file name
- aMenuTitle = aURL.GetLastName(INetURLObject::DECODE_WITH_CHARSET);
+ aMenuTitle = aURL.GetLastName(INetURLObject::DecodeMechanism::WithCharset);
}
else
{
diff --git a/include/svl/urihelper.hxx b/include/svl/urihelper.hxx
index 5a800004a325..b26a43fcb49f 100644
--- a/include/svl/urihelper.hxx
+++ b/include/svl/urihelper.hxx
@@ -55,7 +55,7 @@ SVL_DLLPUBLIC OUString SmartRel2Abs(INetURLObject const & rTheBaseURIRef,
bool bCheckFileExists = true,
bool bIgnoreFragment = false,
INetURLObject::EncodeMechanism eEncodeMechanism = INetURLObject::EncodeMechanism::WasEncoded,
- INetURLObject::DecodeMechanism eDecodeMechanism = INetURLObject::DECODE_TO_IURI,
+ INetURLObject::DecodeMechanism eDecodeMechanism = INetURLObject::DecodeMechanism::ToIUri,
rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8,
bool bRelativeNonURIs = false,
INetURLObject::FSysStyle eStyle = INetURLObject::FSYS_DETECT);
@@ -149,7 +149,7 @@ SVL_DLLPUBLIC OUString FindFirstURLInText(OUString const & rText,
*/
SVL_DLLPUBLIC OUString removePassword(OUString const & rURI,
INetURLObject::EncodeMechanism eEncodeMechanism = INetURLObject::EncodeMechanism::WasEncoded,
- INetURLObject::DecodeMechanism eDecodeMechanism = INetURLObject::DECODE_TO_IURI,
+ INetURLObject::DecodeMechanism eDecodeMechanism = INetURLObject::DecodeMechanism::ToIUri,
rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8);
/** Resolve a URL's host component domain name in IDNA syntax to plain DNS
diff --git a/include/svtools/place.hxx b/include/svtools/place.hxx
index db70cf96c163..23dd863350bd 100644
--- a/include/svtools/place.hxx
+++ b/include/svtools/place.hxx
@@ -31,7 +31,7 @@ public:
void SetUrl(const OUString& aUrl ) { maUrl.SetURL( aUrl ); }
OUString& GetName( ) { return msName; }
- OUString GetUrl( ) { return maUrl.GetMainURL( INetURLObject::NO_DECODE ); }
+ OUString GetUrl( ) { return maUrl.GetMainURL( INetURLObject::DecodeMechanism::NONE ); }
INetURLObject& GetUrlObject( ) { return maUrl; }
bool IsLocal( ) { return maUrl.GetProtocol() == INetProtocol::File; }
bool IsEditable( ) { return mbEditable; }
diff --git a/include/tools/urlobj.hxx b/include/tools/urlobj.hxx
index af2952d207ff..52675f9ded13 100644
--- a/include/tools/urlobj.hxx
+++ b/include/tools/urlobj.hxx
@@ -121,29 +121,29 @@ public:
@descr Along with a DecodeMechanism parameter, the get-methods all
take an rtl_TextEncoding parameter, which is ignored unless the
- DecodeMechanism is DECODE_WITH_CHARSET or DECODE_UNAMBIGUOUS.
+ DecodeMechanism is DecodeMechanism::WithCharset or DecodeMechanism::Unambiguous.
*/
- enum DecodeMechanism
+ enum class DecodeMechanism
{
/** The (part of the) URI is returned unchanged. Since URIs are
written using a subset of US-ASCII, the returned string is
guaranteed to contain only US-ASCII characters.
*/
- NO_DECODE,
+ NONE,
/** All sequences of escape sequences that represent UTF-8 coded
UTF-32 characters with a numerical value greater than 0x7F, are
replaced by the respective UTF-16 characters. All other escape
sequences are not decoded.
*/
- DECODE_TO_IURI,
+ ToIUri,
/** All (sequences of) escape sequences that represent characters from
the specified character set, and that can be converted to UTF-32,
are replaced by the respective UTF-16 characters. All other
escape sequences are not decoded.
*/
- DECODE_WITH_CHARSET,
+ WithCharset,
/** All (sequences of) escape sequences that represent characters from
the specified character set, that can be converted to UTF-32, and
@@ -152,7 +152,7 @@ public:
replaced by the respective UTF-16 characters. All other escape
sequences are not decoded.
*/
- DECODE_UNAMBIGUOUS
+ Unambiguous
};
// General Structure:
@@ -167,18 +167,18 @@ public:
= RTL_TEXTENCODING_UTF8) const
{ return decode(m_aAbsURIRef, eMechanism, eCharset); }
- OUString GetURLNoPass(DecodeMechanism eMechanism = DECODE_TO_IURI,
+ OUString GetURLNoPass(DecodeMechanism eMechanism = DecodeMechanism::ToIUri,
rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8)
const;
- OUString GetURLNoMark(DecodeMechanism eMechanism = DECODE_TO_IURI,
+ OUString GetURLNoMark(DecodeMechanism eMechanism = DecodeMechanism::ToIUri,
rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8)
const;
OUString
getAbbreviated(css::uno::Reference< css::util::XStringWidth > const & rStringWidth,
sal_Int32 nWidth,
- DecodeMechanism eMechanism = DECODE_TO_IURI,
+ DecodeMechanism eMechanism = DecodeMechanism::ToIUri,
rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8)
const;
@@ -340,14 +340,14 @@ public:
OUString const & rTheRelURIRef,
bool bIgnoreFragment = false,
EncodeMechanism eEncodeMechanism = EncodeMechanism::WasEncoded,
- DecodeMechanism eDecodeMechanism = DECODE_TO_IURI,
+ DecodeMechanism eDecodeMechanism = DecodeMechanism::ToIUri,
rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8);
static inline OUString
GetRelURL(OUString const & rTheBaseURIRef,
OUString const & rTheAbsURIRef,
EncodeMechanism eEncodeMechanism = EncodeMechanism::WasEncoded,
- DecodeMechanism eDecodeMechanism = DECODE_TO_IURI,
+ DecodeMechanism eDecodeMechanism = DecodeMechanism::ToIUri,
rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8,
FSysStyle eStyle = FSYS_DETECT);
@@ -358,14 +358,14 @@ public:
static inline bool translateToExternal(OUString const & rTheIntURIRef,
OUString & rTheExtURIRef,
DecodeMechanism eDecodeMechanism
- = DECODE_TO_IURI,
+ = DecodeMechanism::ToIUri,
rtl_TextEncoding eCharset
= RTL_TEXTENCODING_UTF8);
static inline bool translateToInternal(OUString const & rTheExtURIRef,
OUString & rTheIntURIRef,
DecodeMechanism eDecodeMechanism
- = DECODE_TO_IURI,
+ = DecodeMechanism::ToIUri,
rtl_TextEncoding eCharset
= RTL_TEXTENCODING_UTF8);
@@ -409,12 +409,12 @@ public:
inline bool HasUserData() const { return m_aUser.isPresent(); }
- inline OUString GetUser(DecodeMechanism eMechanism = DECODE_TO_IURI,
+ inline OUString GetUser(DecodeMechanism eMechanism = DecodeMechanism::ToIUri,
rtl_TextEncoding eCharset
= RTL_TEXTENCODING_UTF8) const
{ return decode(m_aUser, eMechanism, eCharset); }
- inline OUString GetPass(DecodeMechanism eMechanism = DECODE_TO_IURI,
+ inline OUString GetPass(DecodeMechanism eMechanism = DecodeMechanism::ToIUri,
rtl_TextEncoding eCharset
= RTL_TEXTENCODING_UTF8) const
{ return decode(m_aAuth, eMechanism, eCharset); }
@@ -431,12 +431,12 @@ public:
inline bool HasPort() const { return m_aPort.isPresent(); }
- inline OUString GetHost(DecodeMechanism eMechanism = DECODE_TO_IURI,
+ inline OUString GetHost(DecodeMechanism eMechanism = DecodeMechanism::ToIUri,
rtl_TextEncoding eCharset
= RTL_TEXTENCODING_UTF8) const
{ return decode(m_aHost, eMechanism, eCharset); }
- OUString GetHostPort(DecodeMechanism eMechanism = DECODE_TO_IURI,
+ OUString GetHostPort(DecodeMechanism eMechanism = DecodeMechanism::ToIUri,
rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8);
sal_uInt32 GetPort() const;
@@ -450,7 +450,7 @@ public:
inline bool HasURLPath() const { return !m_aPath.isEmpty(); }
- inline OUString GetURLPath(DecodeMechanism eMechanism = DECODE_TO_IURI,
+ inline OUString GetURLPath(DecodeMechanism eMechanism = DecodeMechanism::ToIUri,
rtl_TextEncoding eCharset
= RTL_TEXTENCODING_UTF8) const
{ return decode(m_aPath, eMechanism, eCharset); }
@@ -561,7 +561,7 @@ public:
*/
OUString getName(sal_Int32 nIndex = LAST_SEGMENT,
bool bIgnoreFinalSlash = true,
- DecodeMechanism eMechanism = DECODE_TO_IURI,
+ DecodeMechanism eMechanism = DecodeMechanism::ToIUri,
rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8)
const;
@@ -595,7 +595,7 @@ public:
*/
OUString getBase(sal_Int32 nIndex = LAST_SEGMENT,
bool bIgnoreFinalSlash = true,
- DecodeMechanism eMechanism = DECODE_TO_IURI,
+ DecodeMechanism eMechanism = DecodeMechanism::ToIUri,
rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8)
const;
@@ -648,7 +648,7 @@ public:
*/
OUString getExtension(sal_Int32 nIndex = LAST_SEGMENT,
bool bIgnoreFinalSlash = true,
- DecodeMechanism eMechanism = DECODE_TO_IURI,
+ DecodeMechanism eMechanism = DecodeMechanism::ToIUri,
rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8)
const;
@@ -724,7 +724,7 @@ public:
inline OUString GetParam(rtl_TextEncoding eCharset
= RTL_TEXTENCODING_UTF8) const
- { return decode(m_aQuery, NO_DECODE, eCharset); }
+ { return decode(m_aQuery, DecodeMechanism::NONE, eCharset); }
inline bool SetParam(OUString const & rTheQuery,
EncodeMechanism eMechanism = EncodeMechanism::WasEncoded,
@@ -734,7 +734,7 @@ public:
inline bool HasMark() const { return m_aFragment.isPresent(); }
- inline OUString GetMark(DecodeMechanism eMechanism = DECODE_TO_IURI,
+ inline OUString GetMark(DecodeMechanism eMechanism = DecodeMechanism::ToIUri,
rtl_TextEncoding eCharset
= RTL_TEXTENCODING_UTF8) const
{ return decode(m_aFragment, eMechanism, eCharset); }
@@ -891,7 +891,7 @@ public:
the last unencoded '/'). Not that this last segment may be empty. If
the URL is not hierarchical, an empty string is returned.
*/
- OUString GetLastName(DecodeMechanism eMechanism = DECODE_TO_IURI,
+ OUString GetLastName(DecodeMechanism eMechanism = DecodeMechanism::ToIUri,
rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8)
const;
@@ -926,7 +926,7 @@ public:
EncodeMechanism eMechanism = EncodeMechanism::WasEncoded,
rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8);
- inline OUString GetName(DecodeMechanism eMechanism = DECODE_TO_IURI,
+ inline OUString GetName(DecodeMechanism eMechanism = DecodeMechanism::ToIUri,
rtl_TextEncoding eCharset
= RTL_TEXTENCODING_UTF8) const
{ return GetLastName(eMechanism, eCharset); }
diff --git a/linguistic/source/convdiclist.cxx b/linguistic/source/convdiclist.cxx
index 4c77c0018a28..4efefdf7e936 100644
--- a/linguistic/source/convdiclist.cxx
+++ b/linguistic/source/convdiclist.cxx
@@ -72,7 +72,7 @@ OUString GetConvDicMainURL( const OUString &rDicName, const OUString &rDirectory
if (aURLObj.HasError())
return OUString();
else
- return aURLObj.GetMainURL( INetURLObject::DECODE_TO_IURI );
+ return aURLObj.GetMainURL( INetURLObject::DecodeMechanism::ToIUri );
}
class ConvDicNameContainer :
@@ -263,7 +263,7 @@ void SAL_CALL ConvDicNameContainer::removeByName( const OUString& rName )
{
try
{
- ::ucbhelper::Content aCnt( aObj.GetMainURL( INetURLObject::NO_DECODE ),
+ ::ucbhelper::Content aCnt( aObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ),
uno::Reference< css::ucb::XCommandEnvironment >(),
comphelper::getProcessComponentContext() );
aCnt.executeCommand( "delete", makeAny( true ) );
@@ -307,7 +307,7 @@ void ConvDicNameContainer::AddConvDics(
// get decoded dictionary file name
INetURLObject aURLObj( aURL );
OUString aDicName = aURLObj.getBase( INetURLObject::LAST_SEGMENT,
- true, INetURLObject::DECODE_WITH_CHARSET );
+ true, INetURLObject::DecodeMechanism::WithCharset );
uno::Reference < XConversionDictionary > xDic;
if (nLang == LANGUAGE_KOREAN &&
diff --git a/linguistic/source/dlistimp.cxx b/linguistic/source/dlistimp.cxx
index 6b2a43be4068..f86963015fbf 100644
--- a/linguistic/source/dlistimp.cxx
+++ b/linguistic/source/dlistimp.cxx
@@ -341,7 +341,7 @@ void DicList::SearchForDictionaries(
// get decoded dictionary file name
INetURLObject aURLObj( aURL );
OUString aDicName = aURLObj.getName( INetURLObject::LAST_SEGMENT,
- true, INetURLObject::DECODE_WITH_CHARSET );
+ true, INetURLObject::DecodeMechanism::WithCharset );
DictionaryType eType = bNeg ? DictionaryType_NEGATIVE : DictionaryType_POSITIVE;
uno::Reference< XDictionary > xDic =
diff --git a/linguistic/source/misc2.cxx b/linguistic/source/misc2.cxx
index cf893f397015..9bd7fd5add26 100644
--- a/linguistic/source/misc2.cxx
+++ b/linguistic/source/misc2.cxx
@@ -160,10 +160,10 @@ OUString GetWritableDictionaryURL( const OUString &rDicName )
aURLObj.Append( rDicName, INetURLObject::EncodeMechanism::All );
DBG_ASSERT(!aURLObj.HasError(), "lng : invalid URL");
- // NO_DECODE preserves the escape sequences that might be included in aDirName
+ // DecodeMechanism::NONE preserves the escape sequences that might be included in aDirName
// depending on the characters used in the path string. (Needed when comparing
// the dictionary URL with GetDictionaryWriteablePath in DicList::createDictionary.)
- return aURLObj.GetMainURL( INetURLObject::NO_DECODE );
+ return aURLObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
}
} // namespace linguistic
diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx
index 766aa9f0fe12..05f2e56bc7f7 100644
--- a/sc/source/core/data/documen2.cxx
+++ b/sc/source/core/data/documen2.cxx
@@ -959,7 +959,7 @@ sal_uLong ScDocument::TransferTab( ScDocument* pSrcDoc, SCTAB nSrcPos,
if (pSrcDoc->pShell->GetMedium())
{
- pSrcDoc->maFileURL = pSrcDoc->pShell->GetMedium()->GetURLObject().GetMainURL(INetURLObject::DECODE_TO_IURI);
+ pSrcDoc->maFileURL = pSrcDoc->pShell->GetMedium()->GetURLObject().GetMainURL(INetURLObject::DecodeMechanism::ToIUri);
// for unsaved files use the title name and adjust during save of file
if (pSrcDoc->maFileURL.isEmpty())
pSrcDoc->maFileURL = pSrcDoc->pShell->GetName();
diff --git a/sc/source/core/data/documen8.cxx b/sc/source/core/data/documen8.cxx
index e2aac3677484..e2a339c528a7 100644
--- a/sc/source/core/data/documen8.cxx
+++ b/sc/source/core/data/documen8.cxx
@@ -834,7 +834,7 @@ void ScDocument::UpdateExternalRefLinks(vcl::Window* pWin)
sfx2::LinkManager::GetDisplayNames(pRefLink, nullptr, &aFile);
// Decode encoded URL for display friendliness.
INetURLObject aUrl(aFile,INetURLObject::EncodeMechanism::WasEncoded);
- aFile = aUrl.GetMainURL(INetURLObject::DECODE_UNAMBIGUOUS);
+ aFile = aUrl.GetMainURL(INetURLObject::DecodeMechanism::Unambiguous);
OUStringBuffer aBuf;
aBuf.append(OUString(ScResId(SCSTR_EXTDOC_NOT_LOADED)));
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index 604ae0401359..17ed40c87d89 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -1969,7 +1969,7 @@ void ScDocument::InitUndo( ScDocument* pSrcDoc, SCTAB nTab1, SCTAB nTab2,
SharePooledResources(pSrcDoc);
if (pSrcDoc->pShell->GetMedium())
- maFileURL = pSrcDoc->pShell->GetMedium()->GetURLObject().GetMainURL(INetURLObject::DECODE_TO_IURI);
+ maFileURL = pSrcDoc->pShell->GetMedium()->GetURLObject().GetMainURL(INetURLObject::DecodeMechanism::ToIUri);
OUString aString;
if ( nTab2 >= static_cast<SCTAB>(maTabs.size()))
@@ -2153,7 +2153,7 @@ void ScDocument::CopyToClip(const ScClipParam& rClipParam,
if (pShell->GetMedium())
{
- pClipDoc->maFileURL = pShell->GetMedium()->GetURLObject().GetMainURL(INetURLObject::DECODE_TO_IURI);
+ pClipDoc->maFileURL = pShell->GetMedium()->GetURLObject().GetMainURL(INetURLObject::DecodeMechanism::ToIUri);
// for unsaved files use the title name and adjust during save of file
if (pClipDoc->maFileURL.isEmpty())
pClipDoc->maFileURL = pShell->GetName();
@@ -2253,7 +2253,7 @@ void ScDocument::CopyTabToClip(SCCOL nCol1, SCROW nRow1,
if (pShell->GetMedium())
{
- pClipDoc->maFileURL = pShell->GetMedium()->GetURLObject().GetMainURL(INetURLObject::DECODE_TO_IURI);
+ pClipDoc->maFileURL = pShell->GetMedium()->GetURLObject().GetMainURL(INetURLObject::DecodeMechanism::ToIUri);
// for unsaved files use the title name and adjust during save of file
if (pClipDoc->maFileURL.isEmpty())
pClipDoc->maFileURL = pShell->GetName();
diff --git a/sc/source/core/data/global2.cxx b/sc/source/core/data/global2.cxx
index b4b189b60de7..59af5df610e5 100644
--- a/sc/source/core/data/global2.cxx
+++ b/sc/source/core/data/global2.cxx
@@ -320,7 +320,7 @@ OUString ScGlobal::GetAbsDocName( const OUString& rFileName,
aObj.SetSmartURL( aPathOpt.GetWorkPath() );
aObj.setFinalSlash(); // it IS a path
bool bWasAbs = true;
- aAbsName = aObj.smartRel2Abs( rFileName, bWasAbs ).GetMainURL(INetURLObject::NO_DECODE);
+ aAbsName = aObj.smartRel2Abs( rFileName, bWasAbs ).GetMainURL(INetURLObject::DecodeMechanism::NONE);
// returned string must be encoded because it's used directly to create SfxMedium
}
else
@@ -329,14 +329,14 @@ OUString ScGlobal::GetAbsDocName( const OUString& rFileName,
if ( pMedium )
{
bool bWasAbs = true;
- aAbsName = pMedium->GetURLObject().smartRel2Abs( rFileName, bWasAbs ).GetMainURL(INetURLObject::NO_DECODE);
+ aAbsName = pMedium->GetURLObject().smartRel2Abs( rFileName, bWasAbs ).GetMainURL(INetURLObject::DecodeMechanism::NONE);
}
else
{ // This can't happen, but ...
// just to be sure to have the same encoding
INetURLObject aObj;
aObj.SetSmartURL( aAbsName );
- aAbsName = aObj.GetMainURL(INetURLObject::NO_DECODE);
+ aAbsName = aObj.GetMainURL(INetURLObject::DecodeMechanism::NONE);
}
}
return aAbsName;
diff --git a/sc/source/core/data/globalx.cxx b/sc/source/core/data/globalx.cxx
index e1aad6443c8b..9a558ae458c0 100644
--- a/sc/source/core/data/globalx.cxx
+++ b/sc/source/core/data/globalx.cxx
@@ -68,7 +68,7 @@ void ScGlobal::InitAddIns()
aObj.setFinalSlash();
try
{
- ::ucbhelper::Content aCnt( aObj.GetMainURL(INetURLObject::NO_DECODE),
+ ::ucbhelper::Content aCnt( aObj.GetMainURL(INetURLObject::DecodeMechanism::NONE),
Reference< XCommandEnvironment >(),
comphelper::getProcessComponentContext() );
Reference< sdbc::XResultSet > xResultSet;
diff --git a/sc/source/core/tool/autoform.cxx b/sc/source/core/tool/autoform.cxx
index 4966475d3180..4552389a5012 100644
--- a/sc/source/core/tool/autoform.cxx
+++ b/sc/source/core/tool/autoform.cxx
@@ -1022,7 +1022,7 @@ void ScAutoFormat::Load()
aURL.setFinalSlash();
aURL.Append( sAutoTblFmtName );
- SfxMedium aMedium( aURL.GetMainURL(INetURLObject::NO_DECODE), StreamMode::READ );
+ SfxMedium aMedium( aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE), StreamMode::READ );
SvStream* pStream = aMedium.GetInStream();
bool bRet = (pStream && pStream->GetError() == 0);
if (bRet)
@@ -1080,7 +1080,7 @@ bool ScAutoFormat::Save()
aURL.setFinalSlash();
aURL.Append(sAutoTblFmtName);
- SfxMedium aMedium( aURL.GetMainURL(INetURLObject::NO_DECODE), StreamMode::WRITE );
+ SfxMedium aMedium( aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE), StreamMode::WRITE );
SvStream* pStream = aMedium.GetOutStream();
bool bRet = (pStream && pStream->GetError() == 0);
if (bRet)
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index b9b3a192a2ef..51553dae5020 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -913,7 +913,7 @@ struct ConventionOOO_A1 : public Convention_A1
if (bEncodeUrl)
aFile = rFileName;
else
- aFile = INetURLObject::decode(rFileName, INetURLObject::DECODE_UNAMBIGUOUS);
+ aFile = INetURLObject::decode(rFileName, INetURLObject::DecodeMechanism::Unambiguous);
rBuffer.append("'" + aFile.replaceAll("'", "''") + "'#");
@@ -1153,7 +1153,7 @@ struct ConventionXL
if (bEncodeUrl)
aFullName = rFullName;
else
- aFullName = INetURLObject::decode(rFullName, INetURLObject::DECODE_UNAMBIGUOUS);
+ aFullName = INetURLObject::decode(rFullName, INetURLObject::DecodeMechanism::Unambiguous);
const sal_Unicode* pBuf = aFullName.getStr();
sal_Int32 nLen = aFullName.getLength();
diff --git a/sc/source/core/tool/formulalogger.cxx b/sc/source/core/tool/formulalogger.cxx
index 036be66a0239..93143e0eeb1f 100644
--- a/sc/source/core/tool/formulalogger.cxx
+++ b/sc/source/core/tool/formulalogger.cxx
@@ -35,7 +35,7 @@ std::unique_ptr<osl::File> initFile()
OUString aPath = OUString::createFromAscii(pPath);
INetURLObject aURL;
aURL.SetSmartURL(aPath);
- aPath = aURL.GetMainURL(INetURLObject::NO_DECODE);
+ aPath = aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE);
return o3tl::make_unique<osl::File>(aPath);
}
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index a91e00069e34..eec366de3978 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -2192,7 +2192,7 @@ void ScInterpreter::ScCell()
OUStringBuffer aBuf;
aBuf.append('\'');
const INetURLObject& rURLObj = pShell->GetMedium()->GetURLObject();
- aBuf.append(rURLObj.GetMainURL(INetURLObject::DECODE_UNAMBIGUOUS));
+ aBuf.append(rURLObj.GetMainURL(INetURLObject::DecodeMechanism::Unambiguous));
aBuf.append("'#$");
OUString aTabName;
pDok->GetName( nTab, aTabName );
diff --git a/sc/source/filter/excel/xecontent.cxx b/sc/source/filter/excel/xecontent.cxx
index e2f989c9dedd..bbbbf4a7abff 100644
--- a/sc/source/filter/excel/xecontent.cxx
+++ b/sc/source/filter/excel/xecontent.cxx
@@ -354,7 +354,7 @@ XclExpHyperlink::XclExpHyperlink( const XclExpRoot& rRoot, const SvxURLField& rU
if( eProtocol == INetProtocol::Smb )
{
// #n382718# (and #n261623#) Convert smb notation to '\\'
- aFileName = aUrlObj.GetMainURL( INetURLObject::NO_DECODE );
+ aFileName = aUrlObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
aFileName = aFileName.copy(4); // skip the 'smb:' part
aFileName = aFileName.replace('/', '\\');
}
@@ -457,7 +457,7 @@ OUString XclExpHyperlink::BuildFileName(
OUString aTmpName( aDosName );
aDosName = INetURLObject::GetRelURL( rRoot.GetBasePath(), rUrl,
INetURLObject::EncodeMechanism::WasEncoded,
- (bEncoded ? INetURLObject::DECODE_TO_IURI : INetURLObject::DECODE_WITH_CHARSET));
+ (bEncoded ? INetURLObject::DecodeMechanism::ToIUri : INetURLObject::DecodeMechanism::WithCharset));
if (aDosName.startsWith(INET_FILE_SCHEME))
{
diff --git a/sc/source/filter/excel/xicontent.cxx b/sc/source/filter/excel/xicontent.cxx
index bb80a929b35f..e0724e228a18 100644
--- a/sc/source/filter/excel/xicontent.cxx
+++ b/sc/source/filter/excel/xicontent.cxx
@@ -154,7 +154,7 @@ void lclGetAbsPath( OUString& rPath, sal_uInt16 nLevel, SfxObjectShell* pDocShel
if( pDocShell )
{
bool bWasAbs = false;
- rPath = pDocShell->GetMedium()->GetURLObject().smartRel2Abs( aTmpStr.makeStringAndClear(), bWasAbs ).GetMainURL( INetURLObject::NO_DECODE );
+ rPath = pDocShell->GetMedium()->GetURLObject().smartRel2Abs( aTmpStr.makeStringAndClear(), bWasAbs ).GetMainURL( INetURLObject::DecodeMechanism::NONE );
// full path as stored in SvxURLField must be encoded
}
else
diff --git a/sc/source/filter/lotus/lotus.cxx b/sc/source/filter/lotus/lotus.cxx
index 9267cafe13c0..24524ba9d1b5 100644
--- a/sc/source/filter/lotus/lotus.cxx
+++ b/sc/source/filter/lotus/lotus.cxx
@@ -75,7 +75,7 @@ FltError ScFormatFilterPluginImpl::ScImportLotus123( SfxMedium& rMedium, ScDocum
// try to load *.FM3 file
INetURLObject aURL( rMedium.GetURLObject() );
aURL.setExtension( "FM3" );
- SfxMedium aMedium( aURL.GetMainURL(INetURLObject::NO_DECODE), StreamMode::STD_READ );
+ SfxMedium aMedium( aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE), StreamMode::STD_READ );
pStream = aMedium.GetInStream();
if ( pStream )
{
diff --git a/sc/source/filter/xcl97/xcl97rec.cxx b/sc/source/filter/xcl97/xcl97rec.cxx
index 85f80676ab8a..66c18054dbb4 100644
--- a/sc/source/filter/xcl97/xcl97rec.cxx
+++ b/sc/source/filter/xcl97/xcl97rec.cxx
@@ -1095,7 +1095,7 @@ bool transformURL(const OUString& rOldURL, OUString& rNewURL, ScDocument* pDoc)
{
// URL has to be decoded for escaped characters (%20)
OUString aURL = INetURLObject::decode( rOldURL,
- INetURLObject::DECODE_WITH_CHARSET );
+ INetURLObject::DecodeMechanism::WithCharset );
OUString aAddressString = aURL.copy(1);
ScRange aRange;
diff --git a/sc/source/ui/app/drwtrans.cxx b/sc/source/ui/app/drwtrans.cxx
index 78a13d3c7956..8c8d24b15683 100644
--- a/sc/source/ui/app/drwtrans.cxx
+++ b/sc/source/ui/app/drwtrans.cxx
@@ -161,7 +161,7 @@ ScDrawTransferObj::ScDrawTransferObj( SdrModel* pClipModel, ScDocShell* pContain
{
bool bWasAbs = true;
aAbs = pMedium->GetURLObject().smartRel2Abs( aUrl, bWasAbs ).
- GetMainURL(INetURLObject::NO_DECODE);
+ GetMainURL(INetURLObject::DecodeMechanism::NONE);
// full path as stored INetBookmark must be encoded
}
else
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index d4e0a711d504..f88b6e52ef2f 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -3071,7 +3071,7 @@ void ScInputHandler::SetReference( const ScRange& rRef, ScDocument* pDoc )
SfxObjectShell* pObjSh = pDoc->GetDocumentShell();
// #i75893# convert escaped URL of the document to something user friendly
- OUString aFileName = pObjSh->GetMedium()->GetURLObject().GetMainURL( INetURLObject::DECODE_UNAMBIGUOUS );
+ OUString aFileName = pObjSh->GetMedium()->GetURLObject().GetMainURL( INetURLObject::DecodeMechanism::Unambiguous );
switch(aAddrDetails.eConv)
{
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index cf4590182705..18c4db7fc1db 100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.cxx
@@ -1676,7 +1676,7 @@ void popFileName(OUString& rPath)
{
INetURLObject aURLObj(rPath);
aURLObj.removeSegment();
- rPath = aURLObj.GetMainURL(INetURLObject::NO_DECODE);
+ rPath = aURLObj.GetMainURL(INetURLObject::DecodeMechanism::NONE);
}
}
diff --git a/sc/source/ui/docshell/docsh8.cxx b/sc/source/ui/docshell/docsh8.cxx
index 646656e56358..4973aaa73b95 100644
--- a/sc/source/ui/docshell/docsh8.cxx
+++ b/sc/source/ui/docshell/docsh8.cxx
@@ -107,11 +107,11 @@ namespace
aURL.SetSmartProtocol( INetProtocol::File );
aURL.SetSmartURL( rFullFileName );
_rTabName = aURL.getBase( INetURLObject::LAST_SEGMENT, true,
- INetURLObject::DECODE_UNAMBIGUOUS );
+ INetURLObject::DecodeMechanism::Unambiguous );
OUString aExtension = aURL.getExtension();
aURL.removeSegment();
aURL.removeFinalSlash();
- OUString aPath = aURL.GetMainURL(INetURLObject::NO_DECODE);
+ OUString aPath = aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE);
uno::Reference<uno::XComponentContext> xContext = comphelper::getProcessComponentContext();
_rDrvMgr.set( sdbc::DriverManager::create( xContext ) );
@@ -169,7 +169,7 @@ bool ScDocShell::MoveFile( const INetURLObject& rSourceObj, const INetURLObject&
try
{
- ::ucbhelper::Content aDestPath( aDestPathObj.GetMainURL(INetURLObject::NO_DECODE),
+ ::ucbhelper::Content aDestPath( aDestPathObj.GetMainURL(INetURLObject::DecodeMechanism::NONE),
uno::Reference< css::ucb::XCommandEnvironment >(),
comphelper::getProcessComponentContext() );
uno::Reference< css::ucb::XCommandInfo > xInfo = aDestPath.getCommands();
@@ -177,7 +177,7 @@ bool ScDocShell::MoveFile( const INetURLObject& rSourceObj, const INetURLObject&
if ( xInfo->hasCommandByName( aTransferName ) )
{
aDestPath.executeCommand( aTransferName, uno::makeAny(
- css::ucb::TransferInfo( bMoveData, rSourceObj.GetMainURL(INetURLObject::NO_DECODE), aName,
+ css::ucb::TransferInfo( bMoveData, rSourceObj.GetMainURL(INetURLObject::DecodeMechanism::NONE), aName,
css::ucb::NameClash::ERROR ) ) );
}
else
@@ -202,7 +202,7 @@ bool ScDocShell::KillFile( const INetURLObject& rURL )
bool bRet = true;
try
{
- ::ucbhelper::Content aCnt( rURL.GetMainURL(INetURLObject::NO_DECODE),
+ ::ucbhelper::Content aCnt( rURL.GetMainURL(INetURLObject::DecodeMechanism::NONE),
uno::Reference< css::ucb::XCommandEnvironment >(),
comphelper::getProcessComponentContext() );
aCnt.executeCommand( "delete", css::uno::Any( true ) );
@@ -221,7 +221,7 @@ bool ScDocShell::IsDocument( const INetURLObject& rURL )
bool bRet = false;
try
{
- ::ucbhelper::Content aCnt( rURL.GetMainURL(INetURLObject::NO_DECODE),
+ ::ucbhelper::Content aCnt( rURL.GetMainURL(INetURLObject::DecodeMechanism::NONE),
uno::Reference< css::ucb::XCommandEnvironment >(),
comphelper::getProcessComponentContext() );
bRet = aCnt.isDocument();
diff --git a/sc/source/ui/docshell/externalrefmgr.cxx b/sc/source/ui/docshell/externalrefmgr.cxx
index 285cbddbd169..44436a0a8504 100644
--- a/sc/source/ui/docshell/externalrefmgr.cxx
+++ b/sc/source/ui/docshell/externalrefmgr.cxx
@@ -2501,7 +2501,7 @@ SfxObjectShellRef ScExternalRefManager::loadSrcDocument(sal_uInt16 nFileId, OUSt
aBaseURL.insertName("content.xml");
OUString aStr = URIHelper::simpleNormalizedMakeRelative(
- aBaseURL.GetMainURL(INetURLObject::NO_DECODE), aFile);
+ aBaseURL.GetMainURL(INetURLObject::DecodeMechanism::NONE), aFile);
setRelativeFileName(nFileId, aStr);
}
@@ -2673,7 +2673,7 @@ void ScExternalRefManager::SrcFileData::maybeCreateRealFileName(const OUString&
INetURLObject aBaseURL(rOwnDocName);
aBaseURL.insertName("content.xml");
bool bWasAbs = false;
- maRealFileName = aBaseURL.smartRel2Abs(rRelPath, bWasAbs).GetMainURL(INetURLObject::NO_DECODE);
+ maRealFileName = aBaseURL.smartRel2Abs(rRelPath, bWasAbs).GetMainURL(INetURLObject::DecodeMechanism::NONE);
}
void ScExternalRefManager::maybeCreateRealFileName(sal_uInt16 nFileId)
@@ -3179,7 +3179,7 @@ void ScExternalRefManager::transformUnsavedRefToSavedRef( SfxObjectShell* pShell
if ( itr->second.maShell.get() == pShell )
{
// found that the shell is marked as unsaved
- OUString aFileURL = pShell->GetMedium()->GetURLObject().GetMainURL(INetURLObject::DECODE_TO_IURI);
+ OUString aFileURL = pShell->GetMedium()->GetURLObject().GetMainURL(INetURLObject::DecodeMechanism::ToIUri);
switchSrcFile(itr->first, aFileURL, OUString());
EndListening(*pShell);
maUnsavedDocShells.erase(itr++);
diff --git a/sc/source/ui/formdlg/formula.cxx b/sc/source/ui/formdlg/formula.cxx
index eb5ddf4acef6..22faa17f9cbc 100644
--- a/sc/source/ui/formdlg/formula.cxx
+++ b/sc/source/ui/formdlg/formula.cxx
@@ -406,7 +406,7 @@ void ScFormulaDlg::SetReference( const ScRange& rRef, ScDocument* pRefDoc )
// #i75893# convert escaped URL of the document to something user friendly
// OUString aFileName = pObjSh->GetMedium()->GetName();
- OUString aFileName = pObjSh->GetMedium()->GetURLObject().GetMainURL( INetURLObject::DECODE_UNAMBIGUOUS );
+ OUString aFileName = pObjSh->GetMedium()->GetURLObject().GetMainURL( INetURLObject::DecodeMechanism::Unambiguous );
aRefStr = "'";
aRefStr += aFileName;
diff --git a/sc/source/ui/vba/vbaworkbook.cxx b/sc/source/ui/vba/vbaworkbook.cxx
index 4547cc234a72..d7a0e6a00ab6 100644
--- a/sc/source/ui/vba/vbaworkbook.cxx
+++ b/sc/source/ui/vba/vbaworkbook.cxx
@@ -314,7 +314,7 @@ ScVbaWorkbook::SaveAs( const uno::Any& FileName, const uno::Any& FileFormat, con
// detect if there is no path if there is no path then we need
// to use the current current folder
INetURLObject aURL( sURL );
- sURL = aURL.GetMainURL( INetURLObject::DECODE_TO_IURI );
+ sURL = aURL.GetMainURL( INetURLObject::DecodeMechanism::ToIUri );
if( sURL.isEmpty() )
{
// need to add cur dir ( of this workbook ) or else the 'Work' dir
@@ -335,7 +335,7 @@ ScVbaWorkbook::SaveAs( const uno::Any& FileName, const uno::Any& FileFormat, con
aURL.SetURL( sURL );
aURL.Append( sFileName );
}
- sURL = aURL.GetMainURL( INetURLObject::DECODE_TO_IURI );
+ sURL = aURL.GetMainURL( INetURLObject::DecodeMechanism::ToIUri );
}
diff --git a/sc/source/ui/view/gridwin5.cxx b/sc/source/ui/view/gridwin5.cxx
index 8608aea834c2..00b81b8d0db9 100644
--- a/sc/source/ui/view/gridwin5.cxx
+++ b/sc/source/ui/view/gridwin5.cxx
@@ -380,7 +380,7 @@ void ScGridWindow::RequestHelp(const HelpEvent& rHEvt)
if ( GetEditUrl( aPosPixel, nullptr, &aUrl ) )
{
aHelpText = INetURLObject::decode( aUrl,
- INetURLObject::DECODE_UNAMBIGUOUS );
+ INetURLObject::DecodeMechanism::Unambiguous );
if( bCtrlClickHlink )
{
diff --git a/sc/source/ui/view/prevwsh.cxx b/sc/source/ui/view/prevwsh.cxx
index f35a0f6ea5b5..86febd581aa2 100644
--- a/sc/source/ui/view/prevwsh.cxx
+++ b/sc/source/ui/view/prevwsh.cxx
@@ -894,9 +894,9 @@ void ScPreviewShell::FillFieldData( ScHeaderFieldData& rData )
rData.aTitle = pDocShell->GetTitle();
const INetURLObject& rURLObj = pDocShell->GetMedium()->GetURLObject();
- rData.aLongDocName = rURLObj.GetMainURL( INetURLObject::DECODE_UNAMBIGUOUS );
+ rData.aLongDocName = rURLObj.GetMainURL( INetURLObject::DecodeMechanism::Unambiguous );
if ( !rData.aLongDocName.isEmpty() )
- rData.aShortDocName = rURLObj.GetName( INetURLObject::DECODE_UNAMBIGUOUS );
+ rData.aShortDocName = rURLObj.GetName( INetURLObject::DecodeMechanism::Unambiguous );
else
rData.aShortDocName = rData.aLongDocName = rData.aTitle;
rData.nPageNo = pPreview->GetPageNo() + 1;
diff --git a/sc/source/ui/view/printfun.cxx b/sc/source/ui/view/printfun.cxx
index 9b99d7ad5273..58418ea01c08 100644
--- a/sc/source/ui/view/printfun.cxx
+++ b/sc/source/ui/view/printfun.cxx
@@ -1055,9 +1055,9 @@ void ScPrintFunc::InitParam( const ScPrintOptions* pOptions )
aFieldData.aTitle = pDocShell->GetTitle();
const INetURLObject& rURLObj = pDocShell->GetMedium()->GetURLObject();
- aFieldData.aLongDocName = rURLObj.GetMainURL( INetURLObject::DECODE_UNAMBIGUOUS );
+ aFieldData.aLongDocName = rURLObj.GetMainURL( INetURLObject::DecodeMechanism::Unambiguous );
if ( !aFieldData.aLongDocName.isEmpty() )
- aFieldData.aShortDocName = rURLObj.GetName( INetURLObject::DECODE_UNAMBIGUOUS );
+ aFieldData.aShortDocName = rURLObj.GetName( INetURLObject::DecodeMechanism::Unambiguous );
else
aFieldData.aShortDocName = aFieldData.aLongDocName = aFieldData.aTitle;
diff --git a/sc/source/ui/view/tabvwsh3.cxx b/sc/source/ui/view/tabvwsh3.cxx
index eb154dd01253..8ee29b991828 100644
--- a/sc/source/ui/view/tabvwsh3.cxx
+++ b/sc/source/ui/view/tabvwsh3.cxx
@@ -316,7 +316,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
{
// URL has to be decoded for escaped characters (%20)
aAddress = INetURLObject::decode( aAddress,
- INetURLObject::DECODE_WITH_CHARSET );
+ INetURLObject::DecodeMechanism::WithCharset );
}
bool bFound = false;
diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx
index df9eaba40dc4..9889bea2b52f 100644
--- a/sc/source/ui/view/tabvwsh4.cxx
+++ b/sc/source/ui/view/tabvwsh4.cxx
@@ -1820,9 +1820,9 @@ void ScTabViewShell::FillFieldData( ScHeaderFieldData& rData )
rData.aTitle = pDocShell->GetTitle();
const INetURLObject& rURLObj = pDocShell->GetMedium()->GetURLObject();
- rData.aLongDocName = rURLObj.GetMainURL( INetURLObject::DECODE_UNAMBIGUOUS );
+ rData.aLongDocName = rURLObj.GetMainURL( INetURLObject::DecodeMechanism::Unambiguous );
if ( !rData.aLongDocName.isEmpty() )
- rData.aShortDocName = rURLObj.GetName( INetURLObject::DECODE_UNAMBIGUOUS );
+ rData.aShortDocName = rURLObj.GetName( INetURLObject::DecodeMechanism::Unambiguous );
else
rData.aShortDocName = rData.aLongDocName = rData.aTitle;
rData.nPageNo = 1;
diff --git a/sc/source/ui/view/viewfun4.cxx b/sc/source/ui/view/viewfun4.cxx
index bd49b55cb954..1dbeb256892c 100644
--- a/sc/source/ui/view/viewfun4.cxx
+++ b/sc/source/ui/view/viewfun4.cxx
@@ -570,7 +570,7 @@ bool ScViewFunc::PasteFile( const Point& rPos, const OUString& rFile, bool bLink
{
INetURLObject aURL;
aURL.SetSmartURL( rFile );
- OUString aStrURL = aURL.GetMainURL( INetURLObject::NO_DECODE );
+ OUString aStrURL = aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE );
// is it a media URL?
if( ::avmedia::MediaWindow::isMediaURL( aStrURL, ""/*TODO?*/ ) )
diff --git a/sc/source/ui/xmlsource/xmlsourcedlg.cxx b/sc/source/ui/xmlsource/xmlsourcedlg.cxx
index bbadc7f03704..2d6bafeba7d6 100644
--- a/sc/source/ui/xmlsource/xmlsourcedlg.cxx
+++ b/sc/source/ui/xmlsource/xmlsourcedlg.cxx
@@ -193,7 +193,7 @@ void ScXMLSourceDlg::SelectSourceFile()
INetURLObject aURL(maSrcPath);
aURL.removeSegment();
aURL.removeFinalSlash();
- OUString aPath = aURL.GetMainURL(INetURLObject::NO_DECODE);
+ OUString aPath = aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE);
xFilePicker->setDisplayDirectory(aPath);
}
diff --git a/scripting/source/dlgprov/dlgprov.cxx b/scripting/source/dlgprov/dlgprov.cxx
index c47a84959277..2a41e8ee573a 100644
--- a/scripting/source/dlgprov/dlgprov.cxx
+++ b/scripting/source/dlgprov/dlgprov.cxx
@@ -91,7 +91,7 @@ namespace dlgprov
INetURLObject aInetObj( i_sURL );
OUString aDlgName = aInetObj.GetBase();
aInetObj.removeSegment();
- OUString aDlgLocation = aInetObj.GetMainURL( INetURLObject::NO_DECODE );
+ OUString aDlgLocation = aInetObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
bool bReadOnly = true;
css::lang::Locale aLocale = Application::GetSettings().GetUILanguageTag().getLocale();
OUString aComment;
diff --git a/scripting/source/provider/MasterScriptProvider.cxx b/scripting/source/provider/MasterScriptProvider.cxx
index 888b7f9800b1..764731c2ea2d 100644
--- a/scripting/source/provider/MasterScriptProvider.cxx
+++ b/scripting/source/provider/MasterScriptProvider.cxx
@@ -470,7 +470,7 @@ MasterScriptProvider::parseLocationName( const OUString& location )
OUString temp = location;
INetURLObject aURLObj( temp );
if ( !aURLObj.HasError() )
- temp = aURLObj.getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET );
+ temp = aURLObj.getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::DecodeMechanism::WithCharset );
return temp;
}
diff --git a/scripting/source/stringresource/stringresource.cxx b/scripting/source/stringresource/stringresource.cxx
index ad382d94d0ba..49f7f823d451 100644
--- a/scripting/source/stringresource/stringresource.cxx
+++ b/scripting/source/stringresource/stringresource.cxx
@@ -1806,7 +1806,7 @@ OUString StringResourcePersistenceImpl::implGetPathForLocaleItem
aInetObj.setExtension( "default" );
else
aInetObj.setExtension( "properties" );
- OUString aCompleteFileName = aInetObj.GetMainURL( INetURLObject::NO_DECODE );
+ OUString aCompleteFileName = aInetObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
return aCompleteFileName;
}
diff --git a/sd/source/filter/cgm/sdcgmfilter.cxx b/sd/source/filter/cgm/sdcgmfilter.cxx
index 8384aa68533f..9c34f6286b53 100644
--- a/sd/source/filter/cgm/sdcgmfilter.cxx
+++ b/sd/source/filter/cgm/sdcgmfilter.cxx
@@ -75,7 +75,7 @@ bool SdCGMFilter::Import()
#else
ImportCGMPointer FncImportCGM = ImportCGM;
#endif
- OUString aFileURL( mrMedium.GetURLObject().GetMainURL( INetURLObject::NO_DECODE ) );
+ OUString aFileURL( mrMedium.GetURLObject().GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
sal_uInt32 nRetValue;
if( mrDocument.GetPageCount() == 0 )
diff --git a/sd/source/filter/eppt/epptso.cxx b/sd/source/filter/eppt/epptso.cxx
index 3112e651e5de..d1feda163db9 100644
--- a/sd/source/filter/eppt/epptso.cxx
+++ b/sd/source/filter/eppt/epptso.cxx
@@ -1131,13 +1131,13 @@ void PPTWriter::ImplWriteTextStyleAtom( SvStream& rOut, int nTextInstance, sal_u
else if ( INetProtocol::Smb == aUrl.GetProtocol() )
{
// Convert smb notation to '\\' and skip the 'smb:' part
- aFile = aUrl.GetMainURL(INetURLObject::NO_DECODE).copy(4);
+ aFile = aUrl.GetMainURL(INetURLObject::DecodeMechanism::NONE).copy(4);
aFile = aFile.replaceAll( "/", "\\" );
aTarget = aFile;
}
else if ( pFieldEntry->aFieldUrl.startsWith("#") )
{
- OUString aPage( INetURLObject::decode( pFieldEntry->aFieldUrl, INetURLObject::DECODE_WITH_CHARSET ) );
+ OUString aPage( INetURLObject::decode( pFieldEntry->aFieldUrl, INetURLObject::DecodeMechanism::WithCharset ) );
aPage = aPage.copy( 1 );
std::vector<OUString>::const_iterator pIter = std::find(
diff --git a/sd/source/filter/grf/sdgrffilter.cxx b/sd/source/filter/grf/sdgrffilter.cxx
index 806e6b93f7c2..285b8b339a9a 100644
--- a/sd/source/filter/grf/sdgrffilter.cxx
+++ b/sd/source/filter/grf/sdgrffilter.cxx
@@ -169,7 +169,7 @@ void SdGRFFilter::HandleGraphicFilterError( sal_uInt16 nFilterError, sal_uLong n
bool SdGRFFilter::Import()
{
Graphic aGraphic;
- const OUString aFileName( mrMedium.GetURLObject().GetMainURL( INetURLObject::NO_DECODE ) );
+ const OUString aFileName( mrMedium.GetURLObject().GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
GraphicFilter& rGraphicFilter = GraphicFilter::GetGraphicFilter();
const sal_uInt16 nFilter = rGraphicFilter.GetImportFormatNumberForTypeName( mrMedium.GetFilter()->GetTypeName() );
bool bRet = false;
diff --git a/sd/source/filter/html/htmlex.cxx b/sd/source/filter/html/htmlex.cxx
index 8bc792b3bfb4..bd30e1f719d9 100644
--- a/sd/source/filter/html/htmlex.cxx
+++ b/sd/source/filter/html/htmlex.cxx
@@ -2869,7 +2869,7 @@ bool HtmlExport::CopyScript( const OUString& rPath, const OUString& rSource, con
meEC.SetContext( STR_HTMLEXP_ERROR_OPEN_FILE, rSource );
sal_uLong nErr = 0;
- SvStream* pIStm = ::utl::UcbStreamHelper::CreateStream( aURL.GetMainURL( INetURLObject::NO_DECODE ), StreamMode::READ );
+ SvStream* pIStm = ::utl::UcbStreamHelper::CreateStream( aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), StreamMode::READ );
if( pIStm )
{
@@ -3204,7 +3204,7 @@ sal_uLong EasyFile::createFileName( const OUString& rURL, OUString& rFileName )
aURL = INetURLObject( aURLStr );
}
DBG_ASSERT( aURL.GetProtocol() != INetProtocol::NotValid, "invalid URL" );
- rFileName = aURL.GetMainURL( INetURLObject::NO_DECODE );
+ rFileName = aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE );
}
return nErr;
diff --git a/sd/source/filter/html/pubdlg.cxx b/sd/source/filter/html/pubdlg.cxx
index a203b0a0e56b..00878d6d8bf9 100644
--- a/sd/source/filter/html/pubdlg.cxx
+++ b/sd/source/filter/html/pubdlg.cxx
@@ -868,7 +868,7 @@ void SdPublishingDlg::GetParameterSequence( Sequence< PropertyValue >& rParams )
INetURLObject::EncodeMechanism::All );
aValue.Name = "HomepageURL";
- aValue.Value <<= OUString( aHomeURL.GetMainURL( INetURLObject::NO_DECODE ) );
+ aValue.Value <<= OUString( aHomeURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
aProps.push_back( aValue );
aValue.Name = "UserText";
@@ -1513,7 +1513,7 @@ void SdPublishingDlg::Load()
// check if file exists, SfxMedium shows an errorbox else
{
- SvStream* pIStm = ::utl::UcbStreamHelper::CreateStream( aURL.GetMainURL( INetURLObject::NO_DECODE ), StreamMode::READ );
+ SvStream* pIStm = ::utl::UcbStreamHelper::CreateStream( aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), StreamMode::READ );
bool bOk = pIStm && ( pIStm->GetError() == 0);
@@ -1523,7 +1523,7 @@ void SdPublishingDlg::Load()
return;
}
- SfxMedium aMedium( aURL.GetMainURL( INetURLObject::NO_DECODE ), StreamMode::READ | StreamMode::NOCREATE );
+ SfxMedium aMedium( aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), StreamMode::READ | StreamMode::NOCREATE );
SvStream* pStream = aMedium.GetInStream();
@@ -1557,7 +1557,7 @@ bool SdPublishingDlg::Save()
{
INetURLObject aURL( SvtPathOptions().GetUserConfigPath() );
aURL.Append( "designs.sod" );
- SfxMedium aMedium( aURL.GetMainURL( INetURLObject::NO_DECODE ), StreamMode::WRITE | StreamMode::TRUNC );
+ SfxMedium aMedium( aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), StreamMode::WRITE | StreamMode::TRUNC );
SvStream* pStream = aMedium.GetOutStream();
diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx
index 55279ace6cbe..c5304993dcc8 100644
--- a/sd/source/filter/ppt/pptin.cxx
+++ b/sd/source/filter/ppt/pptin.cxx
@@ -418,7 +418,7 @@ bool ImplSdPPTImport::Import()
// Convert '\\' notation to 'smb://'
INetURLObject aUrl( pHyperlink->aTarget, INetProtocol::File );
- pHyperlink->aTarget = aUrl.GetMainURL( INetURLObject::NO_DECODE );
+ pHyperlink->aTarget = aUrl.GetMainURL( INetURLObject::DecodeMechanism::NONE );
if ( !aPropItem.Read( pHyperlink->aSubAdress ) )
break;
@@ -1955,7 +1955,7 @@ OUString ImplSdPPTImport::ReadSound(sal_uInt32 nSoundRef) const
sal_uInt8* pBuf = new sal_uInt8[ nSoundDataLen ];
rStCtrl.ReadBytes(pBuf, nSoundDataLen);
- SvStream* pOStm = ::utl::UcbStreamHelper::CreateStream( aGalleryUserSound.GetMainURL( INetURLObject::NO_DECODE ), StreamMode::WRITE | StreamMode::TRUNC );
+ SvStream* pOStm = ::utl::UcbStreamHelper::CreateStream( aGalleryUserSound.GetMainURL( INetURLObject::DecodeMechanism::NONE ), StreamMode::WRITE | StreamMode::TRUNC );
if( pOStm )
{
@@ -1963,8 +1963,8 @@ OUString ImplSdPPTImport::ReadSound(sal_uInt32 nSoundRef) const
if( pOStm->GetError() == ERRCODE_NONE )
{
- GalleryExplorer::InsertURL( GALLERY_THEME_USERSOUNDS, aGalleryUserSound.GetMainURL( INetURLObject::NO_DECODE ) );
- aRetval = aGalleryUserSound.GetMainURL( INetURLObject::NO_DECODE );
+ GalleryExplorer::InsertURL( GALLERY_THEME_USERSOUNDS, aGalleryUserSound.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
+ aRetval = aGalleryUserSound.GetMainURL( INetURLObject::DecodeMechanism::NONE );
}
delete pOStm;
@@ -2031,7 +2031,7 @@ OUString ImplSdPPTImport::ReadMedia( sal_uInt32 nMediaRef ) const
if( osl::FileBase::getFileURLFromSystemPath( aStr, aRetVal )
== osl::FileBase::E_None )
{
- aRetVal = INetURLObject( aRetVal ).GetMainURL( INetURLObject::DECODE_UNAMBIGUOUS );
+ aRetVal = INetURLObject( aRetVal ).GetMainURL( INetURLObject::DecodeMechanism::Unambiguous );
}else{
aRetVal = aStr;
}
diff --git a/sd/source/ui/app/sdmod.cxx b/sd/source/ui/app/sdmod.cxx
index d5cfa2a62fe0..18df03c9cd69 100644
--- a/sd/source/ui/app/sdmod.cxx
+++ b/sd/source/ui/app/sdmod.cxx
@@ -184,7 +184,7 @@ tools::SvRef<SotStorageStream> SdModule::GetOptionStream( const OUString& rOptio
aURL.Append( "drawing.cfg" );
- SvStream* pStm = ::utl::UcbStreamHelper::CreateStream( aURL.GetMainURL( INetURLObject::NO_DECODE ), StreamMode::READWRITE );
+ SvStream* pStm = ::utl::UcbStreamHelper::CreateStream( aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), StreamMode::READWRITE );
if( pStm )
xOptionStorage = new SotStorage( pStm, true );
diff --git a/sd/source/ui/dlg/PhotoAlbumDialog.cxx b/sd/source/ui/dlg/PhotoAlbumDialog.cxx
index 54c6be14b1bb..4f4011ef0da0 100644
--- a/sd/source/ui/dlg/PhotoAlbumDialog.cxx
+++ b/sd/source/ui/dlg/PhotoAlbumDialog.cxx
@@ -510,7 +510,7 @@ IMPL_LINK_NOARG(SdPhotoAlbumDialog, FileHdl, Button*, void)
if (!sUrl.isEmpty())
aDlg.SetDisplayDirectory(sUrl);
else
- aDlg.SetDisplayDirectory( aFile.GetMainURL( INetURLObject::NO_DECODE ) );
+ aDlg.SetDisplayDirectory( aFile.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
if ( aDlg.Execute() == ERRCODE_NONE )
{
@@ -530,8 +530,8 @@ IMPL_LINK_NOARG(SdPhotoAlbumDialog, FileHdl, Button*, void)
{
// Store full path, show filename only. Use INetURLObject to display spaces in filename correctly
INetURLObject aUrl = INetURLObject(aFilesArr[i]);
- sal_Int16 nPos = pImagesLst->InsertEntry( aUrl.GetLastName(INetURLObject::DECODE_WITH_CHARSET) );
- pImagesLst->SetEntryData(nPos, new OUString(aUrl.GetMainURL(INetURLObject::DECODE_WITH_CHARSET)));
+ sal_Int16 nPos = pImagesLst->InsertEntry( aUrl.GetLastName(INetURLObject::DecodeMechanism::WithCharset) );
+ pImagesLst->SetEntryData(nPos, new OUString(aUrl.GetMainURL(INetURLObject::DecodeMechanism::WithCharset)));
}
}
}
diff --git a/sd/source/ui/dlg/navigatr.cxx b/sd/source/ui/dlg/navigatr.cxx
index 0f3c15fd9ace..c1e19adbd8c5 100644
--- a/sd/source/ui/dlg/navigatr.cxx
+++ b/sd/source/ui/dlg/navigatr.cxx
@@ -484,7 +484,7 @@ bool SdNavigatorWin::InsertFile(const OUString& rFileName)
}
// get adjusted FileName
- OUString aFileName( aURL.GetMainURL( INetURLObject::NO_DECODE ) );
+ OUString aFileName( aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
if (aFileName.isEmpty())
{
diff --git a/sd/source/ui/dlg/sdtreelb.cxx b/sd/source/ui/dlg/sdtreelb.cxx
index d6a0434a9d39..c0be5330c245 100644
--- a/sd/source/ui/dlg/sdtreelb.cxx
+++ b/sd/source/ui/dlg/sdtreelb.cxx
@@ -1165,7 +1165,7 @@ void SdPageObjsTLB::DoDrag()
if( mpDropNavWin )
{
::sd::DrawDocShell* pDocShell = mpDoc->GetDocSh();
- OUString aURL = INetURLObject( pDocShell->GetMedium()->GetPhysicalName(), INetProtocol::File ).GetMainURL( INetURLObject::NO_DECODE );
+ OUString aURL = INetURLObject( pDocShell->GetMedium()->GetPhysicalName(), INetProtocol::File ).GetMainURL( INetURLObject::DecodeMechanism::NONE );
NavigatorDragType eDragType = mpDropNavWin->GetNavigatorDragType();
aURL += "#" + GetSelectEntry();
diff --git a/sd/source/ui/dlg/tpaction.cxx b/sd/source/ui/dlg/tpaction.cxx
index 815fa6bbf207..0d917d66e906 100644
--- a/sd/source/ui/dlg/tpaction.cxx
+++ b/sd/source/ui/dlg/tpaction.cxx
@@ -304,7 +304,7 @@ bool SdTPAction::FillItemSet( SfxItemSet* rAttrs )
eCA == presentation::ClickAction_PROGRAM )
aFileName = ::URIHelper::SmartRel2Abs( INetURLObject(aBaseURL), aFileName, URIHelper::GetMaybeFileHdl(), true, false,
INetURLObject::EncodeMechanism::WasEncoded,
- INetURLObject::DECODE_UNAMBIGUOUS );
+ INetURLObject::DecodeMechanism::Unambiguous );
rAttrs->Put( SfxStringItem( ATTR_ACTION_FILENAME, aFileName ) );
bModified = true;
@@ -821,7 +821,7 @@ OUString SdTPAction::GetEditText( bool bFullDocDestination )
aURL = INetURLObject( ::URIHelper::SmartRel2Abs( INetURLObject(aBaseURL), aStr, URIHelper::GetMaybeFileHdl() ) );
// get adjusted file name
- aStr = aURL.GetMainURL( INetURLObject::NO_DECODE );
+ aStr = aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE );
if( bFullDocDestination &&
eCA == presentation::ClickAction_DOCUMENT &&
diff --git a/sd/source/ui/func/fudraw.cxx b/sd/source/ui/func/fudraw.cxx
index 45c8dddbaaa2..c2929684422e 100644
--- a/sd/source/ui/func/fudraw.cxx
+++ b/sd/source/ui/func/fudraw.cxx
@@ -795,7 +795,7 @@ bool FuDraw::SetHelpText(SdrObject* pObj, const Point& rPosPixel, const SdrViewE
if (aHelpText.isEmpty())
{
// show url if no name is available
- aHelpText = INetURLObject::decode( pIMapObj->GetURL(), INetURLObject::DECODE_WITH_CHARSET );
+ aHelpText = INetURLObject::decode( pIMapObj->GetURL(), INetURLObject::DecodeMechanism::WithCharset );
}
}
}
@@ -838,7 +838,7 @@ bool FuDraw::SetHelpText(SdrObject* pObj, const Point& rPosPixel, const SdrViewE
// jump to object/page
aHelpText = SD_RESSTR(STR_CLICK_ACTION_BOOKMARK);
aHelpText += ": ";
- aHelpText += INetURLObject::decode( pInfo->GetBookmark(), INetURLObject::DECODE_WITH_CHARSET );
+ aHelpText += INetURLObject::decode( pInfo->GetBookmark(), INetURLObject::DecodeMechanism::WithCharset );
}
break;
@@ -847,7 +847,7 @@ bool FuDraw::SetHelpText(SdrObject* pObj, const Point& rPosPixel, const SdrViewE
// jump to document (object/page)
aHelpText = SD_RESSTR(STR_CLICK_ACTION_DOCUMENT);
aHelpText += ": ";
- aHelpText += INetURLObject::decode( pInfo->GetBookmark(), INetURLObject::DECODE_WITH_CHARSET );
+ aHelpText += INetURLObject::decode( pInfo->GetBookmark(), INetURLObject::DecodeMechanism::WithCharset );
}
break;
@@ -856,7 +856,7 @@ bool FuDraw::SetHelpText(SdrObject* pObj, const Point& rPosPixel, const SdrViewE
// execute program
aHelpText = SD_RESSTR(STR_CLICK_ACTION_PROGRAM);
aHelpText += ": ";
- aHelpText += INetURLObject::decode( pInfo->GetBookmark(), INetURLObject::DECODE_WITH_CHARSET );
+ aHelpText += INetURLObject::decode( pInfo->GetBookmark(), INetURLObject::DecodeMechanism::WithCharset );
}
break;
@@ -911,7 +911,7 @@ bool FuDraw::SetHelpText(SdrObject* pObj, const Point& rPosPixel, const SdrViewE
/**************************************************************
* URL-Field
**************************************************************/
- aHelpText = INetURLObject::decode( rVEvt.pURLField->GetURL(), INetURLObject::DECODE_WITH_CHARSET );
+ aHelpText = INetURLObject::decode( rVEvt.pURLField->GetURL(), INetURLObject::DecodeMechanism::WithCharset );
}
if (!aHelpText.isEmpty())
diff --git a/sd/source/ui/func/fuinsert.cxx b/sd/source/ui/func/fuinsert.cxx
index f68e92bfa0ca..5edf2182b7ab 100644
--- a/sd/source/ui/func/fuinsert.cxx
+++ b/sd/source/ui/func/fuinsert.cxx
@@ -801,7 +801,7 @@ void FuInsert3DModel::DoExecute( SfxRequest& )
if( aDlg.Execute() == ERRCODE_NONE )
{
const INetURLObject aURL( aDlg.GetPath() );
- sURL = aURL.GetMainURL( INetURLObject::DECODE_UNAMBIGUOUS );
+ sURL = aURL.GetMainURL( INetURLObject::DecodeMechanism::Unambiguous );
}
else if( !sURL.isEmpty() )
sURL.clear();
diff --git a/sd/source/ui/func/fusel.cxx b/sd/source/ui/func/fusel.cxx
index 4a0acda8d055..90d2aa0d8d5b 100644
--- a/sd/source/ui/func/fusel.cxx
+++ b/sd/source/ui/func/fusel.cxx
@@ -1365,11 +1365,11 @@ bool FuSelection::AnimateObj(SdrObject* pObj, const Point& rPos)
OUString aBaseURL = GetDocSh()->GetMedium()->GetBaseURL();
INetURLObject aURL( ::URIHelper::SmartRel2Abs( INetURLObject(aBaseURL), pInfo->GetBookmark(),
URIHelper::GetMaybeFileHdl(), true, false,
- INetURLObject::EncodeMechanism::WasEncoded, INetURLObject::DECODE_UNAMBIGUOUS ) );
+ INetURLObject::EncodeMechanism::WasEncoded, INetURLObject::DecodeMechanism::Unambiguous ) );
if( INetProtocol::File == aURL.GetProtocol() )
{
- SfxStringItem aUrl( SID_FILE_NAME, aURL.GetMainURL( INetURLObject::NO_DECODE ) );
+ SfxStringItem aUrl( SID_FILE_NAME, aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
SfxBoolItem aBrowsing( SID_BROWSE, true );
SfxViewFrame* pViewFrm = SfxViewFrame::Current();
diff --git a/sd/source/ui/func/futext.cxx b/sd/source/ui/func/futext.cxx
index 1657d2a39895..200c001daf07 100644
--- a/sd/source/ui/func/futext.cxx
+++ b/sd/source/ui/func/futext.cxx
@@ -1187,7 +1187,7 @@ bool FuText::RequestHelp(const HelpEvent& rHEvt)
if (pField && dynamic_cast< const SvxURLField *>( pField ) != nullptr)
{
// URL-Field
- aHelpText = INetURLObject::decode( static_cast<const SvxURLField*>(pField)->GetURL(), INetURLObject::DECODE_WITH_CHARSET );
+ aHelpText = INetURLObject::decode( static_cast<const SvxURLField*>(pField)->GetURL(), INetURLObject::DecodeMechanism::WithCharset );
}
if (!aHelpText.isEmpty())
{
diff --git a/sd/source/ui/sidebar/MasterPageDescriptor.cxx b/sd/source/ui/sidebar/MasterPageDescriptor.cxx
index b60725562626..60e7931d5aec 100644
--- a/sd/source/ui/sidebar/MasterPageDescriptor.cxx
+++ b/sd/source/ui/sidebar/MasterPageDescriptor.cxx
@@ -38,7 +38,7 @@ MasterPageDescriptor::MasterPageDescriptor (
const std::shared_ptr<PreviewProvider>& rpPreviewProvider)
: maToken(MasterPageContainer::NIL_TOKEN),
meOrigin(eOrigin),
- msURL(INetURLObject(rsURL).GetMainURL(INetURLObject::DECODE_UNAMBIGUOUS)),
+ msURL(INetURLObject(rsURL).GetMainURL(INetURLObject::DecodeMechanism::Unambiguous)),
msPageName(rsPageName),
msStyleName(rsStyleName),
mbIsPrecious(bIsPrecious),
diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx
index 4a71463d236b..140f0ac73cd0 100644
--- a/sd/source/ui/slideshow/slideshowimpl.cxx
+++ b/sd/source/ui/slideshow/slideshowimpl.cxx
@@ -1535,11 +1535,11 @@ void SlideshowImpl::click( const Reference< XShape >& xShape, const css::awt::Mo
INetURLObject(mpDocSh->GetMedium()->GetBaseURL()),
pEvent->maStrBookmark, ::URIHelper::GetMaybeFileHdl(), true,
false, INetURLObject::EncodeMechanism::WasEncoded,
- INetURLObject::DECODE_UNAMBIGUOUS ) );
+ INetURLObject::DecodeMechanism::Unambiguous ) );
if( INetProtocol::File == aURL.GetProtocol() )
{
- SfxStringItem aUrl( SID_FILE_NAME, aURL.GetMainURL( INetURLObject::NO_DECODE ) );
+ SfxStringItem aUrl( SID_FILE_NAME, aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
SfxBoolItem aBrowsing( SID_BROWSE, true );
SfxViewFrame* pViewFrm = SfxViewFrame::Current();
diff --git a/sd/source/ui/unoidl/UnoDocumentSettings.cxx b/sd/source/ui/unoidl/UnoDocumentSettings.cxx
index c6aba162be0c..9b654caf04cb 100644
--- a/sd/source/ui/unoidl/UnoDocumentSettings.cxx
+++ b/sd/source/ui/unoidl/UnoDocumentSettings.cxx
@@ -969,7 +969,7 @@ void DocumentSettings::ExtractURL( XPropertyListType t, Any* pValue )
INetURLObject aPathURL( pList->GetPath() );
aPathURL.insertName( pList->GetName() );
aPathURL.setExtension( pList->GetDefaultExt() );
- OUString aPath( aPathURL.GetMainURL( INetURLObject::NO_DECODE ) );
+ OUString aPath( aPathURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
*pValue <<= aPath;
}
diff --git a/sd/source/ui/view/drviews3.cxx b/sd/source/ui/view/drviews3.cxx
index d24e4cbeaefb..ea73c9427ab7 100644
--- a/sd/source/ui/view/drviews3.cxx
+++ b/sd/source/ui/view/drviews3.cxx
@@ -416,7 +416,7 @@ void DrawViewShell::ExecCtrl(SfxRequest& rReq)
if (pBookmark)
{
- OUString sBookmark(INetURLObject::decode(pBookmark->GetValue(), INetURLObject::DECODE_WITH_CHARSET));
+ OUString sBookmark(INetURLObject::decode(pBookmark->GetValue(), INetURLObject::DecodeMechanism::WithCharset));
rtl::Reference< sd::SlideShow > xSlideshow( SlideShow::GetSlideShow( GetViewShellBase() ) );
if(xSlideshow.is() && xSlideshow->isRunning())
diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx
index 704b8d9ff172..1e0d809efd68 100644
--- a/sd/source/ui/view/drviewse.cxx
+++ b/sd/source/ui/view/drviewse.cxx
@@ -1474,7 +1474,7 @@ void DrawViewShell::InsertURLButton(const OUString& rURL, const OUString& rText,
const OUString sTargetURL( ::URIHelper::SmartRel2Abs( INetURLObject( GetDocSh()->GetMedium()->GetBaseURL() ), rURL, URIHelper::GetMaybeFileHdl(), true, false,
INetURLObject::EncodeMechanism::WasEncoded,
- INetURLObject::DECODE_UNAMBIGUOUS ) );
+ INetURLObject::DecodeMechanism::Unambiguous ) );
if (mpDrawView->GetMarkedObjectList().GetMarkCount() > 0)
{
SdrObject* pMarkedObj = mpDrawView->GetMarkedObjectList().GetMark(0)->GetMarkedSdrObj();
diff --git a/sd/source/ui/view/sdview4.cxx b/sd/source/ui/view/sdview4.cxx
index 96a2ffc5363c..5fffe0460c1a 100644
--- a/sd/source/ui/view/sdview4.cxx
+++ b/sd/source/ui/view/sdview4.cxx
@@ -412,7 +412,7 @@ IMPL_LINK_NOARG(View, DropInsertFileHdl, Idle *, void)
GraphicFilter& rGraphicFilter = GraphicFilter::GetGraphicFilter();
Graphic aGraphic;
- aCurrentDropFile = aURL.GetMainURL( INetURLObject::NO_DECODE );
+ aCurrentDropFile = aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE );
if( !::avmedia::MediaWindow::isMediaURL( aCurrentDropFile, ""/*TODO?*/ ) )
{
diff --git a/sfx2/source/appl/appdde.cxx b/sfx2/source/appl/appdde.cxx
index 06569040d1f0..3b8e9f1230a8 100644
--- a/sfx2/source/appl/appdde.cxx
+++ b/sfx2/source/appl/appdde.cxx
@@ -87,7 +87,7 @@ namespace
try
{
- ::ucbhelper::Content aCnt( aObj.GetMainURL( INetURLObject::NO_DECODE ), uno::Reference< ucb::XCommandEnvironment >(), comphelper::getProcessComponentContext() );
+ ::ucbhelper::Content aCnt( aObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ), uno::Reference< ucb::XCommandEnvironment >(), comphelper::getProcessComponentContext() );
bRet = aCnt.isDocument();
}
catch( const ucb::CommandAbortedException& )
@@ -141,10 +141,10 @@ bool ImplDdeService::MakeTopic( const OUString& rNm )
INetURLObject aWorkPath( SvtPathOptions().GetWorkPath() );
INetURLObject aFile;
if ( aWorkPath.GetNewAbsURL( rNm, &aFile ) &&
- lcl_IsDocument( aFile.GetMainURL( INetURLObject::NO_DECODE ) ) )
+ lcl_IsDocument( aFile.GetMainURL( INetURLObject::DecodeMechanism::NONE ) ) )
{
// File exists? then try to load it:
- SfxStringItem aName( SID_FILE_NAME, aFile.GetMainURL( INetURLObject::NO_DECODE ) );
+ SfxStringItem aName( SID_FILE_NAME, aFile.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
SfxBoolItem aNewView(SID_OPEN_NEW_VIEW, true);
SfxBoolItem aSilent(SID_SILENT, true);
@@ -439,7 +439,7 @@ bool SfxApplication::InitializeDde()
INetURLObject aOfficeLockFile( SvtPathOptions().GetUserConfigPath() );
aOfficeLockFile.insertName( "soffice.lck" );
OUString aService( SfxDdeServiceName_Impl(
- aOfficeLockFile.GetMainURL(INetURLObject::DECODE_TO_IURI) ) );
+ aOfficeLockFile.GetMainURL(INetURLObject::DecodeMechanism::ToIUri) ) );
aService = aService.toAsciiUpperCase();
pImpl->pDdeService2 = new ImplDdeService( aService );
pImpl->pTriggerTopic = new SfxDdeTriggerTopic_Impl;
diff --git a/sfx2/source/appl/appopen.cxx b/sfx2/source/appl/appopen.cxx
index caec98f9e705..6a259edaf9b6 100644
--- a/sfx2/source/appl/appopen.cxx
+++ b/sfx2/source/appl/appopen.cxx
@@ -528,7 +528,7 @@ void SfxApplication::NewDocExec_Impl( SfxRequest& rReq )
{
DBG_ASSERT( aObj.GetProtocol() != INetProtocol::NotValid, "Illegal URL!" );
- SfxStringItem aName( SID_FILE_NAME, aObj.GetMainURL( INetURLObject::NO_DECODE ) );
+ SfxStringItem aName( SID_FILE_NAME, aObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
SfxStringItem aTemplName( SID_TEMPLATE_NAME, aTemplateName );
SfxStringItem aTemplRegionName( SID_TEMPLATE_REGIONNAME, aTemplateRegion );
pRet = GetDispatcher_Impl()->ExecuteList(SID_OPENDOC, eMode,
diff --git a/sfx2/source/appl/macroloader.cxx b/sfx2/source/appl/macroloader.cxx
index 3ab011f3dac0..92ecab7313c7 100644
--- a/sfx2/source/appl/macroloader.cxx
+++ b/sfx2/source/appl/macroloader.cxx
@@ -216,7 +216,7 @@ ErrCode SfxMacroLoader::loadMacro( const OUString& rURL, css::uno::Any& rRetval,
{
// find BasicManager
SfxObjectShell* pDoc = nullptr;
- OUString aBasMgrName( INetURLObject::decode(aMacro.copy( 8, nHashPos-8 ), INetURLObject::DECODE_WITH_CHARSET) );
+ OUString aBasMgrName( INetURLObject::decode(aMacro.copy( 8, nHashPos-8 ), INetURLObject::DecodeMechanism::WithCharset) );
if ( aBasMgrName.isEmpty() )
pBasMgr = pAppMgr;
else if ( aBasMgrName == "." )
@@ -253,7 +253,7 @@ ErrCode SfxMacroLoader::loadMacro( const OUString& rURL, css::uno::Any& rRetval,
}
// find BASIC method
- OUString aQualifiedMethod( INetURLObject::decode(aMacro.copy( nHashPos+1 ), INetURLObject::DECODE_WITH_CHARSET) );
+ OUString aQualifiedMethod( INetURLObject::decode(aMacro.copy( nHashPos+1 ), INetURLObject::DecodeMechanism::WithCharset) );
OUString aArgs;
if ( -1 != nArgsPos )
{
@@ -317,7 +317,7 @@ ErrCode SfxMacroLoader::loadMacro( const OUString& rURL, css::uno::Any& rRetval,
// direct API call on a specified object
OUStringBuffer aCall;
aCall.append('[').append(INetURLObject::decode(aMacro.copy(6),
- INetURLObject::DECODE_WITH_CHARSET));
+ INetURLObject::DecodeMechanism::WithCharset));
aCall.append(']');
pAppMgr->GetLib(0)->Execute(aCall.makeStringAndClear());
nErr = SbxBase::GetError();
diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx
index 97412bb3b0ca..52d37a0d688f 100644
--- a/sfx2/source/appl/newhelp.cxx
+++ b/sfx2/source/appl/newhelp.cxx
@@ -944,7 +944,7 @@ SearchTabPage_Impl::SearchTabPage_Impl(vcl::Window* pParent, SfxHelpIndexWindow_
{
OUString aToken = aUserData.getToken(i, ';');
m_pSearchED->InsertEntry( INetURLObject::decode(
- aToken, INetURLObject::DECODE_WITH_CHARSET ) );
+ aToken, INetURLObject::DecodeMechanism::WithCharset ) );
}
}
}
diff --git a/sfx2/source/appl/opengrf.cxx b/sfx2/source/appl/opengrf.cxx
index 70670fe25852..278dba81d57f 100644
--- a/sfx2/source/appl/opengrf.cxx
+++ b/sfx2/source/appl/opengrf.cxx
@@ -125,12 +125,12 @@ short SvxOpenGraphicDialog::Execute()
// non-local?
if ( INetProtocol::File != aObj.GetProtocol() )
{
- SfxMedium aMed( aObj.GetMainURL( INetURLObject::NO_DECODE ), StreamMode::READ );
+ SfxMedium aMed( aObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ), StreamMode::READ );
aMed.Download();
SvStream* pStream = aMed.GetInStream();
if( pStream )
- nImpRet = rFilter.CanImportGraphic( aObj.GetMainURL( INetURLObject::NO_DECODE ), *pStream, nFormatNum, &nRetFormat );
+ nImpRet = rFilter.CanImportGraphic( aObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ), *pStream, nFormatNum, &nRetFormat );
else
nImpRet = rFilter.CanImportGraphic( aObj, nFormatNum, &nRetFormat );
@@ -139,7 +139,7 @@ short SvxOpenGraphicDialog::Execute()
if ( !pStream )
nImpRet = rFilter.CanImportGraphic( aObj, GRFILTER_FORMAT_DONTKNOW, &nRetFormat );
else
- nImpRet = rFilter.CanImportGraphic( aObj.GetMainURL( INetURLObject::NO_DECODE ), *pStream,
+ nImpRet = rFilter.CanImportGraphic( aObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ), *pStream,
GRFILTER_FORMAT_DONTKNOW, &nRetFormat );
}
}
diff --git a/sfx2/source/appl/sfxhelp.cxx b/sfx2/source/appl/sfxhelp.cxx
index 2a4c32566c98..e992cc9a4d5a 100644
--- a/sfx2/source/appl/sfxhelp.cxx
+++ b/sfx2/source/appl/sfxhelp.cxx
@@ -173,7 +173,7 @@ bool GetHelpAnchor_Impl( const OUString& _rURL, OUString& _rAnchor )
try
{
- ::ucbhelper::Content aCnt( INetURLObject( _rURL ).GetMainURL( INetURLObject::NO_DECODE ),
+ ::ucbhelper::Content aCnt( INetURLObject( _rURL ).GetMainURL( INetURLObject::DecodeMechanism::NONE ),
Reference< css::ucb::XCommandEnvironment >(),
comphelper::getProcessComponentContext() );
if ( ( aCnt.getPropertyValue("AnchorName") >>= sAnchor ) )
diff --git a/sfx2/source/appl/sfxpicklist.cxx b/sfx2/source/appl/sfxpicklist.cxx
index 0e794b3db2f7..771205a5354c 100644
--- a/sfx2/source/appl/sfxpicklist.cxx
+++ b/sfx2/source/appl/sfxpicklist.cxx
@@ -154,14 +154,14 @@ void SfxPickList::AddDocumentToPickList( SfxObjectShell* pDocSh )
// add to svtool history options
SvtHistoryOptions().AppendItem( ePICKLIST,
- aURL.GetURLNoPass( INetURLObject::NO_DECODE ),
+ aURL.GetURLNoPass( INetURLObject::DecodeMechanism::NONE ),
aFilter,
aTitle,
OUString(),
aThumbnail);
if ( aURL.GetProtocol() == INetProtocol::File )
- Application::AddToRecentDocumentList( aURL.GetURLNoPass( INetURLObject::NO_DECODE ),
+ Application::AddToRecentDocumentList( aURL.GetURLNoPass( INetURLObject::DecodeMechanism::NONE ),
(pFilter) ? pFilter->GetMimeType() : OUString(),
(pFilter) ? pFilter->GetServiceName() : OUString() );
}
diff --git a/sfx2/source/appl/shutdowniconaqua.mm b/sfx2/source/appl/shutdowniconaqua.mm
index c28cf0c646dd..2d466b48458c 100644
--- a/sfx2/source/appl/shutdowniconaqua.mm
+++ b/sfx2/source/appl/shutdowniconaqua.mm
@@ -230,7 +230,7 @@ class RecentFilesStringLength : public ::cppu::WeakImplHelper< css::util::XStrin
{
// Use INetURLObject to abbreviate all other URLs
css::uno::Reference< css::util::XStringWidth > xStringLength( new RecentFilesStringLength() );
- aMenuTitle = aURL.getAbbreviated( xStringLength, 46, INetURLObject::DECODE_UNAMBIGUOUS );
+ aMenuTitle = aURL.getAbbreviated( xStringLength, 46, INetURLObject::DecodeMechanism::Unambiguous );
}
NSMenuItem* pNewItem = [[NSMenuItem alloc] initWithTitle: getAutoreleasedString( aMenuTitle )
diff --git a/sfx2/source/bastyp/fltfnc.cxx b/sfx2/source/bastyp/fltfnc.cxx
index a85c95fcf596..3132535768b6 100644
--- a/sfx2/source/bastyp/fltfnc.cxx
+++ b/sfx2/source/bastyp/fltfnc.cxx
@@ -378,7 +378,7 @@ sal_uInt32 SfxFilterMatcher::GuessFilterIgnoringContent(
OUString sTypeName;
try
{
- sTypeName = xDetection->queryTypeByURL( rMedium.GetURLObject().GetMainURL( INetURLObject::NO_DECODE ) );
+ sTypeName = xDetection->queryTypeByURL( rMedium.GetURLObject().GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
}
catch (uno::Exception&)
{
@@ -419,7 +419,7 @@ sal_uInt32 SfxFilterMatcher::GuessFilterControlDefaultUI( SfxMedium& rMedium, s
// open the stream one times only ...
// Otherwhise it will be tried more than once and show the same interaction more than once ...
- OUString sURL( rMedium.GetURLObject().GetMainURL( INetURLObject::NO_DECODE ) );
+ OUString sURL( rMedium.GetURLObject().GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
uno::Reference< io::XInputStream > xInStream = rMedium.GetInputStream();
OUString aFilterName;
diff --git a/sfx2/source/bastyp/frmhtmlw.cxx b/sfx2/source/bastyp/frmhtmlw.cxx
index 0bbe5f71758e..977c96aab369 100644
--- a/sfx2/source/bastyp/frmhtmlw.cxx
+++ b/sfx2/source/bastyp/frmhtmlw.cxx
@@ -242,7 +242,7 @@ void SfxFrameHTMLWriter::Out_FrameDescriptor(
uno::Any aAny = xSet->getPropertyValue("FrameURL");
if ( (aAny >>= aStr) && !aStr.isEmpty() )
{
- OUString aURL = INetURLObject( aStr ).GetMainURL( INetURLObject::DECODE_TO_IURI );
+ OUString aURL = INetURLObject( aStr ).GetMainURL( INetURLObject::DecodeMechanism::ToIUri );
if( !aURL.isEmpty() )
{
aURL = URIHelper::simpleNormalizedMakeRelative(
diff --git a/sfx2/source/bastyp/helper.cxx b/sfx2/source/bastyp/helper.cxx
index eeb981e38a3f..e42be6dd3ac0 100644
--- a/sfx2/source/bastyp/helper.cxx
+++ b/sfx2/source/bastyp/helper.cxx
@@ -224,7 +224,7 @@ bool SfxContentHelper::IsHelpErrorDocument( const OUString& rURL )
bool bRet = false;
try
{
- ::ucbhelper::Content aCnt( INetURLObject( rURL ).GetMainURL( INetURLObject::NO_DECODE ),
+ ::ucbhelper::Content aCnt( INetURLObject( rURL ).GetMainURL( INetURLObject::DecodeMechanism::NONE ),
uno::Reference< ucb::XCommandEnvironment >(),
comphelper::getProcessComponentContext() );
if ( !( aCnt.getPropertyValue( "IsErrorDocument" ) >>= bRet ) )
@@ -247,7 +247,7 @@ sal_Int64 SfxContentHelper::GetSize( const OUString& rContent )
DBG_ASSERT( aObj.GetProtocol() != INetProtocol::NotValid, "Invalid URL!" );
try
{
- ::ucbhelper::Content aCnt( aObj.GetMainURL( INetURLObject::NO_DECODE ), uno::Reference< ucb::XCommandEnvironment >(), comphelper::getProcessComponentContext() );
+ ::ucbhelper::Content aCnt( aObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ), uno::Reference< ucb::XCommandEnvironment >(), comphelper::getProcessComponentContext() );
aCnt.getPropertyValue( "Size" ) >>= nSize;
}
catch( const ucb::CommandAbortedException& )
diff --git a/sfx2/source/control/recentdocsview.cxx b/sfx2/source/control/recentdocsview.cxx
index 8ff3953f83f0..587bf7ce77a8 100644
--- a/sfx2/source/control/recentdocsview.cxx
+++ b/sfx2/source/control/recentdocsview.cxx
@@ -204,7 +204,7 @@ void RecentDocsView::Reload()
{
INetURLObject aURLObj( aURL );
//Remove extension from url's last segment and use it as title
- aTitle = aURLObj.GetBase(); //DECODE_WITH_CHARSET
+ aTitle = aURLObj.GetBase(); //DecodeMechanism::WithCharset
}
if (isAcceptedFile(aURL))
diff --git a/sfx2/source/control/recentdocsviewitem.cxx b/sfx2/source/control/recentdocsviewitem.cxx
index 317f9f4700e3..0c12f38e9ce3 100644
--- a/sfx2/source/control/recentdocsviewitem.cxx
+++ b/sfx2/source/control/recentdocsviewitem.cxx
@@ -48,7 +48,7 @@ RecentDocsViewItem::RecentDocsViewItem(ThumbnailView &rView, const OUString &rUR
m_sHelpText = aURLObj.GetURLNoPass();
if (aTitle.isEmpty())
- aTitle = aURLObj.GetName(INetURLObject::DECODE_WITH_CHARSET);
+ aTitle = aURLObj.GetName(INetURLObject::DecodeMechanism::WithCharset);
BitmapEx aThumbnail(rThumbnail);
//fdo#74834: only load thumbnail if the corresponding option is not disabled in the configuration
diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx
index 920f921a5cfb..067619d49aa0 100644
--- a/sfx2/source/control/unoctitm.cxx
+++ b/sfx2/source/control/unoctitm.cxx
@@ -432,7 +432,7 @@ void SfxDispatchController_Impl::addParametersToArgs( const css::util::URL& aURL
else if ( aParamType.equalsAsciiL( URLTypeNames[URLType_STRING], 6 ))
{
// STRING support
- rArgs[nLen].Value <<= OUString( INetURLObject::decode( aValue, INetURLObject::DECODE_WITH_CHARSET ));
+ rArgs[nLen].Value <<= OUString( INetURLObject::decode( aValue, INetURLObject::DecodeMechanism::WithCharset ));
}
else if ( aParamType.equalsAsciiL( URLTypeNames[URLType_DOUBLE], 6))
{
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index dd1d784665f4..4be6661f4495 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -1031,7 +1031,7 @@ void SfxDocumentPage::Reset( const SfxItemSet* rSet )
// determine name
INetURLObject aURL(aFile);
- OUString aName = aURL.GetName( INetURLObject::DECODE_WITH_CHARSET );
+ OUString aName = aURL.GetName( INetURLObject::DecodeMechanism::WithCharset );
if ( aName.isEmpty() || aURL.GetProtocol() == INetProtocol::PrivSoffice )
aName = SfxResId( STR_NONAME ).toString();
m_pNameED->SetText( aName );
@@ -1039,7 +1039,7 @@ void SfxDocumentPage::Reset( const SfxItemSet* rSet )
// determine context symbol
aURL.SetSmartProtocol( INetProtocol::File );
aURL.SetSmartURL( aFactory);
- const OUString& rMainURL = aURL.GetMainURL( INetURLObject::NO_DECODE );
+ const OUString& rMainURL = aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE );
Image aImage = SvFileInformationManager::GetImage( aURL, true );
if ( GetDPIScaleFactor() > 1)
@@ -1055,7 +1055,7 @@ void SfxDocumentPage::Reset( const SfxItemSet* rSet )
OUString aSizeText( m_aUnknownSize );
if ( aURL.GetProtocol() == INetProtocol::File ||
aURL.isAnyKnownWebDAVScheme() )
- aSizeText = CreateSizeText( SfxContentHelper::GetSize( aURL.GetMainURL( INetURLObject::NO_DECODE ) ) );
+ aSizeText = CreateSizeText( SfxContentHelper::GetSize( aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ) ) );
m_pShowSizeFT->SetText( aSizeText );
OUString aDescription = SvFileInformationManager::GetDescription( INetURLObject(rMainURL) );
diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx
index 8abb8d4092bb..4e8150851a8d 100644
--- a/sfx2/source/dialog/filedlghelper.cxx
+++ b/sfx2/source/dialog/filedlghelper.cxx
@@ -602,12 +602,12 @@ void FileDialogHelper_Impl::updateVersions()
INetURLObject aObj( aPathSeq[0] );
if ( ( aObj.GetProtocol() == INetProtocol::File ) &&
- ( utl::UCBContentHelper::IsDocument( aObj.GetMainURL( INetURLObject::NO_DECODE ) ) ) )
+ ( utl::UCBContentHelper::IsDocument( aObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ) ) ) )
{
try
{
uno::Reference< embed::XStorage > xStorage = ::comphelper::OStorageHelper::GetStorageFromURL(
- aObj.GetMainURL( INetURLObject::NO_DECODE ),
+ aObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ),
embed::ElementModes::READ );
DBG_ASSERT( xStorage.is(), "The method must return the storage or throw an exception!" );
@@ -1236,7 +1236,7 @@ void FileDialogHelper_Impl::implInitializeFileName( )
if ( bAutoExtChecked )
{ // cut the extension
aObj.removeExtension( );
- mxFileDlg->setDefaultName( aObj.GetName( INetURLObject::DECODE_WITH_CHARSET ) );
+ mxFileDlg->setDefaultName( aObj.GetName( INetURLObject::DecodeMechanism::WithCharset ) );
}
}
}
@@ -1357,7 +1357,7 @@ void FileDialogHelper_Impl::implGetAndCacheFiles(const uno::Reference< XInterfac
else
aPath.setName( lFiles[i] );
- rpURLList.push_back(aPath.GetMainURL(INetURLObject::NO_DECODE));
+ rpURLList.push_back(aPath.GetMainURL(INetURLObject::DecodeMechanism::NONE));
}
}
}
@@ -1578,7 +1578,7 @@ void FileDialogHelper_Impl::verifyPath()
}
INetURLObject url(maPath);
if (url.GetProtocol() != INetProtocol::File
- || url.getName(0, true, INetURLObject::DECODE_WITH_CHARSET) != "tmp")
+ || url.getName(0, true, INetURLObject::DecodeMechanism::WithCharset) != "tmp")
{
return;
}
@@ -1591,12 +1591,12 @@ void FileDialogHelper_Impl::verifyPath()
INetURLObject::EncodeMechanism::All);
OUString sysPathU;
osl::FileBase::RC e = osl::FileBase::getSystemPathFromFileURL(
- url.GetMainURL(INetURLObject::NO_DECODE), sysPathU);
+ url.GetMainURL(INetURLObject::DecodeMechanism::NONE), sysPathU);
if (e != osl::FileBase::E_None) {
SAL_WARN(
"sfx.dialog",
"getSystemPathFromFileURL("
- << url.GetMainURL(INetURLObject::NO_DECODE) << ") failed with "
+ << url.GetMainURL(INetURLObject::DecodeMechanism::NONE) << ") failed with "
<< +e);
return;
}
@@ -1936,7 +1936,7 @@ void FileDialogHelper_Impl::saveConfig()
INetURLObject aObj( getPath() );
if ( aObj.GetProtocol() == INetProtocol::File )
- SetToken( aUserData, 2, ' ', aObj.GetMainURL( INetURLObject::NO_DECODE ) );
+ SetToken( aUserData, 2, ' ', aObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
OUString aFilter = getFilter();
aFilter = EncodeSpaces_Impl( aFilter );
@@ -2440,7 +2440,7 @@ Sequence< OUString > FileDialogHelper::GetSelectedFiles() const
else
aPath.setName( lFiles[i] );
- aResultSeq[i-1] = aPath.GetMainURL( INetURLObject::NO_DECODE );
+ aResultSeq[i-1] = aPath.GetMainURL( INetURLObject::DecodeMechanism::NONE );
}
}
else
@@ -2495,9 +2495,9 @@ void FileDialogHelper::SetDisplayDirectory( const OUString& _rPath )
INetURLObject aObj( _rPath );
- OUString sFileName = aObj.GetName( INetURLObject::DECODE_WITH_CHARSET );
+ OUString sFileName = aObj.GetName( INetURLObject::DecodeMechanism::WithCharset );
aObj.removeSegment();
- OUString sPath = aObj.GetMainURL( INetURLObject::NO_DECODE );
+ OUString sPath = aObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
int nIsFolder = impl_isFolder( _rPath );
if ( nIsFolder == 0 ||
@@ -2509,7 +2509,7 @@ void FileDialogHelper::SetDisplayDirectory( const OUString& _rPath )
else
{
INetURLObject aObjPathName( _rPath );
- OUString sFolder( aObjPathName.GetMainURL( INetURLObject::NO_DECODE ) );
+ OUString sFolder( aObjPathName.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
if ( sFolder.isEmpty() )
{
// _rPath is not a valid path -> fallback to home directory
diff --git a/sfx2/source/dialog/mailmodel.cxx b/sfx2/source/dialog/mailmodel.cxx
index d66f25849345..7bcc296598c5 100644
--- a/sfx2/source/dialog/mailmodel.cxx
+++ b/sfx2/source/dialog/mailmodel.cxx
@@ -457,7 +457,7 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat(
{
// Determine file name from model
INetURLObject aFileObj( xStorable->getLocation() );
- aFileName = aFileObj.getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::NO_DECODE );
+ aFileName = aFileObj.getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::DecodeMechanism::NONE );
}
}
@@ -478,7 +478,7 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat(
aFilePathObj.insertName( aFileName );
aFilePathObj.setExtension( aExtension );
- OUString aFileURL = aFilePathObj.GetMainURL( INetURLObject::NO_DECODE );
+ OUString aFileURL = aFilePathObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
sal_Int32 nNumArgs(0);
const OUString aPasswordPropName( "Password" );
@@ -785,9 +785,9 @@ SfxMailModel::SendMailResult SfxMailModel::Send( const css::uno::Reference< css:
url.getBase(
INetURLObject::LAST_SEGMENT, false,
#ifdef _WIN32
- INetURLObject::NO_DECODE)); // MAPISendMail does not accept Unicode
+ INetURLObject::DecodeMechanism::NONE)); // MAPISendMail does not accept Unicode
#else
- INetURLObject::DECODE_WITH_CHARSET));
+ INetURLObject::DecodeMechanism::WithCharset));
#endif
if (subject.isEmpty()) {
subject = maAttachedDocuments[0];
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index d9a090d7c4db..76ff7a30ec32 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -396,7 +396,7 @@ util::DateTime SfxMedium::GetInitFileDate( bool bIgnoreOldValue )
{
// add a default css::ucb::XCommandEnvironment
// in order to have the WebDAV UCP provider manage http/https authentication correctly
- ::ucbhelper::Content aContent( GetURLObject().GetMainURL( INetURLObject::NO_DECODE ),
+ ::ucbhelper::Content aContent( GetURLObject().GetMainURL( INetURLObject::DecodeMechanism::NONE ),
utl::UCBContentHelper::getDefaultCommandEnvironment(),
comphelper::getProcessComponentContext() );
@@ -449,7 +449,7 @@ Reference < XContent > SfxMedium::GetContent() const
if ( !pImpl->m_aName.isEmpty() )
osl::FileBase::getFileURLFromSystemPath( pImpl->m_aName, aURL );
else if ( !pImpl->m_aLogicName.isEmpty() )
- aURL = GetURLObject().GetMainURL( INetURLObject::NO_DECODE );
+ aURL = GetURLObject().GetMainURL( INetURLObject::DecodeMechanism::NONE );
if (!aURL.isEmpty() )
(void)::ucbhelper::Content::create( aURL, xEnv, comphelper::getProcessComponentContext(), pImpl->aContent );
}
@@ -476,7 +476,7 @@ OUString SfxMedium::GetBaseURL( bool bForSaving )
}
if ( aBaseURL.isEmpty() )
- aBaseURL = GetURLObject().GetMainURL( INetURLObject::NO_DECODE );
+ aBaseURL = GetURLObject().GetMainURL( INetURLObject::DecodeMechanism::NONE );
}
if ( bForSaving )
@@ -752,12 +752,12 @@ void SfxMedium::StorageBackup_Impl()
Reference< css::ucb::XCommandEnvironment > xDummyEnv;
bool bBasedOnOriginalFile = ( !pImpl->pTempFile && !( !pImpl->m_aLogicName.isEmpty() && pImpl->m_bSalvageMode )
- && !GetURLObject().GetMainURL( INetURLObject::NO_DECODE ).isEmpty()
+ && !GetURLObject().GetMainURL( INetURLObject::DecodeMechanism::NONE ).isEmpty()
&& GetURLObject().GetProtocol() == INetProtocol::File
- && ::utl::UCBContentHelper::IsDocument( GetURLObject().GetMainURL( INetURLObject::NO_DECODE ) ) );
+ && ::utl::UCBContentHelper::IsDocument( GetURLObject().GetMainURL( INetURLObject::DecodeMechanism::NONE ) ) );
if ( bBasedOnOriginalFile && pImpl->m_aBackupURL.isEmpty()
- && ::ucbhelper::Content::create( GetURLObject().GetMainURL( INetURLObject::NO_DECODE ), xDummyEnv, comphelper::getProcessComponentContext(), aOriginalContent ) )
+ && ::ucbhelper::Content::create( GetURLObject().GetMainURL( INetURLObject::DecodeMechanism::NONE ), xDummyEnv, comphelper::getProcessComponentContext(), aOriginalContent ) )
{
DoInternalBackup_Impl( aOriginalContent );
if( pImpl->m_aBackupURL.isEmpty() )
@@ -997,7 +997,7 @@ void SfxMedium::LockOrigFileOnDemand( bool bLoading, bool bNoUI )
xCHandler, Reference< css::ucb::XProgressHandler >() );
ucbhelper::Content aContentToLock(
- GetURLObject().GetMainURL( INetURLObject::NO_DECODE ),
+ GetURLObject().GetMainURL( INetURLObject::DecodeMechanism::NONE ),
xComEnv, comphelper::getProcessComponentContext() );
try
@@ -1126,7 +1126,7 @@ void SfxMedium::LockOrigFileOnDemand( bool bLoading, bool bNoUI )
{
// MediaDescriptor does this check also, the duplication should be avoided in future
Reference< css::ucb::XCommandEnvironment > xDummyEnv;
- ::ucbhelper::Content aContent( GetURLObject().GetMainURL( INetURLObject::NO_DECODE ), xDummyEnv, comphelper::getProcessComponentContext() );
+ ::ucbhelper::Content aContent( GetURLObject().GetMainURL( INetURLObject::DecodeMechanism::NONE ), xDummyEnv, comphelper::getProcessComponentContext() );
aContent.getPropertyValue("IsReadOnly") >>= bContentReadonly;
}
catch( const uno::Exception& ) {}
@@ -1141,7 +1141,7 @@ void SfxMedium::LockOrigFileOnDemand( bool bLoading, bool bNoUI )
// the file is not readonly, check the ACL
OUString aPhysPath;
- if ( osl::FileBase::getSystemPathFromFileURL( GetURLObject().GetMainURL( INetURLObject::NO_DECODE ), aPhysPath )
+ if ( osl::FileBase::getSystemPathFromFileURL( GetURLObject().GetMainURL( INetURLObject::DecodeMechanism::NONE ), aPhysPath )
== osl::FileBase::E_None )
bContentReadonly = IsReadonlyAccordingACL( aPhysPath.getStr() );
}
@@ -1637,7 +1637,7 @@ bool SfxMedium::StorageCommit_Impl()
{
OSL_ENSURE( !pImpl->m_aBackupURL.isEmpty(), "No backup on storage commit!\n" );
if ( !pImpl->m_aBackupURL.isEmpty()
- && ::ucbhelper::Content::create( GetURLObject().GetMainURL( INetURLObject::NO_DECODE ),
+ && ::ucbhelper::Content::create( GetURLObject().GetMainURL( INetURLObject::DecodeMechanism::NONE ),
xDummyEnv, comphelper::getProcessComponentContext(),
aOriginalContent ) )
{
@@ -1681,7 +1681,7 @@ void SfxMedium::TransactedTransferForFS_Impl( const INetURLObject& aSource,
try
{
- aOriginalContent = ::ucbhelper::Content( aDest.GetMainURL( INetURLObject::NO_DECODE ), xComEnv, comphelper::getProcessComponentContext() );
+ aOriginalContent = ::ucbhelper::Content( aDest.GetMainURL( INetURLObject::DecodeMechanism::NONE ), xComEnv, comphelper::getProcessComponentContext() );
}
catch ( const css::ucb::CommandAbortedException& )
{
@@ -1715,7 +1715,7 @@ void SfxMedium::TransactedTransferForFS_Impl( const INetURLObject& aSource,
CloseStreams_Impl();
::ucbhelper::Content aTempCont;
- if( ::ucbhelper::Content::create( aSource.GetMainURL( INetURLObject::NO_DECODE ), xDummyEnv, comphelper::getProcessComponentContext(), aTempCont ) )
+ if( ::ucbhelper::Content::create( aSource.GetMainURL( INetURLObject::DecodeMechanism::NONE ), xDummyEnv, comphelper::getProcessComponentContext(), aTempCont ) )
{
bool bTransactStarted = false;
const SfxBoolItem* pOverWrite = SfxItemSet::GetItem<SfxBoolItem>(GetItemSet(), SID_OVERWRITE, false);
@@ -1723,7 +1723,7 @@ void SfxMedium::TransactedTransferForFS_Impl( const INetURLObject& aSource,
try
{
- if( bOverWrite && ::utl::UCBContentHelper::IsDocument( aDest.GetMainURL( INetURLObject::NO_DECODE ) ) )
+ if( bOverWrite && ::utl::UCBContentHelper::IsDocument( aDest.GetMainURL( INetURLObject::DecodeMechanism::NONE ) ) )
{
if( pImpl->m_aBackupURL.isEmpty() )
DoInternalBackup_Impl( aOriginalContent );
@@ -1894,7 +1894,7 @@ void SfxMedium::Transfer_Impl()
INetURLObject aSource( aNameURL );
::ucbhelper::Content aTempCont;
- if( ::ucbhelper::Content::create( aSource.GetMainURL( INetURLObject::NO_DECODE ), xEnv, comphelper::getProcessComponentContext(), aTempCont ) )
+ if( ::ucbhelper::Content::create( aSource.GetMainURL( INetURLObject::DecodeMechanism::NONE ), xEnv, comphelper::getProcessComponentContext(), aTempCont ) )
{
try
{
@@ -1961,7 +1961,7 @@ void SfxMedium::Transfer_Impl()
xComEnv = new ::ucbhelper::CommandEnvironment( xInteractionHandler,
Reference< css::ucb::XProgressHandler >() );
- OUString aDestURL( aDest.GetMainURL( INetURLObject::NO_DECODE ) );
+ OUString aDestURL( aDest.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
if ( comphelper::isFileUrl( aDestURL ) || !aDest.removeSegment() )
{
@@ -2002,7 +2002,7 @@ void SfxMedium::Transfer_Impl()
}
if ( sParentUrl.isEmpty() )
- aDestURL = aDest.GetMainURL( INetURLObject::NO_DECODE );
+ aDestURL = aDest.GetMainURL( INetURLObject::DecodeMechanism::NONE );
// adjust to above aDest.removeSegment()
else
aDestURL = sParentUrl;
@@ -2017,7 +2017,7 @@ void SfxMedium::Transfer_Impl()
OUString sObjectId;
aAny >>= sObjectId;
if ( aFileName.isEmpty() )
- aFileName = GetURLObject().getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET );
+ aFileName = GetURLObject().getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::DecodeMechanism::WithCharset );
try
{
@@ -2047,7 +2047,7 @@ void SfxMedium::Transfer_Impl()
CloseStreams_Impl();
- (void)::ucbhelper::Content::create( aSource.GetMainURL( INetURLObject::NO_DECODE ), xEnv, comphelper::getProcessComponentContext(), aSourceContent );
+ (void)::ucbhelper::Content::create( aSource.GetMainURL( INetURLObject::DecodeMechanism::NONE ), xEnv, comphelper::getProcessComponentContext(), aSourceContent );
// check for external parameters that may customize the handling of NameClash situations
const SfxBoolItem* pOverWrite = SfxItemSet::GetItem<SfxBoolItem>(GetItemSet(), SID_OVERWRITE, false);
@@ -2098,7 +2098,7 @@ void SfxMedium::Transfer_Impl()
// <http://tools.ietf.org/html/rfc4918#section-7.3>
// If the WebDAV resource is already locked by this LO instance, nothing will
// happen, e.g. the LOCK method will not be sent to the server.
- ::ucbhelper::Content aLockContent = ::ucbhelper::Content( GetURLObject().GetMainURL( INetURLObject::NO_DECODE ), xComEnv, comphelper::getProcessComponentContext() );
+ ::ucbhelper::Content aLockContent = ::ucbhelper::Content( GetURLObject().GetMainURL( INetURLObject::DecodeMechanism::NONE ), xComEnv, comphelper::getProcessComponentContext() );
aLockContent.lock();
}
}
@@ -2139,7 +2139,7 @@ void SfxMedium::Transfer_Impl()
{
// without a TempFile the physical and logical name should be the same after successful transfer
if (osl::FileBase::getSystemPathFromFileURL(
- GetURLObject().GetMainURL( INetURLObject::NO_DECODE ), pImpl->m_aName )
+ GetURLObject().GetMainURL( INetURLObject::DecodeMechanism::NONE ), pImpl->m_aName )
!= osl::FileBase::E_None)
{
pImpl->m_aName.clear();
@@ -2161,7 +2161,7 @@ void SfxMedium::DoInternalBackup_Impl( const ::ucbhelper::Content& aOriginalCont
::utl::TempFile aTransactTemp( aPrefix, true, &aExtension, &aDestDir );
INetURLObject aBackObj( aTransactTemp.GetURL() );
- OUString aBackupName = aBackObj.getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET );
+ OUString aBackupName = aBackObj.getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::DecodeMechanism::WithCharset );
Reference < css::ucb::XCommandEnvironment > xDummyEnv;
::ucbhelper::Content aBackupCont;
@@ -2176,7 +2176,7 @@ void SfxMedium::DoInternalBackup_Impl( const ::ucbhelper::Content& aOriginalCont
NameClash::OVERWRITE,
sMimeType ) )
{
- pImpl->m_aBackupURL = aBackObj.GetMainURL( INetURLObject::NO_DECODE );
+ pImpl->m_aBackupURL = aBackObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
pImpl->m_bRemoveBackup = true;
}
}
@@ -2196,7 +2196,7 @@ void SfxMedium::DoInternalBackup_Impl( const ::ucbhelper::Content& aOriginalCont
OUString aFileName = GetURLObject().getName( INetURLObject::LAST_SEGMENT,
true,
- INetURLObject::NO_DECODE );
+ INetURLObject::DecodeMechanism::NONE );
sal_Int32 nPrefixLen = aFileName.lastIndexOf( '.' );
OUString aPrefix = ( nPrefixLen == -1 ) ? aFileName : aFileName.copy( 0, nPrefixLen );
@@ -2220,7 +2220,7 @@ void SfxMedium::DoInternalBackup_Impl( const ::ucbhelper::Content& aOriginalCont
INetURLObject aDest = GetURLObject();
if ( aDest.removeSegment() )
- DoInternalBackup_Impl( aOriginalContent, aPrefix, aExtension, aDest.GetMainURL( INetURLObject::NO_DECODE ) );
+ DoInternalBackup_Impl( aOriginalContent, aPrefix, aExtension, aDest.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
}
}
@@ -2231,7 +2231,7 @@ void SfxMedium::DoBackup_Impl()
INetURLObject aSource( GetURLObject() );
// there is nothing to backup in case source file does not exist
- if ( !::utl::UCBContentHelper::IsDocument( aSource.GetMainURL( INetURLObject::NO_DECODE ) ) )
+ if ( !::utl::UCBContentHelper::IsDocument( aSource.GetMainURL( INetURLObject::DecodeMechanism::NONE ) ) )
return;
bool bSuccess = false;
@@ -2249,11 +2249,11 @@ void SfxMedium::DoBackup_Impl()
INetURLObject aDest( aBakDir );
aDest.insertName( aSource.getName() );
aDest.setExtension( "bak" );
- OUString aFileName = aDest.getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET );
+ OUString aFileName = aDest.getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::DecodeMechanism::WithCharset );
// create a content for the source file
::ucbhelper::Content aSourceContent;
- if ( ::ucbhelper::Content::create( aSource.GetMainURL( INetURLObject::NO_DECODE ), xEnv, comphelper::getProcessComponentContext(), aSourceContent ) )
+ if ( ::ucbhelper::Content::create( aSource.GetMainURL( INetURLObject::DecodeMechanism::NONE ), xEnv, comphelper::getProcessComponentContext(), aSourceContent ) )
{
try
{
@@ -2266,7 +2266,7 @@ void SfxMedium::DoBackup_Impl()
sMimeType );
if( bSuccess )
{
- pImpl->m_aBackupURL = aDest.GetMainURL( INetURLObject::NO_DECODE );
+ pImpl->m_aBackupURL = aDest.GetMainURL( INetURLObject::DecodeMechanism::NONE );
pImpl->m_bRemoveBackup = false;
}
}
@@ -2556,14 +2556,14 @@ void SfxMedium::Init_Impl()
{
if ( aUrl.HasMark() )
{
- pImpl->m_aLogicName = aUrl.GetURLNoMark( INetURLObject::NO_DECODE );
+ pImpl->m_aLogicName = aUrl.GetURLNoMark( INetURLObject::DecodeMechanism::NONE );
GetItemSet()->Put( SfxStringItem( SID_JUMPMARK, aUrl.GetMark() ) );
}
// try to convert the URL into a physical name - but never change a physical name
// physical name may be set if the logical name is changed after construction
if ( pImpl->m_aName.isEmpty() )
- osl::FileBase::getSystemPathFromFileURL( GetURLObject().GetMainURL( INetURLObject::NO_DECODE ), pImpl->m_aName );
+ osl::FileBase::getSystemPathFromFileURL( GetURLObject().GetMainURL( INetURLObject::DecodeMechanism::NONE ), pImpl->m_aName );
else
{
DBG_ASSERT( pSalvageItem, "Suspicious change of logical name!" );
@@ -2598,7 +2598,7 @@ void SfxMedium::Init_Impl()
// let the ItemSet be created if necessary
GetItemSet()->Put(
SfxStringItem(
- SID_FILE_NAME, INetURLObject( pImpl->m_aLogicName ).GetMainURL( INetURLObject::NO_DECODE ) ) );
+ SID_FILE_NAME, INetURLObject( pImpl->m_aLogicName ).GetMainURL( INetURLObject::DecodeMechanism::NONE ) ) );
}
}
@@ -2744,7 +2744,7 @@ void SfxMedium::UnlockFile( bool bReleaseLockStream )
uno::Reference< css::task::XInteractionHandler > xHandler = GetInteractionHandler( true );
uno::Reference< css::ucb::XCommandEnvironment > xComEnv = new ::ucbhelper::CommandEnvironment( xHandler,
Reference< css::ucb::XProgressHandler >() );
- ucbhelper::Content aContentToUnlock( GetURLObject().GetMainURL( INetURLObject::NO_DECODE ), xComEnv, comphelper::getProcessComponentContext());
+ ucbhelper::Content aContentToUnlock( GetURLObject().GetMainURL( INetURLObject::DecodeMechanism::NONE ), xComEnv, comphelper::getProcessComponentContext());
pImpl->m_bLocked = false;
//check if WebDAV unlock was explicitly disabled
if ( !pImpl->m_bDisableUnlockWebDAV )
@@ -3392,7 +3392,7 @@ void SfxMedium::CreateTempFile( bool bReplace )
if ( GetContent().is()
&& GetURLObject().GetProtocol() == INetProtocol::File
- && ::utl::UCBContentHelper::IsDocument( GetURLObject().GetMainURL( INetURLObject::NO_DECODE ) ) )
+ && ::utl::UCBContentHelper::IsDocument( GetURLObject().GetMainURL( INetURLObject::DecodeMechanism::NONE ) ) )
{
// if there is already such a document, we should copy it
// if it is a file system use OS copy process
@@ -3402,10 +3402,10 @@ void SfxMedium::CreateTempFile( bool bReplace )
INetURLObject aTmpURLObj( aTmpURL );
OUString aFileName = aTmpURLObj.getName( INetURLObject::LAST_SEGMENT,
true,
- INetURLObject::DECODE_WITH_CHARSET );
+ INetURLObject::DecodeMechanism::WithCharset );
if ( !aFileName.isEmpty() && aTmpURLObj.removeSegment() )
{
- ::ucbhelper::Content aTargetContent( aTmpURLObj.GetMainURL( INetURLObject::NO_DECODE ), xComEnv, comphelper::getProcessComponentContext() );
+ ::ucbhelper::Content aTargetContent( aTmpURLObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ), xComEnv, comphelper::getProcessComponentContext() );
OUString sMimeType = pImpl->getFilterMimeType();
if ( aTargetContent.transferContent( pImpl->aContent, ::ucbhelper::InsertOperation_COPY, aFileName, NameClash::OVERWRITE, sMimeType ) )
{
@@ -3689,14 +3689,14 @@ OUString SfxMedium::CreateTempCopyWithExt( const OUString& aURL )
INetURLObject aDest( aNewTempFileURL );
OUString aFileName = aDest.getName( INetURLObject::LAST_SEGMENT,
true,
- INetURLObject::DECODE_WITH_CHARSET );
+ INetURLObject::DecodeMechanism::WithCharset );
if ( !aFileName.isEmpty() && aDest.removeSegment() )
{
try
{
uno::Reference< css::ucb::XCommandEnvironment > xComEnv;
- ::ucbhelper::Content aTargetContent( aDest.GetMainURL( INetURLObject::NO_DECODE ), xComEnv, comphelper::getProcessComponentContext() );
- ::ucbhelper::Content aSourceContent( aSource.GetMainURL( INetURLObject::NO_DECODE ), xComEnv, comphelper::getProcessComponentContext() );
+ ::ucbhelper::Content aTargetContent( aDest.GetMainURL( INetURLObject::DecodeMechanism::NONE ), xComEnv, comphelper::getProcessComponentContext() );
+ ::ucbhelper::Content aSourceContent( aSource.GetMainURL( INetURLObject::DecodeMechanism::NONE ), xComEnv, comphelper::getProcessComponentContext() );
if ( aTargetContent.transferContent( aSourceContent,
::ucbhelper::InsertOperation_COPY,
aFileName,
diff --git a/sfx2/source/doc/docinsert.cxx b/sfx2/source/doc/docinsert.cxx
index d1f03827f5c6..36079f27ee7d 100644
--- a/sfx2/source/doc/docinsert.cxx
+++ b/sfx2/source/doc/docinsert.cxx
@@ -160,7 +160,7 @@ void impl_FillURLList( sfx2::FileDialogHelper* _pFileDlg, std::vector<OUString>&
for ( sal_Int32 i = 0; i < aPathSeq.getLength(); ++i )
{
INetURLObject aPathObj( aPathSeq[i] );
- _rpURLList.push_back(aPathObj.GetMainURL(INetURLObject::NO_DECODE));
+ _rpURLList.push_back(aPathObj.GetMainURL(INetURLObject::DecodeMechanism::NONE));
}
}
}
diff --git a/sfx2/source/doc/docmacromode.cxx b/sfx2/source/doc/docmacromode.cxx
index 934d42562546..a67a455284e0 100644
--- a/sfx2/source/doc/docmacromode.cxx
+++ b/sfx2/source/doc/docmacromode.cxx
@@ -207,7 +207,7 @@ namespace sfx2
OUString aLocation;
if ( aURLReferer.removeSegment() )
- aLocation = aURLReferer.GetMainURL( INetURLObject::NO_DECODE );
+ aLocation = aURLReferer.GetMainURL( INetURLObject::DecodeMechanism::NONE );
if ( !aLocation.isEmpty() && xSignatures->isLocationTrusted( aLocation ) )
{
diff --git a/sfx2/source/doc/doctempl.cxx b/sfx2/source/doc/doctempl.cxx
index 6384008a3b78..cadeb45fa7e2 100644
--- a/sfx2/source/doc/doctempl.cxx
+++ b/sfx2/source/doc/doctempl.cxx
@@ -465,7 +465,7 @@ OUString SfxDocumentTemplates::GetTemplateTargetURLFromComponent( const OUString
OUString aResult;
Content aTemplate;
uno::Reference< XCommandEnvironment > aCmdEnv;
- if ( Content::create( aTemplateObj.GetMainURL( INetURLObject::NO_DECODE ), aCmdEnv, comphelper::getProcessComponentContext(), aTemplate ) )
+ if ( Content::create( aTemplateObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ), aCmdEnv, comphelper::getProcessComponentContext(), aTemplate ) )
{
OUString aPropName( TARGET_URL );
getTextProperty_Impl( aTemplate, aPropName, aResult );
@@ -703,10 +703,10 @@ bool SfxDocumentTemplates::CopyTo
INetURLObject aTargetURL( rName );
OUString aTitle( aTargetURL.getName( INetURLObject::LAST_SEGMENT, true,
- INetURLObject::DECODE_WITH_CHARSET ) );
+ INetURLObject::DecodeMechanism::WithCharset ) );
aTargetURL.removeSegment();
- OUString aParentURL = aTargetURL.GetMainURL( INetURLObject::NO_DECODE );
+ OUString aParentURL = aTargetURL.GetMainURL( INetURLObject::DecodeMechanism::NONE );
uno::Reference< XCommandEnvironment > aCmdEnv;
Content aTarget;
@@ -796,7 +796,7 @@ bool SfxDocumentTemplates::CopyFrom
try
{
xStorable.set(
- xDesktop->loadComponentFromURL( aTemplURL.GetMainURL(INetURLObject::NO_DECODE),
+ xDesktop->loadComponentFromURL( aTemplURL.GetMainURL(INetURLObject::DecodeMechanism::NONE),
"_blank",
0,
aArgs ),
@@ -825,7 +825,7 @@ bool SfxDocumentTemplates::CopyFrom
INetURLObject aURL( aTemplURL );
aURL.CutExtension();
aTitle = aURL.getName( INetURLObject::LAST_SEGMENT, true,
- INetURLObject::DECODE_WITH_CHARSET );
+ INetURLObject::DecodeMechanism::WithCharset );
}
// write a template using XStorable interface
@@ -840,7 +840,7 @@ bool SfxDocumentTemplates::CopyFrom
aTemplObj.insertName( aTitle, false,
INetURLObject::LAST_SEGMENT,
INetURLObject::EncodeMechanism::All );
- OUString aTemplURL = aTemplObj.GetMainURL( INetURLObject::NO_DECODE );
+ OUString aTemplURL = aTemplObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
uno::Reference< XCommandEnvironment > aCmdEnv;
Content aTemplCont;
@@ -1146,7 +1146,7 @@ bool SfxDocumentTemplates::GetLogicNames
aFullPath.SetSmartProtocol( INetProtocol::File );
aFullPath.SetURL( rPath );
- OUString aPath( aFullPath.GetMainURL( INetURLObject::NO_DECODE ) );
+ OUString aPath( aFullPath.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
RegionData_Impl *pData = nullptr;
DocTempl_EntryData_Impl *pEntry = nullptr;
@@ -1248,7 +1248,7 @@ const OUString& DocTempl_EntryData_Impl::GetHierarchyURL()
INetURLObject::LAST_SEGMENT,
INetURLObject::EncodeMechanism::All );
- maOwnURL = aTemplateObj.GetMainURL( INetURLObject::NO_DECODE );
+ maOwnURL = aTemplateObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
DBG_ASSERT( !maOwnURL.isEmpty(), "GetHierarchyURL(): Could not create URL!" );
}
@@ -1364,7 +1364,7 @@ void RegionData_Impl::AddEntry( const OUString& rTitle,
aLinkObj.insertName( rTitle, false,
INetURLObject::LAST_SEGMENT,
INetURLObject::EncodeMechanism::All );
- OUString aLinkURL = aLinkObj.GetMainURL( INetURLObject::NO_DECODE );
+ OUString aLinkURL = aLinkObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
bool bFound = false;
size_t nPos = GetEntryPos( rTitle, bFound );
@@ -1405,7 +1405,7 @@ const OUString& RegionData_Impl::GetHierarchyURL()
INetURLObject::LAST_SEGMENT,
INetURLObject::EncodeMechanism::All );
- maOwnURL = aRegionObj.GetMainURL( INetURLObject::NO_DECODE );
+ maOwnURL = aRegionObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
DBG_ASSERT( !maOwnURL.isEmpty(), "GetHierarchyURL(): Could not create URL!" );
}
@@ -1744,7 +1744,7 @@ bool SfxDocTemplate_Impl::GetTitleFromURL( const OUString& rURL,
INetURLObject aURL( rURL );
aURL.CutExtension();
aTitle = aURL.getName( INetURLObject::LAST_SEGMENT, true,
- INetURLObject::DECODE_WITH_CHARSET );
+ INetURLObject::DecodeMechanism::WithCharset );
}
return true;
diff --git a/sfx2/source/doc/doctemplates.cxx b/sfx2/source/doc/doctemplates.cxx
index e3e619fb5b8a..d0ecf8862f2a 100644
--- a/sfx2/source/doc/doctemplates.cxx
+++ b/sfx2/source/doc/doctemplates.cxx
@@ -544,7 +544,7 @@ void SfxDocTplService_Impl::getDirList()
{
aURL.SetSmartProtocol( INetProtocol::File );
aURL.SetURL( aDirs.getToken( i, C_DELIM ) );
- maTemplateDirs[i] = aURL.GetMainURL( INetURLObject::NO_DECODE );
+ maTemplateDirs[i] = aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE );
sal_Int32 nIndex = maTemplateDirs[i].indexOf( aPrefix );
if ( nIndex != -1 && xExpander.is() )
@@ -671,7 +671,7 @@ bool SfxDocTplService_Impl::getTitleFromURL( const OUString& rURL, OUString& aTi
INetURLObject aURL( rURL );
aURL.CutExtension();
aTitle = aURL.getName( INetURLObject::LAST_SEGMENT, true,
- INetURLObject::DECODE_WITH_CHARSET );
+ INetURLObject::DecodeMechanism::WithCharset );
}
else
bDocHasTitle = true;
@@ -691,7 +691,7 @@ bool SfxDocTplService_Impl::addEntry( Content& rParentFolder,
aLinkObj.insertName( rTitle, false,
INetURLObject::LAST_SEGMENT,
INetURLObject::EncodeMechanism::All );
- OUString aLinkURL = aLinkObj.GetMainURL( INetURLObject::NO_DECODE );
+ OUString aLinkURL = aLinkObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
Content aLink;
@@ -732,7 +732,7 @@ bool SfxDocTplService_Impl::createFolder( const OUString& rNewFolderURL,
bool bCreatedFolder = false;
INetURLObject aParentURL( rNewFolderURL );
OUString aFolderName = aParentURL.getName( INetURLObject::LAST_SEGMENT, true,
- INetURLObject::DECODE_WITH_CHARSET );
+ INetURLObject::DecodeMechanism::WithCharset );
// compute the parent folder url from the new folder url
// and remove the final slash, because Content::create doesn't
@@ -744,7 +744,7 @@ bool SfxDocTplService_Impl::createFolder( const OUString& rNewFolderURL,
// if the parent exists, we can continue with the creation of the
// new folder, we have to create the parent otherwise ( as long as
// bCreateParent is set to true )
- if ( Content::create( aParentURL.GetMainURL( INetURLObject::NO_DECODE ), maCmdEnv, comphelper::getProcessComponentContext(), aParent ) )
+ if ( Content::create( aParentURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), maCmdEnv, comphelper::getProcessComponentContext(), aParent ) )
{
try
{
@@ -782,7 +782,7 @@ bool SfxDocTplService_Impl::createFolder( const OUString& rNewFolderURL,
// try to create the new folder again ( but this time, we set
// bCreateParent to false to avoid endless recursions )
if ( ( aParentURL.getSegmentCount() >= 1 ) &&
- createFolder( aParentURL.GetMainURL( INetURLObject::NO_DECODE ), bCreateParent, bFsysFolder, aParent ) )
+ createFolder( aParentURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), bCreateParent, bFsysFolder, aParent ) )
{
bCreatedFolder = createFolder( rNewFolderURL, false, bFsysFolder, rNewFolder );
}
@@ -803,7 +803,7 @@ bool SfxDocTplService_Impl::CreateNewUniqueFolderWithPrefix( const OUString& aPa
Content aParent;
uno::Reference< XCommandEnvironment > aQuietEnv;
- if ( Content::create( aDirPath.GetMainURL( INetURLObject::NO_DECODE ), aQuietEnv, comphelper::getProcessComponentContext(), aParent ) )
+ if ( Content::create( aDirPath.GetMainURL( INetURLObject::DecodeMechanism::NONE ), aQuietEnv, comphelper::getProcessComponentContext(), aParent ) )
{
for ( sal_Int32 nInd = 0; nInd < 32000; nInd++ )
{
@@ -837,7 +837,7 @@ bool SfxDocTplService_Impl::CreateNewUniqueFolderWithPrefix( const OUString& aPa
INetURLObject::EncodeMechanism::All );
// if there is already an element, retry
// if there was another error, do not try any more
- if ( !::utl::UCBContentHelper::Exists( aObjPath.GetMainURL( INetURLObject::NO_DECODE ) ) )
+ if ( !::utl::UCBContentHelper::Exists( aObjPath.GetMainURL( INetURLObject::DecodeMechanism::NONE ) ) )
break;
}
@@ -864,7 +864,7 @@ OUString SfxDocTplService_Impl::CreateNewUniqueFileWithPrefix( const OUString& a
Content aParent;
uno::Reference< XCommandEnvironment > aQuietEnv;
- if ( Content::create( aDirPath.GetMainURL( INetURLObject::NO_DECODE ), aQuietEnv, comphelper::getProcessComponentContext(), aParent ) )
+ if ( Content::create( aDirPath.GetMainURL( INetURLObject::DecodeMechanism::NONE ), aQuietEnv, comphelper::getProcessComponentContext(), aParent ) )
{
for ( sal_Int32 nInd = 0; nInd < 32000; nInd++ )
{
@@ -903,7 +903,7 @@ OUString SfxDocTplService_Impl::CreateNewUniqueFileWithPrefix( const OUString& a
INetURLObject::EncodeMechanism::All );
// if there is already an element, retry
// if there was another error, do not try any more
- if ( !::utl::UCBContentHelper::Exists( aObjPath.GetMainURL( INetURLObject::NO_DECODE ) ) )
+ if ( !::utl::UCBContentHelper::Exists( aObjPath.GetMainURL( INetURLObject::DecodeMechanism::NONE ) ) )
break;
}
@@ -1223,7 +1223,7 @@ std::vector< beans::StringPair > SfxDocTplService_Impl::ReadUINamesForTemplateDi
// TODO/LATER: Use hashmap in future
std::vector< beans::StringPair > aUINames;
- if ( Content::create( aLocObj.GetMainURL( INetURLObject::NO_DECODE ), uno::Reference < ucb::XCommandEnvironment >(), comphelper::getProcessComponentContext(), aLocContent ) )
+ if ( Content::create( aLocObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ), uno::Reference < ucb::XCommandEnvironment >(), comphelper::getProcessComponentContext(), aLocContent ) )
{
try
{
@@ -1414,7 +1414,7 @@ bool SfxDocTplService_Impl::addGroup( const OUString& rGroupName )
INetURLObject::LAST_SEGMENT,
INetURLObject::EncodeMechanism::All );
- aNewGroupURL = aNewGroupObj.GetMainURL( INetURLObject::NO_DECODE );
+ aNewGroupURL = aNewGroupObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
if ( Content::create( aNewGroupURL, maCmdEnv, comphelper::getProcessComponentContext(), aNewGroup ) ||
! createFolder( aNewGroupURL, false, false, aNewGroup ) )
@@ -1501,7 +1501,7 @@ bool SfxDocTplService_Impl::removeGroup( const OUString& rGroupName )
// Get the target url
Content aGroup;
- OUString aGroupURL = aGroupObj.GetMainURL( INetURLObject::NO_DECODE );
+ OUString aGroupURL = aGroupObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
if ( Content::create( aGroupURL, maCmdEnv, comphelper::getProcessComponentContext(), aGroup ) )
{
@@ -1524,7 +1524,7 @@ bool SfxDocTplService_Impl::removeGroup( const OUString& rGroupName )
return false;
OUString aGeneralTempPath = findParentTemplateDir(
- aGroupParentFolder.GetMainURL(INetURLObject::NO_DECODE));
+ aGroupParentFolder.GetMainURL(INetURLObject::DecodeMechanism::NONE));
if (aGeneralTempPath.isEmpty())
return false;
@@ -1602,7 +1602,7 @@ bool SfxDocTplService_Impl::renameGroup( const OUString& rOldName,
aGroupObj.insertName( rNewName, false,
INetURLObject::LAST_SEGMENT,
INetURLObject::EncodeMechanism::All );
- OUString aGroupURL = aGroupObj.GetMainURL( INetURLObject::NO_DECODE );
+ OUString aGroupURL = aGroupObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
// Check, if there is a group with the new name, return false
// if there is one.
@@ -1613,7 +1613,7 @@ bool SfxDocTplService_Impl::renameGroup( const OUString& rOldName,
aGroupObj.insertName( rOldName, false,
INetURLObject::LAST_SEGMENT,
INetURLObject::EncodeMechanism::All );
- aGroupURL = aGroupObj.GetMainURL( INetURLObject::NO_DECODE );
+ aGroupURL = aGroupObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
// When there is no group with the old name, we can't rename it
if ( ! Content::create( aGroupURL, maCmdEnv, comphelper::getProcessComponentContext(), aGroup ) )
@@ -1636,7 +1636,7 @@ bool SfxDocTplService_Impl::renameGroup( const OUString& rOldName,
// check that the fs location is in writable folder and this is not a "My templates" folder
INetURLObject aGroupParentFolder( aGroupTargetURL );
if (!aGroupParentFolder.removeSegment() ||
- isInternalTemplateDir(aGroupParentFolder.GetMainURL(INetURLObject::NO_DECODE)))
+ isInternalTemplateDir(aGroupParentFolder.GetMainURL(INetURLObject::DecodeMechanism::NONE)))
{
return false;
}
@@ -1671,10 +1671,10 @@ bool SfxDocTplService_Impl::renameGroup( const OUString& rOldName,
if ( bCanBeRenamed )
{
INetURLObject aGroupTargetObj( aGroupTargetURL );
- OUString aFsysName = aGroupTargetObj.getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET );
+ OUString aFsysName = aGroupTargetObj.getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::DecodeMechanism::WithCharset );
if ( aGroupTargetObj.removeSegment()
- && ReplaceUINamesForTemplateDir_Impl( aGroupTargetObj.GetMainURL( INetURLObject::NO_DECODE ),
+ && ReplaceUINamesForTemplateDir_Impl( aGroupTargetObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ),
aFsysName,
rOldName,
rNewName ) )
@@ -1709,7 +1709,7 @@ bool SfxDocTplService_Impl::storeTemplate( const OUString& rGroupName,
aGroupObj.insertName( rGroupName, false,
INetURLObject::LAST_SEGMENT,
INetURLObject::EncodeMechanism::All );
- aGroupURL = aGroupObj.GetMainURL( INetURLObject::NO_DECODE );
+ aGroupURL = aGroupObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
if ( ! Content::create( aGroupURL, maCmdEnv, comphelper::getProcessComponentContext(), aGroup ) )
return false;
@@ -1728,7 +1728,7 @@ bool SfxDocTplService_Impl::storeTemplate( const OUString& rGroupName,
aGroupObj.insertName( rTemplateName, false,
INetURLObject::LAST_SEGMENT,
INetURLObject::EncodeMechanism::All );
- aTemplateURL = aGroupObj.GetMainURL( INetURLObject::NO_DECODE );
+ aTemplateURL = aGroupObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
if ( Content::create( aTemplateURL, maCmdEnv, comphelper::getProcessComponentContext(), aTemplateToRemove ) )
{
@@ -1893,7 +1893,7 @@ bool SfxDocTplService_Impl::addTemplate( const OUString& rGroupName,
aGroupObj.insertName( rGroupName, false,
INetURLObject::LAST_SEGMENT,
INetURLObject::EncodeMechanism::All );
- aGroupURL = aGroupObj.GetMainURL( INetURLObject::NO_DECODE );
+ aGroupURL = aGroupObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
if ( ! Content::create( aGroupURL, maCmdEnv, comphelper::getProcessComponentContext(), aGroup ) )
return false;
@@ -1903,7 +1903,7 @@ bool SfxDocTplService_Impl::addTemplate( const OUString& rGroupName,
aGroupObj.insertName( rTemplateName, false,
INetURLObject::LAST_SEGMENT,
INetURLObject::EncodeMechanism::All );
- aTemplateURL = aGroupObj.GetMainURL( INetURLObject::NO_DECODE );
+ aTemplateURL = aGroupObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
if ( Content::create( aTemplateURL, maCmdEnv, comphelper::getProcessComponentContext(), aTemplate ) )
return false;
@@ -1946,7 +1946,7 @@ bool SfxDocTplService_Impl::addTemplate( const OUString& rGroupName,
INetURLObject::EncodeMechanism::All );
aTargetObj.setExtension( aSourceObj.getExtension() );
- aTargetURL2 = aTargetObj.GetMainURL( INetURLObject::NO_DECODE );
+ aTargetURL2 = aTargetObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
if ( aTargetURL2 == rSourceURL )
return addEntry( aGroup, rTemplateName, aTargetURL2, aType );
@@ -1956,11 +1956,11 @@ bool SfxDocTplService_Impl::addTemplate( const OUString& rGroupName,
INetURLObject aTmpURL( aSourceObj );
aTmpURL.CutExtension();
- OUString aPattern = aTmpURL.getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET );
+ OUString aPattern = aTmpURL.getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::DecodeMechanism::WithCharset );
OUString aNewTemplateTargetURL = CreateNewUniqueFileWithPrefix( aTargetURL, aPattern, aSourceObj.getExtension() );
INetURLObject aNewTemplateTargetObj( aNewTemplateTargetURL );
- OUString aNewTemplateTargetName = aNewTemplateTargetObj.getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET );
+ OUString aNewTemplateTargetName = aNewTemplateTargetObj.getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::DecodeMechanism::WithCharset );
if ( aNewTemplateTargetURL.isEmpty() || aNewTemplateTargetName.isEmpty() )
return false;
@@ -1968,7 +1968,7 @@ bool SfxDocTplService_Impl::addTemplate( const OUString& rGroupName,
Content aSourceContent;
uno::Reference < ucb::XCommandEnvironment > xEnv;
INetURLObject aSourceURL( rSourceURL );
- if( ! Content::create( aSourceURL.GetMainURL( INetURLObject::NO_DECODE ), xEnv, comphelper::getProcessComponentContext(), aSourceContent ) )
+ if( ! Content::create( aSourceURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), xEnv, comphelper::getProcessComponentContext(), aSourceContent ) )
return false;
if( ! Content::create( aTargetURL, xEnv, comphelper::getProcessComponentContext(), aTargetGroup ) )
@@ -2009,7 +2009,7 @@ bool SfxDocTplService_Impl::addTemplate( const OUString& rGroupName,
{
INetURLObject aNewTmpObj( aNewTemplateTargetObj );
aNewTmpObj.CutExtension();
- bCorrectTitle = ( aNewTmpObj.getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET ).equals( rTemplateName ) );
+ bCorrectTitle = ( aNewTmpObj.getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::DecodeMechanism::WithCharset ).equals( rTemplateName ) );
}
if ( !bCorrectTitle )
@@ -2066,7 +2066,7 @@ bool SfxDocTplService_Impl::removeTemplate( const OUString& rGroupName,
aGroupObj.insertName( rGroupName, false,
INetURLObject::LAST_SEGMENT,
INetURLObject::EncodeMechanism::All );
- aGroupURL = aGroupObj.GetMainURL( INetURLObject::NO_DECODE );
+ aGroupURL = aGroupObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
if ( ! Content::create( aGroupURL, maCmdEnv, comphelper::getProcessComponentContext(), aGroup ) )
return false;
@@ -2076,7 +2076,7 @@ bool SfxDocTplService_Impl::removeTemplate( const OUString& rGroupName,
aGroupObj.insertName( rTemplateName, false,
INetURLObject::LAST_SEGMENT,
INetURLObject::EncodeMechanism::All );
- aTemplateURL = aGroupObj.GetMainURL( INetURLObject::NO_DECODE );
+ aTemplateURL = aGroupObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
if ( !Content::create( aTemplateURL, maCmdEnv, comphelper::getProcessComponentContext(), aTemplate ) )
return false;
@@ -2118,7 +2118,7 @@ bool SfxDocTplService_Impl::renameTemplate( const OUString& rGroupName,
aGroupObj.insertName( rGroupName, false,
INetURLObject::LAST_SEGMENT,
INetURLObject::EncodeMechanism::All );
- aGroupURL = aGroupObj.GetMainURL( INetURLObject::NO_DECODE );
+ aGroupURL = aGroupObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
if ( ! Content::create( aGroupURL, maCmdEnv, comphelper::getProcessComponentContext(), aGroup ) )
return false;
@@ -2128,7 +2128,7 @@ bool SfxDocTplService_Impl::renameTemplate( const OUString& rGroupName,
aGroupObj.insertName( rNewName, false,
INetURLObject::LAST_SEGMENT,
INetURLObject::EncodeMechanism::All );
- aTemplateURL = aGroupObj.GetMainURL( INetURLObject::NO_DECODE );
+ aTemplateURL = aGroupObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
if ( Content::create( aTemplateURL, maCmdEnv, comphelper::getProcessComponentContext(), aTemplate ) )
return false;
@@ -2139,7 +2139,7 @@ bool SfxDocTplService_Impl::renameTemplate( const OUString& rGroupName,
aGroupObj.insertName( rOldName, false,
INetURLObject::LAST_SEGMENT,
INetURLObject::EncodeMechanism::All );
- aTemplateURL = aGroupObj.GetMainURL( INetURLObject::NO_DECODE );
+ aTemplateURL = aGroupObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
if ( !Content::create( aTemplateURL, maCmdEnv, comphelper::getProcessComponentContext(), aTemplate ) )
return false;
@@ -2563,7 +2563,7 @@ void SfxDocTplService_Impl::createFromContent( GroupList_Impl& rList,
// TODO/LATER: Use hashmap in future
std::vector< beans::StringPair > aUINames;
if ( !bHierarchy )
- aUINames = ReadUINamesForTemplateDir_Impl( aLayerObj.GetMainURL( INetURLObject::NO_DECODE ) );
+ aUINames = ReadUINamesForTemplateDir_Impl( aLayerObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
uno::Reference< XResultSet > xResultSet;
Sequence< OUString > aProps { TITLE };
@@ -2636,7 +2636,7 @@ void SfxDocTplService_Impl::addToHierarchy( GroupData_Impl *pGroup,
INetURLObject::LAST_SEGMENT,
INetURLObject::EncodeMechanism::All );
- OUString aTemplateURL = aGroupObj.GetMainURL( INetURLObject::NO_DECODE );
+ OUString aTemplateURL = aGroupObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
if ( Content::create( aTemplateURL, maCmdEnv, comphelper::getProcessComponentContext(), aTemplate ) )
return;
@@ -2680,7 +2680,7 @@ void SfxDocTplService_Impl::addGroupToHierarchy( GroupData_Impl *pGroup )
INetURLObject::LAST_SEGMENT,
INetURLObject::EncodeMechanism::All );
- OUString aNewGroupURL = aNewGroupObj.GetMainURL( INetURLObject::NO_DECODE );
+ OUString aNewGroupURL = aNewGroupObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
if ( createFolder( aNewGroupURL, false, false, aGroup ) )
{
@@ -2831,7 +2831,7 @@ void SfxURLRelocator_Impl::implExpandURL( OUString& io_url )
if ( aParser.GetProtocol() != INetProtocol::VndSunStarExpand )
return;
- io_url = aParser.GetURLPath( INetURLObject::DECODE_WITH_CHARSET );
+ io_url = aParser.GetURLPath( INetURLObject::DecodeMechanism::WithCharset );
try
{
if ( !mxMacroExpander.is() )
diff --git a/sfx2/source/doc/frmdescr.cxx b/sfx2/source/doc/frmdescr.cxx
index c2f217b99adb..a23126be9c80 100644
--- a/sfx2/source/doc/frmdescr.cxx
+++ b/sfx2/source/doc/frmdescr.cxx
@@ -64,7 +64,7 @@ SfxItemSet* SfxFrameDescriptor::GetArgs()
void SfxFrameDescriptor::SetURL( const OUString& rURL )
{
aURL = INetURLObject(rURL);
- SetActualURL(aURL.GetMainURL( INetURLObject::DECODE_TO_IURI ));
+ SetActualURL(aURL.GetMainURL( INetURLObject::DecodeMechanism::ToIUri ));
}
void SfxFrameDescriptor::SetActualURL( const OUString& rURL )
diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx
index ce69cf683482..cf93b3cb6f43 100644
--- a/sfx2/source/doc/guisaveas.cxx
+++ b/sfx2/source/doc/guisaveas.cxx
@@ -1023,7 +1023,7 @@ bool ModelData_Impl::OutputFileDialog( sal_Int8 nStoreMode,
// get the path from the dialog
INetURLObject aURL( pFileDlg->GetPath() );
// the path should be provided outside since it might be used for further calls to the dialog
- aSuggestedName = aURL.GetName( INetURLObject::DECODE_WITH_CHARSET );
+ aSuggestedName = aURL.GetName( INetURLObject::DecodeMechanism::WithCharset );
aSuggestedDir = pFileDlg->GetDisplayDirectory();
// old filter options should be cleared in case different filter is used
@@ -1106,7 +1106,7 @@ bool ModelData_Impl::OutputFileDialog( sal_Int8 nStoreMode,
// merge in results of the dialog execution
GetMediaDescr()[OUString("URL")] <<=
- OUString( aURL.GetMainURL( INetURLObject::NO_DECODE ));
+ OUString( aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ));
GetMediaDescr()[sFilterNameString] <<= aFilterName;
return bUseFilterOptions;
@@ -1203,11 +1203,11 @@ OUString ModelData_Impl::GetRecommendedDir( const OUString& aSuggestedDir )
aLocation.setFinalSlash();
if ( !aLocation.HasError() )
- aRecommendedDir = aLocation.GetMainURL( INetURLObject::NO_DECODE );
+ aRecommendedDir = aLocation.GetMainURL( INetURLObject::DecodeMechanism::NONE );
}
else
{
- aRecommendedDir = INetURLObject( SvtPathOptions().GetWorkPath() ).GetMainURL( INetURLObject::NO_DECODE );
+ aRecommendedDir = INetURLObject( SvtPathOptions().GetWorkPath() ).GetMainURL( INetURLObject::DecodeMechanism::NONE );
}
return aRecommendedDir;
@@ -1223,7 +1223,7 @@ OUString ModelData_Impl::GetRecommendedName( const OUString& aSuggestedName, con
aRecommendedName = aSuggestedName;
else
{
- aRecommendedName = INetURLObject( GetStorable()->getLocation() ).GetName( INetURLObject::DECODE_WITH_CHARSET );
+ aRecommendedName = INetURLObject( GetStorable()->getLocation() ).GetName( INetURLObject::DecodeMechanism::WithCharset );
if ( aRecommendedName.isEmpty() )
{
try {
@@ -1247,7 +1247,7 @@ OUString ModelData_Impl::GetRecommendedName( const OUString& aSuggestedName, con
if ( !aExtension.isEmpty() )
aObj.SetExtension( aExtension );
- aRecommendedName = aObj.GetName( INetURLObject::DECODE_WITH_CHARSET );
+ aRecommendedName = aObj.GetName( INetURLObject::DecodeMechanism::WithCharset );
}
}
}
@@ -1653,9 +1653,9 @@ bool SfxStoringHelper::GUIStoreModel( const uno::Reference< frame::XModel >& xMo
// Document properties can contain streams that should be freed before storing
aModelData.FreeDocumentProps();
if ( nStoreMode & EXPORT_REQUESTED )
- aModelData.GetStorable()->storeToURL( aURL.GetMainURL( INetURLObject::NO_DECODE ), aArgsSequence );
+ aModelData.GetStorable()->storeToURL( aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), aArgsSequence );
else
- aModelData.GetStorable()->storeAsURL( aURL.GetMainURL( INetURLObject::NO_DECODE ), aArgsSequence );
+ aModelData.GetStorable()->storeAsURL( aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), aArgsSequence );
}
catch( const uno::Exception& )
{
@@ -1679,9 +1679,9 @@ bool SfxStoringHelper::GUIStoreModel( const uno::Reference< frame::XModel >& xMo
// this is actually a save operation with different parameters
// so storeTo or storeAs without DocInfo operations are used
if ( nStoreMode & EXPORT_REQUESTED )
- aModelData.GetStorable()->storeToURL( aURL.GetMainURL( INetURLObject::NO_DECODE ), aArgsSequence );
+ aModelData.GetStorable()->storeToURL( aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), aArgsSequence );
else
- aModelData.GetStorable()->storeAsURL( aURL.GetMainURL( INetURLObject::NO_DECODE ), aArgsSequence );
+ aModelData.GetStorable()->storeAsURL( aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), aArgsSequence );
}
// Launch PDF viewer
@@ -1693,7 +1693,7 @@ bool SfxStoringHelper::GUIStoreModel( const uno::Reference< frame::XModel >& xMo
if ( aViewPDF )
{
uno::Reference<XSystemShellExecute> xSystemShellExecute(SystemShellExecute::create( ::comphelper::getProcessComponentContext() ) );
- xSystemShellExecute->execute( aURL.GetMainURL( INetURLObject::NO_DECODE ), "", SystemShellExecuteFlags::URIS_ONLY );
+ xSystemShellExecute->execute( aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), "", SystemShellExecuteFlags::URIS_ONLY );
}
}
diff --git a/sfx2/source/doc/iframe.cxx b/sfx2/source/doc/iframe.cxx
index 3654103ddd39..7fd0404925ed 100644
--- a/sfx2/source/doc/iframe.cxx
+++ b/sfx2/source/doc/iframe.cxx
@@ -185,7 +185,7 @@ throw( uno::RuntimeException, std::exception )
mxFrame->setCreator( xFramesSupplier );
util::URL aTargetURL;
- aTargetURL.Complete = maFrmDescr.GetURL().GetMainURL( INetURLObject::NO_DECODE );
+ aTargetURL.Complete = maFrmDescr.GetURL().GetMainURL( INetURLObject::DecodeMechanism::NONE );
uno::Reference < util::XURLTransformer > xTrans( util::URLTransformer::create( mxContext ) );
xTrans->parseStrict( aTargetURL );
@@ -333,7 +333,7 @@ uno::Any SAL_CALL IFrameObject::getPropertyValue(const OUString& aPropertyName)
{
case WID_FRAME_URL:
{
- aAny <<= OUString( maFrmDescr.GetURL().GetMainURL( INetURLObject::NO_DECODE ) );
+ aAny <<= OUString( maFrmDescr.GetURL().GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
}
break;
case WID_FRAME_NAME:
diff --git a/sfx2/source/doc/objcont.cxx b/sfx2/source/doc/objcont.cxx
index fc25b5f9ae65..13ba0ec0d266 100644
--- a/sfx2/source/doc/objcont.cxx
+++ b/sfx2/source/doc/objcont.cxx
@@ -531,7 +531,7 @@ void SfxObjectShell::ResetFromTemplate( const OUString& rTemplateName, const OUS
if( SfxGetpApp()->Get_Impl()->GetDocumentTemplates()->GetFull( OUString(), rTemplateName, aFoundName ) )
{
INetURLObject aObj( rFileName );
- xDocProps->setTemplateURL( aObj.GetMainURL(INetURLObject::DECODE_TO_IURI) );
+ xDocProps->setTemplateURL( aObj.GetMainURL(INetURLObject::DecodeMechanism::ToIUri) );
xDocProps->setTemplateName( rTemplateName );
::DateTime now( ::DateTime::SYSTEM );
diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx
index c862ad74001c..569a92f87939 100644
--- a/sfx2/source/doc/objmisc.cxx
+++ b/sfx2/source/doc/objmisc.cxx
@@ -479,7 +479,7 @@ bool SfxObjectShell::SwitchToShared( bool bShared, bool bSave )
if ( bShared != IsDocShared() )
{
- OUString aOrigURL = GetMedium()->GetURLObject().GetMainURL( INetURLObject::NO_DECODE );
+ OUString aOrigURL = GetMedium()->GetURLObject().GetMainURL( INetURLObject::DecodeMechanism::NONE );
if ( aOrigURL.isEmpty() && bSave )
{
@@ -496,7 +496,7 @@ bool SfxObjectShell::SwitchToShared( bool bShared, bool bSave )
const SfxBoolItem* pResult = dynamic_cast<const SfxBoolItem*>( pItem );
bResult = ( pResult && pResult->GetValue() );
if ( bResult )
- aOrigURL = GetMedium()->GetURLObject().GetMainURL( INetURLObject::NO_DECODE );
+ aOrigURL = GetMedium()->GetURLObject().GetMainURL( INetURLObject::DecodeMechanism::NONE );
}
}
@@ -542,7 +542,7 @@ bool SfxObjectShell::SwitchToShared( bool bShared, bool bSave )
}
else
{
- OUString aTempFileURL = pMedium->GetURLObject().GetMainURL( INetURLObject::NO_DECODE );
+ OUString aTempFileURL = pMedium->GetURLObject().GetMainURL( INetURLObject::DecodeMechanism::NONE );
GetMedium()->SwitchDocumentToFile( GetSharedFileURL() );
(pImpl->m_aSharedFileURL).clear();
@@ -552,7 +552,7 @@ bool SfxObjectShell::SwitchToShared( bool bShared, bool bSave )
try
{
// aOrigURL can not be used since it contains an old value
- ::svt::ShareControlFile aControlFile( GetMedium()->GetURLObject().GetMainURL( INetURLObject::NO_DECODE ) );
+ ::svt::ShareControlFile aControlFile( GetMedium()->GetURLObject().GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
aControlFile.RemoveFile();
}
catch( uno::Exception& )
@@ -844,16 +844,16 @@ OUString SfxObjectShell::GetTitle
if ( nMaxLength == SFX_TITLE_FULLNAME )
return aName;
else if ( nMaxLength == SFX_TITLE_FILENAME )
- return aURL.getName(INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET);
+ return aURL.getName(INetURLObject::LAST_SEGMENT, true, INetURLObject::DecodeMechanism::WithCharset);
else if ( pImpl->aTitle.isEmpty() )
pImpl->aTitle = aURL.getBase( INetURLObject::LAST_SEGMENT,
- true, INetURLObject::DECODE_WITH_CHARSET );
+ true, INetURLObject::DecodeMechanism::WithCharset );
}
else
{
if ( nMaxLength >= SFX_TITLE_MAXLEN )
{
- OUString aComplete( aURL.GetMainURL( INetURLObject::NO_DECODE ) );
+ OUString aComplete( aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
if( aComplete.getLength() > nMaxLength )
{
OUString aRet( "..." );
@@ -866,13 +866,13 @@ OUString SfxObjectShell::GetTitle
else if ( nMaxLength == SFX_TITLE_FILENAME )
{
OUString aName( aURL.GetBase() );
- aName = INetURLObject::decode( aName, INetURLObject::DECODE_WITH_CHARSET );
+ aName = INetURLObject::decode( aName, INetURLObject::DecodeMechanism::WithCharset );
if( aName.isEmpty() )
aName = aURL.GetURLNoPass();
return aName;
}
else if ( nMaxLength == SFX_TITLE_FULLNAME )
- return aURL.GetMainURL( INetURLObject::DECODE_TO_IURI );
+ return aURL.GetMainURL( INetURLObject::DecodeMechanism::ToIUri );
// Generate Title from file name if possible
if ( pImpl->aTitle.isEmpty() )
@@ -880,7 +880,7 @@ OUString SfxObjectShell::GetTitle
// workaround for the case when the name can not be retrieved from URL by INetURLObject
if ( pImpl->aTitle.isEmpty() )
- pImpl->aTitle = aURL.GetMainURL( INetURLObject::DECODE_WITH_CHARSET );
+ pImpl->aTitle = aURL.GetMainURL( INetURLObject::DecodeMechanism::WithCharset );
}
// Complete Title
@@ -1079,7 +1079,7 @@ void SfxObjectShell::SetAutoLoad(
if ( bReload )
{
pImpl->pReloadTimer = new AutoReloadTimer_Impl(
- rUrl.GetMainURL( INetURLObject::DECODE_TO_IURI ),
+ rUrl.GetMainURL( INetURLObject::DecodeMechanism::ToIUri ),
nTime, this );
pImpl->pReloadTimer->Start();
}
@@ -1239,7 +1239,7 @@ void SfxObjectShell::TemplateDisconnectionAfterLoad()
{
INetURLObject aURL( aName );
aURL.CutExtension();
- aTemplateName = aURL.getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET );
+ aTemplateName = aURL.getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::DecodeMechanism::WithCharset );
}
}
@@ -1535,7 +1535,7 @@ void SfxHeaderAttributes_Impl::SetAttribute( const SvKeyValue& rKV )
INetURLObject aObj;
INetURLObject( pDoc->GetMedium()->GetName() ).GetNewAbsURL( aURL.copy( 4 ), &aObj );
xDocProps->setAutoloadURL(
- aObj.GetMainURL( INetURLObject::NO_DECODE ) );
+ aObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
}
try
{
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index 46fca81d2ea2..ed67e58d5a11 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -2102,7 +2102,7 @@ void SfxObjectShell::AddToRecentlyUsedList()
if ( aUrl.GetProtocol() == INetProtocol::File )
{
std::shared_ptr<const SfxFilter> pOrgFilter = pMedium->GetOrigFilter();
- Application::AddToRecentDocumentList( aUrl.GetURLNoPass( INetURLObject::NO_DECODE ),
+ Application::AddToRecentDocumentList( aUrl.GetURLNoPass( INetURLObject::DecodeMechanism::NONE ),
(pOrgFilter) ? pOrgFilter->GetMimeType() : OUString(),
(pOrgFilter) ? pOrgFilter->GetServiceName() : OUString() );
}
@@ -2654,7 +2654,7 @@ bool SfxObjectShell::CommonSaveAs_Impl(const INetURLObject& aURL, const OUString
const SfxBoolItem* pCopyStreamItem = rItemSet.GetItem<SfxBoolItem>(SID_COPY_STREAM_IF_POSSIBLE, false);
if ( bSaveTo && pCopyStreamItem && pCopyStreamItem->GetValue() && !IsModified() )
{
- if (pMedium->TryDirectTransfer(aURL.GetMainURL(INetURLObject::NO_DECODE), rItemSet))
+ if (pMedium->TryDirectTransfer(aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE), rItemSet))
return true;
}
rItemSet.ClearItem( SID_COPY_STREAM_IF_POSSIBLE );
@@ -2678,9 +2678,9 @@ bool SfxObjectShell::CommonSaveAs_Impl(const INetURLObject& aURL, const OUString
OUString aTempFileURL;
if ( IsDocShared() )
- aTempFileURL = pMedium->GetURLObject().GetMainURL( INetURLObject::NO_DECODE );
+ aTempFileURL = pMedium->GetURLObject().GetMainURL( INetURLObject::DecodeMechanism::NONE );
- if (PreDoSaveAs_Impl(aURL.GetMainURL(INetURLObject::NO_DECODE), aFilterName, rItemSet))
+ if (PreDoSaveAs_Impl(aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE), aFilterName, rItemSet))
{
// Update Data on media
SfxItemSet *pSet = GetMedium()->GetItemSet();
diff --git a/sfx2/source/doc/objxtor.cxx b/sfx2/source/doc/objxtor.cxx
index e4784b00adbf..438b4d7b2493 100644
--- a/sfx2/source/doc/objxtor.cxx
+++ b/sfx2/source/doc/objxtor.cxx
@@ -358,7 +358,7 @@ SfxObjectShell::~SfxObjectShell()
#if HAVE_FEATURE_MULTIUSER_ENVIRONMENT
if ( IsDocShared() && pMedium )
- FreeSharedFile( pMedium->GetURLObject().GetMainURL( INetURLObject::NO_DECODE ) );
+ FreeSharedFile( pMedium->GetURLObject().GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
#endif
DELETEX( SfxMedium, pMedium );
}
diff --git a/sfx2/source/doc/printhelper.cxx b/sfx2/source/doc/printhelper.cxx
index 8887ca079ac6..9da2bc273d09 100644
--- a/sfx2/source/doc/printhelper.cxx
+++ b/sfx2/source/doc/printhelper.cxx
@@ -537,7 +537,7 @@ class ImplUCBPrintWatcher : public ::osl::Thread
OUString sFileName = aSplitter.getName(
INetURLObject::LAST_SEGMENT,
true,
- INetURLObject::DECODE_WITH_CHARSET);
+ INetURLObject::DecodeMechanism::WithCharset);
if (aSplitter.removeSegment() && !sFileName.isEmpty())
{
::ucbhelper::Content aSource(
@@ -546,7 +546,7 @@ class ImplUCBPrintWatcher : public ::osl::Thread
comphelper::getProcessComponentContext());
::ucbhelper::Content aTarget(
- OUString(aSplitter.GetMainURL(INetURLObject::NO_DECODE)),
+ OUString(aSplitter.GetMainURL(INetURLObject::DecodeMechanism::NONE)),
css::uno::Reference< css::ucb::XCommandEnvironment >(),
comphelper::getProcessComponentContext());
diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index b247d039e0f4..17e248a3cda0 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -1838,7 +1838,7 @@ void SAL_CALL SfxBaseModel::load( const Sequence< beans::PropertyValue >& seqA
nError = m_pData->m_pObjectShell->GetErrorCode();
if ( nError == ERRCODE_IO_BROKENPACKAGE && xHandler.is() )
{
- OUString aDocName = pMedium->GetURLObject().getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET );
+ OUString aDocName = pMedium->GetURLObject().getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::DecodeMechanism::WithCharset );
const SfxBoolItem* pRepairItem = SfxItemSet::GetItem<SfxBoolItem>(pMedium->GetItemSet(), SID_REPAIRPACKAGE, false);
if ( !pRepairItem || !pRepairItem->GetValue() )
{
diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx
index 941f451f1916..114c6a7120a0 100644
--- a/sfx2/source/doc/templatedlg.cxx
+++ b/sfx2/source/doc/templatedlg.cxx
@@ -988,7 +988,7 @@ void SfxTemplateManagerDlg::OnTemplateExport()
else
aPathObj.setName(aItemPath.getName());
- OUString aPath = aPathObj.GetMainURL( INetURLObject::NO_DECODE );
+ OUString aPath = aPathObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
if (!mpLocalView->exportTo(pItem->mnAssocId,pItem->mnRegionId,aPath))
{
@@ -1019,7 +1019,7 @@ void SfxTemplateManagerDlg::OnTemplateExport()
else
aPathObj.setName(aItemPath.getName());
- OUString aPath = aPathObj.GetMainURL( INetURLObject::NO_DECODE );
+ OUString aPath = aPathObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
if (!mpLocalView->exportTo(pItem->mnDocId + 1, //mnId w.r.t. region = mDocId + 1
mpLocalView->getRegionId(pItem->mnRegionId), //pItem->mnRegionId does not store actual region Id
diff --git a/sfx2/source/inet/inettbc.cxx b/sfx2/source/inet/inettbc.cxx
index d13ad0371732..0fcdb557e811 100644
--- a/sfx2/source/inet/inettbc.cxx
+++ b/sfx2/source/inet/inettbc.cxx
@@ -224,7 +224,7 @@ void SfxURLToolBoxControl_Impl::StateChanged
continue;
INetURLObject aURL ( sURL );
- OUString sMainURL( aURL.GetMainURL( INetURLObject::DECODE_WITH_CHARSET ) );
+ OUString sMainURL( aURL.GetMainURL( INetURLObject::DecodeMechanism::WithCharset ) );
OUString sFile;
if (osl::FileBase::getSystemPathFromFileURL(sMainURL, sFile) == osl::FileBase::E_None)
diff --git a/sfx2/source/notify/eventsupplier.cxx b/sfx2/source/notify/eventsupplier.cxx
index 6c54b467c488..aa94e1b8e07f 100644
--- a/sfx2/source/notify/eventsupplier.cxx
+++ b/sfx2/source/notify/eventsupplier.cxx
@@ -437,7 +437,7 @@ void SfxEvents_Impl::NormalizeMacro( const ::comphelper::NamedValueCollection& i
sal_Int32 nArgsPos = aScript.indexOf( '(' );
if ( ( nHashPos != -1 ) && ( nArgsPos == -1 || nHashPos < nArgsPos ) )
{
- OUString aBasMgrName( INetURLObject::decode( aScript.copy( 8, nHashPos-8 ), INetURLObject::DECODE_WITH_CHARSET ) );
+ OUString aBasMgrName( INetURLObject::decode( aScript.copy( 8, nHashPos-8 ), INetURLObject::DecodeMechanism::WithCharset ) );
if ( aBasMgrName == "." )
aLibrary = pDoc->GetTitle();
else
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index 69aaa29c2ab0..3e18546749a3 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -290,7 +290,7 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
{
SfxApplication* pApp = SfxGetpApp();
SfxAllItemSet aSet( pApp->GetPool() );
- aSet.Put( SfxStringItem( SID_FILE_NAME, pMed->GetURLObject().GetMainURL(INetURLObject::NO_DECODE) ) );
+ aSet.Put( SfxStringItem( SID_FILE_NAME, pMed->GetURLObject().GetMainURL(INetURLObject::DecodeMechanism::NONE) ) );
aSet.Put( SfxBoolItem( SID_TEMPLATE, true ) );
aSet.Put( SfxStringItem( SID_TARGETNAME, OUString("_blank") ) );
const SfxStringItem* pReferer = SfxItemSet::GetItem<SfxStringItem>(pMed->GetItemSet(), SID_REFERER, false);
@@ -340,7 +340,7 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
&& ( pSh->GetModifyPasswordHash() || pSh->GetModifyPasswordInfo().getLength() )
&& !pSh->IsModifyPasswordEntered() )
{
- OUString aDocumentName = INetURLObject( pMed->GetOrigURL() ).GetMainURL( INetURLObject::DECODE_WITH_CHARSET );
+ OUString aDocumentName = INetURLObject( pMed->GetOrigURL() ).GetMainURL( INetURLObject::DecodeMechanism::WithCharset );
if( !AskPasswordToModify_Impl( pMed->GetInteractionHandler(), aDocumentName, pMed->GetOrigFilter(), pSh->GetModifyPasswordHash(), pSh->GetModifyPasswordInfo() ) )
{
// this is a read-only document, if it has "Password to modify"
@@ -403,8 +403,8 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
// etag tells that the cache representation (e.g. in LO) is different from the one on the server,
// but tells nothing about the age
// Details at this link: http://tools.ietf.org/html/rfc4918#section-15, section 15.7
- bool bPhysObjIsYounger = ::utl::UCBContentHelper::IsYounger( aMedObj.GetMainURL( INetURLObject::NO_DECODE ),
- aPhysObj.GetMainURL( INetURLObject::NO_DECODE ) );
+ bool bPhysObjIsYounger = ::utl::UCBContentHelper::IsYounger( aMedObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ),
+ aPhysObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
bool bIsWebDAV = aMedObj.isAnyKnownWebDAVScheme();
if ( ( !bNeedsReload && ( ( aMedObj.GetProtocol() == INetProtocol::File &&
diff --git a/sfx2/source/view/viewfrm2.cxx b/sfx2/source/view/viewfrm2.cxx
index 16ca900da627..625bf0a526c5 100644
--- a/sfx2/source/view/viewfrm2.cxx
+++ b/sfx2/source/view/viewfrm2.cxx
@@ -129,7 +129,7 @@ void SfxViewFrame::UpdateTitle()
if ( pObjSh->HasName() )
{
INetURLObject aTmp( pMedium->GetName() );
- aURL = aTmp.getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET );
+ aURL = aTmp.getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::DecodeMechanism::WithCharset );
}
if ( aURL != m_pImpl->aActualURL )
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index 75ec8d1876a0..766e67f81207 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -639,7 +639,7 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq )
{
// Determine file name from model
INetURLObject aFObj( xStorable->getLocation() );
- aFileName = aFObj.getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::NO_DECODE );
+ aFileName = aFObj.getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::DecodeMechanism::NONE );
}
OSL_ASSERT( !aFilterName.isEmpty() );
@@ -652,7 +652,7 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq )
aFilePathObj.insertName( aFileName );
aFilePathObj.setExtension( aExtension );
- OUString aFileURL = aFilePathObj.GetMainURL( INetURLObject::NO_DECODE );
+ OUString aFileURL = aFilePathObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
css::uno::Sequence< css::beans::PropertyValue > aArgs( 1 );
aArgs[0].Name = "FilterName";
diff --git a/slideshow/source/engine/shapes/shapeimporter.cxx b/slideshow/source/engine/shapes/shapeimporter.cxx
index d8c94189c557..4caa9bc7269d 100644
--- a/slideshow/source/engine/shapes/shapeimporter.cxx
+++ b/slideshow/source/engine/shapes/shapeimporter.cxx
@@ -117,7 +117,7 @@ bool importShapeGraphic(
INetURLObject aTmp( aURL );
std::unique_ptr<SvStream> pGraphicStream(
utl::UcbStreamHelper::CreateStream(
- aTmp.GetMainURL( INetURLObject::NO_DECODE ),
+ aTmp.GetMainURL( INetURLObject::DecodeMechanism::NONE ),
StreamMode::READ ) );
if( !pGraphicStream )
{
diff --git a/slideshow/source/engine/soundplayer.cxx b/slideshow/source/engine/soundplayer.cxx
index 502742ee306f..a685dd18d583 100644
--- a/slideshow/source/engine/soundplayer.cxx
+++ b/slideshow/source/engine/soundplayer.cxx
@@ -97,7 +97,7 @@ namespace slideshow
{
const INetURLObject aURL( rSoundURL );
mxPlayer.set( avmedia::MediaWindow::createPlayer(
- aURL.GetMainURL( INetURLObject::DECODE_UNAMBIGUOUS ), ""/*TODO!*/ ),
+ aURL.GetMainURL( INetURLObject::DecodeMechanism::Unambiguous ), ""/*TODO!*/ ),
uno::UNO_QUERY);
}
catch( uno::RuntimeException& )
diff --git a/sot/source/sdstor/storage.cxx b/sot/source/sdstor/storage.cxx
index ac672efd1b1f..0bd242585578 100644
--- a/sot/source/sdstor/storage.cxx
+++ b/sot/source/sdstor/storage.cxx
@@ -305,7 +305,7 @@ void SotStorage::CreateStorage( bool bForceUCBStorage, StreamMode nMode )
OUString aURL;
osl::FileBase::getFileURLFromSystemPath( m_aName, aURL );
aObj.SetURL( aURL );
- m_aName = aObj.GetMainURL( INetURLObject::NO_DECODE );
+ m_aName = aObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
}
// check the stream
@@ -488,7 +488,7 @@ bool SotStorage::IsStorageFile( const OUString & rFileName )
OUString aURL;
osl::FileBase::getFileURLFromSystemPath( aName, aURL );
aObj.SetURL( aURL );
- aName = aObj.GetMainURL( INetURLObject::NO_DECODE );
+ aName = aObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
}
std::unique_ptr<SvStream> pStm(::utl::UcbStreamHelper::CreateStream( aName, StreamMode::STD_READ ));
diff --git a/sot/source/sdstor/ucbstorage.cxx b/sot/source/sdstor/ucbstorage.cxx
index d4c1d560c028..11179f31d118 100644
--- a/sot/source/sdstor/ucbstorage.cxx
+++ b/sot/source/sdstor/ucbstorage.cxx
@@ -1091,7 +1091,7 @@ sal_Int16 UCBStorageStream_Impl::Commit()
INetURLObject aObj( m_aURL );
aObj.SetName( m_aName );
- m_aURL = aObj.GetMainURL( INetURLObject::NO_DECODE );
+ m_aURL = aObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
m_bModified = false;
m_bSourceRead = true;
}
@@ -1631,7 +1631,7 @@ void UCBStorage_Impl::Init()
aObj.Append( "manifest.xml" );
// create input stream
- std::unique_ptr<SvStream> pStream(::utl::UcbStreamHelper::CreateStream( aObj.GetMainURL( INetURLObject::NO_DECODE ), StreamMode::STD_READ ));
+ std::unique_ptr<SvStream> pStream(::utl::UcbStreamHelper::CreateStream( aObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ), StreamMode::STD_READ ));
// no stream means no manifest.xml
if ( pStream )
{
@@ -2794,7 +2794,7 @@ BaseStorage* UCBStorage::OpenStorage_Impl( const OUString& rEleName, StreamMode
INetURLObject aFolderObj( pImp->m_aURL );
aFolderObj.removeSegment();
- Content aFolder( aFolderObj.GetMainURL( INetURLObject::NO_DECODE ), Reference < XCommandEnvironment >(), comphelper::getProcessComponentContext() );
+ Content aFolder( aFolderObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ), Reference < XCommandEnvironment >(), comphelper::getProcessComponentContext() );
pImp->m_pContent = new Content;
bool bRet = ::utl::UCBContentHelper::MakeFolder( aFolder, pImp->m_aName, *pImp->m_pContent );
if ( !bRet )
diff --git a/svgio/source/svgreader/svgnode.cxx b/svgio/source/svgreader/svgnode.cxx
index a3a77ab15b80..06304f193c72 100644
--- a/svgio/source/svgreader/svgnode.cxx
+++ b/svgio/source/svgreader/svgnode.cxx
@@ -577,7 +577,7 @@ namespace svgio
aObjectName = aURL.getName(
INetURLObject::LAST_SEGMENT,
true,
- INetURLObject::DECODE_WITH_CHARSET);
+ INetURLObject::DecodeMechanism::WithCharset);
}
}
diff --git a/svl/source/fsstor/fsstorage.cxx b/svl/source/fsstor/fsstorage.cxx
index 7aa50cd5ba9c..4ba7d18a2347 100644
--- a/svl/source/fsstor/fsstorage.cxx
+++ b/svl/source/fsstor/fsstorage.cxx
@@ -127,12 +127,12 @@ FSStorage::~FSStorage()
bool FSStorage::MakeFolderNoUI( const OUString& rFolder )
{
INetURLObject aURL( rFolder );
- OUString aTitle = aURL.getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET );
+ OUString aTitle = aURL.getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::DecodeMechanism::WithCharset );
aURL.removeSegment();
::ucbhelper::Content aParent;
::ucbhelper::Content aResultContent;
- if ( ::ucbhelper::Content::create( aURL.GetMainURL( INetURLObject::NO_DECODE ),
+ if ( ::ucbhelper::Content::create( aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ),
uno::Reference< ucb::XCommandEnvironment >(),
comphelper::getProcessComponentContext(),
aParent ) )
@@ -217,7 +217,7 @@ void FSStorage::CopyContentToStorage_Impl( ::ucbhelper::Content* pContent, const
// TODO/LATER: not sure whether the entry name must be encoded
OUString aNewEntryName( INetURLObject( aSourceURL ).getName( INetURLObject::LAST_SEGMENT,
true,
- INetURLObject::NO_DECODE ) );
+ INetURLObject::DecodeMechanism::NONE ) );
if ( bIsFolder )
{
uno::Reference< embed::XStorage > xSubStorage = xDest->openStorageElement( aNewEntryName,
@@ -383,11 +383,11 @@ uno::Reference< io::XStream > SAL_CALL FSStorage::openStreamElement(
INetURLObject aFileURL( m_pImpl->m_aURL );
aFileURL.Append( aStreamName );
- if ( ::utl::UCBContentHelper::IsFolder( aFileURL.GetMainURL( INetURLObject::NO_DECODE ) ) )
+ if ( ::utl::UCBContentHelper::IsFolder( aFileURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ) ) )
throw io::IOException();
if ( ( nOpenMode & embed::ElementModes::NOCREATE )
- && !::utl::UCBContentHelper::IsDocument( aFileURL.GetMainURL( INetURLObject::NO_DECODE ) ) )
+ && !::utl::UCBContentHelper::IsDocument( aFileURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ) ) )
throw io::IOException(); // TODO:
uno::Reference< ucb::XCommandEnvironment > xDummyEnv; // TODO: provide InteractionHandler if any
@@ -400,12 +400,12 @@ uno::Reference< io::XStream > SAL_CALL FSStorage::openStreamElement(
{
uno::Reference<ucb::XSimpleFileAccess3> xSimpleFileAccess(
ucb::SimpleFileAccess::create( m_pImpl->m_xContext ) );
- xResult = xSimpleFileAccess->openFileReadWrite( aFileURL.GetMainURL( INetURLObject::NO_DECODE ) );
+ xResult = xSimpleFileAccess->openFileReadWrite( aFileURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
}
else
{
// TODO: test whether it really works for http and fwp
- SvStream* pStream = ::utl::UcbStreamHelper::CreateStream( aFileURL.GetMainURL( INetURLObject::NO_DECODE ),
+ SvStream* pStream = ::utl::UcbStreamHelper::CreateStream( aFileURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ),
StreamMode::STD_WRITE );
if ( pStream )
{
@@ -428,10 +428,10 @@ uno::Reference< io::XStream > SAL_CALL FSStorage::openStreamElement(
else
{
if ( ( nOpenMode & embed::ElementModes::TRUNCATE )
- || !::utl::UCBContentHelper::IsDocument( aFileURL.GetMainURL( INetURLObject::NO_DECODE ) ) )
+ || !::utl::UCBContentHelper::IsDocument( aFileURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ) ) )
throw io::IOException(); // TODO: access denied
- ::ucbhelper::Content aResultContent( aFileURL.GetMainURL( INetURLObject::NO_DECODE ), xDummyEnv, comphelper::getProcessComponentContext() );
+ ::ucbhelper::Content aResultContent( aFileURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), xDummyEnv, comphelper::getProcessComponentContext() );
uno::Reference< io::XInputStream > xInStream = aResultContent.openStream();
xResult = static_cast< io::XStream* >( new OFSInputStreamContainer( xInStream ) );
}
@@ -508,8 +508,8 @@ uno::Reference< embed::XStorage > SAL_CALL FSStorage::openStorageElement(
INetURLObject aFolderURL( m_pImpl->m_aURL );
aFolderURL.Append( aStorName );
- bool bFolderExists = ::utl::UCBContentHelper::IsFolder( aFolderURL.GetMainURL( INetURLObject::NO_DECODE ) );
- if ( !bFolderExists && ::utl::UCBContentHelper::IsDocument( aFolderURL.GetMainURL( INetURLObject::NO_DECODE ) ) )
+ bool bFolderExists = ::utl::UCBContentHelper::IsFolder( aFolderURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
+ if ( !bFolderExists && ::utl::UCBContentHelper::IsDocument( aFolderURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ) ) )
throw io::IOException(); // TODO:
if ( ( nStorageMode & embed::ElementModes::NOCREATE ) && !bFolderExists )
@@ -523,14 +523,14 @@ uno::Reference< embed::XStorage > SAL_CALL FSStorage::openStorageElement(
{
if ( ( nStorageMode & embed::ElementModes::TRUNCATE ) && bFolderExists )
{
- ::utl::UCBContentHelper::Kill( aFolderURL.GetMainURL( INetURLObject::NO_DECODE ) );
+ ::utl::UCBContentHelper::Kill( aFolderURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
bFolderExists =
- MakeFolderNoUI( aFolderURL.GetMainURL( INetURLObject::NO_DECODE ) ); // TODO: not atomic :(
+ MakeFolderNoUI( aFolderURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ) ); // TODO: not atomic :(
}
else if ( !bFolderExists )
{
bFolderExists =
- MakeFolderNoUI( aFolderURL.GetMainURL( INetURLObject::NO_DECODE ) ); // TODO: not atomic :(
+ MakeFolderNoUI( aFolderURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ) ); // TODO: not atomic :(
}
}
else if ( ( nStorageMode & embed::ElementModes::TRUNCATE ) )
@@ -539,7 +539,7 @@ uno::Reference< embed::XStorage > SAL_CALL FSStorage::openStorageElement(
if ( !bFolderExists )
throw io::IOException(); // there is no such folder
- ::ucbhelper::Content aResultContent( aFolderURL.GetMainURL( INetURLObject::NO_DECODE ), xDummyEnv, comphelper::getProcessComponentContext() );
+ ::ucbhelper::Content aResultContent( aFolderURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), xDummyEnv, comphelper::getProcessComponentContext() );
xResult.set( static_cast< OWeakObject* >( new FSStorage( aResultContent,
nStorageMode,
m_pImpl->m_xContext ) ),
@@ -600,7 +600,7 @@ uno::Reference< io::XStream > SAL_CALL FSStorage::cloneStreamElement( const OUSt
try
{
uno::Reference< ucb::XCommandEnvironment > xDummyEnv;
- ::ucbhelper::Content aResultContent( aFileURL.GetMainURL( INetURLObject::NO_DECODE ), xDummyEnv, comphelper::getProcessComponentContext() );
+ ::ucbhelper::Content aResultContent( aFileURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), xDummyEnv, comphelper::getProcessComponentContext() );
uno::Reference< io::XInputStream > xInStream = aResultContent.openStream();
xTempResult = io::TempFile::create(m_pImpl->m_xContext);
@@ -709,7 +709,7 @@ sal_Bool SAL_CALL FSStorage::isStreamElement( const OUString& aElementName )
INetURLObject aURL( m_pImpl->m_aURL );
aURL.Append( aElementName );
- return !::utl::UCBContentHelper::IsFolder( aURL.GetMainURL( INetURLObject::NO_DECODE ) );
+ return !::utl::UCBContentHelper::IsFolder( aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
}
sal_Bool SAL_CALL FSStorage::isStorageElement( const OUString& aElementName )
@@ -729,7 +729,7 @@ sal_Bool SAL_CALL FSStorage::isStorageElement( const OUString& aElementName )
INetURLObject aURL( m_pImpl->m_aURL );
aURL.Append( aElementName );
- return ::utl::UCBContentHelper::IsFolder( aURL.GetMainURL( INetURLObject::NO_DECODE ) );
+ return ::utl::UCBContentHelper::IsFolder( aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
}
void SAL_CALL FSStorage::removeElement( const OUString& aElementName )
@@ -751,11 +751,11 @@ void SAL_CALL FSStorage::removeElement( const OUString& aElementName )
INetURLObject aURL( m_pImpl->m_aURL );
aURL.Append( aElementName );
- if ( !::utl::UCBContentHelper::IsFolder( aURL.GetMainURL( INetURLObject::NO_DECODE ) )
- && !::utl::UCBContentHelper::IsDocument( aURL.GetMainURL( INetURLObject::NO_DECODE ) ) )
+ if ( !::utl::UCBContentHelper::IsFolder( aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ) )
+ && !::utl::UCBContentHelper::IsDocument( aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ) ) )
throw container::NoSuchElementException(); // TODO:
- ::utl::UCBContentHelper::Kill( aURL.GetMainURL( INetURLObject::NO_DECODE ) );
+ ::utl::UCBContentHelper::Kill( aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
}
void SAL_CALL FSStorage::renameElement( const OUString& aElementName, const OUString& aNewName )
@@ -781,18 +781,18 @@ void SAL_CALL FSStorage::renameElement( const OUString& aElementName, const OUSt
INetURLObject aNewURL( m_pImpl->m_aURL );
aNewURL.Append( aNewName );
- if ( !::utl::UCBContentHelper::IsFolder( aOldURL.GetMainURL( INetURLObject::NO_DECODE ) )
- && !::utl::UCBContentHelper::IsDocument( aOldURL.GetMainURL( INetURLObject::NO_DECODE ) ) )
+ if ( !::utl::UCBContentHelper::IsFolder( aOldURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ) )
+ && !::utl::UCBContentHelper::IsDocument( aOldURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ) ) )
throw container::NoSuchElementException(); // TODO:
- if ( ::utl::UCBContentHelper::IsFolder( aNewURL.GetMainURL( INetURLObject::NO_DECODE ) )
- || ::utl::UCBContentHelper::IsDocument( aNewURL.GetMainURL( INetURLObject::NO_DECODE ) ) )
+ if ( ::utl::UCBContentHelper::IsFolder( aNewURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ) )
+ || ::utl::UCBContentHelper::IsDocument( aNewURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ) ) )
throw container::ElementExistException(); // TODO:
try
{
uno::Reference< ucb::XCommandEnvironment > xDummyEnv;
- ::ucbhelper::Content aSourceContent( aOldURL.GetMainURL( INetURLObject::NO_DECODE ), xDummyEnv, comphelper::getProcessComponentContext() );
+ ::ucbhelper::Content aSourceContent( aOldURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), xDummyEnv, comphelper::getProcessComponentContext() );
if ( !GetContent()->transferContent( aSourceContent,
::ucbhelper::InsertOperation_MOVE,
@@ -868,18 +868,18 @@ void SAL_CALL FSStorage::copyElementTo( const OUString& aElementName,
try
{
uno::Reference< ucb::XCommandEnvironment > xDummyEnv;
- if ( ::utl::UCBContentHelper::IsFolder( aOwnURL.GetMainURL( INetURLObject::NO_DECODE ) ) )
+ if ( ::utl::UCBContentHelper::IsFolder( aOwnURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ) ) )
{
- ::ucbhelper::Content aSourceContent( aOwnURL.GetMainURL( INetURLObject::NO_DECODE ), xDummyEnv, comphelper::getProcessComponentContext() );
+ ::ucbhelper::Content aSourceContent( aOwnURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), xDummyEnv, comphelper::getProcessComponentContext() );
uno::Reference< embed::XStorage > xDestSubStor(
xDest->openStorageElement( aNewName, embed::ElementModes::READWRITE ),
uno::UNO_QUERY_THROW );
CopyContentToStorage_Impl( &aSourceContent, xDestSubStor );
}
- else if ( ::utl::UCBContentHelper::IsDocument( aOwnURL.GetMainURL( INetURLObject::NO_DECODE ) ) )
+ else if ( ::utl::UCBContentHelper::IsDocument( aOwnURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ) ) )
{
- CopyStreamToSubStream( aOwnURL.GetMainURL( INetURLObject::NO_DECODE ), xDest, aNewName );
+ CopyStreamToSubStream( aOwnURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), xDest, aNewName );
}
else
throw container::NoSuchElementException(); // TODO:
@@ -937,7 +937,7 @@ void SAL_CALL FSStorage::moveElementTo( const OUString& aElementName,
INetURLObject aOwnURL( m_pImpl->m_aURL );
aOwnURL.Append( aElementName );
- if ( !::utl::UCBContentHelper::Kill( aOwnURL.GetMainURL( INetURLObject::NO_DECODE ) ) )
+ if ( !::utl::UCBContentHelper::Kill( aOwnURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ) ) )
throw io::IOException(); // TODO: error handling
}
@@ -966,11 +966,11 @@ uno::Any SAL_CALL FSStorage::getByName( const OUString& aName )
aURL.Append( aName );
- if ( ::utl::UCBContentHelper::IsFolder( aURL.GetMainURL( INetURLObject::NO_DECODE ) ) )
+ if ( ::utl::UCBContentHelper::IsFolder( aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ) ) )
{
aResult <<= openStorageElement( aName, embed::ElementModes::READ );
}
- else if ( ::utl::UCBContentHelper::IsDocument( aURL.GetMainURL( INetURLObject::NO_DECODE ) ) )
+ else if ( ::utl::UCBContentHelper::IsDocument( aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ) ) )
{
aResult <<= openStreamElement( aName, embed::ElementModes::READ );
}
@@ -1092,8 +1092,8 @@ sal_Bool SAL_CALL FSStorage::hasByName( const OUString& aName )
INetURLObject aURL( m_pImpl->m_aURL );
aURL.Append( aName );
- return ( ::utl::UCBContentHelper::IsFolder( aURL.GetMainURL( INetURLObject::NO_DECODE ) )
- || ::utl::UCBContentHelper::IsDocument( aURL.GetMainURL( INetURLObject::NO_DECODE ) ) );
+ return ( ::utl::UCBContentHelper::IsFolder( aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ) )
+ || ::utl::UCBContentHelper::IsDocument( aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ) ) );
}
uno::Type SAL_CALL FSStorage::getElementType()
@@ -1325,7 +1325,7 @@ uno::Reference< embed::XExtendedStorageStream > SAL_CALL FSStorage::openStreamEl
throw uno::RuntimeException();
OUString aFileURL = INetURLObject::GetAbsURL(
- aBaseURL.GetMainURL( INetURLObject::NO_DECODE ),
+ aBaseURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ),
sStreamPath );
if ( ::utl::UCBContentHelper::IsFolder( aFileURL ) )
@@ -1457,7 +1457,7 @@ void SAL_CALL FSStorage::removeStreamElementByHierarchicalName( const OUString&
throw uno::RuntimeException();
OUString aFileURL = INetURLObject::GetAbsURL(
- aBaseURL.GetMainURL( INetURLObject::NO_DECODE ),
+ aBaseURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ),
sStreamPath );
if ( !::utl::UCBContentHelper::IsDocument( aFileURL ) )
diff --git a/svl/source/misc/filenotation.cxx b/svl/source/misc/filenotation.cxx
index 26d614dcf137..d77f96e97f75 100644
--- a/svl/source/misc/filenotation.cxx
+++ b/svl/source/misc/filenotation.cxx
@@ -59,7 +59,7 @@ namespace svt
aSmartParser.SetSmartProtocol( INetProtocol::File );
if ( aSmartParser.SetSmartURL( _rSystemPath ) )
{
- m_sFileURL = aSmartParser.GetMainURL( INetURLObject::NO_DECODE );
+ m_sFileURL = aSmartParser.GetMainURL( INetURLObject::DecodeMechanism::NONE );
osl_getSystemPathFromFileURL( m_sFileURL.pData, &m_sSystem.pData );
bSuccess = true;
}
diff --git a/svl/source/misc/inethist.cxx b/svl/source/misc/inethist.cxx
index f516af9effc0..3eecd4b3288e 100644
--- a/svl/source/misc/inethist.cxx
+++ b/svl/source/misc/inethist.cxx
@@ -329,7 +329,7 @@ void INetURLHistory::NormalizeUrl_Impl (INetURLObject &rUrl)
case INetProtocol::File:
if (!INetURLObject::IsCaseSensitive())
{
- OUString aPath (rUrl.GetURLPath(INetURLObject::NO_DECODE).toAsciiLowerCase());
+ OUString aPath (rUrl.GetURLPath(INetURLObject::DecodeMechanism::NONE).toAsciiLowerCase());
rUrl.SetURLPath (aPath, INetURLObject::EncodeMechanism::NotCanonical);
}
break;
@@ -366,15 +366,15 @@ void INetURLHistory::PutUrl_Impl (const INetURLObject &rUrl)
INetURLObject aHistUrl (rUrl);
NormalizeUrl_Impl (aHistUrl);
- m_pImpl->putUrl (aHistUrl.GetMainURL(INetURLObject::NO_DECODE));
+ m_pImpl->putUrl (aHistUrl.GetMainURL(INetURLObject::DecodeMechanism::NONE));
Broadcast (INetURLHistoryHint (&rUrl));
if (aHistUrl.HasMark())
{
- aHistUrl.SetURL (aHistUrl.GetURLNoMark(INetURLObject::NO_DECODE),
+ aHistUrl.SetURL (aHistUrl.GetURLNoMark(INetURLObject::DecodeMechanism::NONE),
INetURLObject::EncodeMechanism::NotCanonical);
- m_pImpl->putUrl (aHistUrl.GetMainURL(INetURLObject::NO_DECODE));
+ m_pImpl->putUrl (aHistUrl.GetMainURL(INetURLObject::DecodeMechanism::NONE));
Broadcast (INetURLHistoryHint (&aHistUrl));
}
}
@@ -388,7 +388,7 @@ bool INetURLHistory::QueryUrl_Impl (const INetURLObject &rUrl)
INetURLObject aHistUrl (rUrl);
NormalizeUrl_Impl (aHistUrl);
- return m_pImpl->queryUrl (aHistUrl.GetMainURL(INetURLObject::NO_DECODE));
+ return m_pImpl->queryUrl (aHistUrl.GetMainURL(INetURLObject::DecodeMechanism::NONE));
}
return false;
}
diff --git a/svl/source/misc/lockfilecommon.cxx b/svl/source/misc/lockfilecommon.cxx
index e19bd44fd710..a163c43ac0b3 100644
--- a/svl/source/misc/lockfilecommon.cxx
+++ b/svl/source/misc/lockfilecommon.cxx
@@ -63,7 +63,7 @@ LockFileCommon::LockFileCommon( const OUString& aOrigURL, const OUString& aPrefi
aShareURLString += aPrefix;
aShareURLString += aDocURL.GetName();
aShareURLString += "%23"; // '#'
- m_aURL = INetURLObject( aShareURLString ).GetMainURL( INetURLObject::NO_DECODE );
+ m_aURL = INetURLObject( aShareURLString ).GetMainURL( INetURLObject::DecodeMechanism::NONE );
}
@@ -77,7 +77,7 @@ INetURLObject LockFileCommon::ResolveLinks( const INetURLObject& aDocURL )
if ( aDocURL.HasError() )
throw lang::IllegalArgumentException();
- OUString aURLToCheck = aDocURL.GetMainURL(INetURLObject::NO_DECODE);
+ OUString aURLToCheck = aDocURL.GetMainURL(INetURLObject::DecodeMechanism::NONE);
// there is currently no UCB functionality to resolve the symbolic links;
// since the lock files are used only for local file systems the osl
diff --git a/svl/source/misc/urihelper.cxx b/svl/source/misc/urihelper.cxx
index acf4d0aa4e42..4673a8907079 100644
--- a/svl/source/misc/urihelper.cxx
+++ b/svl/source/misc/urihelper.cxx
@@ -534,7 +534,7 @@ OUString URIHelper::FindFirstURLInText(OUString const & rText,
rBegin = nPos;
rEnd = nUriEnd;
return
- aUri.GetMainURL(INetURLObject::DECODE_TO_IURI);
+ aUri.GetMainURL(INetURLObject::DecodeMechanism::ToIUri);
}
}
}
@@ -563,7 +563,7 @@ OUString URIHelper::FindFirstURLInText(OUString const & rText,
rBegin = nPos;
rEnd = nUriEnd;
return
- aUri.GetMainURL(INetURLObject::DECODE_TO_IURI);
+ aUri.GetMainURL(INetURLObject::DecodeMechanism::ToIUri);
}
}
}
@@ -612,7 +612,7 @@ OUString URIHelper::FindFirstURLInText(OUString const & rText,
rBegin = nPos;
rEnd = nUriEnd;
return
- aUri.GetMainURL(INetURLObject::DECODE_TO_IURI);
+ aUri.GetMainURL(INetURLObject::DecodeMechanism::ToIUri);
}
}
}
@@ -638,7 +638,7 @@ OUString URIHelper::FindFirstURLInText(OUString const & rText,
rBegin = nPos;
rEnd = nUriEnd;
return
- aUri.GetMainURL(INetURLObject::DECODE_TO_IURI);
+ aUri.GetMainURL(INetURLObject::DecodeMechanism::ToIUri);
}
}
}
@@ -667,7 +667,7 @@ OUString URIHelper::FindFirstURLInText(OUString const & rText,
rBegin = nPos;
rEnd = nUriEnd;
return
- aUri.GetMainURL(INetURLObject::DECODE_TO_IURI);
+ aUri.GetMainURL(INetURLObject::DecodeMechanism::ToIUri);
}
}
}
@@ -702,7 +702,7 @@ OUString URIHelper::FindFirstURLInText(OUString const & rText,
rBegin = nPos;
rEnd = i;
return aUri.GetMainURL(
- INetURLObject::DECODE_TO_IURI);
+ INetURLObject::DecodeMechanism::ToIUri);
}
}
}
diff --git a/svtools/source/contnr/fileview.cxx b/svtools/source/contnr/fileview.cxx
index 0a0a5ebea974..335ef8ba094e 100644
--- a/svtools/source/contnr/fileview.cxx
+++ b/svtools/source/contnr/fileview.cxx
@@ -240,7 +240,7 @@ inline const OUString& NameTranslationList::GetTransTableFileName() const
NameTranslationList::NameTranslationList( const INetURLObject& rBaseURL ):
maTransFile( rBaseURL ),
- m_HashedURL(rBaseURL.GetMainURL(INetURLObject::NO_DECODE)),
+ m_HashedURL(rBaseURL.GetMainURL(INetURLObject::DecodeMechanism::NONE)),
maTransFileName( OUString(".nametranslation.table") )
{
maTransFile.insertName( maTransFileName );
@@ -251,7 +251,7 @@ NameTranslationList::NameTranslationList( const INetURLObject& rBaseURL ):
// See examples of such a files in the samples-folder of an Office installation
try
{
- ::ucbhelper::Content aTestContent( maTransFile.GetMainURL( INetURLObject::NO_DECODE ), Reference< XCommandEnvironment >(), comphelper::getProcessComponentContext() );
+ ::ucbhelper::Content aTestContent( maTransFile.GetMainURL( INetURLObject::DecodeMechanism::NONE ), Reference< XCommandEnvironment >(), comphelper::getProcessComponentContext() );
if( aTestContent.isDocument() )
{
@@ -765,7 +765,7 @@ void ViewTabListBox_Impl::DeleteEntries()
if ( eResult != svtools::QUERYDELETE_ALL )
{
INetURLObject aObj( aURL );
- ScopedVclPtrInstance< svtools::QueryDeleteDlg_Impl > aDlg(nullptr, aObj.GetName( INetURLObject::DECODE_WITH_CHARSET ) );
+ ScopedVclPtrInstance< svtools::QueryDeleteDlg_Impl > aDlg(nullptr, aObj.GetName( INetURLObject::DecodeMechanism::WithCharset ) );
if ( sDialogPosition.getLength() )
aDlg->SetWindowState( sDialogPosition );
@@ -1412,7 +1412,7 @@ void NameTranslator_Impl::SetActualFolder( const INetURLObject& rActualFolder )
{
if( mpActFolder )
{
- if (mpActFolder->GetHashedURL() != rActualFolder.GetMainURL(INetURLObject::NO_DECODE))
+ if (mpActFolder->GetHashedURL() != rActualFolder.GetMainURL(INetURLObject::DecodeMechanism::NONE))
{
delete mpActFolder;
mpActFolder = new NameTranslationList( rActualFolder );
@@ -1514,7 +1514,7 @@ FileViewResult SvtFileView_Impl::GetFolderContent_Impl(
// prepare name translation
SetActualFolder( aFolderObj );
- FolderDescriptor aFolder( aFolderObj.GetMainURL( INetURLObject::NO_DECODE ) );
+ FolderDescriptor aFolder( aFolderObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
aGuard.clear();
return GetFolderContent_Impl( aFolder, pAsyncDescriptor, rBlackList );
@@ -2109,7 +2109,7 @@ void SvtFileView_Impl::EntryRenamed( OUString& rURL,
INetURLObject aURLObj( rURL );
aURLObj.SetName( rTitle, INetURLObject::EncodeMechanism::All );
- rURL = aURLObj.GetMainURL( INetURLObject::NO_DECODE );
+ rURL = aURLObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
(*aIt)->maTargetURL = rURL;
break;
diff --git a/svtools/source/contnr/foldertree.cxx b/svtools/source/contnr/foldertree.cxx
index 086ba62e48f0..3912759a9fd0 100644
--- a/svtools/source/contnr/foldertree.cxx
+++ b/svtools/source/contnr/foldertree.cxx
@@ -116,7 +116,7 @@ void FolderTree::SetTreePath( OUString const & sUrl )
INetURLObject aUrl( sUrl );
aUrl.setFinalSlash();
- OUString sPath = aUrl.GetURLPath( INetURLObject::DECODE_WITH_CHARSET );
+ OUString sPath = aUrl.GetURLPath( INetURLObject::DecodeMechanism::WithCharset );
SvTreeListEntry* pEntry = First();
bool end = false;
@@ -130,7 +130,7 @@ void FolderTree::SetTreePath( OUString const & sUrl )
INetURLObject aUrlObj( sNodeUrl );
aUrlObj.setFinalSlash();
- sNodeUrl = aUrlObj.GetURLPath( INetURLObject::DECODE_WITH_CHARSET );
+ sNodeUrl = aUrlObj.GetURLPath( INetURLObject::DecodeMechanism::WithCharset );
if( sPath == sNodeUrl )
{
diff --git a/svtools/source/control/breadcrumb.cxx b/svtools/source/control/breadcrumb.cxx
index 7ed6d4671ea0..fbfdae83315f 100644
--- a/svtools/source/control/breadcrumb.cxx
+++ b/svtools/source/control/breadcrumb.cxx
@@ -114,8 +114,8 @@ void Breadcrumb::SetURL( const OUString& rURL )
sHostPort += OUString::number( aURL.GetPort() );
}
- OUString sUser = aURL.GetUser( INetURLObject::NO_DECODE );
- OUString sPath = aURL.GetURLPath(INetURLObject::DECODE_WITH_CHARSET);
+ OUString sUser = aURL.GetUser( INetURLObject::DecodeMechanism::NONE );
+ OUString sPath = aURL.GetURLPath(INetURLObject::DecodeMechanism::WithCharset);
OUString sRootPath = INetURLObject::GetScheme( aURL.GetProtocol() )
+ sUser
+ ( sUser.isEmpty() ? OUString() : "@" )
diff --git a/svtools/source/control/inettbc.cxx b/svtools/source/control/inettbc.cxx
index d39bb3ab9d9e..ed73fb92674a 100644
--- a/svtools/source/control/inettbc.cxx
+++ b/svtools/source/control/inettbc.cxx
@@ -169,7 +169,7 @@ void SvtMatchContext_Impl::FillPicklist(std::vector<OUString>& rPickList)
{
seqPropertySet[nProperty].Value >>= sTitle;
aURL.SetURL( sTitle );
- rPickList.insert(rPickList.begin() + nItem, aURL.GetMainURL(INetURLObject::DECODE_WITH_CHARSET));
+ rPickList.insert(rPickList.begin() + nItem, aURL.GetMainURL(INetURLObject::DecodeMechanism::WithCharset));
break;
}
}
@@ -328,9 +328,9 @@ void SvtMatchContext_Impl::ReadFolder( const OUString& rURL,
INetURLObject aMatchObj( rMatch );
OUString aMatchName;
- if ( rURL != aMatchObj.GetMainURL( INetURLObject::NO_DECODE ) )
+ if ( rURL != aMatchObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ) )
{
- aMatchName = aMatchObj.getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET );
+ aMatchName = aMatchObj.getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::DecodeMechanism::WithCharset );
// matching is always done case insensitive, but completion will be case sensitive and case preserving
aMatchName = aMatchName.toAsciiLowerCase();
@@ -347,7 +347,7 @@ void SvtMatchContext_Impl::ReadFolder( const OUString& rURL,
try
{
- Content aCnt( aFolderObj.GetMainURL( INetURLObject::NO_DECODE ),
+ Content aCnt( aFolderObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ),
new ::ucbhelper::CommandEnvironment( uno::Reference< XInteractionHandler >(),
uno::Reference< XProgressHandler >() ),
comphelper::getProcessComponentContext() );
@@ -421,7 +421,7 @@ void SvtMatchContext_Impl::ReadFolder( const OUString& rURL,
aObj.setFinalSlash();
// get the last name of the URL
- OUString aMatch = aObj.getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET );
+ OUString aMatch = aObj.getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::DecodeMechanism::WithCharset );
OUString aInput( aText );
if ( nMatchLen )
{
@@ -444,7 +444,7 @@ void SvtMatchContext_Impl::ReadFolder( const OUString& rURL,
if ( bIsFolder )
aInput += OUStringLiteral1(aDelimiter);
- Insert( aInput, aObj.GetMainURL( INetURLObject::NO_DECODE ), true );
+ Insert( aInput, aObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ), true );
}
}
}
@@ -486,7 +486,7 @@ OUString SvtURLBox::ParseSmart( const OUString& _aText, const OUString& _aBaseUR
INetURLObject aTmp( aTemp );
if ( !aTmp.HasError() && aTmp.GetProtocol() != INetProtocol::NotValid )
- aMatch = aTmp.GetMainURL( INetURLObject::NO_DECODE );
+ aMatch = aTmp.GetMainURL( INetURLObject::DecodeMechanism::NONE );
}
else
{
@@ -503,7 +503,7 @@ OUString SvtURLBox::ParseSmart( const OUString& _aText, const OUString& _aBaseUR
// cut to first segment
OUString aTmp = INetURLObject::GetScheme( eBaseProt );
aTmp += "/";
- aTmp += aObj.getName( 0, true, INetURLObject::DECODE_WITH_CHARSET );
+ aTmp += aObj.getName( 0, true, INetURLObject::DecodeMechanism::WithCharset );
aObj.SetURL( aTmp );
aSmart = aSmart.copy(1);
@@ -525,7 +525,7 @@ OUString SvtURLBox::ParseSmart( const OUString& _aText, const OUString& _aBaseUR
// Remove it as a workaround
aTmp.removeFinalSlash();
if ( !aTmp.HasError() && aTmp.GetProtocol() != INetProtocol::NotValid )
- aMatch = aTmp.GetMainURL( INetURLObject::NO_DECODE );
+ aMatch = aTmp.GetMainURL( INetURLObject::DecodeMechanism::NONE );
}
}
else
@@ -583,7 +583,7 @@ void SvtMatchContext_Impl::doExecute()
if ( !aMatch.isEmpty() )
{
INetURLObject aURLObject( aMatch );
- OUString aMainURL( aURLObject.GetMainURL( INetURLObject::NO_DECODE ) );
+ OUString aMainURL( aURLObject.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
// Disable autocompletion for anything but the (local) file
// system (for which access is hopefully fast), as the logic of
// how SvtMatchContext_Impl is used requires this code to run to
@@ -675,7 +675,7 @@ void SvtMatchContext_Impl::doExecute()
aURLObject.removeSegment();
// scan directory and insert all matches
- ReadFolder( aURLObject.GetMainURL( INetURLObject::NO_DECODE ), aMatch, eProt == INetProtocol::NotValid );
+ ReadFolder( aURLObject.GetMainURL( INetURLObject::DecodeMechanism::NONE ), aMatch, eProt == INetProtocol::NotValid );
}
}
}
@@ -697,7 +697,7 @@ void SvtMatchContext_Impl::doExecute()
{
aCurObj.SetURL(*i);
aCurObj.SetSmartURL( aCurObj.GetURLNoPass());
- aCurMainURL = aCurObj.GetMainURL( INetURLObject::NO_DECODE );
+ aCurMainURL = aCurObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
if( eProt != INetProtocol::NotValid && aCurObj.GetProtocol() != eProt )
continue;
@@ -726,13 +726,13 @@ void SvtMatchContext_Impl::doExecute()
if ( aScheme.startsWithIgnoreAsciiCase( aText ) && aText.getLength() < aScheme.getLength() )
{
if( bFull )
- aMatch = aCurObj.GetMainURL( INetURLObject::NO_DECODE );
+ aMatch = aCurObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
else
{
aCurObj.SetMark( "" );
aCurObj.SetParam( "" );
aCurObj.SetURLPath( "" );
- aMatch = aCurObj.GetMainURL( INetURLObject::NO_DECODE );
+ aMatch = aCurObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
}
Insert( aMatch, aMatch );
@@ -745,13 +745,13 @@ void SvtMatchContext_Impl::doExecute()
if( aCurString.startsWithIgnoreAsciiCase( aText ) )
{
if( bFull )
- aMatch = aCurObj.GetMainURL( INetURLObject::NO_DECODE );
+ aMatch = aCurObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
else
{
aCurObj.SetMark( "" );
aCurObj.SetParam( "" );
aCurObj.SetURLPath( "" );
- aMatch = aCurObj.GetMainURL( INetURLObject::NO_DECODE );
+ aMatch = aCurObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
}
OUString aURL( aMatch );
@@ -949,7 +949,7 @@ void SvtURLBox::UpdatePicklistForSmartProtocol_Impl()
break;
}
- OUString aURL( aCurObj.GetMainURL( INetURLObject::DECODE_WITH_CHARSET ) );
+ OUString aURL( aCurObj.GetMainURL( INetURLObject::DecodeMechanism::WithCharset ) );
if ( !aURL.isEmpty() )
{
@@ -1177,7 +1177,7 @@ OUString SvtURLBox::GetURL()
if ( eSmartProtocol != INetProtocol::NotValid )
aTempObj.SetSmartProtocol( eSmartProtocol );
if ( aTempObj.SetSmartURL( aText ) )
- return aTempObj.GetMainURL( INetURLObject::NO_DECODE );
+ return aTempObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
else
return aText;
}
@@ -1186,7 +1186,7 @@ OUString SvtURLBox::GetURL()
{
OUString aName = ParseSmart( aText, aBaseURL );
aObj.SetURL(aName);
- OUString aURL( aObj.GetMainURL( INetURLObject::NO_DECODE ) );
+ OUString aURL( aObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
if ( aURL.isEmpty() )
// aText itself is invalid, and even together with aBaseURL, it could not
// made valid -> no chance
@@ -1205,7 +1205,7 @@ OUString SvtURLBox::GetURL()
aTitle = INetURLObject(aFileURL).getName(
INetURLObject::LAST_SEGMENT,
true,
- INetURLObject::DECODE_WITH_CHARSET );
+ INetURLObject::DecodeMechanism::WithCharset );
else
success =
UCBContentHelper::GetTitle(aURL,&aTitle);
@@ -1219,7 +1219,7 @@ OUString SvtURLBox::GetURL()
}
}
- return aObj.GetMainURL( INetURLObject::NO_DECODE );
+ return aObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
}
void SvtURLBox::DisableHistory()
diff --git a/svtools/source/dialogs/PlaceEditDialog.cxx b/svtools/source/dialogs/PlaceEditDialog.cxx
index 33e1f20cbd38..edf7b3f6f91d 100644
--- a/svtools/source/dialogs/PlaceEditDialog.cxx
+++ b/svtools/source/dialogs/PlaceEditDialog.cxx
@@ -98,9 +98,9 @@ PlaceEditDialog::PlaceEditDialog(vcl::Window* pParent, const std::shared_ptr<Pla
if ( rUrl.HasUserData( ) )
{
m_pEDUsername->SetText( INetURLObject::decode( rUrl.GetUser( ),
- INetURLObject::DECODE_WITH_CHARSET ) );
+ INetURLObject::DecodeMechanism::WithCharset ) );
m_aDetailsContainers[i]->setUsername( INetURLObject::decode( rUrl.GetUser( ),
- INetURLObject::DECODE_WITH_CHARSET ) );
+ INetURLObject::DecodeMechanism::WithCharset ) );
}
m_pLBServerType->SelectEntryPos( i );
@@ -144,7 +144,7 @@ OUString PlaceEditDialog::GetServerUrl()
if ( !sUsername.isEmpty( ) )
aUrl.SetUser( sUsername );
if ( !aUrl.HasError( ) )
- sUrl = aUrl.GetMainURL( INetURLObject::NO_DECODE );
+ sUrl = aUrl.GetMainURL( INetURLObject::DecodeMechanism::NONE );
}
return sUrl;
@@ -225,7 +225,7 @@ IMPL_LINK( PlaceEditDialog, OKHdl, Button*, /*pBtn*/, void)
{
if ( m_xCurrentDetails.get() )
{
- OUString sUrl = m_xCurrentDetails->getUrl().GetHost( INetURLObject::DECODE_WITH_CHARSET );
+ OUString sUrl = m_xCurrentDetails->getUrl().GetHost( INetURLObject::DecodeMechanism::WithCharset );
OUString sGDriveHost( GDRIVE_BASE_URL );
OUString sAlfrescoHost( ALFRESCO_CLOUD_BASE_URL );
OUString sOneDriveHost( ONEDRIVE_BASE_URL );
@@ -236,7 +236,7 @@ IMPL_LINK( PlaceEditDialog, OKHdl, Button*, /*pBtn*/, void)
{
m_pBTRepoRefresh->Click();
- sUrl = m_xCurrentDetails->getUrl().GetHost( INetURLObject::DECODE_WITH_CHARSET );
+ sUrl = m_xCurrentDetails->getUrl().GetHost( INetURLObject::DecodeMechanism::WithCharset );
INetURLObject aHostUrl( sUrl );
OUString sRepoId = aHostUrl.GetMark();
diff --git a/svtools/source/dialogs/ServerDetailsControls.cxx b/svtools/source/dialogs/ServerDetailsControls.cxx
index eccf31907481..06db0c0136c0 100644
--- a/svtools/source/dialogs/ServerDetailsControls.cxx
+++ b/svtools/source/dialogs/ServerDetailsControls.cxx
@@ -364,7 +364,7 @@ bool CmisDetailsContainer::setUrl( const INetURLObject& rUrl )
if ( bSuccess )
{
- OUString sDecodedHost = rUrl.GetHost( INetURLObject::DECODE_WITH_CHARSET );
+ OUString sDecodedHost = rUrl.GetHost( INetURLObject::DecodeMechanism::WithCharset );
INetURLObject aHostUrl( sDecodedHost );
m_sBinding = aHostUrl.GetURLNoMark( );
m_sRepoId = aHostUrl.GetMark( );
@@ -461,7 +461,7 @@ IMPL_LINK_NOARG( CmisDetailsContainer, RefreshReposHdl, Button*, void )
{
OUString sURL = xAccess->queryContentIdentifierString( );
INetURLObject aURL( sURL );
- OUString sId = aURL.GetURLPath( INetURLObject::DECODE_WITH_CHARSET );
+ OUString sId = aURL.GetURLPath( INetURLObject::DecodeMechanism::WithCharset );
sId = sId.copy( 1 );
m_aRepoIds.push_back( sId );
diff --git a/svtools/source/dialogs/addresstemplate.cxx b/svtools/source/dialogs/addresstemplate.cxx
index 4aed39dd7517..a7c805194983 100644
--- a/svtools/source/dialogs/addresstemplate.cxx
+++ b/svtools/source/dialogs/addresstemplate.cxx
@@ -685,7 +685,7 @@ void AssignmentPersistentData::ImplCommit()
INetURLObject aURL( sName );
if( aURL.GetProtocol() != INetProtocol::NotValid )
{
- OFileNotation aFileNotation( aURL.GetMainURL( INetURLObject::NO_DECODE ) );
+ OFileNotation aFileNotation( aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
sName = aFileNotation.get(OFileNotation::N_SYSTEM);
}
@@ -1179,7 +1179,7 @@ void AssignmentPersistentData::ImplCommit()
INetURLObject aURL( sName );
if( aURL.GetProtocol() != INetProtocol::NotValid )
{
- OFileNotation aFileNotation( aURL.GetMainURL( INetURLObject::NO_DECODE ) );
+ OFileNotation aFileNotation( aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
sName = aFileNotation.get(OFileNotation::N_SYSTEM);
}
m_pDatasource->InsertEntry(sName);
diff --git a/svtools/source/misc/imagemgr.cxx b/svtools/source/misc/imagemgr.cxx
index f4ff92462036..6405b68c85c1 100644
--- a/svtools/source/misc/imagemgr.cxx
+++ b/svtools/source/misc/imagemgr.cxx
@@ -197,7 +197,7 @@ static SvtFactory2ExtensionMapping_Impl const Fac2ExtMap_Impl[] =
static OUString GetImageExtensionByFactory_Impl( const OUString& rURL )
{
INetURLObject aObj( rURL );
- OUString aPath = aObj.GetURLPath( INetURLObject::NO_DECODE );
+ OUString aPath = aObj.GetURLPath( INetURLObject::DecodeMechanism::NONE );
OUString aExtension;
if ( !aPath.isEmpty() )
@@ -352,7 +352,7 @@ static sal_uInt16 GetFolderImageId_Impl( const OUString& rURL )
static sal_uInt16 GetImageId_Impl( const INetURLObject& rObject, bool bDetectFolder )
{
- OUString aExt, sURL = rObject.GetMainURL( INetURLObject::NO_DECODE );
+ OUString aExt, sURL = rObject.GetMainURL( INetURLObject::DecodeMechanism::NONE );
sal_uInt16 nImage = IMG_FILE;
if ( rObject.GetProtocol() == INetProtocol::PrivSoffice )
@@ -525,7 +525,7 @@ static Image GetImageFromList_Impl( sal_uInt16 nImageId, bool bBig )
OUString SvFileInformationManager::GetDescription_Impl( const INetURLObject& rObject, bool bDetectFolder )
{
OUString sExtension(rObject.getExtension());
- OUString sDescription, sURL( rObject.GetMainURL( INetURLObject::NO_DECODE ) );
+ OUString sDescription, sURL( rObject.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
sal_uInt16 nResId = 0;
bool bShowExt = false, bOnlyFile = false;
bool bFolder = bDetectFolder && CONTENT_HELPER::IsFolder( sURL );
diff --git a/svtools/source/misc/imap.cxx b/svtools/source/misc/imap.cxx
index a5f31be9b7f8..3a0b1533bbf2 100644
--- a/svtools/source/misc/imap.cxx
+++ b/svtools/source/misc/imap.cxx
@@ -109,7 +109,7 @@ void IMapObject::Read( SvStream& rIStm, const OUString& rBaseURL )
aTarget = read_uInt16_lenPrefixed_uInt8s_ToOUString(rIStm, nTextEncoding);
// make URL absolute
- aURL = URIHelper::SmartRel2Abs( INetURLObject(rBaseURL), aURL, URIHelper::GetMaybeFileHdl(), true, false, INetURLObject::EncodeMechanism::WasEncoded, INetURLObject::DECODE_UNAMBIGUOUS );
+ aURL = URIHelper::SmartRel2Abs( INetURLObject(rBaseURL), aURL, URIHelper::GetMaybeFileHdl(), true, false, INetURLObject::EncodeMechanism::WasEncoded, INetURLObject::DecodeMechanism::Unambiguous );
std::unique_ptr<IMapCompat> pCompat(new IMapCompat( rIStm, StreamMode::READ ));
ReadIMapObject( rIStm );
diff --git a/svtools/source/misc/templatefoldercache.cxx b/svtools/source/misc/templatefoldercache.cxx
index 6979be1adad5..e757511778f6 100644
--- a/svtools/source/misc/templatefoldercache.cxx
+++ b/svtools/source/misc/templatefoldercache.cxx
@@ -124,7 +124,7 @@ namespace svt
explicit TemplateContent( const INetURLObject& _rURL );
// attribute access
- inline OUString getURL( ) const { return m_aURL.GetMainURL( INetURLObject::DECODE_TO_IURI ); }
+ inline OUString getURL( ) const { return m_aURL.GetMainURL( INetURLObject::DecodeMechanism::ToIUri ); }
inline void setModDate( const util::DateTime& _rDate ) { m_aLastModified = _rDate; }
inline const util::DateTime& getModDate( ) const { return m_aLastModified; }
@@ -527,7 +527,7 @@ namespace svt
osl::FileBase::getFileURLFromSystemPath( _rPath, sURL );
aParser.SetURL( sURL );
}
- return aParser.GetMainURL( INetURLObject::DECODE_TO_IURI );
+ return aParser.GetMainURL( INetURLObject::DecodeMechanism::ToIUri );
}
@@ -719,7 +719,7 @@ namespace svt
aStorageURL.Append( ".templdir.cache" );
// open the stream
- m_pCacheStream = UcbStreamHelper::CreateStream( aStorageURL.GetMainURL( INetURLObject::DECODE_TO_IURI ),
+ m_pCacheStream = UcbStreamHelper::CreateStream( aStorageURL.GetMainURL( INetURLObject::DecodeMechanism::ToIUri ),
_bForRead ? StreamMode::READ | StreamMode::NOCREATE : StreamMode::WRITE | StreamMode::TRUNC );
DBG_ASSERT( m_pCacheStream, "TemplateFolderCacheImpl::openCacheStream: could not open/create the cache stream!" );
if ( m_pCacheStream && m_pCacheStream->GetErrorCode() )
diff --git a/svtools/source/misc/transfer.cxx b/svtools/source/misc/transfer.cxx
index ed84be3ecdc6..4cce44721c3e 100644
--- a/svtools/source/misc/transfer.cxx
+++ b/svtools/source/misc/transfer.cxx
@@ -1888,7 +1888,7 @@ bool TransferableDataHelper::GetINetBookmark( const css::datatransfer::DataFlavo
if( ( aDesc.getLength() > 4 ) && aDesc.copy(aDesc.getLength() - 4).equalsIgnoreAsciiCase(".URL") )
{
- std::unique_ptr<SvStream> pStream(::utl::UcbStreamHelper::CreateStream( INetURLObject( OStringToOUString(aDesc, eTextEncoding) ).GetMainURL( INetURLObject::NO_DECODE ),
+ std::unique_ptr<SvStream> pStream(::utl::UcbStreamHelper::CreateStream( INetURLObject( OStringToOUString(aDesc, eTextEncoding) ).GetMainURL( INetURLObject::DecodeMechanism::NONE ),
StreamMode::STD_READ ));
if( !pStream || pStream->GetError() )
diff --git a/svx/source/core/graphichelper.cxx b/svx/source/core/graphichelper.cxx
index 5be57e8a8c2a..742e8cd0be7d 100644
--- a/svx/source/core/graphichelper.cxx
+++ b/svx/source/core/graphichelper.cxx
@@ -110,7 +110,7 @@ OUString GraphicHelper::ExportGraphic( const Graphic& rGraphic, const OUString&
// fish out the graphic's name
aDialogHelper.SetTitle( SVX_RESSTR(RID_SVXSTR_EXPORT_GRAPHIC_TITLE));
- aDialogHelper.SetDisplayDirectory( aPath.GetMainURL(INetURLObject::DECODE_TO_IURI) );
+ aDialogHelper.SetDisplayDirectory( aPath.GetMainURL(INetURLObject::DecodeMechanism::ToIUri) );
INetURLObject aURL;
aURL.SetSmartURL( rGraphicName );
aDialogHelper.SetFileName( aURL.GetName() );
@@ -221,7 +221,7 @@ void GraphicHelper::SaveShapeAsGraphic( const Reference< drawing::XShape >& xSha
INetURLObject aPath;
aPath.SetSmartURL( sGraphicPath );
- xFilePicker->setDisplayDirectory( aPath.GetMainURL(INetURLObject::DECODE_TO_IURI) );
+ xFilePicker->setDisplayDirectory( aPath.GetMainURL(INetURLObject::DecodeMechanism::ToIUri) );
// populate filter dialog filter list and select default filter to match graphic mime type
diff --git a/svx/source/dialog/docrecovery.cxx b/svx/source/dialog/docrecovery.cxx
index 051b23356c97..f2e81f40e1cc 100644
--- a/svx/source/dialog/docrecovery.cxx
+++ b/svx/source/dialog/docrecovery.cxx
@@ -417,7 +417,7 @@ void SAL_CALL RecoveryCore::statusChanged(const css::frame::FeatureStateEvent& a
// If there is a file URL, parse out the filename part as the display name.
INetURLObject aOrgURL(aNew.OrgURL);
aNew.DisplayName = aOrgURL.getName(INetURLObject::LAST_SEGMENT, true,
- INetURLObject::DECODE_WITH_CHARSET);
+ INetURLObject::DecodeMechanism::WithCharset);
}
// search for already existing items and update her nState value ...
@@ -1236,7 +1236,7 @@ BrokenRecoveryDialog::BrokenRecoveryDialog(vcl::Window* pParent ,
m_sSavePath = SvtPathOptions().GetWorkPath();
INetURLObject aObj( m_sSavePath );
OUString sPath;
- osl::FileBase::getSystemPathFromFileURL(aObj.GetMainURL( INetURLObject::NO_DECODE ), sPath);
+ osl::FileBase::getSystemPathFromFileURL(aObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ), sPath);
m_pSaveDirED->SetText( sPath );
impl_refresh();
@@ -1337,7 +1337,7 @@ void BrokenRecoveryDialog::impl_askForSavePath()
css::ui::dialogs::FolderPicker::create( m_pCore->getComponentContext() );
INetURLObject aURL(m_sSavePath, INetProtocol::File);
- xFolderPicker->setDisplayDirectory(aURL.GetMainURL(INetURLObject::NO_DECODE));
+ xFolderPicker->setDisplayDirectory(aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE));
short nRet = xFolderPicker->execute();
if (nRet == css::ui::dialogs::ExecutableDialogResults::OK)
{
diff --git a/svx/source/dialog/imapdlg.cxx b/svx/source/dialog/imapdlg.cxx
index 49c124c27f9a..37eb9297413a 100644
--- a/svx/source/dialog/imapdlg.cxx
+++ b/svx/source/dialog/imapdlg.cxx
@@ -461,7 +461,7 @@ void SvxIMapDlg::DoOpen()
{
INetURLObject aURL( aDlg.GetPath() );
DBG_ASSERT( aURL.GetProtocol() != INetProtocol::NotValid, "invalid URL" );
- std::unique_ptr<SvStream> pIStm(::utl::UcbStreamHelper::CreateStream( aURL.GetMainURL( INetURLObject::NO_DECODE ), StreamMode::READ ));
+ std::unique_ptr<SvStream> pIStm(::utl::UcbStreamHelper::CreateStream( aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), StreamMode::READ ));
if( pIStm )
{
@@ -536,7 +536,7 @@ bool SvxIMapDlg::DoSave()
if( aURL.getExtension().isEmpty() )
aURL.setExtension( aExt );
- std::unique_ptr<SvStream> pOStm(::utl::UcbStreamHelper::CreateStream( aURL.GetMainURL( INetURLObject::NO_DECODE ), StreamMode::WRITE | StreamMode::TRUNC ));
+ std::unique_ptr<SvStream> pOStm(::utl::UcbStreamHelper::CreateStream( aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), StreamMode::WRITE | StreamMode::TRUNC ));
if( pOStm )
{
pIMapWnd->GetImageMap().Write( *pOStm, nFormat, "" );
@@ -699,7 +699,7 @@ IMPL_LINK_NOARG(SvxIMapDlg, URLLoseFocusHdl, Control&, void)
OUString aBase = GetBindings().GetDispatcher()->GetFrame()->GetObjectShell()->GetMedium()->GetBaseURL();
aNewInfo.aMarkURL = ::URIHelper::SmartRel2Abs( INetURLObject(aBase), aURLText, URIHelper::GetMaybeFileHdl(), true, false,
INetURLObject::EncodeMechanism::WasEncoded,
- INetURLObject::DECODE_UNAMBIGUOUS );
+ INetURLObject::DecodeMechanism::Unambiguous );
}
else
aNewInfo.aMarkURL = aURLText;
diff --git a/svx/source/dialog/imapwnd.cxx b/svx/source/dialog/imapwnd.cxx
index d74fdee9d76b..ed0ba4d929de 100644
--- a/svx/source/dialog/imapwnd.cxx
+++ b/svx/source/dialog/imapwnd.cxx
@@ -688,7 +688,7 @@ void IMapWindow::DoPropertyDialog()
{
INetURLObject aObj( aURLText, INetProtocol::File );
DBG_ASSERT( aObj.GetProtocol() != INetProtocol::NotValid, "Invalid URL" );
- pIMapObj->SetURL( aObj.GetMainURL( INetURLObject::NO_DECODE ) );
+ pIMapObj->SetURL( aObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
}
else
pIMapObj->SetURL( aURLText );
diff --git a/svx/source/form/databaselocationinput.cxx b/svx/source/form/databaselocationinput.cxx
index c557751d10e3..64419352961e 100644
--- a/svx/source/form/databaselocationinput.cxx
+++ b/svx/source/form/databaselocationinput.cxx
@@ -242,7 +242,7 @@ namespace svx
INetURLObject aURL( aFileDlg.GetPath() );
if( aURL.GetProtocol() != INetProtocol::NotValid )
{
- ::svt::OFileNotation aFileNotation( aURL.GetMainURL( INetURLObject::NO_DECODE ) );
+ ::svt::OFileNotation aFileNotation( aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
m_rLocationInput.SetText( aFileNotation.get( ::svt::OFileNotation::N_SYSTEM ) );
m_rLocationInput.GetModifyHdl().Call( m_rLocationInput );
// the dialog already checked for the file's existence, so we don't need to, again
diff --git a/svx/source/form/datanavi.cxx b/svx/source/form/datanavi.cxx
index e6811cc5866c..7a582b7396db 100644
--- a/svx/source/form/datanavi.cxx
+++ b/svx/source/form/datanavi.cxx
@@ -3396,7 +3396,7 @@ namespace svxform
OUString sFilterName( "XML" );
aDlg.AddFilter( sFilterName, "*.xml" );
aDlg.SetCurrentFilter( sFilterName );
- aDlg.SetDisplayDirectory( aFile.GetMainURL( INetURLObject::NO_DECODE ) );
+ aDlg.SetDisplayDirectory( aFile.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
if( aDlg.Execute() == ERRCODE_NONE )
m_pURLED->SetText( aDlg.GetPath() );
diff --git a/svx/source/form/fmpage.cxx b/svx/source/form/fmpage.cxx
index 4efb98c7e6f3..0027c7a40355 100644
--- a/svx/source/form/fmpage.cxx
+++ b/svx/source/form/fmpage.cxx
@@ -191,7 +191,7 @@ bool FmFormPage::RequestHelp( vcl::Window* pWindow, SdrView* pView,
for (const INetProtocol& i : s_aQuickHelpSupported)
if (i == aProtocol)
{
- aHelpText = INetURLObject::decode(aUrl.GetURLNoPass(), INetURLObject::DECODE_UNAMBIGUOUS);
+ aHelpText = INetURLObject::decode(aUrl.GetURLNoPass(), INetURLObject::DecodeMechanism::Unambiguous);
break;
}
}
diff --git a/svx/source/gallery2/galbrws1.cxx b/svx/source/gallery2/galbrws1.cxx
index dbd09be8f738..c995723ce6e8 100644
--- a/svx/source/gallery2/galbrws1.cxx
+++ b/svx/source/gallery2/galbrws1.cxx
@@ -198,7 +198,7 @@ void GalleryBrowser1::ImplFillExchangeData( const GalleryTheme* pThm, ExchangeDa
try
{
- ::ucbhelper::Content aCnt( pThm->GetThmURL().GetMainURL( INetURLObject::NO_DECODE ), uno::Reference< ucb::XCommandEnvironment >(), comphelper::getProcessComponentContext() );
+ ::ucbhelper::Content aCnt( pThm->GetThmURL().GetMainURL( INetURLObject::DecodeMechanism::NONE ), uno::Reference< ucb::XCommandEnvironment >(), comphelper::getProcessComponentContext() );
util::DateTime aDateTimeModified;
DateTime aDateTime( DateTime::EMPTY );
diff --git a/svx/source/gallery2/galbrws2.cxx b/svx/source/gallery2/galbrws2.cxx
index 2782d82e0fe3..df1ce017507e 100644
--- a/svx/source/gallery2/galbrws2.cxx
+++ b/svx/source/gallery2/galbrws2.cxx
@@ -344,7 +344,7 @@ IMPL_LINK( GalleryThemePopup, BackgroundMenuSelectHdl, Menu*, pMenu, bool )
return false;
sal_uInt16 nPos( pMenu->GetCurItemId() - 1 );
- OUString aURL( mpBrowser->GetURL().GetMainURL( INetURLObject::NO_DECODE ) );
+ OUString aURL( mpBrowser->GetURL().GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
OUString aFilterName( mpBrowser->GetFilterName() );
css::uno::Sequence< css::beans::PropertyValue > aArgs( 6 );
@@ -1221,11 +1221,11 @@ OUString GalleryBrowser2::GetItemText( const GalleryTheme& rTheme, const SgaObje
OUString aTitle( rObj.GetTitle() );
if( aTitle.isEmpty() )
- aTitle = aURL.getBase( INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_UNAMBIGUOUS );
+ aTitle = aURL.getBase( INetURLObject::LAST_SEGMENT, true, INetURLObject::DecodeMechanism::Unambiguous );
if( aTitle.isEmpty() )
{
- aTitle = aURL.GetMainURL( INetURLObject::DECODE_UNAMBIGUOUS );
+ aTitle = aURL.GetMainURL( INetURLObject::DecodeMechanism::Unambiguous );
aTitle = aTitle.getToken( comphelper::string::getTokenCount(aTitle, '/') - 1, '/' );
}
diff --git a/svx/source/gallery2/galctrl.cxx b/svx/source/gallery2/galctrl.cxx
index d2021087d852..0bd9ba3aa44f 100644
--- a/svx/source/gallery2/galctrl.cxx
+++ b/svx/source/gallery2/galctrl.cxx
@@ -59,7 +59,7 @@ bool GalleryPreview::SetGraphic( const INetURLObject& _aURL )
{
bool bRet = true;
Graphic aGraphic;
- if( ::avmedia::MediaWindow::isMediaURL( _aURL.GetMainURL( INetURLObject::DECODE_UNAMBIGUOUS ), "" ) )
+ if( ::avmedia::MediaWindow::isMediaURL( _aURL.GetMainURL( INetURLObject::DecodeMechanism::Unambiguous ), "" ) )
{
aGraphic = BitmapEx( GAL_RES( RID_SVXBMP_GALLERY_MEDIA ) );
}
@@ -244,7 +244,7 @@ void GalleryPreview::PreviewMedia( const INetURLObject& rURL )
}
if (pFloater)
- pFloater->setURL( rURL.GetMainURL( INetURLObject::DECODE_UNAMBIGUOUS ), "", true );
+ pFloater->setURL( rURL.GetMainURL( INetURLObject::DecodeMechanism::Unambiguous ), "", true );
}
}
diff --git a/svx/source/gallery2/galexpl.cxx b/svx/source/gallery2/galexpl.cxx
index 672c0250080d..682d14e748c6 100644
--- a/svx/source/gallery2/galexpl.cxx
+++ b/svx/source/gallery2/galexpl.cxx
@@ -62,7 +62,7 @@ bool GalleryExplorer::FillObjList( const OUString& rThemeName, std::vector<OUStr
if( pTheme )
{
for( sal_uInt32 i = 0, nCount = pTheme->GetObjectCount(); i < nCount; i++ )
- rObjList.push_back( pTheme->GetObjectURL( i ).GetMainURL( INetURLObject::NO_DECODE ) );
+ rObjList.push_back( pTheme->GetObjectURL( i ).GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
pGal->ReleaseTheme( pTheme, aListener );
}
diff --git a/svx/source/gallery2/galini.cxx b/svx/source/gallery2/galini.cxx
index e0d1a786206c..9708e917a630 100644
--- a/svx/source/gallery2/galini.cxx
+++ b/svx/source/gallery2/galini.cxx
@@ -28,7 +28,7 @@
OUString GalleryThemeEntry::ReadStrFromIni(const OUString &aKeyName )
{
std::unique_ptr<SvStream> pStrm(::utl::UcbStreamHelper::CreateStream(
- GetStrURL().GetMainURL( INetURLObject::NO_DECODE ),
+ GetStrURL().GetMainURL( INetURLObject::DecodeMechanism::NONE ),
StreamMode::READ ));
const LanguageTag &rLangTag = Application::GetSettings().GetUILanguageTag();
diff --git a/svx/source/gallery2/gallery1.cxx b/svx/source/gallery2/gallery1.cxx
index f623c2f9170f..69a380e623e2 100644
--- a/svx/source/gallery2/gallery1.cxx
+++ b/svx/source/gallery2/gallery1.cxx
@@ -232,7 +232,7 @@ void Gallery::ImplLoadSubDirs( const INetURLObject& rBaseURL, bool& rbDirIsReadO
try
{
uno::Reference< ucb::XCommandEnvironment > xEnv;
- ::ucbhelper::Content aCnt( rBaseURL.GetMainURL( INetURLObject::NO_DECODE ), xEnv, comphelper::getProcessComponentContext() );
+ ::ucbhelper::Content aCnt( rBaseURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), xEnv, comphelper::getProcessComponentContext() );
uno::Sequence<OUString> aProps { "Url" };
@@ -254,7 +254,7 @@ void Gallery::ImplLoadSubDirs( const INetURLObject& rBaseURL, bool& rbDirIsReadO
OUString aTestFile( "cdefghij.klm" );
aTestURL.Append( aTestFile );
- std::unique_ptr<SvStream> pTestStm(::utl::UcbStreamHelper::CreateStream( aTestURL.GetMainURL( INetURLObject::NO_DECODE ), StreamMode::WRITE ));
+ std::unique_ptr<SvStream> pTestStm(::utl::UcbStreamHelper::CreateStream( aTestURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), StreamMode::WRITE ));
if( pTestStm )
{
@@ -300,9 +300,9 @@ void Gallery::ImplLoadSubDirs( const INetURLObject& rBaseURL, bool& rbDirIsReadO
try
{
- ::ucbhelper::Content aThmCnt( aThmURL.GetMainURL( INetURLObject::NO_DECODE ), xEnv, comphelper::getProcessComponentContext() );
- ::ucbhelper::Content aSdgCnt( aSdgURL.GetMainURL( INetURLObject::NO_DECODE ), xEnv, comphelper::getProcessComponentContext() );
- ::ucbhelper::Content aSdvCnt( aSdvURL.GetMainURL( INetURLObject::NO_DECODE ), xEnv, comphelper::getProcessComponentContext() );
+ ::ucbhelper::Content aThmCnt( aThmURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), xEnv, comphelper::getProcessComponentContext() );
+ ::ucbhelper::Content aSdgCnt( aSdgURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), xEnv, comphelper::getProcessComponentContext() );
+ ::ucbhelper::Content aSdvCnt( aSdvURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), xEnv, comphelper::getProcessComponentContext() );
try
{
@@ -607,7 +607,7 @@ GalleryTheme* Gallery::ImplGetCachedTheme(const GalleryThemeEntry* pThemeEntry)
if( FileExists( aURL ) )
{
- std::unique_ptr<SvStream> pIStm(::utl::UcbStreamHelper::CreateStream( aURL.GetMainURL( INetURLObject::NO_DECODE ), StreamMode::READ ));
+ std::unique_ptr<SvStream> pIStm(::utl::UcbStreamHelper::CreateStream( aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), StreamMode::READ ));
if( pIStm )
{
diff --git a/svx/source/gallery2/galmisc.cxx b/svx/source/gallery2/galmisc.cxx
index 86b00d8d4bcb..765ad392030b 100644
--- a/svx/source/gallery2/galmisc.cxx
+++ b/svx/source/gallery2/galmisc.cxx
@@ -88,7 +88,7 @@ GalleryGraphicImportRet GalleryGraphicImport( const INetURLObject& rURL, Graphic
OUString& rFilterName, bool bShowProgress )
{
GalleryGraphicImportRet nRet = GalleryGraphicImportRet::IMPORT_NONE;
- SfxMedium aMedium( rURL.GetMainURL( INetURLObject::NO_DECODE ), StreamMode::READ );
+ SfxMedium aMedium( rURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), StreamMode::READ );
aMedium.Download();
@@ -100,7 +100,7 @@ GalleryGraphicImportRet GalleryGraphicImport( const INetURLObject& rURL, Graphic
std::unique_ptr<GalleryProgress> pProgress(bShowProgress ? new GalleryProgress( &rGraphicFilter ) : nullptr);
sal_uInt16 nFormat;
- if( !rGraphicFilter.ImportGraphic( rGraphic, rURL.GetMainURL( INetURLObject::NO_DECODE ), *pIStm, GRFILTER_FORMAT_DONTKNOW, &nFormat ) )
+ if( !rGraphicFilter.ImportGraphic( rGraphic, rURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), *pIStm, GRFILTER_FORMAT_DONTKNOW, &nFormat ) )
{
rFilterName = rGraphicFilter.GetImportFormatName( nFormat );
nRet = GalleryGraphicImportRet::IMPORT_FILE;
@@ -188,7 +188,7 @@ bool CreateIMapGraphic( const FmFormModel& rModel, Graphic& rGraphic, ImageMap&
OUString GetReducedString( const INetURLObject& rURL, sal_Int32 nMaxLen )
{
- OUString aReduced( rURL.GetMainURL( INetURLObject::DECODE_UNAMBIGUOUS ) );
+ OUString aReduced( rURL.GetMainURL( INetURLObject::DecodeMechanism::Unambiguous ) );
aReduced = aReduced.getToken( comphelper::string::getTokenCount(aReduced, '/') - 1, '/' );
@@ -225,9 +225,9 @@ OUString GetSvDrawStreamNameFromURL( const INetURLObject& rSvDrawObjURL )
OUString aRet;
if( rSvDrawObjURL.GetProtocol() == INetProtocol::PrivSoffice &&
- comphelper::string::getTokenCount(rSvDrawObjURL.GetMainURL( INetURLObject::NO_DECODE ), '/') == 3 )
+ comphelper::string::getTokenCount(rSvDrawObjURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), '/') == 3 )
{
- aRet = rSvDrawObjURL.GetMainURL( INetURLObject::NO_DECODE ).getToken( 2, '/' );
+ aRet = rSvDrawObjURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ).getToken( 2, '/' );
}
return aRet;
@@ -241,7 +241,7 @@ bool FileExists( const INetURLObject& rURL )
{
try
{
- ::ucbhelper::Content aCnt( rURL.GetMainURL( INetURLObject::NO_DECODE ), uno::Reference< ucb::XCommandEnvironment >(), comphelper::getProcessComponentContext() );
+ ::ucbhelper::Content aCnt( rURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), uno::Reference< ucb::XCommandEnvironment >(), comphelper::getProcessComponentContext() );
OUString aTitle;
aCnt.getPropertyValue("Title") >>= aTitle;
@@ -272,14 +272,14 @@ bool CreateDir( const INetURLObject& rURL )
uno::Reference< ucb::XCommandEnvironment > aCmdEnv;
INetURLObject aParentURL( rURL );
aParentURL.removeSegment();
- ::ucbhelper::Content aParent( aParentURL.GetMainURL( INetURLObject::NO_DECODE ), aCmdEnv, comphelper::getProcessComponentContext() );
+ ::ucbhelper::Content aParent( aParentURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), aCmdEnv, comphelper::getProcessComponentContext() );
uno::Sequence< OUString > aProps( 1 );
uno::Sequence< uno::Any > aValues( 1 );
aProps[0] = "Title";
aValues[0] = uno::makeAny( OUString( rURL.GetName() ) );
- ::ucbhelper::Content aContent( rURL.GetMainURL( INetURLObject::NO_DECODE ), aCmdEnv, comphelper::getProcessComponentContext() );
+ ::ucbhelper::Content aContent( rURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), aCmdEnv, comphelper::getProcessComponentContext() );
bRet = aParent.insertNewContent( "application/vnd.sun.staroffice.fsys-folder", aProps, aValues, aContent );
}
catch( const ucb::ContentCreationException& )
@@ -302,10 +302,10 @@ bool CopyFile( const INetURLObject& rSrcURL, const INetURLObject& rDstURL )
try
{
- ::ucbhelper::Content aDestPath( rDstURL.GetMainURL( INetURLObject::NO_DECODE ), uno::Reference< ucb::XCommandEnvironment >(), comphelper::getProcessComponentContext() );
+ ::ucbhelper::Content aDestPath( rDstURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), uno::Reference< ucb::XCommandEnvironment >(), comphelper::getProcessComponentContext() );
aDestPath.executeCommand( "transfer",
- uno::makeAny( ucb::TransferInfo( false, rSrcURL.GetMainURL( INetURLObject::NO_DECODE ),
+ uno::makeAny( ucb::TransferInfo( false, rSrcURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ),
rDstURL.GetName(), ucb::NameClash::OVERWRITE ) ) );
bRet = true;
}
@@ -330,7 +330,7 @@ bool KillFile( const INetURLObject& rURL )
{
try
{
- ::ucbhelper::Content aCnt( rURL.GetMainURL( INetURLObject::NO_DECODE ), uno::Reference< ucb::XCommandEnvironment >(), comphelper::getProcessComponentContext() );
+ ::ucbhelper::Content aCnt( rURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), uno::Reference< ucb::XCommandEnvironment >(), comphelper::getProcessComponentContext() );
aCnt.executeCommand( "delete", uno::makeAny( true ) );
}
catch( const ucb::ContentCreationException& )
@@ -523,7 +523,7 @@ bool GalleryTransferable::GetData( const datatransfer::DataFlavor& rFlavor, cons
}
else if( ( SotClipboardFormatId::SIMPLE_FILE == nFormat ) && mpURL )
{
- bRet = SetString( mpURL->GetMainURL( INetURLObject::NO_DECODE ), rFlavor );
+ bRet = SetString( mpURL->GetMainURL( INetURLObject::DecodeMechanism::NONE ), rFlavor );
}
else if( ( SotClipboardFormatId::SVXB == nFormat ) && mpGraphicObject )
{
diff --git a/svx/source/gallery2/galobj.cxx b/svx/source/gallery2/galobj.cxx
index 270ad42bba19..2b1c2d9a57bb 100644
--- a/svx/source/gallery2/galobj.cxx
+++ b/svx/source/gallery2/galobj.cxx
@@ -190,7 +190,7 @@ void SgaObject::WriteData( SvStream& rOut, const OUString& rDestDir ) const
else
WriteGDIMetaFile( rOut, aThumbMtf );
- OUString aURLWithoutDestDir = aURL.GetMainURL( INetURLObject::NO_DECODE );
+ OUString aURLWithoutDestDir = aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE );
aURLWithoutDestDir = aURLWithoutDestDir.replaceFirst(rDestDir, "");
write_uInt16_lenPrefixed_uInt8s_FromOUString(rOut, aURLWithoutDestDir, RTL_TEXTENCODING_UTF8);
}
diff --git a/svx/source/gallery2/galtheme.cxx b/svx/source/gallery2/galtheme.cxx
index 64d1c8f15ce9..02ea64cd7a2a 100644
--- a/svx/source/gallery2/galtheme.cxx
+++ b/svx/source/gallery2/galtheme.cxx
@@ -91,22 +91,22 @@ void GalleryTheme::ImplCreateSvDrawStorage()
{
try
{
- aSvDrawStorageRef = new SotStorage( false, GetSdvURL().GetMainURL( INetURLObject::NO_DECODE ), pThm->IsReadOnly() ? StreamMode::READ : StreamMode::STD_READWRITE );
+ aSvDrawStorageRef = new SotStorage( false, GetSdvURL().GetMainURL( INetURLObject::DecodeMechanism::NONE ), pThm->IsReadOnly() ? StreamMode::READ : StreamMode::STD_READWRITE );
// #i50423# ReadOnly may not been set though the file can't be written (because of security reasons)
if ( ( aSvDrawStorageRef->GetError() != ERRCODE_NONE ) && !pThm->IsReadOnly() )
- aSvDrawStorageRef = new SotStorage( false, GetSdvURL().GetMainURL( INetURLObject::NO_DECODE ), StreamMode::READ );
+ aSvDrawStorageRef = new SotStorage( false, GetSdvURL().GetMainURL( INetURLObject::DecodeMechanism::NONE ), StreamMode::READ );
}
catch (const css::ucb::ContentCreationException& e)
{
SAL_WARN("svx", "failed to open: "
- << GetSdvURL().GetMainURL(INetURLObject::NO_DECODE)
+ << GetSdvURL().GetMainURL(INetURLObject::DecodeMechanism::NONE)
<< "due to : " << e.Message);
}
}
bool GalleryTheme::ImplWriteSgaObject( const SgaObject& rObj, size_t nPos, GalleryObject* pExistentEntry )
{
- std::unique_ptr<SvStream> pOStm(::utl::UcbStreamHelper::CreateStream( GetSdgURL().GetMainURL( INetURLObject::NO_DECODE ), StreamMode::WRITE ));
+ std::unique_ptr<SvStream> pOStm(::utl::UcbStreamHelper::CreateStream( GetSdgURL().GetMainURL( INetURLObject::DecodeMechanism::NONE ), StreamMode::WRITE ));
bool bRet = false;
if( pOStm )
@@ -150,7 +150,7 @@ SgaObject* GalleryTheme::ImplReadSgaObject( GalleryObject* pEntry )
if( pEntry )
{
- std::unique_ptr<SvStream> pIStm(::utl::UcbStreamHelper::CreateStream( GetSdgURL().GetMainURL( INetURLObject::NO_DECODE ), StreamMode::READ ));
+ std::unique_ptr<SvStream> pIStm(::utl::UcbStreamHelper::CreateStream( GetSdgURL().GetMainURL( INetURLObject::DecodeMechanism::NONE ), StreamMode::READ ));
if( pIStm )
{
@@ -202,9 +202,9 @@ void GalleryTheme::ImplWrite()
if( FileExists( aPathURL ) || CreateDir( aPathURL ) )
{
#ifdef UNX
- std::unique_ptr<SvStream> pOStm(::utl::UcbStreamHelper::CreateStream( GetThmURL().GetMainURL( INetURLObject::NO_DECODE ), StreamMode::WRITE | StreamMode::COPY_ON_SYMLINK | StreamMode::TRUNC ));
+ std::unique_ptr<SvStream> pOStm(::utl::UcbStreamHelper::CreateStream( GetThmURL().GetMainURL( INetURLObject::DecodeMechanism::NONE ), StreamMode::WRITE | StreamMode::COPY_ON_SYMLINK | StreamMode::TRUNC ));
#else
- std::unique_ptr<SvStream> pOStm(::utl::UcbStreamHelper::CreateStream( GetThmURL().GetMainURL( INetURLObject::NO_DECODE ), StreamMode::WRITE | StreamMode::TRUNC ));
+ std::unique_ptr<SvStream> pOStm(::utl::UcbStreamHelper::CreateStream( GetThmURL().GetMainURL( INetURLObject::DecodeMechanism::NONE ), StreamMode::WRITE | StreamMode::TRUNC ));
#endif
if( pOStm )
@@ -253,7 +253,7 @@ INetURLObject GalleryTheme::ImplCreateUniqueURL( SgaObjKind eObjKind, ConvertDat
// read next possible number
if( FileExists( aInfoFileURL ) )
{
- std::unique_ptr<SvStream> pIStm(::utl::UcbStreamHelper::CreateStream( aInfoFileURL.GetMainURL( INetURLObject::NO_DECODE ), StreamMode::READ ));
+ std::unique_ptr<SvStream> pIStm(::utl::UcbStreamHelper::CreateStream( aInfoFileURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), StreamMode::READ ));
if( pIStm )
{
@@ -318,7 +318,7 @@ INetURLObject GalleryTheme::ImplCreateUniqueURL( SgaObjKind eObjKind, ConvertDat
while( bExists );
// write updated number
- std::unique_ptr<SvStream> pOStm(::utl::UcbStreamHelper::CreateStream( aInfoFileURL.GetMainURL( INetURLObject::NO_DECODE ), StreamMode::WRITE ));
+ std::unique_ptr<SvStream> pOStm(::utl::UcbStreamHelper::CreateStream( aInfoFileURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), StreamMode::WRITE ));
if( pOStm )
{
@@ -468,7 +468,7 @@ bool GalleryTheme::RemoveObject( size_t nPos )
if( pEntry )
{
if( SgaObjKind::SvDraw == pEntry->eObjKind )
- aSvDrawStorageRef->Remove( pEntry->aURL.GetMainURL( INetURLObject::NO_DECODE ) );
+ aSvDrawStorageRef->Remove( pEntry->aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
Broadcast( GalleryHint( GalleryHintType::CLOSE_OBJECT, GetName(), reinterpret_cast< sal_uIntPtr >( pEntry ) ) );
Broadcast( GalleryHint( GalleryHintType::OBJECT_REMOVED, GetName(), reinterpret_cast< sal_uIntPtr >( pEntry ) ) );
@@ -610,8 +610,8 @@ void GalleryTheme::Actualize( const Link<const INetURLObject&, void>& rActualize
DBG_ASSERT( aInURL.GetProtocol() != INetProtocol::NotValid, "invalid URL" );
DBG_ASSERT( aTmpURL.GetProtocol() != INetProtocol::NotValid, "invalid URL" );
- std::unique_ptr<SvStream> pIStm(::utl::UcbStreamHelper::CreateStream( aInURL.GetMainURL( INetURLObject::NO_DECODE ), StreamMode::READ ));
- std::unique_ptr<SvStream> pTmpStm(::utl::UcbStreamHelper::CreateStream( aTmpURL.GetMainURL( INetURLObject::NO_DECODE ), StreamMode::WRITE | StreamMode::TRUNC ));
+ std::unique_ptr<SvStream> pIStm(::utl::UcbStreamHelper::CreateStream( aInURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), StreamMode::READ ));
+ std::unique_ptr<SvStream> pTmpStm(::utl::UcbStreamHelper::CreateStream( aTmpURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), StreamMode::WRITE | StreamMode::TRUNC ));
if( pIStm && pTmpStm )
{
@@ -656,14 +656,14 @@ void GalleryTheme::Actualize( const Link<const INetURLObject&, void>& rActualize
try
{
- tools::SvRef<SotStorage> aTempStorageRef( new SotStorage( false, aTmpURL.GetMainURL( INetURLObject::NO_DECODE ), StreamMode::STD_READWRITE ) );
+ tools::SvRef<SotStorage> aTempStorageRef( new SotStorage( false, aTmpURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), StreamMode::STD_READWRITE ) );
aSvDrawStorageRef->CopyTo( aTempStorageRef.get() );
nStorErr = aSvDrawStorageRef->GetError();
}
catch (const css::ucb::ContentCreationException& e)
{
SAL_WARN("svx", "failed to open: "
- << aTmpURL.GetMainURL(INetURLObject::NO_DECODE)
+ << aTmpURL.GetMainURL(INetURLObject::DecodeMechanism::NONE)
<< "due to : " << e.Message);
nStorErr = ERRCODE_IO_GENERAL;
}
@@ -690,7 +690,7 @@ GalleryThemeEntry* GalleryTheme::CreateThemeEntry( const INetURLObject& rURL, bo
if( FileExists( rURL ) )
{
- std::unique_ptr<SvStream> pIStm(::utl::UcbStreamHelper::CreateStream( rURL.GetMainURL( INetURLObject::NO_DECODE ), StreamMode::READ ));
+ std::unique_ptr<SvStream> pIStm(::utl::UcbStreamHelper::CreateStream( rURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), StreamMode::READ ));
if( pIStm )
{
@@ -884,7 +884,7 @@ bool GalleryTheme::InsertGraphic( const Graphic& rGraphic, sal_uIntPtr nInsertPo
}
const INetURLObject aURL( ImplCreateUniqueURL( SgaObjKind::Bitmap, nExportFormat ) );
- std::unique_ptr<SvStream> pOStm(::utl::UcbStreamHelper::CreateStream( aURL.GetMainURL( INetURLObject::NO_DECODE ), StreamMode::WRITE | StreamMode::TRUNC ));
+ std::unique_ptr<SvStream> pOStm(::utl::UcbStreamHelper::CreateStream( aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), StreamMode::WRITE | StreamMode::TRUNC ));
if( pOStm )
{
@@ -1110,7 +1110,7 @@ bool GalleryTheme::InsertURL( const INetURLObject& rURL, sal_uIntPtr nInsertPos
pNewObj.reset(static_cast<SgaObject*>(new SgaObjectBmp( aGraphic, rURL, aFormat )));
}
#if HAVE_FEATURE_AVMEDIA
- else if( ::avmedia::MediaWindow::isMediaURL( rURL.GetMainURL( INetURLObject::DECODE_UNAMBIGUOUS ), ""/*TODO?*/ ) )
+ else if( ::avmedia::MediaWindow::isMediaURL( rURL.GetMainURL( INetURLObject::DecodeMechanism::Unambiguous ), ""/*TODO?*/ ) )
pNewObj.reset(static_cast<SgaObject*>(new SgaObjectSound( rURL )));
#endif
if( pNewObj && InsertObject( *pNewObj, nInsertPos ) )
@@ -1127,7 +1127,7 @@ bool GalleryTheme::InsertFileOrDirURL( const INetURLObject& rFileOrDirURL, sal_u
try
{
- ::ucbhelper::Content aCnt( rFileOrDirURL.GetMainURL( INetURLObject::NO_DECODE ), uno::Reference< ucb::XCommandEnvironment >(), comphelper::getProcessComponentContext() );
+ ::ucbhelper::Content aCnt( rFileOrDirURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), uno::Reference< ucb::XCommandEnvironment >(), comphelper::getProcessComponentContext() );
bool bFolder = false;
aCnt.getPropertyValue("IsFolder") >>= bFolder;
@@ -1301,28 +1301,28 @@ SvStream& GalleryTheme::WriteData( SvStream& rOStm ) const
}
else
{
- aPath = pObj->aURL.GetMainURL( INetURLObject::NO_DECODE );
- aPath = aPath.copy( 0, std::min(aRelURL1.GetMainURL( INetURLObject::NO_DECODE ).getLength(), aPath.getLength()) );
- bRel = aPath == aRelURL1.GetMainURL( INetURLObject::NO_DECODE );
+ aPath = pObj->aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE );
+ aPath = aPath.copy( 0, std::min(aRelURL1.GetMainURL( INetURLObject::DecodeMechanism::NONE ).getLength(), aPath.getLength()) );
+ bRel = aPath == aRelURL1.GetMainURL( INetURLObject::DecodeMechanism::NONE );
- if( bRel && ( pObj->aURL.GetMainURL( INetURLObject::NO_DECODE ).getLength() > ( aRelURL1.GetMainURL( INetURLObject::NO_DECODE ).getLength() + 1 ) ) )
+ if( bRel && ( pObj->aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ).getLength() > ( aRelURL1.GetMainURL( INetURLObject::DecodeMechanism::NONE ).getLength() + 1 ) ) )
{
- aPath = pObj->aURL.GetMainURL( INetURLObject::NO_DECODE );
- aPath = aPath.copy( std::min(aRelURL1.GetMainURL( INetURLObject::NO_DECODE ).getLength(), aPath.getLength()) );
+ aPath = pObj->aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE );
+ aPath = aPath.copy( std::min(aRelURL1.GetMainURL( INetURLObject::DecodeMechanism::NONE ).getLength(), aPath.getLength()) );
}
else
{
- aPath = pObj->aURL.GetMainURL( INetURLObject::NO_DECODE );
- aPath = aPath.copy( 0, std::min(aRelURL2.GetMainURL( INetURLObject::NO_DECODE ).getLength(), aPath.getLength()) );
- bRel = aPath == aRelURL2.GetMainURL( INetURLObject::NO_DECODE );
+ aPath = pObj->aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE );
+ aPath = aPath.copy( 0, std::min(aRelURL2.GetMainURL( INetURLObject::DecodeMechanism::NONE ).getLength(), aPath.getLength()) );
+ bRel = aPath == aRelURL2.GetMainURL( INetURLObject::DecodeMechanism::NONE );
- if( bRel && ( pObj->aURL.GetMainURL( INetURLObject::NO_DECODE ).getLength() > ( aRelURL2.GetMainURL( INetURLObject::NO_DECODE ).getLength() + 1 ) ) )
+ if( bRel && ( pObj->aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ).getLength() > ( aRelURL2.GetMainURL( INetURLObject::DecodeMechanism::NONE ).getLength() + 1 ) ) )
{
- aPath = pObj->aURL.GetMainURL( INetURLObject::NO_DECODE );
- aPath = aPath.copy( std::min(aRelURL2.GetMainURL( INetURLObject::NO_DECODE ).getLength(), aPath.getLength()) );
+ aPath = pObj->aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE );
+ aPath = aPath.copy( std::min(aRelURL2.GetMainURL( INetURLObject::DecodeMechanism::NONE ).getLength(), aPath.getLength()) );
}
else
- aPath = pObj->aURL.GetMainURL( INetURLObject::NO_DECODE );
+ aPath = pObj->aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE );
}
}
@@ -1423,7 +1423,7 @@ SvStream& GalleryTheme::ReadData( SvStream& rIStm )
if( bRel )
{
aFileName = aFileName.replaceAll( "\\", "/" );
- aPath = aRelURL1.GetMainURL( INetURLObject::NO_DECODE );
+ aPath = aRelURL1.GetMainURL( INetURLObject::DecodeMechanism::NONE );
if( aFileName[ 0 ] != '/' )
aPath += "/";
@@ -1434,7 +1434,7 @@ SvStream& GalleryTheme::ReadData( SvStream& rIStm )
if( !FileExists( pObj->aURL ) )
{
- aPath = aRelURL2.GetMainURL( INetURLObject::NO_DECODE );
+ aPath = aRelURL2.GetMainURL( INetURLObject::DecodeMechanism::NONE );
if( aFileName[0] != '/' )
aPath += "/";
diff --git a/svx/source/gengal/gengal.cxx b/svx/source/gengal/gengal.cxx
index 7a8f1a5b5969..0b81ff122a30 100644
--- a/svx/source/gengal/gengal.cxx
+++ b/svx/source/gengal/gengal.cxx
@@ -122,10 +122,10 @@ static void createTheme( const OUString& aThemeName, const OUString& aGalleryURL
if ( ! pGalTheme->InsertURL( *aIter ) )
fprintf( stderr, "Failed to import '%s'\n",
- OUStringToOString( aIter->GetMainURL(INetURLObject::NO_DECODE), RTL_TEXTENCODING_UTF8 ).getStr() );
+ OUStringToOString( aIter->GetMainURL(INetURLObject::DecodeMechanism::NONE), RTL_TEXTENCODING_UTF8 ).getStr() );
else
fprintf( stderr, "Imported file '%s' (%" SAL_PRI_SIZET "u)\n",
- OUStringToOString( aIter->GetMainURL(INetURLObject::NO_DECODE), RTL_TEXTENCODING_UTF8 ).getStr(),
+ OUStringToOString( aIter->GetMainURL(INetURLObject::DecodeMechanism::NONE), RTL_TEXTENCODING_UTF8 ).getStr(),
pGalTheme->GetObjectCount() );
}
@@ -298,7 +298,7 @@ int GalApp::Main()
aName = GetCommandLineParam( ++i );
else if ( aParam == "--path" )
aPath = Smartify( GetCommandLineParam( ++i ) ).
- GetMainURL(INetURLObject::NO_DECODE);
+ GetMainURL(INetURLObject::DecodeMechanism::NONE);
else if ( aParam == "--destdir" )
aDestDir = GetCommandLineParam( ++i );
else if ( aParam == "--relative-urls" )
diff --git a/svx/source/sidebar/nbdtmg.cxx b/svx/source/sidebar/nbdtmg.cxx
index e1bd4914ed78..af5a2c218c4e 100644
--- a/svx/source/sidebar/nbdtmg.cxx
+++ b/svx/source/sidebar/nbdtmg.cxx
@@ -173,7 +173,7 @@ void NBOTypeMgrBase::ImplLoad(const OUString& filename)
eCoreUnit = MapUnit::Map100thMM;
INetURLObject aFile( SvtPathOptions().GetUserConfigPath() );
aFile.Append( filename);
- std::unique_ptr<SvStream> xIStm(::utl::UcbStreamHelper::CreateStream( aFile.GetMainURL( INetURLObject::NO_DECODE ), StreamMode::READ ));
+ std::unique_ptr<SvStream> xIStm(::utl::UcbStreamHelper::CreateStream( aFile.GetMainURL( INetURLObject::DecodeMechanism::NONE ), StreamMode::READ ));
if( xIStm ) {
sal_uInt32 nVersion = 0;
sal_Int32 nNumIndex = 0;
@@ -212,7 +212,7 @@ void NBOTypeMgrBase::ImplStore(const OUString& filename)
eCoreUnit = MapUnit::Map100thMM;
INetURLObject aFile( SvtPathOptions().GetUserConfigPath() );
aFile.Append( filename);
- std::unique_ptr<SvStream> xOStm(::utl::UcbStreamHelper::CreateStream( aFile.GetMainURL( INetURLObject::NO_DECODE ), StreamMode::WRITE ));
+ std::unique_ptr<SvStream> xOStm(::utl::UcbStreamHelper::CreateStream( aFile.GetMainURL( INetURLObject::DecodeMechanism::NONE ), StreamMode::WRITE ));
if( xOStm ) {
sal_uInt32 nVersion;
sal_Int32 nNumIndex;
diff --git a/svx/source/svdraw/svdomedia.cxx b/svx/source/svdraw/svdomedia.cxx
index 2a70bf95ceb4..3ed8fb19b115 100644
--- a/svx/source/svdraw/svdomedia.cxx
+++ b/svx/source/svdraw/svdomedia.cxx
@@ -301,7 +301,7 @@ static bool lcl_HandleJsonPackageURL(
const OUString& rFilename = aFilenames[nFileIndex];
INetURLObject aUrlObj(o_rTempDirURL);
aUrlObj.insertName(rFilename);
- const OUString sFilepath = aUrlObj.GetMainURL( INetURLObject::NO_DECODE );
+ const OUString sFilepath = aUrlObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
// Media URL will point at json file
if( rFilename.endsWith(".json") )
diff --git a/svx/source/svdraw/svdotxln.cxx b/svx/source/svdraw/svdotxln.cxx
index d46f64509be8..20792039e5ee 100644
--- a/svx/source/svdraw/svdotxln.cxx
+++ b/svx/source/svdraw/svdotxln.cxx
@@ -165,7 +165,7 @@ bool SdrTextObj::ReloadLinkedText( bool bForceLoad)
INetURLObject aURL( pData->aFileName );
DBG_ASSERT( aURL.GetProtocol() != INetProtocol::NotValid, "invalid URL" );
- ::ucbhelper::Content aCnt( aURL.GetMainURL( INetURLObject::NO_DECODE ), css::uno::Reference< css::ucb::XCommandEnvironment >(), comphelper::getProcessComponentContext() );
+ ::ucbhelper::Content aCnt( aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), css::uno::Reference< css::ucb::XCommandEnvironment >(), comphelper::getProcessComponentContext() );
css::uno::Any aAny( aCnt.getPropertyValue("DateModified") );
css::util::DateTime aDateTime;
@@ -214,7 +214,7 @@ bool SdrTextObj::LoadText(const OUString& rFileName, const OUString& /*rFilterNa
DBG_ASSERT( aFileURL.GetProtocol() != INetProtocol::NotValid, "invalid URL" );
- std::unique_ptr<SvStream> pIStm(::utl::UcbStreamHelper::CreateStream( aFileURL.GetMainURL( INetURLObject::NO_DECODE ), StreamMode::READ ));
+ std::unique_ptr<SvStream> pIStm(::utl::UcbStreamHelper::CreateStream( aFileURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), StreamMode::READ ));
if( pIStm )
{
@@ -230,7 +230,7 @@ bool SdrTextObj::LoadText(const OUString& rFileName, const OUString& /*rFilterNa
if( !pIStm->GetError() )
{
- SetText( *pIStm, aFileURL.GetMainURL( INetURLObject::NO_DECODE ), sal::static_int_cast< sal_uInt16 >( bRTF ? EE_FORMAT_RTF : EE_FORMAT_TEXT ) );
+ SetText( *pIStm, aFileURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), sal::static_int_cast< sal_uInt16 >( bRTF ? EE_FORMAT_RTF : EE_FORMAT_TEXT ) );
bRet = true;
}
}
diff --git a/svx/source/unogallery/unogalitem.cxx b/svx/source/unogallery/unogalitem.cxx
index 1b439c0484d3..195b09c33245 100644
--- a/svx/source/unogallery/unogalitem.cxx
+++ b/svx/source/unogallery/unogalitem.cxx
@@ -289,7 +289,7 @@ void GalleryItem::_getPropertyValues( const comphelper::PropertyMapEntry** ppEnt
::GalleryTheme* pGalTheme = ( isValid() ? mpTheme->implGetTheme() : nullptr );
if( pGalTheme )
- *pValue <<= OUString( implGetObject()->aURL.GetMainURL( INetURLObject::NO_DECODE ) );
+ *pValue <<= OUString( implGetObject()->aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
}
break;
diff --git a/svx/source/xoutdev/_xoutbmp.cxx b/svx/source/xoutdev/_xoutbmp.cxx
index d458802091a1..0f5113e0f8ec 100644
--- a/svx/source/xoutdev/_xoutbmp.cxx
+++ b/svx/source/xoutdev/_xoutbmp.cxx
@@ -158,8 +158,8 @@ sal_uInt16 XOutBitmap::WriteGraphic( const Graphic& rGraphic, OUString& rFileNam
aURL.setExtension(rFilterName);
}
- rFileName = aURL.GetMainURL(INetURLObject::NO_DECODE);
- SfxMedium aMedium(aURL.GetMainURL(INetURLObject::NO_DECODE), StreamMode::WRITE|StreamMode::SHARE_DENYNONE|StreamMode::TRUNC);
+ rFileName = aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE);
+ SfxMedium aMedium(aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE), StreamMode::WRITE|StreamMode::SHARE_DENYNONE|StreamMode::TRUNC);
SvStream* pOStm = aMedium.GetOutStream();
if(pOStm)
@@ -180,8 +180,8 @@ sal_uInt16 XOutBitmap::WriteGraphic( const Graphic& rGraphic, OUString& rFileNam
if (!(nFlags & XOutFlags::DontAddExtension))
aURL.setExtension(rFilterName);
- rFileName = aURL.GetMainURL(INetURLObject::NO_DECODE);
- SfxMedium aMedium(aURL.GetMainURL(INetURLObject::NO_DECODE), StreamMode::WRITE|StreamMode::SHARE_DENYNONE|StreamMode::TRUNC);
+ rFileName = aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE);
+ SfxMedium aMedium(aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE), StreamMode::WRITE|StreamMode::SHARE_DENYNONE|StreamMode::TRUNC);
if (SvStream* pOutStream = aMedium.GetOutStream())
{
uno::Sequence<sal_Int8> aPdfData = rGraphic.getPdfData();
@@ -220,9 +220,9 @@ sal_uInt16 XOutBitmap::WriteGraphic( const Graphic& rGraphic, OUString& rFileNam
{
if( !(nFlags & XOutFlags::DontAddExtension) )
aURL.setExtension( aExt );
- rFileName = aURL.GetMainURL( INetURLObject::NO_DECODE );
+ rFileName = aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE );
- SfxMedium aMedium(aURL.GetMainURL(INetURLObject::NO_DECODE), StreamMode::WRITE | StreamMode::SHARE_DENYNONE | StreamMode::TRUNC);
+ SfxMedium aMedium(aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE), StreamMode::WRITE | StreamMode::SHARE_DENYNONE | StreamMode::TRUNC);
SvStream* pOStm = aMedium.GetOutStream();
if( pOStm && aGfxLink.GetDataSize() && aGfxLink.GetData() )
@@ -334,7 +334,7 @@ sal_uInt16 XOutBitmap::WriteGraphic( const Graphic& rGraphic, OUString& rFileNam
{
if( !(nFlags & XOutFlags::DontAddExtension) )
aURL.setExtension( aExt );
- rFileName = aURL.GetMainURL( INetURLObject::NO_DECODE );
+ rFileName = aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE );
nErr = ExportGraphic( aGraphic, aURL, rFilter, nFilter );
}
}
@@ -412,7 +412,7 @@ sal_uInt16 XOutBitmap::ExportGraphic( const Graphic& rGraphic, const INetURLObje
{
DBG_ASSERT( rURL.GetProtocol() != INetProtocol::NotValid, "XOutBitmap::ExportGraphic(...): invalid URL" );
- SfxMedium aMedium( rURL.GetMainURL( INetURLObject::NO_DECODE ), StreamMode::WRITE | StreamMode::SHARE_DENYNONE | StreamMode::TRUNC );
+ SfxMedium aMedium( rURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), StreamMode::WRITE | StreamMode::SHARE_DENYNONE | StreamMode::TRUNC );
SvStream* pOStm = aMedium.GetOutStream();
sal_uInt16 nRet = GRFILTER_IOERROR;
@@ -420,7 +420,7 @@ sal_uInt16 XOutBitmap::ExportGraphic( const Graphic& rGraphic, const INetURLObje
{
pGrfFilter = &rFilter;
- nRet = rFilter.ExportGraphic( rGraphic, rURL.GetMainURL( INetURLObject::NO_DECODE ), *pOStm, nFormat, pFilterData );
+ nRet = rFilter.ExportGraphic( rGraphic, rURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), *pOStm, nFormat, pFilterData );
pGrfFilter = nullptr;
aMedium.Commit();
diff --git a/svx/source/xoutdev/xtable.cxx b/svx/source/xoutdev/xtable.cxx
index ecea27c39ac8..2760ab83a600 100644
--- a/svx/source/xoutdev/xtable.cxx
+++ b/svx/source/xoutdev/xtable.cxx
@@ -273,7 +273,7 @@ bool XPropertyList::Load()
if( aURL.getExtension().isEmpty() )
aURL.setExtension( GetDefaultExt() );
- bool bRet = SvxXMLXTableImport::load(aURL.GetMainURL(INetURLObject::NO_DECODE),
+ bool bRet = SvxXMLXTableImport::load(aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE),
maReferer, uno::Reference < embed::XStorage >(),
createInstance(), nullptr );
if (bRet)
@@ -316,7 +316,7 @@ bool XPropertyList::Save()
if( aURL.getExtension().isEmpty() )
aURL.setExtension( GetDefaultExt() );
- return SvxXMLXTableExportComponent::save( aURL.GetMainURL( INetURLObject::NO_DECODE ),
+ return SvxXMLXTableExportComponent::save( aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ),
createInstance(),
uno::Reference< embed::XStorage >(), nullptr );
}
@@ -375,7 +375,7 @@ XPropertyList::CreatePropertyListFromURL( XPropertyListType t,
aPathURL.removeFinalSlash();
XPropertyListRef pList = XPropertyList::CreatePropertyList(
- t, aPathURL.GetMainURL( INetURLObject::NO_DECODE ), "" );
+ t, aPathURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), "" );
pList->SetName( aURL.getName() );
return pList;
diff --git a/sw/qa/core/uwriter.cxx b/sw/qa/core/uwriter.cxx
index 01c67e4f5395..2792ec32aac1 100644
--- a/sw/qa/core/uwriter.cxx
+++ b/sw/qa/core/uwriter.cxx
@@ -186,7 +186,7 @@ void SwDocTest::testFileNameFields()
aTempFile.EnableKillingFile();
INetURLObject aTempFileURL(aTempFile.GetURL());
- OUString sFileURL = aTempFileURL.GetMainURL(INetURLObject::NO_DECODE);
+ OUString sFileURL = aTempFileURL.GetMainURL(INetURLObject::DecodeMechanism::NONE);
SfxMedium aDstMed(sFileURL, StreamMode::STD_READWRITE);
std::shared_ptr<SfxFilter> pFilter(new SfxFilter(
@@ -205,7 +205,7 @@ void SwDocTest::testFileNameFields()
{
OUString sResult(aNameField.Expand(FF_NAME));
OUString sExpected(rUrlObj.getName(INetURLObject::LAST_SEGMENT,
- true,INetURLObject::DECODE_WITH_CHARSET));
+ true,INetURLObject::DecodeMechanism::WithCharset));
CPPUNIT_ASSERT_EQUAL_MESSAGE("Expected Readable FileName", sExpected, sResult);
}
@@ -226,7 +226,7 @@ void SwDocTest::testFileNameFields()
{
OUString sResult(aNameField.Expand(FF_NAME_NOEXT));
OUString sExpected(rUrlObj.getName(INetURLObject::LAST_SEGMENT,
- true,INetURLObject::DECODE_WITH_CHARSET));
+ true,INetURLObject::DecodeMechanism::WithCharset));
//Chop off .tmp
sExpected = sExpected.copy(0, sExpected.getLength() - 4);
CPPUNIT_ASSERT_EQUAL_MESSAGE("Expected Readable FileName", sExpected, sResult);
diff --git a/sw/source/core/doc/DocumentLinksAdministrationManager.cxx b/sw/source/core/doc/DocumentLinksAdministrationManager.cxx
index 1255eccc5433..ccbe757d2323 100644
--- a/sw/source/core/doc/DocumentLinksAdministrationManager.cxx
+++ b/sw/source/core/doc/DocumentLinksAdministrationManager.cxx
@@ -450,7 +450,7 @@ bool DocumentLinksAdministrationManager::SelectServerObj( const OUString& rStr,
rpRange = nullptr;
OUString sItem( INetURLObject::decode( rStr,
- INetURLObject::DECODE_WITH_CHARSET ));
+ INetURLObject::DecodeMechanism::WithCharset ));
sal_Int32 nPos = sItem.indexOf( cMarkSeparator );
diff --git a/sw/source/core/doc/docglbl.cxx b/sw/source/core/doc/docglbl.cxx
index 5cccd88b1c69..479a7611a172 100644
--- a/sw/source/core/doc/docglbl.cxx
+++ b/sw/source/core/doc/docglbl.cxx
@@ -234,7 +234,7 @@ bool SwDoc::SplitDoc( sal_uInt16 eDocType, const OUString& rPath, bool bOutline,
INetURLObject aEntry(rPath);
OUString sLeading(aEntry.GetBase());
aEntry.removeSegment();
- OUString sPath = aEntry.GetMainURL( INetURLObject::NO_DECODE );
+ OUString sPath = aEntry.GetMainURL( INetURLObject::DecodeMechanism::NONE );
utl::TempFile aTemp(sLeading, true, &sExt, &sPath);
aTemp.EnableKillingFile();
diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx
index a03f36a93992..533ba658c4c0 100644
--- a/sw/source/core/doc/notxtfrm.cxx
+++ b/sw/source/core/doc/notxtfrm.cxx
@@ -86,7 +86,7 @@ inline bool GetRealURL( const SwGrfNode& rNd, OUString& rText )
bool bRet = rNd.GetFileFilterNms( &rText, nullptr );
if( bRet )
rText = URIHelper::removePassword( rText, INetURLObject::EncodeMechanism::WasEncoded,
- INetURLObject::DECODE_UNAMBIGUOUS);
+ INetURLObject::DecodeMechanism::Unambiguous);
if (rText.startsWith("data:image")) rText = "inline image";
return bRet;
diff --git a/sw/source/core/doc/visiturl.cxx b/sw/source/core/doc/visiturl.cxx
index 7555205b64c8..fad1ebc57a83 100644
--- a/sw/source/core/doc/visiturl.cxx
+++ b/sw/source/core/doc/visiturl.cxx
@@ -46,7 +46,7 @@ void SwURLStateChanged::Notify( SfxBroadcaster& , const SfxHint& rHint )
{
// This URL has been changed:
const INetURLObject* pIURL = static_cast<const INetURLHistoryHint&>(rHint).GetObject();
- OUString sURL( pIURL->GetMainURL( INetURLObject::NO_DECODE ) ), sBkmk;
+ OUString sURL( pIURL->GetMainURL( INetURLObject::DecodeMechanism::NONE ) ), sBkmk;
SwEditShell* pESh = pDoc->GetEditShell();
diff --git a/sw/source/core/draw/dpage.cxx b/sw/source/core/draw/dpage.cxx
index 08b039fc934e..bea0588ea495 100644
--- a/sw/source/core/draw/dpage.cxx
+++ b/sw/source/core/draw/dpage.cxx
@@ -199,14 +199,14 @@ bool SwDPage::RequestHelp( vcl::Window* pWindow, SdrView* pView,
if ( sText.isEmpty() )
sText = URIHelper::removePassword( pTmpObj->GetURL(),
INetURLObject::EncodeMechanism::WasEncoded,
- INetURLObject::DECODE_UNAMBIGUOUS);
+ INetURLObject::DecodeMechanism::Unambiguous);
}
}
else if ( !rURL.GetURL().isEmpty() )
{
sText = URIHelper::removePassword( rURL.GetURL(),
INetURLObject::EncodeMechanism::WasEncoded,
- INetURLObject::DECODE_UNAMBIGUOUS);
+ INetURLObject::DecodeMechanism::Unambiguous);
if( rURL.IsServerMap() )
{
diff --git a/sw/source/core/edit/edglss.cxx b/sw/source/core/edit/edglss.cxx
index e4ba47455677..48ee031537c8 100644
--- a/sw/source/core/edit/edglss.cxx
+++ b/sw/source/core/edit/edglss.cxx
@@ -53,7 +53,7 @@ sal_uInt16 SwEditShell::MakeGlossary( SwTextBlocks& rBlks, const OUString& rName
if(bSaveRelFile)
{
INetURLObject aURL( rBlks.GetFileName() );
- sBase = aURL.GetMainURL( INetURLObject::NO_DECODE );
+ sBase = aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE );
}
rBlks.SetBaseURL( sBase );
@@ -87,7 +87,7 @@ sal_uInt16 SwEditShell::SaveGlossaryDoc( SwTextBlocks& rBlock,
if(bSaveRelFile)
{
INetURLObject aURL( rBlock.GetFileName() );
- sBase = aURL.GetMainURL( INetURLObject::NO_DECODE );
+ sBase = aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE );
}
rBlock.SetBaseURL( sBase );
sal_uInt16 nRet = USHRT_MAX;
diff --git a/sw/source/core/fields/docufld.cxx b/sw/source/core/fields/docufld.cxx
index fbefdc24719f..e8205534509a 100644
--- a/sw/source/core/fields/docufld.cxx
+++ b/sw/source/core/fields/docufld.cxx
@@ -90,7 +90,7 @@
#include <calbck.hxx>
#include <docary.hxx>
-#define URL_DECODE INetURLObject::DECODE_UNAMBIGUOUS
+#define URL_DECODE INetURLObject::DecodeMechanism::Unambiguous
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
@@ -424,7 +424,7 @@ OUString SwFileNameFieldType::Expand(sal_uLong nFormat) const
else
{
aRet = URIHelper::removePassword(
- rURLObj.GetMainURL( INetURLObject::NO_DECODE ),
+ rURLObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ),
INetURLObject::EncodeMechanism::WasEncoded, URL_DECODE );
const sal_Int32 nPos = aRet.indexOf(rURLObj.GetLastName( URL_DECODE ));
if (nPos>=0)
@@ -436,7 +436,7 @@ OUString SwFileNameFieldType::Expand(sal_uLong nFormat) const
break;
case FF_NAME:
- aRet = rURLObj.GetLastName( INetURLObject::DECODE_WITH_CHARSET );
+ aRet = rURLObj.GetLastName( INetURLObject::DecodeMechanism::WithCharset );
break;
case FF_NAME_NOEXT:
@@ -448,7 +448,7 @@ OUString SwFileNameFieldType::Expand(sal_uLong nFormat) const
aRet = rURLObj.GetFull();
else
aRet = URIHelper::removePassword(
- rURLObj.GetMainURL( INetURLObject::NO_DECODE ),
+ rURLObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ),
INetURLObject::EncodeMechanism::WasEncoded, URL_DECODE );
}
}
diff --git a/sw/source/core/graphic/ndgrf.cxx b/sw/source/core/graphic/ndgrf.cxx
index 2326706345a3..94142cfa8a68 100644
--- a/sw/source/core/graphic/ndgrf.cxx
+++ b/sw/source/core/graphic/ndgrf.cxx
@@ -126,7 +126,7 @@ SwGrfNode::SwGrfNode( const SwNodeIndex & rWhere,
{
INetURLObject aUrl( rGrfName );
if( INetProtocol::File == aUrl.GetProtocol() &&
- FStatHelper::IsDocument( aUrl.GetMainURL( INetURLObject::NO_DECODE ) ))
+ FStatHelper::IsDocument( aUrl.GetMainURL( INetURLObject::DecodeMechanism::NONE ) ))
{
// file exists, so create connection without an update
static_cast<SwBaseLink*>( refLink.get() )->Connect();
diff --git a/sw/source/core/swg/SwXMLTextBlocks.cxx b/sw/source/core/swg/SwXMLTextBlocks.cxx
index 1c2ed672b181..cb4aee07af82 100644
--- a/sw/source/core/swg/SwXMLTextBlocks.cxx
+++ b/sw/source/core/swg/SwXMLTextBlocks.cxx
@@ -510,7 +510,7 @@ bool SwXMLTextBlocks::IsFileUCBStorage( const OUString & rFileName)
OUString aURL;
osl::FileBase::getFileURLFromSystemPath( aName, aURL );
aObj.SetURL( aURL );
- aName = aObj.GetMainURL( INetURLObject::NO_DECODE );
+ aName = aObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
}
SvStream * pStm = ::utl::UcbStreamHelper::CreateStream( aName, StreamMode::STD_READ );
diff --git a/sw/source/core/swg/swblocks.cxx b/sw/source/core/swg/swblocks.cxx
index 9176f503cbbc..99f0751a41cb 100644
--- a/sw/source/core/swg/swblocks.cxx
+++ b/sw/source/core/swg/swblocks.cxx
@@ -236,7 +236,7 @@ SwTextBlocks::SwTextBlocks( const OUString& rFile )
: pImp( nullptr ), nErr( 0 )
{
INetURLObject aObj(rFile);
- const OUString sFileName = aObj.GetMainURL( INetURLObject::NO_DECODE );
+ const OUString sFileName = aObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
switch( SwImpBlocks::GetFileType( rFile ) )
{
case SwImpBlocks::FileType::XML: pImp = new SwXMLTextBlocks( sFileName ); break;
diff --git a/sw/source/core/text/EnhancedPDFExportHelper.cxx b/sw/source/core/text/EnhancedPDFExportHelper.cxx
index 77803217ca84..e729e2b659d9 100644
--- a/sw/source/core/text/EnhancedPDFExportHelper.cxx
+++ b/sw/source/core/text/EnhancedPDFExportHelper.cxx
@@ -1647,7 +1647,7 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport()
// than one link to this destination:
OUString aURL( INetURLObject::decode(
p->rINetAttr.GetINetFormat().GetValue(),
- INetURLObject::DECODE_UNAMBIGUOUS ) );
+ INetURLObject::DecodeMechanism::Unambiguous ) );
// We have to distinguish between intern and real URLs
const bool bIntern = '#' == aURL[0];
diff --git a/sw/source/core/unocore/swunohelper.cxx b/sw/source/core/unocore/swunohelper.cxx
index 75d286148d5c..3e947d1cbde2 100644
--- a/sw/source/core/unocore/swunohelper.cxx
+++ b/sw/source/core/unocore/swunohelper.cxx
@@ -91,7 +91,7 @@ bool UCB_CopyFile( const OUString& rURL, const OUString& rNewURL, bool bCopyIsMo
INetURLObject aURL( rNewURL );
const OUString sName( aURL.GetName() );
aURL.removeSegment();
- const OUString sMainURL( aURL.GetMainURL(INetURLObject::NO_DECODE) );
+ const OUString sMainURL( aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE) );
ucbhelper::Content aTempContent( sMainURL,
css::uno::Reference< css::ucb::XCommandEnvironment >(),
@@ -120,11 +120,11 @@ bool UCB_IsCaseSensitiveFileName( const OUString& rURL )
INetURLObject aTempObj( rURL );
aTempObj.SetBase( aTempObj.GetBase().toAsciiLowerCase() );
css::uno::Reference< css::ucb::XContentIdentifier > xRef1 = new
- ucbhelper::ContentIdentifier( aTempObj.GetMainURL( INetURLObject::NO_DECODE ));
+ ucbhelper::ContentIdentifier( aTempObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ));
aTempObj.SetBase(aTempObj.GetBase().toAsciiUpperCase());
css::uno::Reference< css::ucb::XContentIdentifier > xRef2 = new
- ucbhelper::ContentIdentifier( aTempObj.GetMainURL( INetURLObject::NO_DECODE ));
+ ucbhelper::ContentIdentifier( aTempObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ));
css::uno::Reference< css::ucb::XUniversalContentBroker > xUcb =
css::ucb::UniversalContentBroker::create(comphelper::getProcessComponentContext());
diff --git a/sw/source/filter/basflt/iodetect.cxx b/sw/source/filter/basflt/iodetect.cxx
index 5b6e92ff8a91..4fc0635b3985 100644
--- a/sw/source/filter/basflt/iodetect.cxx
+++ b/sw/source/filter/basflt/iodetect.cxx
@@ -160,7 +160,7 @@ std::shared_ptr<const SfxFilter> SwIoSystem::GetFileFilter(const OUString& rFile
INetURLObject aObj;
aObj.SetSmartProtocol( INetProtocol::File );
aObj.SetSmartURL( rFileName );
- SfxMedium aMedium(aObj.GetMainURL(INetURLObject::NO_DECODE), StreamMode::STD_READ);
+ SfxMedium aMedium(aObj.GetMainURL(INetURLObject::DecodeMechanism::NONE), StreamMode::STD_READ);
// templates should not get precedence over "normal" filters (#i35508, #i33168)
std::shared_ptr<const SfxFilter> pTemplateFilter;
diff --git a/sw/source/filter/basflt/shellio.cxx b/sw/source/filter/basflt/shellio.cxx
index c9f300379892..113fe38f8bd1 100644
--- a/sw/source/filter/basflt/shellio.cxx
+++ b/sw/source/filter/basflt/shellio.cxx
@@ -463,7 +463,7 @@ SwDoc* Reader::GetTemplateDoc()
else
{
INetURLObject aTDir( aTemplateNm );
- const OUString aFileName = aTDir.GetMainURL( INetURLObject::NO_DECODE );
+ const OUString aFileName = aTDir.GetMainURL( INetURLObject::DecodeMechanism::NONE );
OSL_ENSURE( !aTDir.HasError(), "No absolute path for template name!" );
DateTime aCurrDateTime( DateTime::SYSTEM );
bool bLoad = false;
@@ -474,7 +474,7 @@ SwDoc* Reader::GetTemplateDoc()
Date aTstDate( Date::EMPTY );
tools::Time aTstTime( tools::Time::EMPTY );
if( FStatHelper::GetModifiedDateTimeOfFile(
- aTDir.GetMainURL( INetURLObject::NO_DECODE ),
+ aTDir.GetMainURL( INetURLObject::DecodeMechanism::NONE ),
&aTstDate, &aTstTime ) &&
( !pTemplate || aDStamp != aTstDate || aTStamp != aTstTime ))
{
diff --git a/sw/source/filter/html/SwAppletImpl.cxx b/sw/source/filter/html/SwAppletImpl.cxx
index fc8fb9104366..11fba7e16641 100644
--- a/sw/source/filter/html/SwAppletImpl.cxx
+++ b/sw/source/filter/html/SwAppletImpl.cxx
@@ -124,7 +124,7 @@ void SwApplet_Impl::CreateApplet( const OUString& rCode, const OUString& rName,
INetURLObject aUrlBase(rDocumentBaseURL);
aUrlBase.removeSegment();
- OUString sDocBase = aUrlBase.GetMainURL(INetURLObject::NO_DECODE);
+ OUString sDocBase = aUrlBase.GetMainURL(INetURLObject::DecodeMechanism::NONE);
uno::Reference < beans::XPropertySet > xSet( xApplet->getComponent(), uno::UNO_QUERY );
if ( xSet.is() )
{
diff --git a/sw/source/filter/html/htmlgrin.cxx b/sw/source/filter/html/htmlgrin.cxx
index 2485f1123c95..72078ba85754 100644
--- a/sw/source/filter/html/htmlgrin.cxx
+++ b/sw/source/filter/html/htmlgrin.cxx
@@ -1158,7 +1158,7 @@ ANCHOR_SETEVENT:
if( !aName.isEmpty() )
{
OUString sDecoded( INetURLObject::decode( aName,
- INetURLObject::DECODE_UNAMBIGUOUS ));
+ INetURLObject::DecodeMechanism::Unambiguous ));
sal_Int32 nPos = sDecoded.lastIndexOf( cMarkSeparator );
if( nPos != -1 )
{
diff --git a/sw/source/filter/html/htmlplug.cxx b/sw/source/filter/html/htmlplug.cxx
index 1845d8aac3e1..ef67ba07632b 100644
--- a/sw/source/filter/html/htmlplug.cxx
+++ b/sw/source/filter/html/htmlplug.cxx
@@ -885,7 +885,7 @@ void SwHTMLParser::InsertFloatingFrame()
bool bHasBorder = aFrameDesc.HasFrameBorder();
Size aMargin = aFrameDesc.GetMargin();
- xSet->setPropertyValue("FrameURL", uno::makeAny( OUString( aFrameDesc.GetURL().GetMainURL( INetURLObject::NO_DECODE ) ) ) );
+ xSet->setPropertyValue("FrameURL", uno::makeAny( OUString( aFrameDesc.GetURL().GetMainURL( INetURLObject::DecodeMechanism::NONE ) ) ) );
xSet->setPropertyValue("FrameName", uno::makeAny( aName ) );
if ( eScroll == ScrollingAuto )
diff --git a/sw/source/filter/html/wrthtml.cxx b/sw/source/filter/html/wrthtml.cxx
index b3034c7f65b4..8cec822b9183 100644
--- a/sw/source/filter/html/wrthtml.cxx
+++ b/sw/source/filter/html/wrthtml.cxx
@@ -1201,7 +1201,7 @@ OUString SwHTMLWriter::convertHyperlinkHRefValue(const OUString& rURL)
{
// Link is not started from "#", so looks like external link. Encode this URL.
INetURLObject aURL(sURL);
- sURL = aURL.GetMainURL(INetURLObject::NO_DECODE);
+ sURL = aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE);
}
return URIHelper::simpleNormalizedMakeRelative( GetBaseURL(), sURL );
}
diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx
index 46d42cb5835b..2f61d329b8dd 100644
--- a/sw/source/filter/ww8/wrtw8esh.cxx
+++ b/sw/source/filter/ww8/wrtw8esh.cxx
@@ -148,7 +148,7 @@ OUString SwBasicEscherEx::BuildFileName(sal_uInt16& rnLevel, bool& rbRel, const
// try to convert to relative file name
OUString aTmpName( aDosName );
aDosName = INetURLObject::GetRelURL( GetBasePath(), rUrl,
- INetURLObject::EncodeMechanism::WasEncoded, INetURLObject::DECODE_WITH_CHARSET );
+ INetURLObject::EncodeMechanism::WasEncoded, INetURLObject::DecodeMechanism::WithCharset );
if (aDosName.startsWith(INET_FILE_SCHEME))
{
diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx
index b81b1097cab1..a173f1d0b4f9 100644
--- a/sw/source/filter/ww8/wrtw8nds.cxx
+++ b/sw/source/filter/ww8/wrtw8nds.cxx
@@ -928,8 +928,8 @@ bool AttributeOutputBase::AnalyzeURL( const OUString& rUrl, const OUString& /*rT
else
{
INetURLObject aURL( rUrl, INetProtocol::NotValid );
- sURL = aURL.GetURLNoMark( INetURLObject::DECODE_UNAMBIGUOUS );
- sMark = aURL.GetMark( INetURLObject::DECODE_UNAMBIGUOUS );
+ sURL = aURL.GetURLNoMark( INetURLObject::DecodeMechanism::Unambiguous );
+ sMark = aURL.GetMark( INetURLObject::DecodeMechanism::Unambiguous );
}
if ( !sMark.isEmpty() && sURL.isEmpty() )
@@ -1135,7 +1135,7 @@ OUString BookmarkToWord(const OUString &rBookmark)
OUString BookmarkToWriter(const OUString &rBookmark)
{
return INetURLObject::decode(rBookmark,
- INetURLObject::DECODE_UNAMBIGUOUS, RTL_TEXTENCODING_ASCII_US);
+ INetURLObject::DecodeMechanism::Unambiguous, RTL_TEXTENCODING_ASCII_US);
}
void SwWW8AttrIter::OutSwFormatRefMark(const SwFormatRefMark& rAttr, bool)
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index dffd69106798..e994e4f3ab9f 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -198,7 +198,7 @@ void lclGetAbsPath(OUString& rPath, sal_uInt16 nLevel, SwDocShell* pDocShell)
if (!aTmpStr.isEmpty())
{
bool bWasAbs = false;
- rPath = pDocShell->GetMedium()->GetURLObject().smartRel2Abs( aTmpStr, bWasAbs ).GetMainURL( INetURLObject::NO_DECODE );
+ rPath = pDocShell->GetMedium()->GetURLObject().smartRel2Abs( aTmpStr, bWasAbs ).GetMainURL( INetURLObject::DecodeMechanism::NONE );
// full path as stored in SvxURLField must be encoded
}
}
@@ -4744,7 +4744,7 @@ void SwWW8ImplReader::ReadDocInfo()
{
OUString aName = pMedium->GetName();
INetURLObject aURL( aName );
- sTemplateURL = aURL.GetMainURL(INetURLObject::DECODE_TO_IURI);
+ sTemplateURL = aURL.GetMainURL(INetURLObject::DecodeMechanism::ToIUri);
if ( !sTemplateURL.isEmpty() )
xDocProps->setTemplateURL( sTemplateURL );
}
@@ -5523,7 +5523,7 @@ namespace
{
::comphelper::DocPasswordRequest* pRequest = new ::comphelper::DocPasswordRequest(
::comphelper::DocPasswordRequestType::MS, task::PasswordRequestMode_PASSWORD_ENTER,
- INetURLObject( rMedium.GetOrigURL() ).GetName( INetURLObject::DECODE_WITH_CHARSET ) );
+ INetURLObject( rMedium.GetOrigURL() ).GetName( INetURLObject::DecodeMechanism::WithCharset ) );
uno::Reference< task::XInteractionRequest > xRequest( pRequest );
xHandler->handle( xRequest );
diff --git a/sw/source/filter/xml/xmltexti.cxx b/sw/source/filter/xml/xmltexti.cxx
index 85d9af4cc312..73fb70565f42 100644
--- a/sw/source/filter/xml/xmltexti.cxx
+++ b/sw/source/filter/xml/xmltexti.cxx
@@ -572,7 +572,7 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertOOoLink(
uno::Sequence< beans::PropertyValue > aMediaDescriptor( 1 );
aMediaDescriptor[0].Name = "URL";
- aMediaDescriptor[0].Value <<= OUString( aURLObj.GetMainURL( INetURLObject::NO_DECODE ) );
+ aMediaDescriptor[0].Value <<= OUString( aURLObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
if ( pDoc->GetDocShell() && pDoc->GetDocShell()->GetMedium() )
{
uno::Reference< task::XInteractionHandler > xInteraction =
@@ -718,7 +718,7 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertPlugin(
{
if( bValidURL )
xSet->setPropertyValue("PluginURL",
- makeAny( OUString( aURLObj.GetMainURL( INetURLObject::NO_DECODE ) ) ) );
+ makeAny( OUString( aURLObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ) ) ) );
if( bValidMimeType )
xSet->setPropertyValue("PluginMimeType",
makeAny( OUString( rMimeType ) ) );
diff --git a/sw/source/ui/chrdlg/chardlg.cxx b/sw/source/ui/chrdlg/chardlg.cxx
index 1211e6efb5f7..e1e6cefc0a76 100644
--- a/sw/source/ui/chrdlg/chardlg.cxx
+++ b/sw/source/ui/chrdlg/chardlg.cxx
@@ -211,7 +211,7 @@ void SwCharURLPage::Reset(const SfxItemSet* rSet)
{
const SwFormatINetFormat* pINetFormat = static_cast<const SwFormatINetFormat*>( pItem);
m_pURLED->SetText(INetURLObject::decode(pINetFormat->GetValue(),
- INetURLObject::DECODE_UNAMBIGUOUS));
+ INetURLObject::DecodeMechanism::Unambiguous));
m_pURLED->SaveValue();
m_pNameED->SetText(pINetFormat->GetName());
diff --git a/sw/source/ui/dbui/addresslistdialog.cxx b/sw/source/ui/dbui/addresslistdialog.cxx
index 682e5b76035a..617957d5c7a6 100644
--- a/sw/source/ui/dbui/addresslistdialog.cxx
+++ b/sw/source/ui/dbui/addresslistdialog.cxx
@@ -385,7 +385,7 @@ IMPL_LINK(SwAddressListDialog, CreateHdl_Impl, Button*, pButton, void)
INetURLObject aTempURL(aURL);
aTempURL.removeSegment();
aTempURL.removeFinalSlash();
- const OUString sDBURL("sdbc:flat:" + aTempURL.GetMainURL(INetURLObject::NO_DECODE));
+ const OUString sDBURL("sdbc:flat:" + aTempURL.GetMainURL(INetURLObject::DecodeMechanism::NONE));
xDataProperties->setPropertyValue("URL", Any(sDBURL));
//set the filter to the file name without extension
uno::Sequence<OUString> aFilters { sNewName };
diff --git a/sw/source/ui/dbui/createaddresslistdialog.cxx b/sw/source/ui/dbui/createaddresslistdialog.cxx
index 27086a9338f0..7c87d4875fd6 100644
--- a/sw/source/ui/dbui/createaddresslistdialog.cxx
+++ b/sw/source/ui/dbui/createaddresslistdialog.cxx
@@ -636,7 +636,7 @@ IMPL_LINK_NOARG(SwCreateAddressListDialog, OkHdl_Impl, Button*, void)
m_sURL = xFP->getSelectedFiles().getConstArray()[0];
INetURLObject aResult( m_sURL );
aResult.setExtension("csv");
- m_sURL = aResult.GetMainURL(INetURLObject::NO_DECODE);
+ m_sURL = aResult.GetMainURL(INetURLObject::DecodeMechanism::NONE);
}
}
if(!m_sURL.isEmpty())
diff --git a/sw/source/ui/dbui/mmresultdialogs.cxx b/sw/source/ui/dbui/mmresultdialogs.cxx
index 509f6bb329a7..78836ebaf028 100644
--- a/sw/source/ui/dbui/mmresultdialogs.cxx
+++ b/sw/source/ui/dbui/mmresultdialogs.cxx
@@ -165,7 +165,7 @@ SwSaveWarningBox_Impl::SwSaveWarningBox_Impl(vcl::Window* pParent, const OUStrin
INetURLObject aTmp(rFileName);
m_pPrimaryMessage->SetText(m_pPrimaryMessage->GetText().replaceAll("%1", aTmp.getName(
- INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET)));
+ INetURLObject::LAST_SEGMENT, true, INetURLObject::DecodeMechanism::WithCharset)));
ModifyHdl(*m_pEdit);
}
@@ -429,7 +429,7 @@ void SwMMResultEmailDialog::FillInEmailSettings()
{
INetURLObject aTmp(pDocShell->GetMedium()->GetName());
m_pAttachmentED->SetText(aTmp.getName(
- INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET ));
+ INetURLObject::LAST_SEGMENT, true, INetURLObject::DecodeMechanism::WithCharset ));
}
}
@@ -713,7 +713,7 @@ IMPL_LINK(SwMMResultSaveDialog, SaveOutputHdl_Impl, Button*, pButton, void)
documentStartPageNumber(xConfigItem.get(), nDoc), documentEndPageNumber(xConfigItem.get(), nDoc));
pTargetView->GetWrtShell().EndAction();
//then save it
- OUString sOutPath = aURL.GetMainURL(INetURLObject::DECODE_TO_IURI);
+ OUString sOutPath = aURL.GetMainURL(INetURLObject::DecodeMechanism::ToIUri);
OUString sCounter = "_" + OUString::number(nDoc);
sOutPath = sOutPath.replaceAt( sOutPath.getLength() - sExtension.getLength() - 1, 0, sCounter);
diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx
index 496654aaeb76..722ec47ca64c 100644
--- a/sw/source/ui/dialog/uiregionsw.cxx
+++ b/sw/source/ui/dialog/uiregionsw.cxx
@@ -204,7 +204,7 @@ SectRepr::SectRepr( size_t nPos, SwSection& rSect )
void SectRepr::SetFile( const OUString& rFile )
{
OUString sNewFile( INetURLObject::decode( rFile,
- INetURLObject::DECODE_UNAMBIGUOUS ));
+ INetURLObject::DecodeMechanism::Unambiguous ));
const OUString sOldFileName( m_SectionData.GetLinkFileName() );
const OUString sSub( sOldFileName.getToken( 2, sfx2::cTokenSeparator ) );
@@ -289,7 +289,7 @@ OUString SectRepr::GetFile() const
.replaceFirst( OUStringLiteral1(sfx2::cTokenSeparator), " ", &n );
}
return INetURLObject::decode( sLinkFile.getToken( 0, sfx2::cTokenSeparator ),
- INetURLObject::DECODE_UNAMBIGUOUS );
+ INetURLObject::DecodeMechanism::Unambiguous );
}
OUString SectRepr::GetSubRegion() const
@@ -1319,7 +1319,7 @@ IMPL_LINK( SwEditRegionDlg, DlgClosedHdl, sfx2::FileDialogHelper *, _pFileDlg, v
std::unique_ptr<SfxMedium> pMedium(m_pDocInserter->CreateMedium("sglobal"));
if ( pMedium )
{
- sFileName = pMedium->GetURLObject().GetMainURL( INetURLObject::NO_DECODE );
+ sFileName = pMedium->GetURLObject().GetMainURL( INetURLObject::DecodeMechanism::NONE );
sFilterName = pMedium->GetFilter()->GetFilterName();
const SfxPoolItem* pItem;
if ( SfxItemState::SET == pMedium->GetItemSet()->GetItemState( SID_PASSWORD, false, &pItem ) )
@@ -1358,7 +1358,7 @@ IMPL_LINK( SwEditRegionDlg, SubRegionEventHdl, VclWindowEvent&, rEvent, void )
//load file and set the shell
SfxMedium aMedium( sFileName, StreamMode::STD_READ );
- sFileName = aMedium.GetURLObject().GetMainURL( INetURLObject::NO_DECODE );
+ sFileName = aMedium.GetURLObject().GetMainURL( INetURLObject::DecodeMechanism::NONE );
::lcl_ReadSections(aMedium, *m_pSubRegionED);
}
else
@@ -1786,13 +1786,13 @@ IMPL_LINK( SwInsertSectionTabPage, DlgClosedHdl, sfx2::FileDialogHelper *, _pFil
std::unique_ptr<SfxMedium> pMedium(m_pDocInserter->CreateMedium("sglobal"));
if ( pMedium )
{
- m_sFileName = pMedium->GetURLObject().GetMainURL( INetURLObject::NO_DECODE );
+ m_sFileName = pMedium->GetURLObject().GetMainURL( INetURLObject::DecodeMechanism::NONE );
m_sFilterName = pMedium->GetFilter()->GetFilterName();
const SfxPoolItem* pItem;
if ( SfxItemState::SET == pMedium->GetItemSet()->GetItemState( SID_PASSWORD, false, &pItem ) )
m_sFilePasswd = static_cast<const SfxStringItem*>(pItem)->GetValue();
m_pFileNameED->SetText( INetURLObject::decode(
- m_sFileName, INetURLObject::DECODE_UNAMBIGUOUS ) );
+ m_sFileName, INetURLObject::DecodeMechanism::Unambiguous ) );
::lcl_ReadSections(*pMedium, *m_pSubRegionED);
}
}
diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx
index b9d850aed94a..9f40d88f5686 100644
--- a/sw/source/ui/frmdlg/frmpage.cxx
+++ b/sw/source/ui/frmdlg/frmpage.cxx
@@ -2586,7 +2586,7 @@ IMPL_LINK_NOARG(SwGrfExtPage, BrowseHdl, Button*, void)
{ // remember selected filter
aFilterName = pGrfDlg->GetCurrentFilter();
aNewGrfName = INetURLObject::decode( pGrfDlg->GetPath(),
- INetURLObject::DECODE_UNAMBIGUOUS );
+ INetURLObject::DecodeMechanism::Unambiguous );
m_pConnectED->SetModifyFlag();
m_pConnectED->SetText( aNewGrfName );
//reset mirrors because maybe a Bitmap was swapped with
@@ -2778,7 +2778,7 @@ void SwFrameURLPage::Reset( const SfxItemSet *rSet )
{
const SwFormatURL* pFormatURL = static_cast<const SwFormatURL*>(pItem);
pURLED->SetText( INetURLObject::decode( pFormatURL->GetURL(),
- INetURLObject::DECODE_UNAMBIGUOUS ));
+ INetURLObject::DecodeMechanism::Unambiguous ));
pNameED->SetText( pFormatURL->GetName());
pClientCB->Enable( pFormatURL->GetMap() != nullptr );
diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx
index b565df9db20c..bb187b0db1d1 100644
--- a/sw/source/ui/index/cnttab.cxx
+++ b/sw/source/ui/index/cnttab.cxx
@@ -1264,7 +1264,7 @@ void SwTOXSelectTabPage::Reset( const SfxItemSet* )
m_pTypeLB->SelectEntryPos(m_pTypeLB->GetEntryPos(reinterpret_cast<void*>(nData)));
sAutoMarkURL = INetURLObject::decode( rSh.GetTOIAutoMarkURL(),
- INetURLObject::DECODE_UNAMBIGUOUS );
+ INetURLObject::DecodeMechanism::Unambiguous );
m_pFromFileCB->Check( !sAutoMarkURL.isEmpty() );
m_pCaptionSequenceLB->Clear();
diff --git a/sw/source/ui/misc/glosbib.cxx b/sw/source/ui/misc/glosbib.cxx
index fa2804d0ffbf..85ec9bfdc5f9 100644
--- a/sw/source/ui/misc/glosbib.cxx
+++ b/sw/source/ui/misc/glosbib.cxx
@@ -79,7 +79,7 @@ SwGlossaryGroupDlg::SwGlossaryGroupDlg(vcl::Window * pParent,
for (size_t i = 0; i < rPathArr.size(); ++i)
{
INetURLObject aTempURL(rPathArr[i]);
- const OUString sPath = aTempURL.GetMainURL(INetURLObject::DECODE_WITH_CHARSET );
+ const OUString sPath = aTempURL.GetMainURL(INetURLObject::DecodeMechanism::WithCharset );
m_pPathLB->InsertEntry(sPath);
sal_uLong nCaseReadonly = 0;
utl::TempFile aTempFile(&sPath);
diff --git a/sw/source/ui/vba/vbatemplate.cxx b/sw/source/ui/vba/vbatemplate.cxx
index 69ff6ee85fea..a23735a9c8ec 100644
--- a/sw/source/ui/vba/vbatemplate.cxx
+++ b/sw/source/ui/vba/vbatemplate.cxx
@@ -74,7 +74,7 @@ SwVbaTemplate::getPath() throw ( css::uno::RuntimeException, std::exception )
if( !msFullUrl.isEmpty() )
{
INetURLObject aURL( msFullUrl );
- OUString sURL( aURL.GetMainURL( INetURLObject::DECODE_TO_IURI ) );
+ OUString sURL( aURL.GetMainURL( INetURLObject::DecodeMechanism::ToIUri ) );
sURL = sURL.copy( 0, sURL.getLength() - aURL.GetLastName().getLength() - 1 );
::osl::File::getSystemPathFromFileURL( sURL, sPath );
}
diff --git a/sw/source/uibase/app/docsh.cxx b/sw/source/uibase/app/docsh.cxx
index d425aa921aaf..8ebdc5483630 100644
--- a/sw/source/uibase/app/docsh.cxx
+++ b/sw/source/uibase/app/docsh.cxx
@@ -430,7 +430,7 @@ bool SwDocShell::SaveAs( SfxMedium& rMedium )
const INetURLObject& rOldURLObject = GetMedium()->GetURLObject();
OUString aURL = "vnd.sun.star.pkg://";
- aURL += INetURLObject::encode(rOldURLObject.GetMainURL(INetURLObject::DECODE_WITH_CHARSET), INetURLObject::PART_AUTHORITY, INetURLObject::EncodeMechanism::All);
+ aURL += INetURLObject::encode(rOldURLObject.GetMainURL(INetURLObject::DecodeMechanism::WithCharset), INetURLObject::PART_AUTHORITY, INetURLObject::EncodeMechanism::All);
aURL += "/" + INetURLObject::encode(m_pDoc->GetDBManager()->getEmbeddedName(), INetURLObject::PART_FPATH, INetURLObject::EncodeMechanism::All);
uno::Reference<sdb::XDocumentDataSource> xDataSource(xDatabaseContext->getByName(aURL), uno::UNO_QUERY);
diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx
index 7c555b262c8e..899ee0ea20e7 100644
--- a/sw/source/uibase/app/docsh2.cxx
+++ b/sw/source/uibase/app/docsh2.cxx
@@ -1567,7 +1567,7 @@ int SwFindDocShell( SfxObjectShellRef& xDocSh,
// 2. Open the file ourselves
std::unique_ptr<SfxMedium> xMed(new SfxMedium( aTmpObj.GetMainURL(
- INetURLObject::NO_DECODE ), StreamMode::READ ));
+ INetURLObject::DecodeMechanism::NONE ), StreamMode::READ ));
if( INetProtocol::File == aTmpObj.GetProtocol() )
xMed->Download(); // Touch the medium (download it)
diff --git a/sw/source/uibase/config/uinums.cxx b/sw/source/uibase/config/uinums.cxx
index a3943a968111..9d2772a32998 100644
--- a/sw/source/uibase/config/uinums.cxx
+++ b/sw/source/uibase/config/uinums.cxx
@@ -58,7 +58,7 @@ void SwChapterNumRules::Save()
aURL.setFinalSlash();
aURL.Append(CHAPTER_FILENAME);
- SfxMedium aMedium( aURL.GetMainURL(INetURLObject::NO_DECODE), StreamMode::WRITE );
+ SfxMedium aMedium( aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE), StreamMode::WRITE );
SvStream* pStream = aMedium.GetOutStream();
bool bRet = (pStream && pStream->GetError() == 0);
if (bRet)
diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx
index d822c00d7786..805b81f3d6c0 100644
--- a/sw/source/uibase/dbui/dbmgr.cxx
+++ b/sw/source/uibase/dbui/dbmgr.cxx
@@ -262,7 +262,7 @@ void SAL_CALL SwDataSourceRemovedListener::revokedDatabaseLocation(const sdb::Da
if (!pDocShell)
return;
- OUString aOwnURL = pDocShell->GetMedium()->GetURLObject().GetMainURL(INetURLObject::DECODE_WITH_CHARSET);
+ OUString aOwnURL = pDocShell->GetMedium()->GetURLObject().GetMainURL(INetURLObject::DecodeMechanism::WithCharset);
OUString sTmpName = "vnd.sun.star.pkg://";
sTmpName += INetURLObject::encode(aOwnURL, INetURLObject::PART_AUTHORITY, INetURLObject::EncodeMechanism::All);
sTmpName += "/" + m_pDBManager->getEmbeddedName();
@@ -853,7 +853,7 @@ static void lcl_SaveDebugDoc( SfxObjectShell *xTargetDocShell,
if( aTempDir.IsValid() )
{
INetURLObject aTempDirURL( aTempDir.GetURL() );
- sTempDirURL = aTempDirURL.GetMainURL( INetURLObject::NO_DECODE );
+ sTempDirURL = aTempDirURL.GetMainURL( INetURLObject::DecodeMechanism::NONE );
SAL_INFO( "sw.mailmerge", "Dump directory: " << sTempDirURL );
}
}
@@ -868,7 +868,7 @@ static void lcl_SaveDebugDoc( SfxObjectShell *xTargetDocShell,
utl::TempFile aTempFile( basename, true, &sExt, &sTempDirURL );
INetURLObject aTempFileURL( aTempFile.GetURL() );
SfxMedium* pDstMed = new SfxMedium(
- aTempFileURL.GetMainURL( INetURLObject::NO_DECODE ),
+ aTempFileURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ),
StreamMode::STD_READWRITE );
bool bAnyError = !xTargetDocShell->DoSaveAs( *pDstMed );
// xObjectShell->DoSaveCompleted crashes the mail merge unit tests, so skip it
@@ -890,7 +890,7 @@ static bool lcl_SaveDoc(
SwWrtShell& rWorkShell,
OUString * const decodedURL = nullptr )
{
- OUString url = pFileURL->GetMainURL( INetURLObject::NO_DECODE );
+ OUString url = pFileURL->GetMainURL( INetURLObject::DecodeMechanism::NONE );
if( decodedURL )
(*decodedURL) = url;
@@ -1167,7 +1167,7 @@ bool SwDBManager::MergeMailFiles(SwWrtShell* pSourceShell,
// setup the output format
std::shared_ptr<const SfxFilter> pStoreToFilter = SwIoSystem::GetFileFilter(
- pSourceDocSh->GetMedium()->GetURLObject().GetMainURL(INetURLObject::NO_DECODE));
+ pSourceDocSh->GetMedium()->GetURLObject().GetMainURL(INetURLObject::DecodeMechanism::NONE));
SfxFilterContainer* pFilterContainer = SwDocShell::Factory().GetFilterContainer();
const OUString* pStoreToFilterOptions = nullptr;
@@ -1335,7 +1335,7 @@ bool SwDBManager::MergeMailFiles(SwWrtShell* pSourceShell,
INetURLObject aEntry( sPrefix );
sLeading = aEntry.GetBase();
aEntry.removeSegment();
- sPrefix = aEntry.GetMainURL( INetURLObject::NO_DECODE );
+ sPrefix = aEntry.GetMainURL( INetURLObject::DecodeMechanism::NONE );
}
OUString sExt(comphelper::string::stripStart(pStoreToFilter->GetDefaultExtension(), '*'));
@@ -2574,7 +2574,7 @@ SwDBManager::DBConnURITypes SwDBManager::GetDBunoURI(const OUString &rURI, uno::
|| sExt.equalsIgnoreAsciiCase("xls"))
{
OUString sDBURL("sdbc:calc:");
- sDBURL += aURL.GetMainURL(INetURLObject::NO_DECODE);
+ sDBURL += aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE);
aURLAny <<= sDBURL;
type = DBCONN_CALC;
}
@@ -2583,7 +2583,7 @@ SwDBManager::DBConnURITypes SwDBManager::GetDBunoURI(const OUString &rURI, uno::
aURL.removeSegment();
aURL.removeFinalSlash();
OUString sDBURL("sdbc:dbase:");
- sDBURL += aURL.GetMainURL(INetURLObject::NO_DECODE);
+ sDBURL += aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE);
aURLAny <<= sDBURL;
type = DBCONN_DBASE;
}
@@ -2593,7 +2593,7 @@ SwDBManager::DBConnURITypes SwDBManager::GetDBunoURI(const OUString &rURI, uno::
aURL.removeFinalSlash();
OUString sDBURL("sdbc:flat:");
//only the 'path' has to be added
- sDBURL += aURL.GetMainURL(INetURLObject::NO_DECODE);
+ sDBURL += aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE);
aURLAny <<= sDBURL;
type = DBCONN_FLAT;
}
@@ -2625,7 +2625,7 @@ OUString lcl_getOwnURL(SwDocShell* pDocShell)
return aRet;
const INetURLObject& rURLObject = pDocShell->GetMedium()->GetURLObject();
- aRet = rURLObject.GetMainURL(INetURLObject::DECODE_WITH_CHARSET);
+ aRet = rURLObject.GetMainURL(INetURLObject::DecodeMechanism::WithCharset);
return aRet;
}
@@ -2666,7 +2666,7 @@ OUString SwDBManager::LoadAndRegisterDataSource(const DBConnURITypes type, const
uno::Reference<sdb::XDatabaseContext> xDBContext = sdb::DatabaseContext::create(xContext);
OUString sNewName = INetURLObject::decode( aURL.getName(),
- INetURLObject::DECODE_UNAMBIGUOUS );
+ INetURLObject::DecodeMechanism::Unambiguous );
sal_Int32 nExtLen = aURL.GetExtension().getLength();
sNewName = sNewName.replaceAt( sNewName.getLength() - nExtLen - 1, nExtLen + 1, "" );
if (pPrefix)
@@ -2685,7 +2685,7 @@ OUString SwDBManager::LoadAndRegisterDataSource(const DBConnURITypes type, const
if(!bStore)
{
//odb-file
- uno::Any aDataSource = xDBContext->getByName(aURL.GetMainURL(INetURLObject::NO_DECODE));
+ uno::Any aDataSource = xDBContext->getByName(aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE));
aDataSource >>= xNewInstance;
}
else
@@ -2797,7 +2797,7 @@ void SwDBManager::LoadAndRegisterEmbeddedDataSource(const SwDBData& rData, const
// Encode the stream name and the real path into a single URL.
const INetURLObject& rURLObject = rDocShell.GetMedium()->GetURLObject();
OUString aURL = "vnd.sun.star.pkg://";
- aURL += INetURLObject::encode(rURLObject.GetMainURL(INetURLObject::DECODE_WITH_CHARSET), INetURLObject::PART_AUTHORITY, INetURLObject::EncodeMechanism::All);
+ aURL += INetURLObject::encode(rURLObject.GetMainURL(INetURLObject::DecodeMechanism::WithCharset), INetURLObject::PART_AUTHORITY, INetURLObject::EncodeMechanism::All);
aURL += "/" + INetURLObject::encode(m_sEmbeddedName, INetURLObject::PART_FPATH, INetURLObject::EncodeMechanism::All);
uno::Reference<uno::XInterface> xDataSource(xDatabaseContext->getByName(aURL), uno::UNO_QUERY);
diff --git a/sw/source/uibase/dochdl/gloshdl.cxx b/sw/source/uibase/dochdl/gloshdl.cxx
index 07b5a7a4e415..fe066e0ab13b 100644
--- a/sw/source/uibase/dochdl/gloshdl.cxx
+++ b/sw/source/uibase/dochdl/gloshdl.cxx
@@ -115,7 +115,7 @@ void SwGlossaryHdl::SetCurGroup(const OUString &rGrp, bool bApi, bool bAlwaysCre
INetURLObject aTemp( pCurGrp->GetFileName() );
const OUString sCurBase = aTemp.getBase();
aTemp.removeSegment();
- const OUString sCurEntryPath = aTemp.GetMainURL(INetURLObject::NO_DECODE);
+ const OUString sCurEntryPath = aTemp.GetMainURL(INetURLObject::DecodeMechanism::NONE);
const std::vector<OUString> & rPathArr = rStatGlossaries.GetPathArray();
sal_uInt16 nCurrentPath = USHRT_MAX;
for (size_t nPath = 0; nPath < rPathArr.size(); ++nPath)
diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx
index 41d7a5bd63de..7566fb1a769a 100644
--- a/sw/source/uibase/dochdl/swdtflvr.cxx
+++ b/sw/source/uibase/dochdl/swdtflvr.cxx
@@ -224,9 +224,9 @@ SwTransferable::SwTransferable( SwWrtShell& rSh )
{
const INetURLObject& rURLObj = pDShell->GetMedium()->GetURLObject();
m_aObjDesc.maDisplayName = URIHelper::removePassword(
- rURLObj.GetMainURL( INetURLObject::NO_DECODE ),
+ rURLObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ),
INetURLObject::EncodeMechanism::WasEncoded,
- INetURLObject::DECODE_UNAMBIGUOUS );
+ INetURLObject::DecodeMechanism::Unambiguous );
}
PrepareOLE( m_aObjDesc );
@@ -2487,7 +2487,7 @@ bool SwTransferable::PasteAsHyperlink( TransferableDataHelper& rData,
INetURLObject aURL;
aURL.SetSmartProtocol( INetProtocol::File );
aURL.SetSmartURL( sFile );
- sFile = aURL.GetMainURL( INetURLObject::NO_DECODE );
+ sFile = aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE );
switch( rSh.GetObjCntTypeOfSelection() )
{
@@ -2537,7 +2537,7 @@ bool SwTransferable::PasteFileName( TransferableDataHelper& rData,
INetURLObject aMediaURL;
aMediaURL.SetSmartURL( sFile );
- const OUString aMediaURLStr( aMediaURL.GetMainURL( INetURLObject::NO_DECODE ) );
+ const OUString aMediaURLStr( aMediaURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
if( ::avmedia::MediaWindow::isMediaURL( aMediaURLStr, ""/*TODO?*/ ) )
{
@@ -2581,7 +2581,7 @@ bool SwTransferable::PasteFileName( TransferableDataHelper& rData,
INetURLObject aURL;
aURL.SetSmartProtocol( INetProtocol::File );
aURL.SetSmartURL( sFile );
- sFile = aURL.GetMainURL( INetURLObject::NO_DECODE );
+ sFile = aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE );
switch( rSh.GetObjCntTypeOfSelection() )
{
diff --git a/sw/source/uibase/docvw/edtwin2.cxx b/sw/source/uibase/docvw/edtwin2.cxx
index f0f65e1ae090..ea84cdd7fd8c 100644
--- a/sw/source/uibase/docvw/edtwin2.cxx
+++ b/sw/source/uibase/docvw/edtwin2.cxx
@@ -169,7 +169,7 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
sText = static_cast<const SfxStringItem*>(aContentAtPos.aFnd.pAttr)->GetValue();
sText = URIHelper::removePassword( sText,
INetURLObject::EncodeMechanism::WasEncoded,
- INetURLObject::DECODE_UNAMBIGUOUS);
+ INetURLObject::DecodeMechanism::Unambiguous);
//#i63832# remove the link target type
sal_Int32 nFound = sText.indexOf(cMarkSeparator);
if( nFound != -1 && (++nFound) < sText.getLength() )
diff --git a/sw/source/uibase/shells/grfsh.cxx b/sw/source/uibase/shells/grfsh.cxx
index 7b51f393c291..7f2eea848106 100644
--- a/sw/source/uibase/shells/grfsh.cxx
+++ b/sw/source/uibase/shells/grfsh.cxx
@@ -309,7 +309,7 @@ void SwGrfShell::Execute(SfxRequest &rReq)
if( !sGrfNm.isEmpty() )
{
aSet.Put( SvxBrushItem( INetURLObject::decode( sGrfNm,
- INetURLObject::DECODE_UNAMBIGUOUS ),
+ INetURLObject::DecodeMechanism::Unambiguous ),
sFilterNm, GPOS_LT,
SID_ATTR_GRAF_GRAPHIC ));
}
diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx
index e59d432c9007..28ec6d45194f 100644
--- a/sw/source/uibase/uiview/view2.cxx
+++ b/sw/source/uibase/uiview/view2.cxx
@@ -265,7 +265,7 @@ int SwView::InsertGraphic( const OUString &rPath, const OUString &rFilter,
SwDocShell* pDocSh = GetDocShell();
INetURLObject aTemp(
pDocSh->HasName() ?
- pDocSh->GetMedium()->GetURLObject().GetMainURL( INetURLObject::NO_DECODE ) :
+ pDocSh->GetMedium()->GetURLObject().GetMainURL( INetURLObject::DecodeMechanism::NONE ) :
OUString());
OUString sURL = URIHelper::SmartRel2Abs(
@@ -1937,7 +1937,7 @@ bool SwView::JumpToSwMark( const OUString& rMark )
const SwFormatINetFormat* pINet;
OUString sCmp;
OUString sMark( INetURLObject::decode( rMark,
- INetURLObject::DECODE_WITH_CHARSET ));
+ INetURLObject::DecodeMechanism::WithCharset ));
sal_Int32 nLastPos, nPos = sMark.indexOf( cMarkSeparator );
if( -1 != nPos )
diff --git a/sw/source/uibase/uno/unoatxt.cxx b/sw/source/uibase/uno/unoatxt.cxx
index f92a35be225c..dbb2cb51550f 100644
--- a/sw/source/uibase/uno/unoatxt.cxx
+++ b/sw/source/uibase/uno/unoatxt.cxx
@@ -379,7 +379,7 @@ uno::Reference< text::XAutoTextEntry > SwXAutoTextGroup::insertNewByName(const
if(rCfg.IsSaveRelFile())
{
INetURLObject aTemp(pGlosGroup->GetFileName());
- pGlosGroup->SetBaseURL( aTemp.GetMainURL(INetURLObject::NO_DECODE));
+ pGlosGroup->SetBaseURL( aTemp.GetMainURL(INetURLObject::DecodeMechanism::NONE));
}
else
pGlosGroup->SetBaseURL( OUString() );
diff --git a/sw/source/uibase/uno/unomailmerge.cxx b/sw/source/uibase/uno/unomailmerge.cxx
index 32e2fd1f71af..357aca692551 100644
--- a/sw/source/uibase/uno/unomailmerge.cxx
+++ b/sw/source/uibase/uno/unomailmerge.cxx
@@ -716,7 +716,7 @@ uno::Any SAL_CALL SwXMailMerge::execute(
if (aCurOutputURL.isEmpty())
{
aURLObj.removeSegment();
- aCurOutputURL = aURLObj.GetMainURL( INetURLObject::DECODE_TO_IURI );
+ aCurOutputURL = aURLObj.GetMainURL( INetURLObject::DecodeMechanism::ToIUri );
}
}
else // default empty document without URL
@@ -726,7 +726,7 @@ uno::Any SAL_CALL SwXMailMerge::execute(
}
aURLObj.SetSmartURL( aCurOutputURL );
- OUString aPath = aURLObj.GetMainURL( INetURLObject::DECODE_TO_IURI );
+ OUString aPath = aURLObj.GetMainURL( INetURLObject::DecodeMechanism::ToIUri );
const OUString aDelim( "/" );
if (!aPath.isEmpty() && !aPath.endsWith(aDelim))
diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx
index 0d4e3b094c6e..512248bb3161 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -167,7 +167,7 @@ namespace
p->sText,
INetURLObject::decode(
p->rINetAttr.GetINetFormat().GetValue(),
- INetURLObject::DECODE_UNAMBIGUOUS ),
+ INetURLObject::DecodeMechanism::Unambiguous ),
&p->rINetAttr,
n );
pMember->insert( pCnt );
@@ -570,7 +570,7 @@ void SwContentType::FillMemberList(bool* pbLevelOrVisibilityChanged)
pWrtShell->GetGrfNms( &sLink, nullptr, static_cast<const SwFlyFrameFormat*>( pFrameFormat));
pCnt = new SwGraphicContent(this, sFrameName,
INetURLObject::decode( sLink,
- INetURLObject::DECODE_UNAMBIGUOUS ),
+ INetURLObject::DecodeMechanism::Unambiguous ),
pFrameFormat->FindLayoutRect(false, &aNullPt).Top());
}
else
diff --git a/sw/source/uibase/utlui/glbltree.cxx b/sw/source/uibase/utlui/glbltree.cxx
index 649517dde047..038cf7d765f0 100644
--- a/sw/source/uibase/utlui/glbltree.cxx
+++ b/sw/source/uibase/utlui/glbltree.cxx
@@ -722,7 +722,7 @@ void SwGlobalTree::InsertRegion( const SwGlblDocContent* pCont, const OUString*
aFileNames.realloc(1);
INetURLObject aFileName;
aFileName.SetSmartURL( *pFileName );
- aFileNames.getArray()[0] = aFileName.GetMainURL( INetURLObject::NO_DECODE );
+ aFileNames.getArray()[0] = aFileName.GetMainURL( INetURLObject::DecodeMechanism::NONE );
InsertRegion( pCont, aFileNames );
}
}
@@ -934,7 +934,7 @@ void SwGlobalTree::ExecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry )
SID_SAVEASDOC, SfxCallMode::SYNCHRON ));
SfxObjectShell& rObj = *pViewFrame->GetObjectShell();
const SfxMedium* pMedium = rObj.GetMedium();
- OUString sNewFile(pMedium->GetURLObject().GetMainURL(INetURLObject::DECODE_TO_IURI));
+ OUString sNewFile(pMedium->GetURLObject().GetMainURL(INetURLObject::DecodeMechanism::ToIUri));
// Insert the area with the Doc-Name
// Bring the own Doc in the foreground
if(aFrameListener.IsValid() && !sNewFile.isEmpty())
@@ -1160,7 +1160,7 @@ void SwGlobalTree::OpenDoc(const SwGlblDocContent* pCont)
while( !bFound && pCurr )
{
if(pCurr->GetMedium() &&
- pCurr->GetMedium()->GetURLObject().GetMainURL(INetURLObject::DECODE_TO_IURI) == sFileName)
+ pCurr->GetMedium()->GetURLObject().GetMainURL(INetURLObject::DecodeMechanism::ToIUri) == sFileName)
{
bFound = true;
SwGlobalTree::SetShowShell(pCurr);
@@ -1297,7 +1297,7 @@ void SwGlobalTree::InsertRegion( const SwGlblDocContent* _pContent, const Sequen
INetURLObject aFileUrl;
aFileUrl.SetSmartURL( sFileName );
OUString sSectionName(aFileUrl.GetLastName(
- INetURLObject::DECODE_UNAMBIGUOUS).getToken(0, sfx2::cTokenSeparator));
+ INetURLObject::DecodeMechanism::Unambiguous).getToken(0, sfx2::cTokenSeparator));
sal_uInt16 nSectCount = rSh.GetSectionFormatCount();
OUString sTempSectionName(sSectionName);
sal_uInt16 nAddNumber = 0;
@@ -1355,7 +1355,7 @@ IMPL_LINK( SwGlobalTree, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg, vo
sal_Int32 nPos = 0;
for (SfxMedium* pMed : *pMedList)
{
- OUString sFileName = pMed->GetURLObject().GetMainURL( INetURLObject::NO_DECODE )
+ OUString sFileName = pMed->GetURLObject().GetMainURL( INetURLObject::DecodeMechanism::NONE )
+ OUStringLiteral1(sfx2::cTokenSeparator)
+ pMed->GetFilter()->GetFilterName()
+ OUStringLiteral1(sfx2::cTokenSeparator);
diff --git a/sw/source/uibase/utlui/navipi.cxx b/sw/source/uibase/utlui/navipi.cxx
index 18aaeb73ac72..c6eeb706c437 100644
--- a/sw/source/uibase/utlui/navipi.cxx
+++ b/sw/source/uibase/utlui/navipi.cxx
@@ -1037,7 +1037,7 @@ OUString SwNavigationPI::CreateDropFileName( TransferableDataHelper& rData )
}
if( !sFileName.isEmpty() )
{
- sFileName = INetURLObject( sFileName ).GetMainURL( INetURLObject::NO_DECODE );
+ sFileName = INetURLObject( sFileName ).GetMainURL( INetURLObject::DecodeMechanism::NONE );
}
return sFileName;
}
diff --git a/toolkit/source/awt/animatedimagespeer.cxx b/toolkit/source/awt/animatedimagespeer.cxx
index 82169b358d70..3dae4a6bfad5 100644
--- a/toolkit/source/awt/animatedimagespeer.cxx
+++ b/toolkit/source/awt/animatedimagespeer.cxx
@@ -109,7 +109,7 @@ namespace toolkit
if ( aURL.GetProtocol() != INetProtocol::PrivSoffice )
{
OSL_VERIFY( aURL.insertName( "hicontrast", false, 0 ) );
- return aURL.GetMainURL( INetURLObject::NO_DECODE );
+ return aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE );
}
// the private: scheme is not considered to be hierarchical by INetURLObject, so manually insert the
// segment
diff --git a/toolkit/source/controls/controlmodelcontainerbase.cxx b/toolkit/source/controls/controlmodelcontainerbase.cxx
index 3cf4abb36d26..32a80af35cc4 100644
--- a/toolkit/source/controls/controlmodelcontainerbase.cxx
+++ b/toolkit/source/controls/controlmodelcontainerbase.cxx
@@ -1824,7 +1824,7 @@ OUString getPhysicalLocation( const css::uno::Any& rbase, const css::uno::Any& r
{
INetURLObject urlObj(baseLocation);
urlObj.removeSegment();
- baseLocation = urlObj.GetMainURL( INetURLObject::NO_DECODE );
+ baseLocation = urlObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
const INetURLObject protocolCheck( url );
const INetProtocol protocol = protocolCheck.GetProtocol();
diff --git a/tools/qa/cppunit/test_urlobj.cxx b/tools/qa/cppunit/test_urlobj.cxx
index 161455739d95..c2f2cf78d3bf 100644
--- a/tools/qa/cppunit/test_urlobj.cxx
+++ b/tools/qa/cppunit/test_urlobj.cxx
@@ -49,18 +49,18 @@ namespace tools_urlobj
{
INetURLObject aUrl( OUString( "file://10.10.1.1/sampledir/sample.file" ) );
#ifdef LINUX
- CPPUNIT_ASSERT( aUrl.GetMainURL( INetURLObject::NO_DECODE )
+ CPPUNIT_ASSERT( aUrl.GetMainURL( INetURLObject::DecodeMechanism::NONE )
== "smb://10.10.1.1/sampledir/sample.file" );
CPPUNIT_ASSERT( aUrl.GetProtocol( ) == INetProtocol::Smb );
#endif
#ifdef _WIN32
- CPPUNIT_ASSERT( aUrl.GetMainURL( INetURLObject::NO_DECODE )
+ CPPUNIT_ASSERT( aUrl.GetMainURL( INetURLObject::DecodeMechanism::NONE )
== "file://10.10.1.1/sampledir/sample.file" );
CPPUNIT_ASSERT( aUrl.GetProtocol( ) == INetProtocol::File );
#endif
- CPPUNIT_ASSERT( aUrl.GetHost( INetURLObject::NO_DECODE )
+ CPPUNIT_ASSERT( aUrl.GetHost( INetURLObject::DecodeMechanism::NONE )
== "10.10.1.1" );
- CPPUNIT_ASSERT( aUrl.GetURLPath( INetURLObject::NO_DECODE )
+ CPPUNIT_ASSERT( aUrl.GetURLPath( INetURLObject::DecodeMechanism::NONE )
== "/sampledir/sample.file" );
CPPUNIT_ASSERT( aUrl.getName( )
== "sample.file" );
@@ -75,18 +75,18 @@ namespace tools_urlobj
setFSysPath( "\\\\137.65.170.24\\c$\\Img0001.jpg",
INetURLObject::FSYS_DETECT );
#ifdef LINUX
- CPPUNIT_ASSERT( aUrl.GetMainURL( INetURLObject::NO_DECODE )
+ CPPUNIT_ASSERT( aUrl.GetMainURL( INetURLObject::DecodeMechanism::NONE )
== "smb://137.65.170.24/c$/Img0001.jpg" );
CPPUNIT_ASSERT( aUrl.GetProtocol( ) == INetProtocol::Smb );
#endif
#ifdef _WIN32
- CPPUNIT_ASSERT( aUrl.GetMainURL( INetURLObject::NO_DECODE )
+ CPPUNIT_ASSERT( aUrl.GetMainURL( INetURLObject::DecodeMechanism::NONE )
== "file://137.65.170.24/c$/Img0001.jpg" );
CPPUNIT_ASSERT( aUrl.GetProtocol( ) == INetProtocol::File );
#endif
- CPPUNIT_ASSERT( aUrl.GetHost( INetURLObject::NO_DECODE )
+ CPPUNIT_ASSERT( aUrl.GetHost( INetURLObject::DecodeMechanism::NONE )
== "137.65.170.24" );
- CPPUNIT_ASSERT( aUrl.GetURLPath( INetURLObject::NO_DECODE )
+ CPPUNIT_ASSERT( aUrl.GetURLPath( INetURLObject::DecodeMechanism::NONE )
== "/c$/Img0001.jpg" );
CPPUNIT_ASSERT( aUrl.getName( ) == "Img0001.jpg" );
CPPUNIT_ASSERT( aUrl.getBase( ) == "Img0001" );
@@ -101,18 +101,18 @@ namespace tools_urlobj
setFSysPath( "\\\\hive-winxp-x86\\pmladek\\test2.odt",
INetURLObject::FSYS_DETECT );
#ifdef LINUX
- CPPUNIT_ASSERT( aUrl.GetMainURL( INetURLObject::NO_DECODE )
+ CPPUNIT_ASSERT( aUrl.GetMainURL( INetURLObject::DecodeMechanism::NONE )
== "smb://hive-winxp-x86/pmladek/test2.odt" );
CPPUNIT_ASSERT( aUrl.GetProtocol( ) == INetProtocol::Smb );
#endif
#ifdef _WIN32
- CPPUNIT_ASSERT( aUrl.GetMainURL( INetURLObject::NO_DECODE )
+ CPPUNIT_ASSERT( aUrl.GetMainURL( INetURLObject::DecodeMechanism::NONE )
== "file://hive-winxp-x86/pmladek/test2.odt" );
CPPUNIT_ASSERT( aUrl.GetProtocol( ) == INetProtocol::File );
#endif
- CPPUNIT_ASSERT( aUrl.GetHost( INetURLObject::NO_DECODE )
+ CPPUNIT_ASSERT( aUrl.GetHost( INetURLObject::DecodeMechanism::NONE )
== "hive-winxp-x86" );
- CPPUNIT_ASSERT( aUrl.GetURLPath( INetURLObject::NO_DECODE )
+ CPPUNIT_ASSERT( aUrl.GetURLPath( INetURLObject::DecodeMechanism::NONE )
== "/pmladek/test2.odt" );
}
@@ -120,18 +120,18 @@ namespace tools_urlobj
{
INetURLObject aUrl( OUString( "smb://10.10.1.1/sampledir/sample.file" ) );
#ifdef LINUX
- CPPUNIT_ASSERT( aUrl.GetMainURL( INetURLObject::NO_DECODE )
+ CPPUNIT_ASSERT( aUrl.GetMainURL( INetURLObject::DecodeMechanism::NONE )
== "smb://10.10.1.1/sampledir/sample.file" );
CPPUNIT_ASSERT( aUrl.GetProtocol( ) == INetProtocol::Smb );
#endif
#ifdef _WIN32
- CPPUNIT_ASSERT( aUrl.GetMainURL( INetURLObject::NO_DECODE )
+ CPPUNIT_ASSERT( aUrl.GetMainURL( INetURLObject::DecodeMechanism::NONE )
== "file://10.10.1.1/sampledir/sample.file" );
CPPUNIT_ASSERT( aUrl.GetProtocol( ) == INetProtocol::File );
#endif
- CPPUNIT_ASSERT( aUrl.GetHost( INetURLObject::NO_DECODE )
+ CPPUNIT_ASSERT( aUrl.GetHost( INetURLObject::DecodeMechanism::NONE )
== "10.10.1.1" );
- CPPUNIT_ASSERT( aUrl.GetURLPath( INetURLObject::NO_DECODE )
+ CPPUNIT_ASSERT( aUrl.GetURLPath( INetURLObject::DecodeMechanism::NONE )
== "/sampledir/sample.file" );
CPPUNIT_ASSERT( aUrl.getName( ) == "sample.file" );
CPPUNIT_ASSERT( aUrl.getBase( ) == "sample" );
@@ -144,18 +144,18 @@ namespace tools_urlobj
aUrl.setFSysPath( "//137.65.170.24/c$/Img0001.jpg",
INetURLObject::FSYS_DETECT );
#ifdef LINUX
- CPPUNIT_ASSERT( aUrl.GetMainURL( INetURLObject::NO_DECODE )
+ CPPUNIT_ASSERT( aUrl.GetMainURL( INetURLObject::DecodeMechanism::NONE )
== "smb://137.65.170.24/c$/Img0001.jpg" );
CPPUNIT_ASSERT( aUrl.GetProtocol( ) == INetProtocol::Smb );
#endif
#ifdef _WIN32
- CPPUNIT_ASSERT( aUrl.GetMainURL( INetURLObject::NO_DECODE )
+ CPPUNIT_ASSERT( aUrl.GetMainURL( INetURLObject::DecodeMechanism::NONE )
== "file://137.65.170.24/c$/Img0001.jpg" );
CPPUNIT_ASSERT( aUrl.GetProtocol( ) == INetProtocol::File );
#endif
- CPPUNIT_ASSERT( aUrl.GetHost( INetURLObject::NO_DECODE )
+ CPPUNIT_ASSERT( aUrl.GetHost( INetURLObject::DecodeMechanism::NONE )
== "137.65.170.24" );
- CPPUNIT_ASSERT( aUrl.GetURLPath( INetURLObject::NO_DECODE )
+ CPPUNIT_ASSERT( aUrl.GetURLPath( INetURLObject::DecodeMechanism::NONE )
== "/c$/Img0001.jpg" );
CPPUNIT_ASSERT( aUrl.getName( ) == "Img0001.jpg" );
CPPUNIT_ASSERT( aUrl.getBase( ) == "Img0001" );
@@ -169,18 +169,18 @@ namespace tools_urlobj
aUrl.setFSysPath( "//hive-winxp-x86/pmladek/test2.odt",
INetURLObject::FSYS_DETECT );
#ifdef LINUX
- CPPUNIT_ASSERT( aUrl.GetMainURL( INetURLObject::NO_DECODE )
+ CPPUNIT_ASSERT( aUrl.GetMainURL( INetURLObject::DecodeMechanism::NONE )
== "smb://hive-winxp-x86/pmladek/test2.odt" );
CPPUNIT_ASSERT( aUrl.GetProtocol( ) == INetProtocol::Smb );
#endif
#ifdef _WIN32
- CPPUNIT_ASSERT( aUrl.GetMainURL( INetURLObject::NO_DECODE )
+ CPPUNIT_ASSERT( aUrl.GetMainURL( INetURLObject::DecodeMechanism::NONE )
== "file://hive-winxp-x86/pmladek/test2.odt" );
CPPUNIT_ASSERT( aUrl.GetProtocol( ) == INetProtocol::File );
#endif
- CPPUNIT_ASSERT( aUrl.GetHost( INetURLObject::NO_DECODE )
+ CPPUNIT_ASSERT( aUrl.GetHost( INetURLObject::DecodeMechanism::NONE )
== "hive-winxp-x86" );
- CPPUNIT_ASSERT( aUrl.GetURLPath( INetURLObject::NO_DECODE )
+ CPPUNIT_ASSERT( aUrl.GetURLPath( INetURLObject::DecodeMechanism::NONE )
== "/pmladek/test2.odt" );
}
@@ -190,10 +190,10 @@ namespace tools_urlobj
{
INetURLObject aUrl( OUString( "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::DECODE_WITH_CHARSET ) ) );
+ OUSTR_TO_STDSTR( aUrl.GetHost( INetURLObject::DecodeMechanism::WithCharset ) ) );
CPPUNIT_ASSERT_EQUAL( std::string( "username" ), OUSTR_TO_STDSTR( aUrl.GetUser( ) ) );
CPPUNIT_ASSERT_EQUAL( std::string( "/path/to/content" ),
- OUSTR_TO_STDSTR( aUrl.GetURLPath( INetURLObject::NO_DECODE ) ) );
+ OUSTR_TO_STDSTR( aUrl.GetURLPath( INetURLObject::DecodeMechanism::NONE ) ) );
CPPUNIT_ASSERT_EQUAL_MESSAGE( "Wrong protocol found", INetProtocol::Cmis, aUrl.GetProtocol( ) );
}
@@ -202,10 +202,10 @@ namespace tools_urlobj
INetURLObject aUrl( OUString(
"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::DECODE_WITH_CHARSET ) ) );
+ OUSTR_TO_STDSTR( aUrl.GetHost( INetURLObject::DecodeMechanism::WithCharset ) ) );
CPPUNIT_ASSERT( !aUrl.HasUserData() );
CPPUNIT_ASSERT_EQUAL( std::string( "/path/to/content" ),
- OUSTR_TO_STDSTR( aUrl.GetURLPath( INetURLObject::NO_DECODE ) ) );
+ OUSTR_TO_STDSTR( aUrl.GetURLPath( INetURLObject::DecodeMechanism::NONE ) ) );
CPPUNIT_ASSERT_EQUAL_MESSAGE( "Wrong protocol found", INetProtocol::Cmis, aUrl.GetProtocol( ) );
}
}
diff --git a/tools/source/fsys/urlobj.cxx b/tools/source/fsys/urlobj.cxx
index 7d3669630c4c..73384cde65cf 100644
--- a/tools/source/fsys/urlobj.cxx
+++ b/tools/source/fsys/urlobj.cxx
@@ -583,7 +583,7 @@ std::unique_ptr<SvMemoryStream> INetURLObject::getData()
return nullptr;
}
- OUString sURLPath = GetURLPath( DECODE_WITH_CHARSET, RTL_TEXTENCODING_ISO_8859_1 );
+ OUString sURLPath = GetURLPath( DecodeMechanism::WithCharset, RTL_TEXTENCODING_ISO_8859_1 );
sal_Unicode const * pSkippedMediatype = INetMIME::scanContentType( sURLPath.getStr(), sURLPath.getStr() + sURLPath.getLength() );
sal_Int32 nCharactersSkipped = pSkippedMediatype == nullptr
? 0 : pSkippedMediatype-sURLPath.getStr();
@@ -1730,7 +1730,7 @@ bool INetURLObject::convertRelToAbs(OUString const & rTheRelURIRef,
HasError(), "tools.urlobj",
"cannot make <" << rTheRelURIRef
<< "> absolute against broken base <"
- << GetMainURL(NO_DECODE) << ">");
+ << GetMainURL(DecodeMechanism::NONE) << ">");
rWasAbsolute = false;
return false;
}
@@ -1858,7 +1858,7 @@ bool INetURLObject::convertRelToAbs(OUString const & rTheRelURIRef,
SAL_WARN_IF(
HasError(), "tools.urlobj",
"cannot make <" << rTheRelURIRef
- << "> absolute against broken base <" << GetMainURL(NO_DECODE)
+ << "> absolute against broken base <" << GetMainURL(DecodeMechanism::NONE)
<< ">");
rWasAbsolute = false;
return false;
@@ -3388,10 +3388,10 @@ OUString INetURLObject::decode(sal_Unicode const * pBegin,
{
switch (eMechanism)
{
- case NO_DECODE:
+ case DecodeMechanism::NONE:
return OUString(pBegin, pEnd - pBegin);
- case DECODE_TO_IURI:
+ case DecodeMechanism::ToIUri:
eCharset = RTL_TEXTENCODING_UTF8;
break;
@@ -3418,9 +3418,9 @@ OUString INetURLObject::decode(sal_Unicode const * pBegin,
if (
rtl::isAscii(nUTF32) &&
(
- eMechanism == DECODE_TO_IURI ||
+ eMechanism == DecodeMechanism::ToIUri ||
(
- eMechanism == DECODE_UNAMBIGUOUS &&
+ eMechanism == DecodeMechanism::Unambiguous &&
mustEncode(nUTF32, PART_UNAMBIGUOUS)
)
)
@@ -3645,16 +3645,16 @@ bool INetURLObject::operator ==(INetURLObject const & rObject) const
if ((m_aScheme.compare(
rObject.m_aScheme, m_aAbsURIRef, rObject.m_aAbsURIRef)
!= 0)
- || GetUser(NO_DECODE) != rObject.GetUser(NO_DECODE)
- || GetPass(NO_DECODE) != rObject.GetPass(NO_DECODE)
- || !GetHost(NO_DECODE).equalsIgnoreAsciiCase(
- rObject.GetHost(NO_DECODE))
+ || GetUser(DecodeMechanism::NONE) != rObject.GetUser(DecodeMechanism::NONE)
+ || GetPass(DecodeMechanism::NONE) != rObject.GetPass(DecodeMechanism::NONE)
+ || !GetHost(DecodeMechanism::NONE).equalsIgnoreAsciiCase(
+ rObject.GetHost(DecodeMechanism::NONE))
|| GetPort() != rObject.GetPort()
|| HasParam() != rObject.HasParam()
|| GetParam() != rObject.GetParam())
return false;
- OUString aPath1(GetURLPath(NO_DECODE));
- OUString aPath2(rObject.GetURLPath(NO_DECODE));
+ OUString aPath1(GetURLPath(DecodeMechanism::NONE));
+ OUString aPath2(rObject.GetURLPath(DecodeMechanism::NONE));
switch (m_eScheme)
{
case INetProtocol::File:
@@ -3841,7 +3841,7 @@ OUString INetURLObject::GetAbsURL(OUString const & rTheBaseURIRef,
eCharset, bIgnoreFragment, false,
false, FSYS_DETECT)
|| eEncodeMechanism != EncodeMechanism::WasEncoded
- || eDecodeMechanism != DECODE_TO_IURI
+ || eDecodeMechanism != DecodeMechanism::ToIUri
|| eCharset != RTL_TEXTENCODING_UTF8 ?
aTheAbsURIRef.GetMainURL(eDecodeMechanism, eCharset) :
rTheRelURIRef;
@@ -4462,11 +4462,11 @@ OUString INetURLObject::getFSysPath(FSysStyle eStyle,
OUStringBuffer aSynFSysPath;
aSynFSysPath.append("//");
if (m_aHost.isPresent() && m_aHost.getLength() > 0)
- aSynFSysPath.append(decode(m_aHost, DECODE_WITH_CHARSET,
+ aSynFSysPath.append(decode(m_aHost, DecodeMechanism::WithCharset,
RTL_TEXTENCODING_UTF8));
else
aSynFSysPath.append('.');
- aSynFSysPath.append(decode(m_aPath, DECODE_WITH_CHARSET,
+ aSynFSysPath.append(decode(m_aPath, DecodeMechanism::WithCharset,
RTL_TEXTENCODING_UTF8));
return aSynFSysPath.makeStringAndClear();
}
@@ -4479,7 +4479,7 @@ OUString INetURLObject::getFSysPath(FSysStyle eStyle,
if (pDelimiter)
*pDelimiter = '/';
- return decode(m_aPath, DECODE_WITH_CHARSET, RTL_TEXTENCODING_UTF8);
+ return decode(m_aPath, DecodeMechanism::WithCharset, RTL_TEXTENCODING_UTF8);
}
case FSYS_DOS:
@@ -4491,7 +4491,7 @@ OUString INetURLObject::getFSysPath(FSysStyle eStyle,
if (m_aHost.isPresent() && m_aHost.getLength() > 0)
{
aSynFSysPath.append("\\\\");
- aSynFSysPath.append(decode(m_aHost, DECODE_WITH_CHARSET,
+ aSynFSysPath.append(decode(m_aHost, DecodeMechanism::WithCharset,
RTL_TEXTENCODING_UTF8));
aSynFSysPath.append('\\');
}
@@ -4855,7 +4855,7 @@ OUString INetURLObject::GetPartBeforeLastName()
aTemp.clearQuery();
aTemp.removeSegment(LAST_SEGMENT, false);
aTemp.setFinalSlash();
- return aTemp.GetMainURL(DECODE_TO_IURI);
+ return aTemp.GetMainURL(DecodeMechanism::ToIUri);
}
OUString INetURLObject::GetLastName(DecodeMechanism eMechanism,
@@ -4887,7 +4887,7 @@ OUString INetURLObject::PathToFileName() const
if (osl::FileBase::getSystemPathFromFileURL(
decode(m_aAbsURIRef.getStr(),
m_aAbsURIRef.getStr() + m_aPath.getEnd(),
- NO_DECODE, RTL_TEXTENCODING_UTF8),
+ DecodeMechanism::NONE, RTL_TEXTENCODING_UTF8),
aSystemPath)
!= osl::FileBase::E_None)
return OUString();
@@ -4916,7 +4916,7 @@ void INetURLObject::SetBase(OUString const & rTheBase)
OUString INetURLObject::GetBase() const
{
- return getBase(LAST_SEGMENT, true, DECODE_WITH_CHARSET);
+ return getBase(LAST_SEGMENT, true, DecodeMechanism::WithCharset);
}
void INetURLObject::SetName(OUString const & rTheName,
diff --git a/ucb/source/core/FileAccess.cxx b/ucb/source/core/FileAccess.cxx
index e88ef9d403ac..4c2859da297a 100644
--- a/ucb/source/core/FileAccess.cxx
+++ b/ucb/source/core/FileAccess.cxx
@@ -225,15 +225,15 @@ void OFileAccess::transferImpl( const OUString& rSource,
INetURLObject aSourceObj( rSource, INetProtocol::File );
INetURLObject aDestObj( rDest, INetProtocol::File );
OUString aName = aDestObj.getName(
- INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET );
+ INetURLObject::LAST_SEGMENT, true, INetURLObject::DecodeMechanism::WithCharset );
OUString aDestURL;
- OUString aSourceURL = aSourceObj.GetMainURL( INetURLObject::NO_DECODE );
+ OUString aSourceURL = aSourceObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
if ( aDestObj.removeSegment() )
{
// hierarchical URL.
aDestObj.setFinalSlash();
- aDestURL = aDestObj.GetMainURL( INetURLObject::NO_DECODE );
+ aDestURL = aDestObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
}
else
{
@@ -252,7 +252,7 @@ void OFileAccess::transferImpl( const OUString& rSource,
Reference< XMacroExpander > xExpander = theMacroExpander::get(m_xContext);
aDestURL = xExpander->expandMacros(
- aDestObj.GetURLPath( INetURLObject::DECODE_WITH_CHARSET ) );
+ aDestObj.GetURLPath( INetURLObject::DecodeMechanism::WithCharset ) );
}
catch ( Exception const & )
{
@@ -306,7 +306,7 @@ void OFileAccess::kill( const OUString& FileURL )
{
// SfxContentHelper::Kill
INetURLObject aDeleteObj( FileURL, INetProtocol::File );
- ucbhelper::Content aCnt( aDeleteObj.GetMainURL( INetURLObject::NO_DECODE ), mxEnvironment, comphelper::getProcessComponentContext() );
+ ucbhelper::Content aCnt( aDeleteObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ), mxEnvironment, comphelper::getProcessComponentContext() );
try
{
aCnt.executeCommand( "delete", makeAny( true ) );
@@ -324,7 +324,7 @@ sal_Bool OFileAccess::isFolder( const OUString& FileURL )
try
{
INetURLObject aURLObj( FileURL, INetProtocol::File );
- ucbhelper::Content aCnt( aURLObj.GetMainURL( INetURLObject::NO_DECODE ), mxEnvironment, comphelper::getProcessComponentContext() );
+ ucbhelper::Content aCnt( aURLObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ), mxEnvironment, comphelper::getProcessComponentContext() );
bRet = aCnt.isFolder();
}
catch (const Exception &) {}
@@ -335,7 +335,7 @@ sal_Bool OFileAccess::isReadOnly( const OUString& FileURL )
throw(CommandAbortedException, Exception, RuntimeException, std::exception)
{
INetURLObject aURLObj( FileURL, INetProtocol::File );
- ucbhelper::Content aCnt( aURLObj.GetMainURL( INetURLObject::NO_DECODE ), mxEnvironment, comphelper::getProcessComponentContext() );
+ ucbhelper::Content aCnt( aURLObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ), mxEnvironment, comphelper::getProcessComponentContext() );
Any aRetAny = aCnt.getPropertyValue("IsReadOnly");
bool bRet = false;
aRetAny >>= bRet;
@@ -346,7 +346,7 @@ void OFileAccess::setReadOnly( const OUString& FileURL, sal_Bool bReadOnly )
throw(CommandAbortedException, Exception, RuntimeException, std::exception)
{
INetURLObject aURLObj( FileURL, INetProtocol::File );
- ucbhelper::Content aCnt( aURLObj.GetMainURL( INetURLObject::NO_DECODE ), mxEnvironment, comphelper::getProcessComponentContext() );
+ ucbhelper::Content aCnt( aURLObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ), mxEnvironment, comphelper::getProcessComponentContext() );
aCnt.setPropertyValue("IsReadOnly", Any(bReadOnly) );
}
@@ -359,20 +359,20 @@ void OFileAccess::createFolder( const OUString& NewFolderURL )
// SfxContentHelper::MakeFolder
INetURLObject aURL( NewFolderURL, INetProtocol::File );
- OUString aTitle = aURL.getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET );
+ OUString aTitle = aURL.getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::DecodeMechanism::WithCharset );
if ( !aTitle.isEmpty() )
{
aURL.removeSegment();
// Does the base folder exist? Otherwise create it first
- OUString aBaseFolderURLStr = aURL.GetMainURL( INetURLObject::NO_DECODE );
+ OUString aBaseFolderURLStr = aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE );
if( !isFolder( aBaseFolderURLStr ) )
{
createFolder( aBaseFolderURLStr );
}
}
- ucbhelper::Content aCnt( aURL.GetMainURL( INetURLObject::NO_DECODE ), mxEnvironment, comphelper::getProcessComponentContext() );
+ ucbhelper::Content aCnt( aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), mxEnvironment, comphelper::getProcessComponentContext() );
Sequence< ContentInfo > aInfo = aCnt.queryCreatableContentsInfo();
sal_Int32 nCount = aInfo.getLength();
@@ -423,7 +423,7 @@ sal_Int32 OFileAccess::getSize( const OUString& FileURL )
sal_Int32 nSize = 0;
sal_Int64 nTemp = 0;
INetURLObject aObj( FileURL, INetProtocol::File );
- ucbhelper::Content aCnt( aObj.GetMainURL( INetURLObject::NO_DECODE ), mxEnvironment, comphelper::getProcessComponentContext() );
+ ucbhelper::Content aCnt( aObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ), mxEnvironment, comphelper::getProcessComponentContext() );
aCnt.getPropertyValue( "Size" ) >>= nTemp;
nSize = (sal_Int32)nTemp;
return nSize;
@@ -433,7 +433,7 @@ OUString OFileAccess::getContentType( const OUString& FileURL )
throw(CommandAbortedException, Exception, RuntimeException, std::exception)
{
INetURLObject aObj( FileURL, INetProtocol::File );
- ucbhelper::Content aCnt( aObj.GetMainURL( INetURLObject::NO_DECODE ), mxEnvironment, comphelper::getProcessComponentContext() );
+ ucbhelper::Content aCnt( aObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ), mxEnvironment, comphelper::getProcessComponentContext() );
Reference< XContent > xContent = aCnt.get();
OUString aTypeStr = xContent->getContentType();
@@ -447,7 +447,7 @@ css::util::DateTime OFileAccess::getDateTimeModified( const OUString& FileURL )
css::util::DateTime aDateTime;
Reference< XCommandEnvironment > aCmdEnv;
- ucbhelper::Content aYoung( aFileObj.GetMainURL( INetURLObject::NO_DECODE ), aCmdEnv, comphelper::getProcessComponentContext() );
+ ucbhelper::Content aYoung( aFileObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ), aCmdEnv, comphelper::getProcessComponentContext() );
aYoung.getPropertyValue("DateModified") >>= aDateTime;
return aDateTime;
}
@@ -462,7 +462,7 @@ Sequence< OUString > OFileAccess::getFolderContents( const OUString& FolderURL,
StringList_Impl* pFiles = nullptr;
INetURLObject aFolderObj( FolderURL, INetProtocol::File );
- ucbhelper::Content aCnt( aFolderObj.GetMainURL( INetURLObject::NO_DECODE ), mxEnvironment, comphelper::getProcessComponentContext() );
+ ucbhelper::Content aCnt( aFolderObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ), mxEnvironment, comphelper::getProcessComponentContext() );
Reference< XResultSet > xResultSet;
Sequence< OUString > aProps(0);
@@ -486,7 +486,7 @@ Sequence< OUString > OFileAccess::getFolderContents( const OUString& FolderURL,
{
OUString aId = xContentAccess->queryContentIdentifierString();
INetURLObject aURL( aId, INetProtocol::File );
- OUString* pFile = new OUString( aURL.GetMainURL( INetURLObject::NO_DECODE ) );
+ OUString* pFile = new OUString( aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
pFiles->push_back( pFile );
}
}
@@ -534,7 +534,7 @@ Reference< XInputStream > OFileAccess::openFileRead( const OUString& FileURL )
{
Reference< XInputStream > xRet;
INetURLObject aObj( FileURL, INetProtocol::File );
- ucbhelper::Content aCnt( aObj.GetMainURL( INetURLObject::NO_DECODE ), mxEnvironment, comphelper::getProcessComponentContext() );
+ ucbhelper::Content aCnt( aObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ), mxEnvironment, comphelper::getProcessComponentContext() );
Reference< XActiveDataSink > xSink = static_cast<XActiveDataSink*>(new OActiveDataSink());
@@ -578,7 +578,7 @@ Reference< XStream > OFileAccess::openFileReadWrite( const OUString& FileURL )
aCmdArg <<= aArg;
INetURLObject aFileObj( FileURL, INetProtocol::File );
- ucbhelper::Content aCnt( aFileObj.GetMainURL( INetURLObject::NO_DECODE ), mxEnvironment, comphelper::getProcessComponentContext() );
+ ucbhelper::Content aCnt( aFileObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ), mxEnvironment, comphelper::getProcessComponentContext() );
// Be silent...
Reference< XInteractionHandler > xIH;
@@ -698,7 +698,7 @@ void SAL_CALL OFileAccess::writeFile( const OUString& FileURL,
try
{
ucbhelper::Content aCnt(
- aURL.GetMainURL( INetURLObject::NO_DECODE ), mxEnvironment,
+ aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), mxEnvironment,
comphelper::getProcessComponentContext() );
try
@@ -719,7 +719,7 @@ void SAL_CALL OFileAccess::writeFile( const OUString& FileURL,
if ( aParentURLObj.removeSegment() )
{
OUString aParentURL
- = aParentURLObj.GetMainURL( INetURLObject::NO_DECODE );
+ = aParentURLObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
// ensure all parent folders exist.
createFolder( aParentURL );
@@ -728,7 +728,7 @@ void SAL_CALL OFileAccess::writeFile( const OUString& FileURL,
OUString aTitle
= aURL.getName( INetURLObject::LAST_SEGMENT,
true,
- INetURLObject::DECODE_WITH_CHARSET );
+ INetURLObject::DecodeMechanism::WithCharset );
if ( createNewFile( aParentURL, aTitle, data ) )
{
// success
@@ -745,7 +745,7 @@ sal_Bool OFileAccess::isHidden( const OUString& FileURL )
throw(CommandAbortedException, Exception, RuntimeException, std::exception)
{
INetURLObject aURLObj( FileURL, INetProtocol::File );
- ucbhelper::Content aCnt( aURLObj.GetMainURL( INetURLObject::NO_DECODE ), mxEnvironment, comphelper::getProcessComponentContext() );
+ ucbhelper::Content aCnt( aURLObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ), mxEnvironment, comphelper::getProcessComponentContext() );
Any aRetAny = aCnt.getPropertyValue("IsHidden");
bool bRet = false;
aRetAny >>= bRet;
@@ -756,7 +756,7 @@ void OFileAccess::setHidden( const OUString& FileURL, sal_Bool bHidden )
throw(CommandAbortedException, Exception, RuntimeException, std::exception)
{
INetURLObject aURLObj( FileURL, INetProtocol::File );
- ucbhelper::Content aCnt( aURLObj.GetMainURL( INetURLObject::NO_DECODE ), mxEnvironment, comphelper::getProcessComponentContext() );
+ ucbhelper::Content aCnt( aURLObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ), mxEnvironment, comphelper::getProcessComponentContext() );
aCnt.setPropertyValue("IsHidden", Any(bHidden) );
}
diff --git a/ucb/source/ucp/cmis/cmis_content.cxx b/ucb/source/ucp/cmis/cmis_content.cxx
index c5fa4a555c82..05de98078935 100644
--- a/ucb/source/ucp/cmis/cmis_content.cxx
+++ b/ucb/source/ucp/cmis/cmis_content.cxx
@@ -536,9 +536,9 @@ namespace cmis
// It's weird, but needed to handle case where the path isn't the folders/files
// names separated by '/' (as in Lotus Live)
INetURLObject aParentUrl( m_sURL );
- string sName = OUSTR_TO_STDSTR( aParentUrl.getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET ) );
+ string sName = OUSTR_TO_STDSTR( aParentUrl.getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::DecodeMechanism::WithCharset ) );
aParentUrl.removeSegment( );
- OUString sParentUrl = aParentUrl.GetMainURL( INetURLObject::NO_DECODE );
+ OUString sParentUrl = aParentUrl.GetMainURL( INetURLObject::DecodeMechanism::NONE );
// Avoid infinite recursion if sParentUrl == m_sURL
if (sParentUrl != m_sURL)
{
@@ -1697,7 +1697,7 @@ namespace cmis
{
URL aCmisUrl( m_sURL );
aUrl.removeSegment( );
- aCmisUrl.setObjectPath( aUrl.GetURLPath( INetURLObject::DECODE_WITH_CHARSET ) );
+ aCmisUrl.setObjectPath( aUrl.GetURLPath( INetURLObject::DecodeMechanism::WithCharset ) );
parentUrl = aCmisUrl.asString( );
}
}
@@ -2043,7 +2043,7 @@ namespace cmis
// TODO Cache the objects
INetURLObject aURL( m_sURL );
- OUString sUser = aURL.GetUser( INetURLObject::DECODE_WITH_CHARSET );
+ OUString sUser = aURL.GetUser( INetURLObject::DecodeMechanism::WithCharset );
URL aUrl( m_sURL );
OUString sPath( m_sObjectPath );
diff --git a/ucb/source/ucp/cmis/cmis_url.cxx b/ucb/source/ucp/cmis/cmis_url.cxx
index 151b85c22323..3fbfce3bad70 100644
--- a/ucb/source/ucp/cmis/cmis_url.cxx
+++ b/ucb/source/ucp/cmis/cmis_url.cxx
@@ -23,17 +23,17 @@ namespace cmis
INetURLObject aUrl( urlStr );
// Decode the authority to get the binding URL and repository id
- OUString sDecodedHost = aUrl.GetHost( INetURLObject::DECODE_WITH_CHARSET );
+ OUString sDecodedHost = aUrl.GetHost( INetURLObject::DecodeMechanism::WithCharset );
INetURLObject aHostUrl( sDecodedHost );
m_sBindingUrl = aHostUrl.GetURLNoMark( );
m_sRepositoryId = aHostUrl.GetMark( );
- m_sUser = aUrl.GetUser( INetURLObject::DECODE_WITH_CHARSET );
- m_sPass = aUrl.GetPass( INetURLObject::DECODE_WITH_CHARSET );
+ m_sUser = aUrl.GetUser( INetURLObject::DecodeMechanism::WithCharset );
+ m_sPass = aUrl.GetPass( INetURLObject::DecodeMechanism::WithCharset );
// Store the path to the object
- m_sPath = aUrl.GetURLPath( INetURLObject::DECODE_WITH_CHARSET );
- m_sId = aUrl.GetMark( INetURLObject::DECODE_WITH_CHARSET );
+ m_sPath = aUrl.GetURLPath( INetURLObject::DecodeMechanism::WithCharset );
+ m_sId = aUrl.GetMark( INetURLObject::DecodeMechanism::WithCharset );
if ( m_sPath == "/" && m_sBindingUrl.indexOf( "google" ) != -1 )
m_sId = "root";
diff --git a/unotools/source/config/pathoptions.cxx b/unotools/source/config/pathoptions.cxx
index d9052456d3d2..5accec7861a4 100644
--- a/unotools/source/config/pathoptions.cxx
+++ b/unotools/source/config/pathoptions.cxx
@@ -313,7 +313,7 @@ OUString SvtPathOptions_Impl::ExpandMacros( const OUString& rPath ) const
const INetURLObject aParser( rPath );
if ( aParser.GetProtocol() == INetProtocol::VndSunStarExpand )
- sExpanded = m_xMacroExpander->expandMacros( aParser.GetURLPath( INetURLObject::DECODE_WITH_CHARSET ) );
+ sExpanded = m_xMacroExpander->expandMacros( aParser.GetURLPath( INetURLObject::DecodeMechanism::WithCharset ) );
return sExpanded;
}
@@ -744,15 +744,15 @@ bool SvtPathOptions::SearchFile( OUString& rIniFile, Paths ePath )
}
while ( nIniIndex >= 0 );
- if ( !::utl::UCBContentHelper::Exists( aObj.GetMainURL( INetURLObject::NO_DECODE ) ) )
+ if ( !::utl::UCBContentHelper::Exists( aObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ) ) )
{
aObj.SetSmartURL( GetConfigPath() );
aObj.insertName( aIniFile );
- bRet = ::utl::UCBContentHelper::Exists( aObj.GetMainURL( INetURLObject::NO_DECODE ) );
+ bRet = ::utl::UCBContentHelper::Exists( aObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
}
if ( bRet )
- rIniFile = aObj.GetMainURL( INetURLObject::NO_DECODE );
+ rIniFile = aObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
break;
}
@@ -809,7 +809,7 @@ bool SvtPathOptions::SearchFile( OUString& rIniFile, Paths ePath )
if ( aObj.GetProtocol() == INetProtocol::VndSunStarExpand )
{
Reference< XMacroExpander > xMacroExpander = theMacroExpander::get( ::comphelper::getProcessComponentContext() );
- const OUString sExpandedPath = xMacroExpander->expandMacros( aObj.GetURLPath( INetURLObject::DECODE_WITH_CHARSET ) );
+ const OUString sExpandedPath = xMacroExpander->expandMacros( aObj.GetURLPath( INetURLObject::DecodeMechanism::WithCharset ) );
aObj.SetURL( sExpandedPath );
}
@@ -821,7 +821,7 @@ bool SvtPathOptions::SearchFile( OUString& rIniFile, Paths ePath )
}
while ( nIniIndex >= 0 );
- bRet = ::utl::UCBContentHelper::Exists( aObj.GetMainURL( INetURLObject::NO_DECODE ) );
+ bRet = ::utl::UCBContentHelper::Exists( aObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
if ( bRet )
{
@@ -829,11 +829,11 @@ bool SvtPathOptions::SearchFile( OUString& rIniFile, Paths ePath )
{
OUString sTmp;
osl::FileBase::getSystemPathFromFileURL(
- aObj.GetMainURL( INetURLObject::NO_DECODE ), sTmp );
+ aObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ), sTmp );
rIniFile = sTmp;
}
else
- rIniFile = aObj.GetMainURL( INetURLObject::NO_DECODE );
+ rIniFile = aObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
break;
}
}
diff --git a/unotools/source/ucbhelper/ucbhelper.cxx b/unotools/source/ucbhelper/ucbhelper.cxx
index 93ad0a670925..37844f2b6dd3 100644
--- a/unotools/source/ucbhelper/ucbhelper.cxx
+++ b/unotools/source/ucbhelper/ucbhelper.cxx
@@ -65,7 +65,7 @@ namespace {
OUString canonic(OUString const & url) {
INetURLObject o(url);
SAL_WARN_IF(o.HasError(), "unotools.ucbhelper", "Invalid URL \"" << url << '"');
- return o.GetMainURL(INetURLObject::NO_DECODE);
+ return o.GetMainURL(INetURLObject::DecodeMechanism::NONE);
}
ucbhelper::Content content(OUString const & url) {
@@ -77,7 +77,7 @@ ucbhelper::Content content(OUString const & url) {
ucbhelper::Content content(INetURLObject const & url) {
return ucbhelper::Content(
- url.GetMainURL(INetURLObject::NO_DECODE),
+ url.GetMainURL(INetURLObject::DecodeMechanism::NONE),
utl::UCBContentHelper::getDefaultCommandEnvironment(),
comphelper::getProcessComponentContext());
}
@@ -381,17 +381,17 @@ bool utl::UCBContentHelper::Exists(OUString const & url) {
OUString name(
o.getName(
INetURLObject::LAST_SEGMENT, true,
- INetURLObject::DECODE_WITH_CHARSET));
+ INetURLObject::DecodeMechanism::WithCharset));
o.removeSegment();
o.removeFinalSlash();
std::vector<OUString> cs(
- getContents(o.GetMainURL(INetURLObject::NO_DECODE)));
+ getContents(o.GetMainURL(INetURLObject::DecodeMechanism::NONE)));
for (std::vector<OUString>::iterator i(cs.begin()); i != cs.end();
++i)
{
if (INetURLObject(*i).getName(
INetURLObject::LAST_SEGMENT, true,
- INetURLObject::DECODE_WITH_CHARSET).
+ INetURLObject::DecodeMechanism::WithCharset).
equalsIgnoreAsciiCase(name))
{
return true;
@@ -474,11 +474,11 @@ bool utl::UCBContentHelper::ensureFolder(
try
{
INetURLObject aURL( rFolder );
- OUString aTitle = aURL.getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET );
+ OUString aTitle = aURL.getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::DecodeMechanism::WithCharset );
aURL.removeSegment();
::ucbhelper::Content aParent;
- if ( ::ucbhelper::Content::create( aURL.GetMainURL( INetURLObject::NO_DECODE ),
+ if ( ::ucbhelper::Content::create( aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ),
xEnv, xCtx, aParent ) )
{
return ::utl::UCBContentHelper::MakeFolder(aParent, aTitle, result);
diff --git a/uui/source/fltdlg.cxx b/uui/source/fltdlg.cxx
index 8bec836f8b66..4aa2baa2c8e9 100644
--- a/uui/source/fltdlg.cxx
+++ b/uui/source/fltdlg.cxx
@@ -212,7 +212,7 @@ OUString FilterDialog::impl_buildUIFileName( const OUString& sName )
{
INetURLObject aBuilder ( sName );
Size aSize = m_pFtURL->GetOutputSizePixel();
- sShortName = aBuilder.getAbbreviated( xStringCalculator, aSize.Width(), INetURLObject::DECODE_UNAMBIGUOUS );
+ sShortName = aBuilder.getAbbreviated( xStringCalculator, aSize.Width(), INetURLObject::DecodeMechanism::Unambiguous );
}
}
diff --git a/uui/source/passworddlg.cxx b/uui/source/passworddlg.cxx
index 490af47a9c16..4a403bea6370 100644
--- a/uui/source/passworddlg.cxx
+++ b/uui/source/passworddlg.cxx
@@ -75,7 +75,7 @@ PasswordDialog::PasswordDialog(vcl::Window* _pParent,
OUString aMessage(ResId(nStrId, *pResourceMgr).toString());
INetURLObject url(aDocURL);
aMessage += url.HasError()
- ? aDocURL : url.GetMainURL(INetURLObject::DECODE_UNAMBIGUOUS);
+ ? aDocURL : url.GetMainURL(INetURLObject::DecodeMechanism::Unambiguous);
m_pFTPassword->SetText(aMessage);
if (bIsSimplePasswordRequest)
diff --git a/vbahelper/source/vbahelper/vbadocumentbase.cxx b/vbahelper/source/vbahelper/vbadocumentbase.cxx
index 335aef9e7c24..899d0de3049a 100644
--- a/vbahelper/source/vbahelper/vbadocumentbase.cxx
+++ b/vbahelper/source/vbahelper/vbadocumentbase.cxx
@@ -79,7 +79,7 @@ OUString
VbaDocumentBase::getPath() throw (uno::RuntimeException, std::exception)
{
INetURLObject aURL( getModel()->getURL() );
- OUString sURL = aURL.GetMainURL( INetURLObject::DECODE_TO_IURI );
+ OUString sURL = aURL.GetMainURL( INetURLObject::DecodeMechanism::ToIUri );
OUString sPath;
if( !sURL.isEmpty() )
{
diff --git a/vcl/source/filter/graphicfilter.cxx b/vcl/source/filter/graphicfilter.cxx
index 1a77aae2d973..8e4d8b22bbf0 100644
--- a/vcl/source/filter/graphicfilter.cxx
+++ b/vcl/source/filter/graphicfilter.cxx
@@ -111,7 +111,7 @@ static bool DirEntryExists( const INetURLObject& rObj )
try
{
- ::ucbhelper::Content aCnt( rObj.GetMainURL( INetURLObject::NO_DECODE ),
+ ::ucbhelper::Content aCnt( rObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ),
css::uno::Reference< css::ucb::XCommandEnvironment >(),
comphelper::getProcessComponentContext() );
@@ -1280,7 +1280,7 @@ sal_uInt16 GraphicFilter::CanImportGraphic( const INetURLObject& rPath,
sal_uInt16 nRetValue = GRFILTER_FORMATERROR;
SAL_WARN_IF( rPath.GetProtocol() == INetProtocol::NotValid, "vcl", "GraphicFilter::CanImportGraphic() : ProtType == INetProtocol::NotValid" );
- OUString aMainUrl( rPath.GetMainURL( INetURLObject::NO_DECODE ) );
+ OUString aMainUrl( rPath.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
std::unique_ptr<SvStream> xStream(::utl::UcbStreamHelper::CreateStream( aMainUrl, StreamMode::READ | StreamMode::SHARE_DENYNONE ));
if (xStream)
{
@@ -1310,7 +1310,7 @@ sal_uInt16 GraphicFilter::ImportGraphic( Graphic& rGraphic, const INetURLObject&
sal_uInt16 nRetValue = GRFILTER_FORMATERROR;
SAL_WARN_IF( rPath.GetProtocol() == INetProtocol::NotValid, "vcl", "GraphicFilter::ImportGraphic() : ProtType == INetProtocol::NotValid" );
- OUString aMainUrl( rPath.GetMainURL( INetURLObject::NO_DECODE ) );
+ OUString aMainUrl( rPath.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
std::unique_ptr<SvStream> xStream(::utl::UcbStreamHelper::CreateStream( aMainUrl, StreamMode::READ | StreamMode::SHARE_DENYNONE ));
if (xStream)
{
@@ -1810,7 +1810,7 @@ sal_uInt16 GraphicFilter::ExportGraphic( const Graphic& rGraphic, const INetURLO
SAL_WARN_IF( rPath.GetProtocol() == INetProtocol::NotValid, "vcl", "GraphicFilter::ExportGraphic() : ProtType == INetProtocol::NotValid" );
bool bAlreadyExists = DirEntryExists( rPath );
- OUString aMainUrl( rPath.GetMainURL( INetURLObject::NO_DECODE ) );
+ OUString aMainUrl( rPath.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
std::unique_ptr<SvStream> xStream(::utl::UcbStreamHelper::CreateStream( aMainUrl, StreamMode::WRITE | StreamMode::TRUNC ));
if (xStream)
{
diff --git a/vcl/source/filter/graphicfilter2.cxx b/vcl/source/filter/graphicfilter2.cxx
index 66c83e9cfc92..3ec8c80c9a80 100644
--- a/vcl/source/filter/graphicfilter2.cxx
+++ b/vcl/source/filter/graphicfilter2.cxx
@@ -28,7 +28,7 @@
#define DATA_SIZE 640
GraphicDescriptor::GraphicDescriptor( const INetURLObject& rPath ) :
- pFileStm( ::utl::UcbStreamHelper::CreateStream( rPath.GetMainURL( INetURLObject::NO_DECODE ), StreamMode::READ ) ),
+ pFileStm( ::utl::UcbStreamHelper::CreateStream( rPath.GetMainURL( INetURLObject::DecodeMechanism::NONE ), StreamMode::READ ) ),
aPathExt( rPath.GetFileExtension().toAsciiLowerCase() ),
bOwnStream( true )
{
diff --git a/vcl/source/filter/sgvmain.cxx b/vcl/source/filter/sgvmain.cxx
index cc0207513233..adc956a6e4c0 100644
--- a/vcl/source/filter/sgvmain.cxx
+++ b/vcl/source/filter/sgvmain.cxx
@@ -720,7 +720,7 @@ void BmapType::Draw(OutputDevice& rOut)
(sal_Int32)Filename[ 0 ], RTL_TEXTENCODING_UTF8 );
INetURLObject aFNam( aStr );
- SvStream* pInp = ::utl::UcbStreamHelper::CreateStream( aFNam.GetMainURL( INetURLObject::NO_DECODE ), StreamMode::READ );
+ SvStream* pInp = ::utl::UcbStreamHelper::CreateStream( aFNam.GetMainURL( INetURLObject::DecodeMechanism::NONE ), StreamMode::READ );
if ( pInp )
{
unsigned char nSgfTyp = CheckSgfTyp( *pInp,nVersion);
@@ -919,7 +919,7 @@ bool SgfSDrwFilter(SvStream& rInp, GDIMetaFile& rMtf, const INetURLObject& _aIni
pSgfFonts = new SgfFontLst;
- pSgfFonts->AssignFN( aIniPath.GetMainURL( INetURLObject::NO_DECODE ) );
+ pSgfFonts->AssignFN( aIniPath.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
nFileStart=rInp.Tell();
ReadSgfHeader( rInp, aHead );
if (aHead.ChkMagic() && aHead.Typ==SgfStarDraw && aHead.Version==SGV_VERSION) {
diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx
index 2f8e645a81c7..29775ea8eda7 100644
--- a/vcl/source/gdi/impgraph.cxx
+++ b/vcl/source/gdi/impgraph.cxx
@@ -316,7 +316,7 @@ ImpSwapFile::~ImpSwapFile()
{
try
{
- ::ucbhelper::Content aCnt( aSwapURL.GetMainURL( INetURLObject::NO_DECODE ),
+ ::ucbhelper::Content aCnt( aSwapURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ),
css::uno::Reference< css::ucb::XCommandEnvironment >(),
comphelper::getProcessComponentContext() );
@@ -1122,12 +1122,12 @@ bool ImpGraphic::ImplSwapOut()
::utl::TempFile aTempFile;
const INetURLObject aTmpURL( aTempFile.GetURL() );
- if( !aTmpURL.GetMainURL( INetURLObject::NO_DECODE ).isEmpty() )
+ if( !aTmpURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ).isEmpty() )
{
std::unique_ptr<SvStream> xOStm;
try
{
- xOStm.reset(::utl::UcbStreamHelper::CreateStream( aTmpURL.GetMainURL( INetURLObject::NO_DECODE ), StreamMode::READWRITE | StreamMode::SHARE_DENYWRITE ));
+ xOStm.reset(::utl::UcbStreamHelper::CreateStream( aTmpURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), StreamMode::READWRITE | StreamMode::SHARE_DENYWRITE ));
}
catch( const css::uno::Exception& )
{
@@ -1149,7 +1149,7 @@ bool ImpGraphic::ImplSwapOut()
try
{
- ::ucbhelper::Content aCnt( aTmpURL.GetMainURL( INetURLObject::NO_DECODE ),
+ ::ucbhelper::Content aCnt( aTmpURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ),
css::uno::Reference< css::ucb::XCommandEnvironment >(),
comphelper::getProcessComponentContext() );
@@ -1217,7 +1217,7 @@ bool ImpGraphic::ImplSwapIn()
OUString aSwapURL;
if( mpSwapFile )
- aSwapURL = mpSwapFile->aSwapURL.GetMainURL( INetURLObject::NO_DECODE );
+ aSwapURL = mpSwapFile->aSwapURL.GetMainURL( INetURLObject::DecodeMechanism::NONE );
if( !aSwapURL.isEmpty() )
{
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index 2eb6e6272082..01d60bb8080f 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -3902,7 +3902,7 @@ we check in the following sequence:
if( m_aContext.RelFsys && eBaseProtocol == eTargetProtocol && eTargetProtocol == INetProtocol::File )
bSetRelative = true;
- OUString aFragment = aTargetURL.GetMark( INetURLObject::NO_DECODE /*DECODE_WITH_CHARSET*/ ); //fragment as is,
+ OUString aFragment = aTargetURL.GetMark( INetURLObject::DecodeMechanism::NONE /*DecodeMechanism::WithCharset*/ ); //fragment as is,
if( !bSetGoToRMode )
{
switch( m_aContext.DefaultLinkAction )
@@ -3938,12 +3938,12 @@ we check in the following sequence:
if( bSetGoToRMode )
{
//add the fragment
- OUString aURLNoMark = aTargetURL.GetURLNoMark( INetURLObject::DECODE_WITH_CHARSET );
+ OUString aURLNoMark = aTargetURL.GetURLNoMark( INetURLObject::DecodeMechanism::WithCharset );
aLine.append("/GoToR");
aLine.append("/F");
appendLiteralStringEncrypt( bSetRelative ? INetURLObject::GetRelURL( m_aContext.BaseURL, aURLNoMark,
INetURLObject::EncodeMechanism::WasEncoded,
- INetURLObject::DECODE_WITH_CHARSET ) :
+ INetURLObject::DecodeMechanism::WithCharset ) :
aURLNoMark, rLink.m_nObject, aLine, osl_getThreadTextEncoding() );
if( !aFragment.isEmpty() )
{
@@ -3963,10 +3963,10 @@ we check in the following sequence:
//substitute the fragment
aTargetURL.SetMark( OStringToOUString(aLineLoc.makeStringAndClear(), RTL_TEXTENCODING_ASCII_US) );
}
- OUString aURL = aTargetURL.GetMainURL( bFileSpec ? INetURLObject::DECODE_WITH_CHARSET : INetURLObject::NO_DECODE );
+ OUString aURL = aTargetURL.GetMainURL( bFileSpec ? INetURLObject::DecodeMechanism::WithCharset : INetURLObject::DecodeMechanism::NONE );
appendLiteralStringEncrypt(bSetRelative ? INetURLObject::GetRelURL( m_aContext.BaseURL, aURL,
INetURLObject::EncodeMechanism::WasEncoded,
- bFileSpec ? INetURLObject::DECODE_WITH_CHARSET : INetURLObject::NO_DECODE
+ bFileSpec ? INetURLObject::DecodeMechanism::WithCharset : INetURLObject::DecodeMechanism::NONE
) :
aURL , rLink.m_nObject, aLine, osl_getThreadTextEncoding() );
}
@@ -7367,7 +7367,7 @@ sal_Int32 PDFWriterImpl::emitNamedDestinations()
OUString( "http://ahost.ax" ) ); //dummy location, won't be used
aLocalURL.SetMark( rDest.m_aDestName );
- const OUString aName = aLocalURL.GetMark( INetURLObject::NO_DECODE ); //same coding as
+ const OUString aName = aLocalURL.GetMark( INetURLObject::DecodeMechanism::NONE ); //same coding as
// in link creation ( see PDFWriterImpl::emitLinkAnnotations )
const PDFPage& rDestPage = m_aPages[ rDest.m_nPage ];
diff --git a/vcl/source/image/ImplImageTree.cxx b/vcl/source/image/ImplImageTree.cxx
index a1628fb281b3..28d0427ba3d7 100644
--- a/vcl/source/image/ImplImageTree.cxx
+++ b/vcl/source/image/ImplImageTree.cxx
@@ -398,7 +398,7 @@ void ImplImageTree::createStyle()
bool ok = aUrl.Append("images_" + maCurrentStyle, INetURLObject::EncodeMechanism::All);
OSL_ASSERT(ok); (void) ok;
- sThemeUrl = aUrl.GetMainURL(INetURLObject::NO_DECODE) + ".zip";
+ sThemeUrl = aUrl.GetMainURL(INetURLObject::DecodeMechanism::NONE) + ".zip";
}
else
diff --git a/vcl/unx/generic/fontmanager/fontmanager.cxx b/vcl/unx/generic/fontmanager/fontmanager.cxx
index 8a3af665c29e..b660d73b54b2 100644
--- a/vcl/unx/generic/fontmanager/fontmanager.cxx
+++ b/vcl/unx/generic/fontmanager/fontmanager.cxx
@@ -176,9 +176,9 @@ std::vector<fontID> PrintFontManager::addFontFile( const OString& rFileName )
{
rtl_TextEncoding aEncoding = osl_getThreadTextEncoding();
INetURLObject aPath( OStringToOUString( rFileName, aEncoding ), INetURLObject::FSYS_DETECT );
- OString aName( OUStringToOString( aPath.GetName( INetURLObject::DECODE_WITH_CHARSET, aEncoding ), aEncoding ) );
+ OString aName( OUStringToOString( aPath.GetName( INetURLObject::DecodeMechanism::WithCharset, aEncoding ), aEncoding ) );
OString aDir( OUStringToOString(
- INetURLObject::decode( aPath.GetPath(), INetURLObject::DECODE_WITH_CHARSET, aEncoding ), aEncoding ) );
+ INetURLObject::decode( aPath.GetPath(), INetURLObject::DecodeMechanism::WithCharset, aEncoding ), aEncoding ) );
int nDirID = getDirectoryAtom( aDir, true );
std::vector<fontID> aFontIds = findFontFileIDs( nDirID, aName );
diff --git a/vcl/unx/generic/fontmanager/helper.cxx b/vcl/unx/generic/fontmanager/helper.cxx
index 84f87e7ae4c6..2a130f40cef7 100644
--- a/vcl/unx/generic/fontmanager/helper.cxx
+++ b/vcl/unx/generic/fontmanager/helper.cxx
@@ -175,7 +175,7 @@ void psp::getPrinterPathList( std::list< OUString >& rPathList, const char* pSub
{
INetURLObject aDir( aExe );
aDir.removeSegment();
- aExe = aDir.GetMainURL( INetURLObject::NO_DECODE );
+ aExe = aDir.GetMainURL( INetURLObject::DecodeMechanism::NONE );
OUString aSysPath;
if( osl_getSystemPathFromFileURL( aExe.pData, &aSysPath.pData ) == osl_File_E_None )
{
diff --git a/vcl/unx/generic/printer/ppdparser.cxx b/vcl/unx/generic/printer/ppdparser.cxx
index c2271609d56e..817db94ad9a5 100644
--- a/vcl/unx/generic/printer/ppdparser.cxx
+++ b/vcl/unx/generic/printer/ppdparser.cxx
@@ -459,7 +459,7 @@ void PPDParser::initPPDFiles(PPDCache &rPPDCache)
for( std::list< OUString >::const_iterator ppd_it = aPathList.begin(); ppd_it != aPathList.end(); ++ppd_it )
{
INetURLObject aPPDDir( *ppd_it, INetProtocol::File, INetURLObject::EncodeMechanism::All );
- scanPPDDir( aPPDDir.GetMainURL( INetURLObject::NO_DECODE ) );
+ scanPPDDir( aPPDDir.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
}
if( rPPDCache.pAllPPDFiles->find( OUString( "SGENPRT" ) ) == rPPDCache.pAllPPDFiles->end() )
{
@@ -470,8 +470,8 @@ void PPDParser::initPPDFiles(PPDCache &rPPDCache)
INetURLObject aDir( aExe );
aDir.removeSegment();
SAL_INFO("vcl.unx.print", "scanning last chance dir: "
- << aDir.GetMainURL(INetURLObject::NO_DECODE));
- scanPPDDir( aDir.GetMainURL( INetURLObject::NO_DECODE ) );
+ << aDir.GetMainURL(INetURLObject::DecodeMechanism::NONE));
+ scanPPDDir( aDir.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
SAL_INFO("vcl.unx.print", "SGENPRT "
<< (rPPDCache.pAllPPDFiles->find("SGENPRT") ==
rPPDCache.pAllPPDFiles->end() ? "not found" : "found"));
diff --git a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
index 59dbb79b0a8e..e6633e803eed 100644
--- a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
+++ b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
@@ -950,7 +950,7 @@ sal_Int16 SAL_CALL SalGtkFilePicker::execute() throw( uno::RuntimeException, std
aFileObj.getName(
INetURLObject::LAST_SEGMENT,
true,
- INetURLObject::DECODE_WITH_CHARSET
+ INetURLObject::DecodeMechanism::WithCharset
),
RTL_TEXTENCODING_UTF8
)
@@ -985,7 +985,7 @@ sal_Int16 SAL_CALL SalGtkFilePicker::execute() throw( uno::RuntimeException, std
aFileObj.getName(
nSegmentCount-2,
true,
- INetURLObject::DECODE_WITH_CHARSET
+ INetURLObject::DecodeMechanism::WithCharset
),
RTL_TEXTENCODING_UTF8
)
diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx
index 9af5b542ef22..b46af12a233a 100644
--- a/xmloff/source/core/xmlexp.cxx
+++ b/xmloff/source/core/xmlexp.cxx
@@ -748,7 +748,7 @@ void SAL_CALL SvXMLExport::initialize( const uno::Sequence< uno::Any >& aArgumen
if( !sRelPath.isEmpty() )
aBaseURL.insertName( sRelPath );
aBaseURL.insertName( sName );
- msOrigFileName = aBaseURL.GetMainURL(INetURLObject::DECODE_TO_IURI);
+ msOrigFileName = aBaseURL.GetMainURL(INetURLObject::DecodeMechanism::ToIUri);
}
mpImpl->mStreamName = sName; // Note: may be empty (XSLT)
@@ -2152,7 +2152,7 @@ OUString SvXMLExport::GetRelativeReference(const OUString& rValue)
//#i61943# relative URLs need special handling
INetURLObject aTemp( mpImpl->msPackageURI );
bool bWasAbsolute = false;
- sValue = aTemp.smartRel2Abs(sValue, bWasAbsolute ).GetMainURL(INetURLObject::DECODE_TO_IURI);
+ sValue = aTemp.smartRel2Abs(sValue, bWasAbsolute ).GetMainURL(INetURLObject::DecodeMechanism::ToIUri);
}
}
catch(const uno::Exception&)
diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx
index 6ce1378eea2d..008ac5cc7f86 100644
--- a/xmloff/source/core/xmlimp.cxx
+++ b/xmloff/source/core/xmlimp.cxx
@@ -1674,7 +1674,7 @@ OUString SvXMLImport::GetAbsoluteReference(const OUString& rValue) const
INetURLObject aAbsURL;
if( mpImpl->aBaseURL.GetNewAbsURL( rValue, &aAbsURL ) )
- return aAbsURL.GetMainURL( INetURLObject::DECODE_TO_IURI );
+ return aAbsURL.GetMainURL( INetURLObject::DecodeMechanism::ToIUri );
else
return rValue;
}
@@ -1878,12 +1878,12 @@ SvXMLImport::GetComponentContext() const
OUString SvXMLImport::GetBaseURL() const
{
- return mpImpl->aBaseURL.GetMainURL( INetURLObject::NO_DECODE );
+ return mpImpl->aBaseURL.GetMainURL( INetURLObject::DecodeMechanism::NONE );
}
OUString SvXMLImport::GetDocumentBase() const
{
- return mpImpl->aDocBase.GetMainURL( INetURLObject::NO_DECODE );
+ return mpImpl->aDocBase.GetMainURL( INetURLObject::DecodeMechanism::NONE );
}
// Convert drawing object positions from OOo file format to OASIS (#i28749#)
diff --git a/xmloff/source/draw/eventimp.cxx b/xmloff/source/draw/eventimp.cxx
index 0305de21a92e..f9ec6082a452 100644
--- a/xmloff/source/draw/eventimp.cxx
+++ b/xmloff/source/draw/eventimp.cxx
@@ -244,7 +244,7 @@ SdXMLEventContext::SdXMLEventContext( SvXMLImport& rImp, sal_uInt16 nPrfx, cons
const OUString &rTmp =
rImp.GetAbsoluteReference(sValue);
INetURLObject::translateToInternal( rTmp, msBookmark,
- INetURLObject::DECODE_UNAMBIGUOUS );
+ INetURLObject::DecodeMechanism::Unambiguous );
}
}
break;