diff options
54 files changed, 177 insertions, 177 deletions
diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx index 92062a6c4133..cb821f5b1d3e 100644 --- a/basctl/source/basicide/moduldl2.cxx +++ b/basctl/source/basicide/moduldl2.cxx @@ -1217,7 +1217,7 @@ void LibPage::ExportAsPackage( const OUString& aLibName ) OUString aTmpPath = SvtPathOptions().GetTempPath(); INetURLObject aInetObj( aTmpPath ); - aInetObj.insertName( aLibName, true, INetURLObject::LAST_SEGMENT, INetURLObject::ENCODE_ALL ); + aInetObj.insertName( aLibName, true, INetURLObject::LAST_SEGMENT, INetURLObject::EncodeMechanism::All ); OUString aSourcePath = aInetObj.GetMainURL( INetURLObject::NO_DECODE ); if( xSFA->exists( aSourcePath ) ) xSFA->kill( aSourcePath ); @@ -1249,7 +1249,7 @@ void LibPage::ExportAsPackage( const OUString& aLibName ) INetURLObject aMetaInfInetObj( aTmpPath ); aMetaInfInetObj.insertName( "META-INF", - true, INetURLObject::LAST_SEGMENT, INetURLObject::ENCODE_ALL ); + true, INetURLObject::LAST_SEGMENT, INetURLObject::EncodeMechanism::All ); OUString aMetaInfFolder = aMetaInfInetObj.GetMainURL( INetURLObject::NO_DECODE ); if( xSFA->exists( aMetaInfFolder ) ) xSFA->kill( aMetaInfFolder ); @@ -1276,7 +1276,7 @@ void LibPage::ExportAsPackage( const OUString& aLibName ) &manifest[ 0 ], manifest.size() ) ); aMetaInfInetObj.insertName( "manifest.xml", - true, INetURLObject::LAST_SEGMENT, INetURLObject::ENCODE_ALL ); + true, INetURLObject::LAST_SEGMENT, INetURLObject::EncodeMechanism::All ); // write buffered pipe data to content: ::ucbhelper::Content manifestContent( aMetaInfInetObj.GetMainURL( INetURLObject::NO_DECODE ), xCmdEnv, comphelper::getProcessComponentContext() ); diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx index 7c9965e09627..26a20365fc10 100644 --- a/basic/source/uno/namecont.cxx +++ b/basic/source/uno/namecont.cxx @@ -585,14 +585,14 @@ static void checkAndCopyFileImpl( const INetURLObject& rSourceFolderInetObj, { INetURLObject aTargetFolderInetObj( rTargetFolderInetObj ); aTargetFolderInetObj.insertName( rCheckFileName, true, INetURLObject::LAST_SEGMENT, - INetURLObject::ENCODE_ALL ); + INetURLObject::EncodeMechanism::All ); aTargetFolderInetObj.setExtension( rCheckExtension ); OUString aTargetFile = aTargetFolderInetObj.GetMainURL( INetURLObject::NO_DECODE ); if( !xSFI->exists( aTargetFile ) ) { INetURLObject aSourceFolderInetObj( rSourceFolderInetObj ); aSourceFolderInetObj.insertName( rCheckFileName, true, INetURLObject::LAST_SEGMENT, - INetURLObject::ENCODE_ALL ); + INetURLObject::EncodeMechanism::All ); aSourceFolderInetObj.setExtension( rCheckExtension ); OUString aSourceFile = aSourceFolderInetObj.GetMainURL( INetURLObject::NO_DECODE ); xSFI->copy( aSourceFile, aTargetFile ); @@ -781,7 +781,7 @@ void SfxLibraryContainer::init_Impl( const OUString& rInitialDocumentURL, { pLibInfoInetObj.reset(new INetURLObject( maLibraryPath.getToken(1, (sal_Unicode)';') )); } - pLibInfoInetObj->insertName( maInfoFileName, false, INetURLObject::LAST_SEGMENT, INetURLObject::ENCODE_ALL ); + pLibInfoInetObj->insertName( maInfoFileName, false, INetURLObject::LAST_SEGMENT, INetURLObject::EncodeMechanism::All ); pLibInfoInetObj->setExtension( "xlc" ); aFileName = pLibInfoInetObj->GetMainURL( INetURLObject::NO_DECODE ); } @@ -800,7 +800,7 @@ void SfxLibraryContainer::init_Impl( const OUString& rInitialDocumentURL, if( !xInput.is() && nPass == 0 ) { INetURLObject aLibInfoInetObj( maLibraryPath.getToken(1, (sal_Unicode)';') ); - aLibInfoInetObj.insertName( maOldInfoFileName, false, INetURLObject::LAST_SEGMENT, INetURLObject::ENCODE_ALL ); + aLibInfoInetObj.insertName( maOldInfoFileName, false, INetURLObject::LAST_SEGMENT, INetURLObject::EncodeMechanism::All ); aLibInfoInetObj.setExtension( "xli" ); aFileName = aLibInfoInetObj.GetMainURL( INetURLObject::NO_DECODE ); @@ -862,7 +862,7 @@ void SfxLibraryContainer::init_Impl( const OUString& rInitialDocumentURL, INetURLObject aInetObj( aLibraryPath ); aInetObj.insertName( rLib.aName, true, INetURLObject::LAST_SEGMENT, - INetURLObject::ENCODE_ALL ); + INetURLObject::EncodeMechanism::All ); OUString aLibDirPath = aInetObj.GetMainURL( INetURLObject::NO_DECODE ); if( mxSFI->isFolder( aLibDirPath ) ) { @@ -874,7 +874,7 @@ void SfxLibraryContainer::init_Impl( const OUString& rInitialDocumentURL, // Check "share" path INetURLObject aShareInetObj( maLibraryPath.getToken(0, (sal_Unicode)';') ); aShareInetObj.insertName( rLib.aName, true, INetURLObject::LAST_SEGMENT, - INetURLObject::ENCODE_ALL ); + INetURLObject::EncodeMechanism::All ); OUString aShareLibDirPath = aShareInetObj.GetMainURL( INetURLObject::NO_DECODE ); if( mxSFI->isFolder( aShareLibDirPath ) ) { @@ -1037,10 +1037,10 @@ void SfxLibraryContainer::init_Impl( const OUString& rInitialDocumentURL, // Check if Standard folder exists and is complete INetURLObject aUserBasicStandardInetObj( aUserBasicInetObj ); aUserBasicStandardInetObj.insertName( aStandardStr, true, INetURLObject::LAST_SEGMENT, - INetURLObject::ENCODE_ALL ); + INetURLObject::EncodeMechanism::All ); INetURLObject aPrevUserBasicStandardInetObj( aPrevUserBasicInetObj ); aPrevUserBasicStandardInetObj.insertName( aStandardStr, true, INetURLObject::LAST_SEGMENT, - INetURLObject::ENCODE_ALL ); + INetURLObject::EncodeMechanism::All ); OUString aPrevStandardFolder = aPrevUserBasicStandardInetObj.GetMainURL( INetURLObject::NO_DECODE ); if( mxSFI->isFolder( aPrevStandardFolder ) ) { @@ -1112,7 +1112,7 @@ void SfxLibraryContainer::init_Impl( const OUString& rInitialDocumentURL, INetURLObject aPrevUserBasicLibInfoInetObj( aUserBasicInetObj ); aPrevUserBasicLibInfoInetObj.insertName( maInfoFileName, false, INetURLObject::LAST_SEGMENT, - INetURLObject::ENCODE_ALL ); + INetURLObject::EncodeMechanism::All ); aPrevUserBasicLibInfoInetObj.setExtension( "xlc"); OUString aLibInfoFileName = aPrevUserBasicLibInfoInetObj.GetMainURL( INetURLObject::NO_DECODE ); Sequence<Any> aInitSeq( 1 ); @@ -1318,7 +1318,7 @@ void SfxLibraryContainer::checkStorageURL( const OUString& aSourceURL, { // URL to library folder aStorageURL = aExpandedSourceURL; - aInetObj.insertName( maInfoFileName, false, INetURLObject::LAST_SEGMENT, INetURLObject::ENCODE_ALL ); + aInetObj.insertName( maInfoFileName, false, INetURLObject::LAST_SEGMENT, INetURLObject::EncodeMechanism::All ); aInetObj.setExtension( "xlb" ); aLibInfoFileURL = aInetObj.GetMainURL( INetURLObject::NO_DECODE ); } @@ -1371,7 +1371,7 @@ OUString SfxLibraryContainer::createAppLibraryFolder( SfxLibrary* pLib, const OU if( aLibDirPath.isEmpty() ) { INetURLObject aInetObj( maLibraryPath.getToken(1, (sal_Unicode)';') ); - aInetObj.insertName( aName, true, INetURLObject::LAST_SEGMENT, INetURLObject::ENCODE_ALL ); + aInetObj.insertName( aName, true, INetURLObject::LAST_SEGMENT, INetURLObject::EncodeMechanism::All ); checkStorageURL( aInetObj.GetMainURL( INetURLObject::NO_DECODE ), pLib->maLibInfoFileURL, pLib->maStorageURL, pLib->maUnexpandedStorageURL ); aLibDirPath = pLib->maStorageURL; @@ -1480,7 +1480,7 @@ void SfxLibraryContainer::implStoreLibrary( SfxLibrary* pLib, if( bExport ) { INetURLObject aInetObj( aTargetURL ); - aInetObj.insertName( aName, true, INetURLObject::LAST_SEGMENT, INetURLObject::ENCODE_ALL ); + aInetObj.insertName( aName, true, INetURLObject::LAST_SEGMENT, INetURLObject::EncodeMechanism::All ); aLibDirPath = aInetObj.GetMainURL( INetURLObject::NO_DECODE ); if( !xSFI->isFolder( aLibDirPath ) ) @@ -1502,7 +1502,7 @@ void SfxLibraryContainer::implStoreLibrary( SfxLibrary* pLib, INetURLObject aElementInetObj( aLibDirPath ); aElementInetObj.insertName( aElementName, false, INetURLObject::LAST_SEGMENT, - INetURLObject::ENCODE_ALL ); + INetURLObject::EncodeMechanism::All ); aElementInetObj.setExtension( maLibElementFileExtension ); OUString aElementPath( aElementInetObj.GetMainURL( INetURLObject::NO_DECODE ) ); @@ -1613,13 +1613,13 @@ void SfxLibraryContainer::implStoreLibraryIndexFile( SfxLibrary* pLib, if( bExport ) { INetURLObject aInetObj( aTargetURL ); - aInetObj.insertName( rLib.aName, true, INetURLObject::LAST_SEGMENT, INetURLObject::ENCODE_ALL ); + aInetObj.insertName( rLib.aName, true, INetURLObject::LAST_SEGMENT, INetURLObject::EncodeMechanism::All ); OUString aLibDirPath = aInetObj.GetMainURL( INetURLObject::NO_DECODE ); if( !xSFI->isFolder( aLibDirPath ) ) { xSFI->createFolder( aLibDirPath ); } - aInetObj.insertName( maInfoFileName, false, INetURLObject::LAST_SEGMENT, INetURLObject::ENCODE_ALL ); + aInetObj.insertName( maInfoFileName, false, INetURLObject::LAST_SEGMENT, INetURLObject::EncodeMechanism::All ); aInetObj.setExtension( "xlb" ); aLibInfoPath = aInetObj.GetMainURL( INetURLObject::NO_DECODE ); } @@ -2124,7 +2124,7 @@ void SfxLibraryContainer::storeLibraries_Impl( const uno::Reference< embed::XSto { // Create Output stream INetURLObject aLibInfoInetObj( maLibraryPath.getToken(1, (sal_Unicode)';') ); - aLibInfoInetObj.insertName( maInfoFileName, false, INetURLObject::LAST_SEGMENT, INetURLObject::ENCODE_ALL ); + aLibInfoInetObj.insertName( maInfoFileName, false, INetURLObject::LAST_SEGMENT, INetURLObject::EncodeMechanism::All ); aLibInfoInetObj.setExtension( "xlc" ); OUString aLibInfoPath( aLibInfoInetObj.GetMainURL( INetURLObject::NO_DECODE ) ); @@ -2333,7 +2333,7 @@ void SAL_CALL SfxLibraryContainer::removeLibrary( const OUString& Name ) // Delete folder if empty INetURLObject aInetObj( maLibraryPath.getToken(1, (sal_Unicode)';') ); aInetObj.insertName( Name, true, INetURLObject::LAST_SEGMENT, - INetURLObject::ENCODE_ALL ); + INetURLObject::EncodeMechanism::All ); OUString aLibDirPath = aInetObj.GetMainURL( INetURLObject::NO_DECODE ); try @@ -2480,7 +2480,7 @@ void SAL_CALL SfxLibraryContainer::loadLibrary( const OUString& Name ) INetURLObject aElementInetObj( aLibDirPath ); aElementInetObj.insertName( aElementName, false, INetURLObject::LAST_SEGMENT, - INetURLObject::ENCODE_ALL ); + INetURLObject::EncodeMechanism::All ); aElementInetObj.setExtension( maLibElementFileExtension ); aFile = aElementInetObj.GetMainURL( INetURLObject::NO_DECODE ); } @@ -2599,7 +2599,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::ENCODE_ALL ); + INetURLObject::EncodeMechanism::All ); OUString aDestDirPath = aDestInetObj.GetMainURL( INetURLObject::NO_DECODE ); // Store new URL @@ -2637,14 +2637,14 @@ void SAL_CALL SfxLibraryContainer::renameLibrary( const OUString& Name, const OU INetURLObject aElementInetObj( aLibDirPath ); aElementInetObj.insertName( aElementName, false, - INetURLObject::LAST_SEGMENT, INetURLObject::ENCODE_ALL ); + INetURLObject::LAST_SEGMENT, INetURLObject::EncodeMechanism::All ); aElementInetObj.setExtension( maLibElementFileExtension ); OUString aElementPath( aElementInetObj.GetMainURL( INetURLObject::NO_DECODE ) ); INetURLObject aElementDestInetObj( aDestDirPath ); aElementDestInetObj.insertName( aElementName, false, INetURLObject::LAST_SEGMENT, - INetURLObject::ENCODE_ALL ); + INetURLObject::EncodeMechanism::All ); aElementDestInetObj.setExtension( maLibElementFileExtension ); OUString aDestElementPath( aElementDestInetObj.GetMainURL( INetURLObject::NO_DECODE ) ); @@ -3178,7 +3178,7 @@ void SfxLibrary::impl_removeWithoutChecks( const OUString& _rElementName ) INetURLObject aElementInetObj( maStorageURL ); aElementInetObj.insertName( _rElementName, false, INetURLObject::LAST_SEGMENT, - INetURLObject::ENCODE_ALL ); + INetURLObject::EncodeMechanism::All ); aElementInetObj.setExtension( maLibElementFileExtension ); OUString aFile = aElementInetObj.GetMainURL( INetURLObject::NO_DECODE ); diff --git a/basic/source/uno/scriptcont.cxx b/basic/source/uno/scriptcont.cxx index 29ace2433bfd..0107e422c5e9 100644 --- a/basic/source/uno/scriptcont.cxx +++ b/basic/source/uno/scriptcont.cxx @@ -524,7 +524,7 @@ void SAL_CALL SfxScriptLibraryContainer::changeLibraryPassword( const OUString& INetURLObject aElementInetObj( aLibDirPath ); aElementInetObj.insertName( aElementName, false, INetURLObject::LAST_SEGMENT, - INetURLObject::ENCODE_ALL ); + INetURLObject::EncodeMechanism::All ); if( bKillUncryptedFiles ) { aElementInetObj.setExtension( maLibElementFileExtension ); @@ -718,7 +718,7 @@ bool SfxScriptLibraryContainer::implStorePasswordLibrary( SfxLibrary* pLib, cons { INetURLObject aInetObj( aTargetURL ); aInetObj.insertName( aName, true, INetURLObject::LAST_SEGMENT, - INetURLObject::ENCODE_ALL ); + INetURLObject::EncodeMechanism::All ); aLibDirPath = aInetObj.GetMainURL( INetURLObject::NO_DECODE ); if( !xSFI->isFolder( aLibDirPath ) ) @@ -738,7 +738,7 @@ bool SfxScriptLibraryContainer::implStorePasswordLibrary( SfxLibrary* pLib, cons INetURLObject aElementInetObj( aLibDirPath ); aElementInetObj.insertName( aElementName, false, INetURLObject::LAST_SEGMENT, - INetURLObject::ENCODE_ALL ); + INetURLObject::EncodeMechanism::All ); aElementInetObj.setExtension( "pba" ); OUString aElementPath = aElementInetObj.GetMainURL( INetURLObject::NO_DECODE ); @@ -1032,7 +1032,7 @@ bool SfxScriptLibraryContainer::implLoadPasswordLibrary INetURLObject aElementInetObj( aLibDirPath ); aElementInetObj.insertName( aElementName, false, - INetURLObject::LAST_SEGMENT, INetURLObject::ENCODE_ALL ); + INetURLObject::LAST_SEGMENT, INetURLObject::EncodeMechanism::All ); aElementInetObj.setExtension( "pba" ); OUString aElementPath = aElementInetObj.GetMainURL( INetURLObject::NO_DECODE ); diff --git a/connectivity/source/drivers/file/FDatabaseMetaData.cxx b/connectivity/source/drivers/file/FDatabaseMetaData.cxx index 47f9dd6c59c3..f734fbb9924a 100644 --- a/connectivity/source/drivers/file/FDatabaseMetaData.cxx +++ b/connectivity/source/drivers/file/FDatabaseMetaData.cxx @@ -87,7 +87,7 @@ namespace aContent1 = aFolderOrDoc; else { - aContentURL = INetURLObject( _rFolderOrDoc, INetURLObject::WAS_ENCODED ); + aContentURL = INetURLObject( _rFolderOrDoc, INetURLObject::EncodeMechanism::WasEncoded ); aContentURL.Append( _rDocName ); aContent1 = ::ucbhelper::Content( aContentURL.GetMainURL( INetURLObject::NO_DECODE ), Reference< XCommandEnvironment >(), comphelper::getProcessComponentContext() ); } diff --git a/cui/source/dialogs/hldocntp.cxx b/cui/source/dialogs/hldocntp.cxx index c5133396258f..1c61efb91c20 100644 --- a/cui/source/dialogs/hldocntp.cxx +++ b/cui/source/dialogs/hldocntp.cxx @@ -70,7 +70,7 @@ bool SvxHyperlinkNewDocTp::ImplGetURLObject( const OUString& rPath, const OUStri INetURLObject base(rBase); base.setFinalSlash(); aURLObject = base.smartRel2Abs( - rPath, wasAbs, true, INetURLObject::ENCODE_ALL, + rPath, wasAbs, true, INetURLObject::EncodeMechanism::All, RTL_TEXTENCODING_UTF8, true); } bIsValidURL = aURLObject.GetProtocol() != INetProtocol::NotValid; diff --git a/dbaccess/source/ui/dlg/ConnectionHelper.cxx b/dbaccess/source/ui/dlg/ConnectionHelper.cxx index 5911c6e0eb88..1226b532d8f8 100644 --- a/dbaccess/source/ui/dlg/ConnectionHelper.cxx +++ b/dbaccess/source/ui/dlg/ConnectionHelper.cxx @@ -198,7 +198,7 @@ namespace dbaui while (bDoBrowse); OUString sSelectedDirectory = xFolderPicker->getDirectory(); - INetURLObject aSelectedDirectory( sSelectedDirectory, INetURLObject::WAS_ENCODED, RTL_TEXTENCODING_UTF8 ); + 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 ); @@ -428,7 +428,7 @@ namespace dbaui } // encode the URL - INetURLObject aFileURL( sFileURLDecoded, INetURLObject::ENCODE_ALL, RTL_TEXTENCODING_UTF8 ); + INetURLObject aFileURL( sFileURLDecoded, INetURLObject::EncodeMechanism::All, RTL_TEXTENCODING_UTF8 ); sFileURLDecoded = aFileURL.GetMainURL( INetURLObject::NO_DECODE ); } } diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx index 9a681584c59d..0a5fd7d9ddf9 100644 --- a/desktop/source/app/app.cxx +++ b/desktop/source/app/app.cxx @@ -2335,7 +2335,7 @@ OUString GetURL_Impl( // Use the provided parameters for smartRel2Abs to support the usage of '%' in system paths. // Otherwise this char won't get encoded and we are not able to load such files later, bool bWasAbsolute; - INetURLObject aURL = aObj.smartRel2Abs( rName, bWasAbsolute, false, INetURLObject::WAS_ENCODED, + INetURLObject aURL = aObj.smartRel2Abs( rName, bWasAbsolute, false, INetURLObject::EncodeMechanism::WasEncoded, RTL_TEXTENCODING_UTF8, true ); OUString aFileURL = aURL.GetMainURL(INetURLObject::NO_DECODE); diff --git a/extensions/source/abpilot/datasourcehandling.cxx b/extensions/source/abpilot/datasourcehandling.cxx index 6c09d1dce2f4..5b287d0de0de 100644 --- a/extensions/source/abpilot/datasourcehandling.cxx +++ b/extensions/source/abpilot/datasourcehandling.cxx @@ -379,7 +379,7 @@ namespace abp // Embed. OUString aStreamRelPath = "EmbeddedDatabase"; OUString sTmpName = "vnd.sun.star.pkg://"; - sTmpName += INetURLObject::encode(aOwnURL, INetURLObject::PART_AUTHORITY, INetURLObject::ENCODE_ALL); + sTmpName += INetURLObject::encode(aOwnURL, INetURLObject::PART_AUTHORITY, INetURLObject::EncodeMechanism::All); sTmpName += "/" + aStreamRelPath; uno::Reference<embed::XStorage> xStorage = pObjectShell->GetStorage(); uno::Sequence<beans::PropertyValue> aSequence = comphelper::InitPropertySequence( diff --git a/filter/source/xsltfilter/XSLTFilter.cxx b/filter/source/xsltfilter/XSLTFilter.cxx index 615b4c11fd0b..1deb70ff6286 100644 --- a/filter/source/xsltfilter/XSLTFilter.cxx +++ b/filter/source/xsltfilter/XSLTFilter.cxx @@ -260,7 +260,7 @@ namespace XSLT aObj.setFinalSlash(); bool bWasAbsolute; INetURLObject aURL = aObj.smartRel2Abs(s, bWasAbsolute, false, - INetURLObject::WAS_ENCODED, RTL_TEXTENCODING_UTF8, true); + INetURLObject::EncodeMechanism::WasEncoded, RTL_TEXTENCODING_UTF8, true); return aURL.GetMainURL(INetURLObject::NO_DECODE); } diff --git a/forms/source/component/DatabaseForm.cxx b/forms/source/component/DatabaseForm.cxx index 74f3de8d3891..b98374b5b80d 100644 --- a/forms/source/component/DatabaseForm.cxx +++ b/forms/source/component/DatabaseForm.cxx @@ -2189,8 +2189,8 @@ void ODatabaseForm::submit_impl(const Reference<XControl>& Control, const css::a // FormMethod GET if( eSubmitMethod == FormSubmitMethod_GET ) { - INetURLObject aUrlObj( aURLStr, INetURLObject::WAS_ENCODED ); - aUrlObj.SetParam( aData, INetURLObject::ENCODE_ALL ); + INetURLObject aUrlObj( aURLStr, INetURLObject::EncodeMechanism::WasEncoded ); + aUrlObj.SetParam( aData, INetURLObject::EncodeMechanism::All ); aURL.Complete = aUrlObj.GetMainURL( INetURLObject::DECODE_UNAMBIGUOUS ); if (xTransformer.is()) xTransformer->parseStrict(aURL); diff --git a/fpicker/source/office/RemoteFilesDialog.cxx b/fpicker/source/office/RemoteFilesDialog.cxx index 0ddd997740cc..7f154ffd896a 100644 --- a/fpicker/source/office/RemoteFilesDialog.cxx +++ b/fpicker/source/office/RemoteFilesDialog.cxx @@ -1127,8 +1127,8 @@ IMPL_LINK_NOARG ( RemoteFilesDialog, OkHdl, Button*, void ) if( !bSelected ) { - m_sPath = sCurrentPath + INetURLObject::encode( sName, INetURLObject::PART_FPATH, INetURLObject::ENCODE_ALL ); - sPathNoExt = sCurrentPath + INetURLObject::encode( sNameNoExt, INetURLObject::PART_FPATH, INetURLObject::ENCODE_ALL ); + m_sPath = sCurrentPath + INetURLObject::encode( sName, INetURLObject::PART_FPATH, INetURLObject::EncodeMechanism::All ); + sPathNoExt = sCurrentPath + INetURLObject::encode( sNameNoExt, INetURLObject::PART_FPATH, INetURLObject::EncodeMechanism::All ); } else { diff --git a/framework/source/services/urltransformer.cxx b/framework/source/services/urltransformer.cxx index 99c78e99f803..c19eaac4518d 100644 --- a/framework/source/services/urltransformer.cxx +++ b/framework/source/services/urltransformer.cxx @@ -262,7 +262,7 @@ sal_Bool SAL_CALL URLTransformer::assemble( css::util::URL& aURL ) throw( css::u aURL.Main = aParser.GetMainURL( INetURLObject::NO_DECODE ); // ...and then WITH parameter and mark. aParser.SetParam( aURL.Arguments); - aParser.SetMark ( aURL.Mark, INetURLObject::ENCODE_ALL ); + aParser.SetMark ( aURL.Mark, INetURLObject::EncodeMechanism::All ); aURL.Complete = aParser.GetMainURL( INetURLObject::NO_DECODE ); // Return "URL is assembled". diff --git a/framework/source/uielement/fontmenucontroller.cxx b/framework/source/uielement/fontmenucontroller.cxx index 85711654d147..10232221805e 100644 --- a/framework/source/uielement/fontmenucontroller.cxx +++ b/framework/source/uielement/fontmenucontroller.cxx @@ -104,7 +104,7 @@ void FontMenuController::fillPopupMenu( const Sequence< OUString >& rFontNameSeq m_xPopupMenu->checkItem( i+1, true ); // use VCL popup menu pointer to set vital information that are not part of the awt implementation OUStringBuffer aCommandBuffer( aFontNameCommandPrefix ); - aCommandBuffer.append( INetURLObject::encode( rName, INetURLObject::PART_HTTP_QUERY, INetURLObject::ENCODE_ALL )); + aCommandBuffer.append( INetURLObject::encode( rName, INetURLObject::PART_HTTP_QUERY, INetURLObject::EncodeMechanism::All )); OUString aFontNameCommand = aCommandBuffer.makeStringAndClear(); pVCLPopupMenu->SetItemCommand( i+1, aFontNameCommand ); // Store font name into item command. } diff --git a/include/svl/urihelper.hxx b/include/svl/urihelper.hxx index ce10bc932a1c..5a800004a325 100644 --- a/include/svl/urihelper.hxx +++ b/include/svl/urihelper.hxx @@ -54,7 +54,7 @@ SVL_DLLPUBLIC OUString SmartRel2Abs(INetURLObject const & rTheBaseURIRef, Link<OUString *, bool> const & rMaybeFileHdl = Link<OUString *, bool>(), bool bCheckFileExists = true, bool bIgnoreFragment = false, - INetURLObject::EncodeMechanism eEncodeMechanism = INetURLObject::WAS_ENCODED, + INetURLObject::EncodeMechanism eEncodeMechanism = INetURLObject::EncodeMechanism::WasEncoded, INetURLObject::DecodeMechanism eDecodeMechanism = INetURLObject::DECODE_TO_IURI, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8, bool bRelativeNonURIs = false, @@ -119,7 +119,7 @@ SVL_DLLPUBLIC OUString FindFirstURLInText(OUString const & rText, sal_Int32 & rBegin, sal_Int32 & rEnd, CharClass const & rCharClass, - INetURLObject::EncodeMechanism eMechanism = INetURLObject::WAS_ENCODED, + INetURLObject::EncodeMechanism eMechanism = INetURLObject::EncodeMechanism::WasEncoded, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8); /** Remove any password component from both absolute and relative URLs. @@ -148,7 +148,7 @@ SVL_DLLPUBLIC OUString FindFirstURLInText(OUString const & rText, @return The input URI with any password component removed. */ SVL_DLLPUBLIC OUString removePassword(OUString const & rURI, - INetURLObject::EncodeMechanism eEncodeMechanism = INetURLObject::WAS_ENCODED, + INetURLObject::EncodeMechanism eEncodeMechanism = INetURLObject::EncodeMechanism::WasEncoded, INetURLObject::DecodeMechanism eDecodeMechanism = INetURLObject::DECODE_TO_IURI, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8); diff --git a/include/tools/urlobj.hxx b/include/tools/urlobj.hxx index 9fa5bee5c0e9..af2952d207ff 100644 --- a/include/tools/urlobj.hxx +++ b/include/tools/urlobj.hxx @@ -92,14 +92,14 @@ public: @descr Along with an EncodeMechanism parameter, the set-methods all take an rtl_TextEncoding parameter, which is ignored unless the - EncodeMechanism is WAS_ENCODED. + EncodeMechanism is EncodeMechanism::WasEncoded. */ - enum EncodeMechanism + enum class EncodeMechanism { /** All escape sequences that are already present are ignored, and are interpreted as literal sequences of three characters. */ - ENCODE_ALL, + All, /** Sequences of escape sequences, that represent characters from the specified character set and that can be converted to UTF-32 @@ -108,12 +108,12 @@ public: (sequences of) escape sequences. Other escape sequences are copied verbatim (but using upper case hex digits). */ - WAS_ENCODED, + WasEncoded, /** All escape sequences that are already present are copied verbatim (but using upper case hex digits). */ - NOT_CANONIC + NotCanonical }; /** The way strings that represent (parts of) URIs are returned from get- @@ -191,11 +191,11 @@ public: inline explicit INetURLObject( OUString const & rTheAbsURIRef, - EncodeMechanism eMechanism = WAS_ENCODED, + EncodeMechanism eMechanism = EncodeMechanism::WasEncoded, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8); inline bool SetURL(OUString const & rTheAbsURIRef, - EncodeMechanism eMechanism = WAS_ENCODED, + EncodeMechanism eMechanism = EncodeMechanism::WasEncoded, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8); bool ConcatData(INetProtocol eTheScheme, OUString const & rTheUser, @@ -299,7 +299,7 @@ public: inline INetURLObject(OUString const & rTheAbsURIRef, INetProtocol eTheSmartScheme, - EncodeMechanism eMechanism = WAS_ENCODED, + EncodeMechanism eMechanism = EncodeMechanism::WasEncoded, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8, FSysStyle eStyle = FSYS_DETECT); @@ -308,7 +308,7 @@ public: inline bool SetSmartURL(OUString const & rTheAbsURIRef, - EncodeMechanism eMechanism = WAS_ENCODED, + EncodeMechanism eMechanism = EncodeMechanism::WasEncoded, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8, FSysStyle eStyle = FSYS_DETECT); @@ -316,7 +316,7 @@ public: smartRel2Abs(OUString const & rTheRelURIRef, bool & rWasAbsolute, bool bIgnoreFragment = false, - EncodeMechanism eMechanism = WAS_ENCODED, + EncodeMechanism eMechanism = EncodeMechanism::WasEncoded, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8, bool bRelativeNonURIs = false, FSysStyle eStyle = FSYS_DETECT) const; @@ -339,14 +339,14 @@ public: GetAbsURL(OUString const & rTheBaseURIRef, OUString const & rTheRelURIRef, bool bIgnoreFragment = false, - EncodeMechanism eEncodeMechanism = WAS_ENCODED, + EncodeMechanism eEncodeMechanism = EncodeMechanism::WasEncoded, DecodeMechanism eDecodeMechanism = DECODE_TO_IURI, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8); static inline OUString GetRelURL(OUString const & rTheBaseURIRef, OUString const & rTheAbsURIRef, - EncodeMechanism eEncodeMechanism = WAS_ENCODED, + EncodeMechanism eEncodeMechanism = EncodeMechanism::WasEncoded, DecodeMechanism eDecodeMechanism = DECODE_TO_IURI, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8, FSysStyle eStyle = FSYS_DETECT); @@ -456,7 +456,7 @@ public: { return decode(m_aPath, eMechanism, eCharset); } inline bool SetURLPath(OUString const & rThePath, - EncodeMechanism eMechanism = WAS_ENCODED, + EncodeMechanism eMechanism = EncodeMechanism::WasEncoded, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8) { return setPath(rThePath, eMechanism, eCharset); } @@ -540,7 +540,7 @@ public: bool insertName(OUString const & rTheName, bool bAppendFinalSlash = false, sal_Int32 nIndex = LAST_SEGMENT, - EncodeMechanism eMechanism = WAS_ENCODED, + EncodeMechanism eMechanism = EncodeMechanism::WasEncoded, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8); /** Get the name of a segment of the hierarchical path. @@ -619,7 +619,7 @@ public: */ bool setBase(OUString const & rTheBase, sal_Int32 nIndex = LAST_SEGMENT, - EncodeMechanism eMechanism = WAS_ENCODED, + EncodeMechanism eMechanism = EncodeMechanism::WasEncoded, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8); /** Determine whether the name of the last segment has an extension. @@ -727,7 +727,7 @@ public: { return decode(m_aQuery, NO_DECODE, eCharset); } inline bool SetParam(OUString const & rTheQuery, - EncodeMechanism eMechanism = WAS_ENCODED, + EncodeMechanism eMechanism = EncodeMechanism::WasEncoded, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8); // Fragment: @@ -740,7 +740,7 @@ public: { return decode(m_aFragment, eMechanism, eCharset); } inline bool SetMark(OUString const & rTheFragment, - EncodeMechanism eMechanism = WAS_ENCODED, + EncodeMechanism eMechanism = EncodeMechanism::WasEncoded, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8); // File URLs: @@ -905,7 +905,7 @@ public: OUString GetFileExtension() const; bool Append(OUString const & rTheSegment, - EncodeMechanism eMechanism = WAS_ENCODED, + EncodeMechanism eMechanism = EncodeMechanism::WasEncoded, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8); void CutLastName(); @@ -923,7 +923,7 @@ public: OUString GetBase() const; void SetName(OUString const & rTheName, - EncodeMechanism eMechanism = WAS_ENCODED, + EncodeMechanism eMechanism = EncodeMechanism::WasEncoded, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8); inline OUString GetName(DecodeMechanism eMechanism = DECODE_TO_IURI, @@ -1229,7 +1229,7 @@ inline bool INetURLObject::GetNewAbsURL(OUString const & rTheRelURIRef, INetURLObject aTheAbsURIRef; bool bWasAbsolute; if (!convertRelToAbs(rTheRelURIRef, aTheAbsURIRef, bWasAbsolute, - WAS_ENCODED, RTL_TEXTENCODING_UTF8, false/*bIgnoreFragment*/, false, false, + EncodeMechanism::WasEncoded, RTL_TEXTENCODING_UTF8, false/*bIgnoreFragment*/, false, false, FSYS_DETECT)) return false; if (pTheAbsURIRef) diff --git a/linguistic/source/convdiclist.cxx b/linguistic/source/convdiclist.cxx index 9d0e6fe8a668..4c77c0018a28 100644 --- a/linguistic/source/convdiclist.cxx +++ b/linguistic/source/convdiclist.cxx @@ -67,7 +67,7 @@ OUString GetConvDicMainURL( const OUString &rDicName, const OUString &rDirectory INetURLObject aURLObj; aURLObj.SetSmartProtocol( INetProtocol::File ); aURLObj.SetSmartURL( rDirectoryURL ); - aURLObj.Append( aFullDicName, INetURLObject::ENCODE_ALL ); + aURLObj.Append( aFullDicName, INetURLObject::EncodeMechanism::All ); DBG_ASSERT(!aURLObj.HasError(), "invalid URL"); if (aURLObj.HasError()) return OUString(); diff --git a/linguistic/source/misc2.cxx b/linguistic/source/misc2.cxx index bf99fdcb3c69..cf893f397015 100644 --- a/linguistic/source/misc2.cxx +++ b/linguistic/source/misc2.cxx @@ -157,7 +157,7 @@ OUString GetWritableDictionaryURL( const OUString &rDicName ) aURLObj.SetSmartProtocol( INetProtocol::File ); aURLObj.SetSmartURL( aDirName ); DBG_ASSERT(!aURLObj.HasError(), "lng : invalid URL"); - aURLObj.Append( rDicName, INetURLObject::ENCODE_ALL ); + 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 diff --git a/sc/source/core/data/documen8.cxx b/sc/source/core/data/documen8.cxx index 572d594b3697..e2aac3677484 100644 --- a/sc/source/core/data/documen8.cxx +++ b/sc/source/core/data/documen8.cxx @@ -833,7 +833,7 @@ void ScDocument::UpdateExternalRefLinks(vcl::Window* pWin) OUString aFile; sfx2::LinkManager::GetDisplayNames(pRefLink, nullptr, &aFile); // Decode encoded URL for display friendliness. - INetURLObject aUrl(aFile,INetURLObject::WAS_ENCODED); + INetURLObject aUrl(aFile,INetURLObject::EncodeMechanism::WasEncoded); aFile = aUrl.GetMainURL(INetURLObject::DECODE_UNAMBIGUOUS); OUStringBuffer aBuf; diff --git a/sc/source/filter/excel/xecontent.cxx b/sc/source/filter/excel/xecontent.cxx index 7771e92203c6..e2f989c9dedd 100644 --- a/sc/source/filter/excel/xecontent.cxx +++ b/sc/source/filter/excel/xecontent.cxx @@ -456,7 +456,7 @@ OUString XclExpHyperlink::BuildFileName( // try to convert to relative file name OUString aTmpName( aDosName ); aDosName = INetURLObject::GetRelURL( rRoot.GetBasePath(), rUrl, - INetURLObject::WAS_ENCODED, + INetURLObject::EncodeMechanism::WasEncoded, (bEncoded ? INetURLObject::DECODE_TO_IURI : INetURLObject::DECODE_WITH_CHARSET)); if (aDosName.startsWith(INET_FILE_SCHEME)) diff --git a/scripting/source/stringresource/stringresource.cxx b/scripting/source/stringresource/stringresource.cxx index f29dbfbf56f4..ad382d94d0ba 100644 --- a/scripting/source/stringresource/stringresource.cxx +++ b/scripting/source/stringresource/stringresource.cxx @@ -1801,7 +1801,7 @@ OUString StringResourcePersistenceImpl::implGetPathForLocaleItem { OUString aFileName = implGetFileNameForLocaleItem( pLocaleItem, aNameBase ); INetURLObject aInetObj( aLocation ); - aInetObj.insertName( aFileName, true, INetURLObject::LAST_SEGMENT, INetURLObject::ENCODE_ALL ); + aInetObj.insertName( aFileName, true, INetURLObject::LAST_SEGMENT, INetURLObject::EncodeMechanism::All ); if( bDefaultFile ) aInetObj.setExtension( "default" ); else diff --git a/sd/source/filter/html/pubdlg.cxx b/sd/source/filter/html/pubdlg.cxx index c279412baf79..a203b0a0e56b 100644 --- a/sd/source/filter/html/pubdlg.cxx +++ b/sd/source/filter/html/pubdlg.cxx @@ -865,7 +865,7 @@ void SdPublishingDlg::GetParameterSequence( Sequence< PropertyValue >& rParams ) // try to guess protocol for user's homepage INetURLObject aHomeURL( pPage4_WWW->GetText(), INetProtocol::Http, // default proto is HTTP - INetURLObject::ENCODE_ALL ); + INetURLObject::EncodeMechanism::All ); aValue.Name = "HomepageURL"; aValue.Value <<= OUString( aHomeURL.GetMainURL( INetURLObject::NO_DECODE ) ); diff --git a/sd/source/ui/dlg/tpaction.cxx b/sd/source/ui/dlg/tpaction.cxx index d1a0b7472dd8..815fa6bbf207 100644 --- a/sd/source/ui/dlg/tpaction.cxx +++ b/sd/source/ui/dlg/tpaction.cxx @@ -303,7 +303,7 @@ bool SdTPAction::FillItemSet( SfxItemSet* rAttrs ) eCA == presentation::ClickAction_DOCUMENT || eCA == presentation::ClickAction_PROGRAM ) aFileName = ::URIHelper::SmartRel2Abs( INetURLObject(aBaseURL), aFileName, URIHelper::GetMaybeFileHdl(), true, false, - INetURLObject::WAS_ENCODED, + INetURLObject::EncodeMechanism::WasEncoded, INetURLObject::DECODE_UNAMBIGUOUS ); rAttrs->Put( SfxStringItem( ATTR_ACTION_FILENAME, aFileName ) ); diff --git a/sd/source/ui/func/fusel.cxx b/sd/source/ui/func/fusel.cxx index f1e024947f0e..4a0acda8d055 100644 --- a/sd/source/ui/func/fusel.cxx +++ b/sd/source/ui/func/fusel.cxx @@ -1365,7 +1365,7 @@ 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::WAS_ENCODED, INetURLObject::DECODE_UNAMBIGUOUS ) ); + INetURLObject::EncodeMechanism::WasEncoded, INetURLObject::DECODE_UNAMBIGUOUS ) ); if( INetProtocol::File == aURL.GetProtocol() ) { diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx index dd430e2b3bf2..4a71463d236b 100644 --- a/sd/source/ui/slideshow/slideshowimpl.cxx +++ b/sd/source/ui/slideshow/slideshowimpl.cxx @@ -1534,7 +1534,7 @@ void SlideshowImpl::click( const Reference< XShape >& xShape, const css::awt::Mo ::URIHelper::SmartRel2Abs( INetURLObject(mpDocSh->GetMedium()->GetBaseURL()), pEvent->maStrBookmark, ::URIHelper::GetMaybeFileHdl(), true, - false, INetURLObject::WAS_ENCODED, + false, INetURLObject::EncodeMechanism::WasEncoded, INetURLObject::DECODE_UNAMBIGUOUS ) ); if( INetProtocol::File == aURL.GetProtocol() ) diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx index cff011ed0dc2..704b8d9ff172 100644 --- a/sd/source/ui/view/drviewse.cxx +++ b/sd/source/ui/view/drviewse.cxx @@ -1473,7 +1473,7 @@ void DrawViewShell::InsertURLButton(const OUString& rURL, const OUString& rText, bool bNewObj = true; const OUString sTargetURL( ::URIHelper::SmartRel2Abs( INetURLObject( GetDocSh()->GetMedium()->GetBaseURL() ), rURL, URIHelper::GetMaybeFileHdl(), true, false, - INetURLObject::WAS_ENCODED, + INetURLObject::EncodeMechanism::WasEncoded, INetURLObject::DECODE_UNAMBIGUOUS ) ); if (mpDrawView->GetMarkedObjectList().GetMarkCount() > 0) { diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx index ed5cc6f9c70e..97412bb3b0ca 100644 --- a/sfx2/source/appl/newhelp.cxx +++ b/sfx2/source/appl/newhelp.cxx @@ -973,7 +973,7 @@ void SearchTabPage_Impl::dispose() OUString aText = m_pSearchED->GetEntry(i); aUserData += INetURLObject::encode( aText, INetURLObject::PART_UNO_PARAM_VALUE, - INetURLObject::ENCODE_ALL ); + INetURLObject::EncodeMechanism::All ); aUserData += ";"; } diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx index c54a0df748a4..8abb8d4092bb 100644 --- a/sfx2/source/dialog/filedlghelper.cxx +++ b/sfx2/source/dialog/filedlghelper.cxx @@ -1588,7 +1588,7 @@ void FileDialogHelper_Impl::verifyPath() } url.insertName( maFileName, false, INetURLObject::LAST_SEGMENT, - INetURLObject::ENCODE_ALL); + INetURLObject::EncodeMechanism::All); OUString sysPathU; osl::FileBase::RC e = osl::FileBase::getSystemPathFromFileURL( url.GetMainURL(INetURLObject::NO_DECODE), sysPathU); diff --git a/sfx2/source/dialog/mailmodel.cxx b/sfx2/source/dialog/mailmodel.cxx index 38a9b1f394d0..d66f25849345 100644 --- a/sfx2/source/dialog/mailmodel.cxx +++ b/sfx2/source/dialog/mailmodel.cxx @@ -780,7 +780,7 @@ SfxMailModel::SendMailResult SfxMailModel::Send( const css::uno::Reference< css: if ( xSimpleMailMessage->getSubject().isEmpty() ) { INetURLObject url( - maAttachedDocuments[0], INetURLObject::WAS_ENCODED); + maAttachedDocuments[0], INetURLObject::EncodeMechanism::WasEncoded); OUString subject( url.getBase( INetURLObject::LAST_SEGMENT, false, diff --git a/sfx2/source/doc/doctempl.cxx b/sfx2/source/doc/doctempl.cxx index 28a997639320..6384008a3b78 100644 --- a/sfx2/source/doc/doctempl.cxx +++ b/sfx2/source/doc/doctempl.cxx @@ -455,11 +455,11 @@ OUString SfxDocumentTemplates::GetTemplateTargetURLFromComponent( const OUString aTemplateObj.insertName( aGroupName, false, INetURLObject::LAST_SEGMENT, - INetURLObject::ENCODE_ALL ); + INetURLObject::EncodeMechanism::All ); aTemplateObj.insertName( aTitle, false, INetURLObject::LAST_SEGMENT, - INetURLObject::ENCODE_ALL ); + INetURLObject::EncodeMechanism::All ); OUString aResult; @@ -839,7 +839,7 @@ bool SfxDocumentTemplates::CopyFrom INetURLObject aTemplObj( pTargetRgn->GetHierarchyURL() ); aTemplObj.insertName( aTitle, false, INetURLObject::LAST_SEGMENT, - INetURLObject::ENCODE_ALL ); + INetURLObject::EncodeMechanism::All ); OUString aTemplURL = aTemplObj.GetMainURL( INetURLObject::NO_DECODE ); uno::Reference< XCommandEnvironment > aCmdEnv; @@ -1246,7 +1246,7 @@ const OUString& DocTempl_EntryData_Impl::GetHierarchyURL() aTemplateObj.insertName( GetTitle(), false, INetURLObject::LAST_SEGMENT, - INetURLObject::ENCODE_ALL ); + INetURLObject::EncodeMechanism::All ); maOwnURL = aTemplateObj.GetMainURL( INetURLObject::NO_DECODE ); DBG_ASSERT( !maOwnURL.isEmpty(), "GetHierarchyURL(): Could not create URL!" ); @@ -1363,7 +1363,7 @@ void RegionData_Impl::AddEntry( const OUString& rTitle, INetURLObject aLinkObj( GetHierarchyURL() ); aLinkObj.insertName( rTitle, false, INetURLObject::LAST_SEGMENT, - INetURLObject::ENCODE_ALL ); + INetURLObject::EncodeMechanism::All ); OUString aLinkURL = aLinkObj.GetMainURL( INetURLObject::NO_DECODE ); bool bFound = false; @@ -1403,7 +1403,7 @@ const OUString& RegionData_Impl::GetHierarchyURL() aRegionObj.insertName( GetTitle(), false, INetURLObject::LAST_SEGMENT, - INetURLObject::ENCODE_ALL ); + INetURLObject::EncodeMechanism::All ); maOwnURL = aRegionObj.GetMainURL( INetURLObject::NO_DECODE ); DBG_ASSERT( !maOwnURL.isEmpty(), "GetHierarchyURL(): Could not create URL!" ); diff --git a/sfx2/source/doc/doctemplates.cxx b/sfx2/source/doc/doctemplates.cxx index 8d6654b5e7e2..e3e619fb5b8a 100644 --- a/sfx2/source/doc/doctemplates.cxx +++ b/sfx2/source/doc/doctemplates.cxx @@ -690,7 +690,7 @@ bool SfxDocTplService_Impl::addEntry( Content& rParentFolder, INetURLObject aLinkObj( rParentFolder.getURL() ); aLinkObj.insertName( rTitle, false, INetURLObject::LAST_SEGMENT, - INetURLObject::ENCODE_ALL ); + INetURLObject::EncodeMechanism::All ); OUString aLinkURL = aLinkObj.GetMainURL( INetURLObject::NO_DECODE ); Content aLink; @@ -834,7 +834,7 @@ bool SfxDocTplService_Impl::CreateNewUniqueFolderWithPrefix( const OUString& aPa INetURLObject aObjPath( aDirPath ); aObjPath.insertName( aTryName, false, INetURLObject::LAST_SEGMENT, - INetURLObject::ENCODE_ALL ); + 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 ) ) ) @@ -900,7 +900,7 @@ OUString SfxDocTplService_Impl::CreateNewUniqueFileWithPrefix( const OUString& a INetURLObject aObjPath( aPath ); aObjPath.insertName( aTryName, false, INetURLObject::LAST_SEGMENT, - INetURLObject::ENCODE_ALL ); + 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 ) ) ) @@ -1218,7 +1218,7 @@ std::vector< beans::StringPair > SfxDocTplService_Impl::ReadUINamesForTemplateDi INetURLObject aLocObj( aUserPath ); aLocObj.insertName( "groupuinames.xml", false, INetURLObject::LAST_SEGMENT, - INetURLObject::ENCODE_ALL ); + INetURLObject::EncodeMechanism::All ); Content aLocContent; // TODO/LATER: Use hashmap in future @@ -1412,7 +1412,7 @@ bool SfxDocTplService_Impl::addGroup( const OUString& rGroupName ) aNewGroupObj.insertName( rGroupName, false, INetURLObject::LAST_SEGMENT, - INetURLObject::ENCODE_ALL ); + INetURLObject::EncodeMechanism::All ); aNewGroupURL = aNewGroupObj.GetMainURL( INetURLObject::NO_DECODE ); @@ -1497,7 +1497,7 @@ bool SfxDocTplService_Impl::removeGroup( const OUString& rGroupName ) INetURLObject aGroupObj( maRootURL ); aGroupObj.insertName( rGroupName, false, INetURLObject::LAST_SEGMENT, - INetURLObject::ENCODE_ALL ); + INetURLObject::EncodeMechanism::All ); // Get the target url Content aGroup; @@ -1601,7 +1601,7 @@ bool SfxDocTplService_Impl::renameGroup( const OUString& rOldName, INetURLObject aGroupObj( maRootURL ); aGroupObj.insertName( rNewName, false, INetURLObject::LAST_SEGMENT, - INetURLObject::ENCODE_ALL ); + INetURLObject::EncodeMechanism::All ); OUString aGroupURL = aGroupObj.GetMainURL( INetURLObject::NO_DECODE ); // Check, if there is a group with the new name, return false @@ -1612,7 +1612,7 @@ bool SfxDocTplService_Impl::renameGroup( const OUString& rOldName, aGroupObj.removeSegment(); aGroupObj.insertName( rOldName, false, INetURLObject::LAST_SEGMENT, - INetURLObject::ENCODE_ALL ); + INetURLObject::EncodeMechanism::All ); aGroupURL = aGroupObj.GetMainURL( INetURLObject::NO_DECODE ); // When there is no group with the old name, we can't rename it @@ -1708,7 +1708,7 @@ bool SfxDocTplService_Impl::storeTemplate( const OUString& rGroupName, aGroupObj.insertName( rGroupName, false, INetURLObject::LAST_SEGMENT, - INetURLObject::ENCODE_ALL ); + INetURLObject::EncodeMechanism::All ); aGroupURL = aGroupObj.GetMainURL( INetURLObject::NO_DECODE ); if ( ! Content::create( aGroupURL, maCmdEnv, comphelper::getProcessComponentContext(), aGroup ) ) @@ -1727,7 +1727,7 @@ bool SfxDocTplService_Impl::storeTemplate( const OUString& rGroupName, // it can not be replaced aGroupObj.insertName( rTemplateName, false, INetURLObject::LAST_SEGMENT, - INetURLObject::ENCODE_ALL ); + INetURLObject::EncodeMechanism::All ); aTemplateURL = aGroupObj.GetMainURL( INetURLObject::NO_DECODE ); if ( Content::create( aTemplateURL, maCmdEnv, comphelper::getProcessComponentContext(), aTemplateToRemove ) ) @@ -1892,7 +1892,7 @@ bool SfxDocTplService_Impl::addTemplate( const OUString& rGroupName, aGroupObj.insertName( rGroupName, false, INetURLObject::LAST_SEGMENT, - INetURLObject::ENCODE_ALL ); + INetURLObject::EncodeMechanism::All ); aGroupURL = aGroupObj.GetMainURL( INetURLObject::NO_DECODE ); if ( ! Content::create( aGroupURL, maCmdEnv, comphelper::getProcessComponentContext(), aGroup ) ) @@ -1902,7 +1902,7 @@ bool SfxDocTplService_Impl::addTemplate( const OUString& rGroupName, // Return false, if there already is a template aGroupObj.insertName( rTemplateName, false, INetURLObject::LAST_SEGMENT, - INetURLObject::ENCODE_ALL ); + INetURLObject::EncodeMechanism::All ); aTemplateURL = aGroupObj.GetMainURL( INetURLObject::NO_DECODE ); if ( Content::create( aTemplateURL, maCmdEnv, comphelper::getProcessComponentContext(), aTemplate ) ) @@ -1943,7 +1943,7 @@ bool SfxDocTplService_Impl::addTemplate( const OUString& rGroupName, aTargetObj.insertName( rTemplateName, false, INetURLObject::LAST_SEGMENT, - INetURLObject::ENCODE_ALL ); + INetURLObject::EncodeMechanism::All ); aTargetObj.setExtension( aSourceObj.getExtension() ); aTargetURL2 = aTargetObj.GetMainURL( INetURLObject::NO_DECODE ); @@ -2065,7 +2065,7 @@ bool SfxDocTplService_Impl::removeTemplate( const OUString& rGroupName, aGroupObj.insertName( rGroupName, false, INetURLObject::LAST_SEGMENT, - INetURLObject::ENCODE_ALL ); + INetURLObject::EncodeMechanism::All ); aGroupURL = aGroupObj.GetMainURL( INetURLObject::NO_DECODE ); if ( ! Content::create( aGroupURL, maCmdEnv, comphelper::getProcessComponentContext(), aGroup ) ) @@ -2075,7 +2075,7 @@ bool SfxDocTplService_Impl::removeTemplate( const OUString& rGroupName, // Return false, if there is no template aGroupObj.insertName( rTemplateName, false, INetURLObject::LAST_SEGMENT, - INetURLObject::ENCODE_ALL ); + INetURLObject::EncodeMechanism::All ); aTemplateURL = aGroupObj.GetMainURL( INetURLObject::NO_DECODE ); if ( !Content::create( aTemplateURL, maCmdEnv, comphelper::getProcessComponentContext(), aTemplate ) ) @@ -2117,7 +2117,7 @@ bool SfxDocTplService_Impl::renameTemplate( const OUString& rGroupName, aGroupObj.insertName( rGroupName, false, INetURLObject::LAST_SEGMENT, - INetURLObject::ENCODE_ALL ); + INetURLObject::EncodeMechanism::All ); aGroupURL = aGroupObj.GetMainURL( INetURLObject::NO_DECODE ); if ( ! Content::create( aGroupURL, maCmdEnv, comphelper::getProcessComponentContext(), aGroup ) ) @@ -2127,7 +2127,7 @@ bool SfxDocTplService_Impl::renameTemplate( const OUString& rGroupName, // Return false, if there is one aGroupObj.insertName( rNewName, false, INetURLObject::LAST_SEGMENT, - INetURLObject::ENCODE_ALL ); + INetURLObject::EncodeMechanism::All ); aTemplateURL = aGroupObj.GetMainURL( INetURLObject::NO_DECODE ); if ( Content::create( aTemplateURL, maCmdEnv, comphelper::getProcessComponentContext(), aTemplate ) ) @@ -2138,7 +2138,7 @@ bool SfxDocTplService_Impl::renameTemplate( const OUString& rGroupName, aGroupObj.removeSegment(); aGroupObj.insertName( rOldName, false, INetURLObject::LAST_SEGMENT, - INetURLObject::ENCODE_ALL ); + INetURLObject::EncodeMechanism::All ); aTemplateURL = aGroupObj.GetMainURL( INetURLObject::NO_DECODE ); if ( !Content::create( aTemplateURL, maCmdEnv, comphelper::getProcessComponentContext(), aTemplate ) ) @@ -2634,7 +2634,7 @@ void SfxDocTplService_Impl::addToHierarchy( GroupData_Impl *pGroup, aGroupObj.insertName( pData->getTitle(), false, INetURLObject::LAST_SEGMENT, - INetURLObject::ENCODE_ALL ); + INetURLObject::EncodeMechanism::All ); OUString aTemplateURL = aGroupObj.GetMainURL( INetURLObject::NO_DECODE ); @@ -2678,7 +2678,7 @@ void SfxDocTplService_Impl::addGroupToHierarchy( GroupData_Impl *pGroup ) INetURLObject aNewGroupObj( maRootURL ); aNewGroupObj.insertName( pGroup->getTitle(), false, INetURLObject::LAST_SEGMENT, - INetURLObject::ENCODE_ALL ); + INetURLObject::EncodeMechanism::All ); OUString aNewGroupURL = aNewGroupObj.GetMainURL( INetURLObject::NO_DECODE ); diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx index 7dcc6286271c..ce69cf683482 100644 --- a/sfx2/source/doc/guisaveas.cxx +++ b/sfx2/source/doc/guisaveas.cxx @@ -1241,7 +1241,7 @@ OUString ModelData_Impl::GetRecommendedName( const OUString& aSuggestedName, con if ( xTypeDetection.is() ) { INetURLObject aObj( "c:/" + aRecommendedName, INetProtocol::File, - INetURLObject::ENCODE_ALL, RTL_TEXTENCODING_UTF8, INetURLObject::FSYS_DOS ); + INetURLObject::EncodeMechanism::All, RTL_TEXTENCODING_UTF8, INetURLObject::FSYS_DOS ); OUString aExtension = GetRecommendedExtension( aTypeName ); if ( !aExtension.isEmpty() ) diff --git a/sot/source/sdstor/ucbstorage.cxx b/sot/source/sdstor/ucbstorage.cxx index 148e9cc9efa6..d4c1d560c028 100644 --- a/sot/source/sdstor/ucbstorage.cxx +++ b/sot/source/sdstor/ucbstorage.cxx @@ -1540,7 +1540,7 @@ UCBStorage_Impl::UCBStorage_Impl( const OUString& rName, StreamMode nMode, UCBSt { // create the special package URL for the package content OUString aTemp = "vnd.sun.star.pkg://"; - aTemp += INetURLObject::encode( aName, INetURLObject::PART_AUTHORITY, INetURLObject::ENCODE_ALL ); + aTemp += INetURLObject::encode( aName, INetURLObject::PART_AUTHORITY, INetURLObject::EncodeMechanism::All ); m_aURL = aTemp; if ( m_nMode & StreamMode::WRITE ) @@ -1584,7 +1584,7 @@ UCBStorage_Impl::UCBStorage_Impl( SvStream& rStream, UCBStorage* pStorage, bool // accessed readonly // the root storage opens the package; create the special package URL for the package content OUString aTemp = "vnd.sun.star.pkg://"; - aTemp += INetURLObject::encode( m_pTempFile->GetURL(), INetURLObject::PART_AUTHORITY, INetURLObject::ENCODE_ALL ); + aTemp += INetURLObject::encode( m_pTempFile->GetURL(), INetURLObject::PART_AUTHORITY, INetURLObject::EncodeMechanism::All ); m_aURL = aTemp; // copy data into the temporary file diff --git a/svl/source/misc/inethist.cxx b/svl/source/misc/inethist.cxx index 4fe327f6830b..f516af9effc0 100644 --- a/svl/source/misc/inethist.cxx +++ b/svl/source/misc/inethist.cxx @@ -330,7 +330,7 @@ void INetURLHistory::NormalizeUrl_Impl (INetURLObject &rUrl) if (!INetURLObject::IsCaseSensitive()) { OUString aPath (rUrl.GetURLPath(INetURLObject::NO_DECODE).toAsciiLowerCase()); - rUrl.SetURLPath (aPath, INetURLObject::NOT_CANONIC); + rUrl.SetURLPath (aPath, INetURLObject::EncodeMechanism::NotCanonical); } break; @@ -372,7 +372,7 @@ void INetURLHistory::PutUrl_Impl (const INetURLObject &rUrl) if (aHistUrl.HasMark()) { aHistUrl.SetURL (aHistUrl.GetURLNoMark(INetURLObject::NO_DECODE), - INetURLObject::NOT_CANONIC); + INetURLObject::EncodeMechanism::NotCanonical); m_pImpl->putUrl (aHistUrl.GetMainURL(INetURLObject::NO_DECODE)); Broadcast (INetURLHistoryHint (&aHistUrl)); diff --git a/svl/source/misc/urihelper.cxx b/svl/source/misc/urihelper.cxx index b53a725dde55..acf4d0aa4e42 100644 --- a/svl/source/misc/urihelper.cxx +++ b/svl/source/misc/urihelper.cxx @@ -493,7 +493,7 @@ OUString URIHelper::FindFirstURLInText(OUString const & rText, // length match. // Productions 1--4 use the given eMechanism and eCharset. Productions 5--9 - // use ENCODE_ALL. + // use EncodeMechanism::All. // Productions 6--9 are only applicable if the FSYS_DOS bit is set in // eStyle. @@ -630,7 +630,7 @@ OUString URIHelper::FindFirstURLInText(OUString const & rText, { INetURLObject aUri(rText.copy(nPos, nUriEnd - nPos), INetProtocol::File, - INetURLObject::ENCODE_ALL, + INetURLObject::EncodeMechanism::All, RTL_TEXTENCODING_UTF8, INetURLObject::FSYS_DOS); if (!aUri.HasError()) @@ -659,7 +659,7 @@ OUString URIHelper::FindFirstURLInText(OUString const & rText, { INetURLObject aUri(rText.copy(nPos, nUriEnd - nPos), INetProtocol::File, - INetURLObject::ENCODE_ALL, + INetURLObject::EncodeMechanism::All, RTL_TEXTENCODING_UTF8, INetURLObject::FSYS_DOS); if (!aUri.HasError()) @@ -696,7 +696,7 @@ OUString URIHelper::FindFirstURLInText(OUString const & rText, { INetURLObject aUri(rText.copy(nPos, i - nPos), INetProtocol::Mailto, - INetURLObject::ENCODE_ALL); + INetURLObject::EncodeMechanism::All); if (!aUri.HasError()) { rBegin = nPos; diff --git a/svtools/source/contnr/fileview.cxx b/svtools/source/contnr/fileview.cxx index 76f1ea59a7ce..0a0a5ebea974 100644 --- a/svtools/source/contnr/fileview.cxx +++ b/svtools/source/contnr/fileview.cxx @@ -2107,7 +2107,7 @@ void SvtFileView_Impl::EntryRenamed( OUString& rURL, (*aIt)->maDisplayText = aDisplayText.replaceAt( 0, nIndex, rTitle ); INetURLObject aURLObj( rURL ); - aURLObj.SetName( rTitle, INetURLObject::ENCODE_ALL ); + aURLObj.SetName( rTitle, INetURLObject::EncodeMechanism::All ); rURL = aURLObj.GetMainURL( INetURLObject::NO_DECODE ); diff --git a/svtools/source/control/inettbc.cxx b/svtools/source/control/inettbc.cxx index 38ddaccce972..d39bb3ab9d9e 100644 --- a/svtools/source/control/inettbc.cxx +++ b/svtools/source/control/inettbc.cxx @@ -481,7 +481,7 @@ OUString SvtURLBox::ParseSmart( const OUString& _aText, const OUString& _aBaseUR // file URL must be correctly encoded! OUString aTextURL = INetURLObject::encode( aText, INetURLObject::PART_FPATH, - INetURLObject::ENCODE_ALL ); + INetURLObject::EncodeMechanism::All ); aTemp += aTextURL; INetURLObject aTmp( aTemp ); @@ -516,7 +516,7 @@ OUString SvtURLBox::ParseSmart( const OUString& _aText, const OUString& _aBaseUR bool bWasAbsolute = false; #ifdef UNX // encode file URL correctly - aSmart = INetURLObject::encode( aSmart, INetURLObject::PART_FPATH, INetURLObject::ENCODE_ALL ); + aSmart = INetURLObject::encode( aSmart, INetURLObject::PART_FPATH, INetURLObject::EncodeMechanism::All ); #endif INetURLObject aTmp( aObj.smartRel2Abs( aSmart, bWasAbsolute ) ); diff --git a/svtools/source/misc/imap.cxx b/svtools/source/misc/imap.cxx index 839450aac5b3..a5f31be9b7f8 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::WAS_ENCODED, INetURLObject::DECODE_UNAMBIGUOUS ); + aURL = URIHelper::SmartRel2Abs( INetURLObject(rBaseURL), aURL, URIHelper::GetMaybeFileHdl(), true, false, INetURLObject::EncodeMechanism::WasEncoded, INetURLObject::DECODE_UNAMBIGUOUS ); std::unique_ptr<IMapCompat> pCompat(new IMapCompat( rIStm, StreamMode::READ )); ReadIMapObject( rIStm ); diff --git a/svx/source/dialog/imapdlg.cxx b/svx/source/dialog/imapdlg.cxx index 8afc2c14e5f9..49c124c27f9a 100644 --- a/svx/source/dialog/imapdlg.cxx +++ b/svx/source/dialog/imapdlg.cxx @@ -698,7 +698,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::WAS_ENCODED, + INetURLObject::EncodeMechanism::WasEncoded, INetURLObject::DECODE_UNAMBIGUOUS ); } else diff --git a/svx/source/dialog/langbox.cxx b/svx/source/dialog/langbox.cxx index ad29e4c7e6ca..d746aef1a1fa 100644 --- a/svx/source/dialog/langbox.cxx +++ b/svx/source/dialog/langbox.cxx @@ -45,7 +45,7 @@ OUString GetDicInfoStr( const OUString& rName, const sal_uInt16 nLang, bool bNeg { INetURLObject aURLObj; aURLObj.SetSmartProtocol( INetProtocol::File ); - aURLObj.SetSmartURL( rName, INetURLObject::ENCODE_ALL ); + aURLObj.SetSmartURL( rName, INetURLObject::EncodeMechanism::All ); OUString aTmp( aURLObj.GetBase() ); aTmp += " "; diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx index f90b2e1795cb..a03f36a93992 100644 --- a/sw/source/core/doc/notxtfrm.cxx +++ b/sw/source/core/doc/notxtfrm.cxx @@ -85,7 +85,7 @@ inline bool GetRealURL( const SwGrfNode& rNd, OUString& rText ) { bool bRet = rNd.GetFileFilterNms( &rText, nullptr ); if( bRet ) - rText = URIHelper::removePassword( rText, INetURLObject::WAS_ENCODED, + rText = URIHelper::removePassword( rText, INetURLObject::EncodeMechanism::WasEncoded, INetURLObject::DECODE_UNAMBIGUOUS); if (rText.startsWith("data:image")) rText = "inline image"; diff --git a/sw/source/core/draw/dpage.cxx b/sw/source/core/draw/dpage.cxx index 3a46620eec33..08b039fc934e 100644 --- a/sw/source/core/draw/dpage.cxx +++ b/sw/source/core/draw/dpage.cxx @@ -198,14 +198,14 @@ bool SwDPage::RequestHelp( vcl::Window* pWindow, SdrView* pView, sText = pTmpObj->GetAltText(); if ( sText.isEmpty() ) sText = URIHelper::removePassword( pTmpObj->GetURL(), - INetURLObject::WAS_ENCODED, + INetURLObject::EncodeMechanism::WasEncoded, INetURLObject::DECODE_UNAMBIGUOUS); } } else if ( !rURL.GetURL().isEmpty() ) { sText = URIHelper::removePassword( rURL.GetURL(), - INetURLObject::WAS_ENCODED, + INetURLObject::EncodeMechanism::WasEncoded, INetURLObject::DECODE_UNAMBIGUOUS); if( rURL.IsServerMap() ) diff --git a/sw/source/core/fields/docufld.cxx b/sw/source/core/fields/docufld.cxx index c3a392bd7789..fbefdc24719f 100644 --- a/sw/source/core/fields/docufld.cxx +++ b/sw/source/core/fields/docufld.cxx @@ -425,7 +425,7 @@ OUString SwFileNameFieldType::Expand(sal_uLong nFormat) const { aRet = URIHelper::removePassword( rURLObj.GetMainURL( INetURLObject::NO_DECODE ), - INetURLObject::WAS_ENCODED, URL_DECODE ); + INetURLObject::EncodeMechanism::WasEncoded, URL_DECODE ); const sal_Int32 nPos = aRet.indexOf(rURLObj.GetLastName( URL_DECODE )); if (nPos>=0) { @@ -449,7 +449,7 @@ OUString SwFileNameFieldType::Expand(sal_uLong nFormat) const else aRet = URIHelper::removePassword( rURLObj.GetMainURL( INetURLObject::NO_DECODE ), - INetURLObject::WAS_ENCODED, URL_DECODE ); + INetURLObject::EncodeMechanism::WasEncoded, URL_DECODE ); } } return aRet; diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx index c4bfb39f4c6f..46d42cb5835b 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::WAS_ENCODED, INetURLObject::DECODE_WITH_CHARSET ); + INetURLObject::EncodeMechanism::WasEncoded, INetURLObject::DECODE_WITH_CHARSET ); if (aDosName.startsWith(INET_FILE_SCHEME)) { diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx index 738a51a18271..b81b1097cab1 100644 --- a/sw/source/filter/ww8/wrtw8nds.cxx +++ b/sw/source/filter/ww8/wrtw8nds.cxx @@ -1128,7 +1128,7 @@ OUString BookmarkToWord(const OUString &rBookmark) { OUString sRet(INetURLObject::encode(rBookmark, INetURLObject::PART_REL_SEGMENT_EXTRA, - INetURLObject::ENCODE_ALL, RTL_TEXTENCODING_ASCII_US)); + INetURLObject::EncodeMechanism::All, RTL_TEXTENCODING_ASCII_US)); return TruncateBookmark(sRet); } diff --git a/sw/source/uibase/app/docsh.cxx b/sw/source/uibase/app/docsh.cxx index 2872e78040f4..d425aa921aaf 100644 --- a/sw/source/uibase/app/docsh.cxx +++ b/sw/source/uibase/app/docsh.cxx @@ -430,8 +430,8 @@ 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::ENCODE_ALL); - aURL += "/" + INetURLObject::encode(m_pDoc->GetDBManager()->getEmbeddedName(), INetURLObject::PART_FPATH, INetURLObject::ENCODE_ALL); + aURL += INetURLObject::encode(rOldURLObject.GetMainURL(INetURLObject::DECODE_WITH_CHARSET), 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); uno::Reference<frame::XStorable> xStorable(xDataSource->getDatabaseDocument(), uno::UNO_QUERY); diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx index b7a15fc31f57..d822c00d7786 100644 --- a/sw/source/uibase/dbui/dbmgr.cxx +++ b/sw/source/uibase/dbui/dbmgr.cxx @@ -264,7 +264,7 @@ void SAL_CALL SwDataSourceRemovedListener::revokedDatabaseLocation(const sdb::Da OUString aOwnURL = pDocShell->GetMedium()->GetURLObject().GetMainURL(INetURLObject::DECODE_WITH_CHARSET); OUString sTmpName = "vnd.sun.star.pkg://"; - sTmpName += INetURLObject::encode(aOwnURL, INetURLObject::PART_AUTHORITY, INetURLObject::ENCODE_ALL); + sTmpName += INetURLObject::encode(aOwnURL, INetURLObject::PART_AUTHORITY, INetURLObject::EncodeMechanism::All); sTmpName += "/" + m_pDBManager->getEmbeddedName(); if (sTmpName != rEvent.OldLocation) @@ -2755,7 +2755,7 @@ void SwDBManager::StoreEmbeddedDataSource(const uno::Reference<frame::XStorable> { // Construct vnd.sun.star.pkg:// URL for later loading, and TargetStorage/StreamRelPath for storing. OUString sTmpName = "vnd.sun.star.pkg://"; - sTmpName += INetURLObject::encode(rOwnURL, INetURLObject::PART_AUTHORITY, INetURLObject::ENCODE_ALL); + sTmpName += INetURLObject::encode(rOwnURL, INetURLObject::PART_AUTHORITY, INetURLObject::EncodeMechanism::All); sTmpName += "/" + rStreamRelPath; uno::Sequence<beans::PropertyValue> aSequence = comphelper::InitPropertySequence( @@ -2797,8 +2797,8 @@ 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::ENCODE_ALL); - aURL += "/" + INetURLObject::encode(m_sEmbeddedName, INetURLObject::PART_FPATH, INetURLObject::ENCODE_ALL); + aURL += INetURLObject::encode(rURLObject.GetMainURL(INetURLObject::DECODE_WITH_CHARSET), 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); xDatabaseContext->registerObject( sDataSource, xDataSource ); diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx index 0b84f351553b..41d7a5bd63de 100644 --- a/sw/source/uibase/dochdl/swdtflvr.cxx +++ b/sw/source/uibase/dochdl/swdtflvr.cxx @@ -225,7 +225,7 @@ SwTransferable::SwTransferable( SwWrtShell& rSh ) const INetURLObject& rURLObj = pDShell->GetMedium()->GetURLObject(); m_aObjDesc.maDisplayName = URIHelper::removePassword( rURLObj.GetMainURL( INetURLObject::NO_DECODE ), - INetURLObject::WAS_ENCODED, + INetURLObject::EncodeMechanism::WasEncoded, INetURLObject::DECODE_UNAMBIGUOUS ); } diff --git a/sw/source/uibase/docvw/edtwin2.cxx b/sw/source/uibase/docvw/edtwin2.cxx index 71a3e152487f..f0f65e1ae090 100644 --- a/sw/source/uibase/docvw/edtwin2.cxx +++ b/sw/source/uibase/docvw/edtwin2.cxx @@ -168,7 +168,7 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt) { sText = static_cast<const SfxStringItem*>(aContentAtPos.aFnd.pAttr)->GetValue(); sText = URIHelper::removePassword( sText, - INetURLObject::WAS_ENCODED, + INetURLObject::EncodeMechanism::WasEncoded, INetURLObject::DECODE_UNAMBIGUOUS); //#i63832# remove the link target type sal_Int32 nFound = sText.indexOf(cMarkSeparator); diff --git a/tools/source/fsys/urlobj.cxx b/tools/source/fsys/urlobj.cxx index 8b38c70eef5d..7d3669630c4c 100644 --- a/tools/source/fsys/urlobj.cxx +++ b/tools/source/fsys/urlobj.cxx @@ -756,7 +756,7 @@ bool INetURLObject::setAbsURIRef(OUString const & rTheAbsURIRef, && (pEnd - p1 == 2 || p1[2] == '/' || p1[2] == '\\')) { m_eScheme = INetProtocol::File; // 8th, 9th - eMechanism = ENCODE_ALL; + eMechanism = EncodeMechanism::All; nFragmentDelimiter = 0x80000000; } else if (pEnd - p1 >= 2 && p1[0] == '/' && p1[1] == '/') @@ -769,7 +769,7 @@ bool INetURLObject::setAbsURIRef(OUString const & rTheAbsURIRef, else if (p1 != pEnd && *p1 == '/') { m_eScheme = INetProtocol::File; // 6th - eMechanism = ENCODE_ALL; + eMechanism = EncodeMechanism::All; nFragmentDelimiter = 0x80000000; } else if (eStyle & FSYS_DOS @@ -783,13 +783,13 @@ bool INetURLObject::setAbsURIRef(OUString const & rTheAbsURIRef, sal_Unicode const * pe = n == -1 ? pEnd : p1 + n; if ( parseHostOrNetBiosName( - p1, pe, bOctets, ENCODE_ALL, RTL_TEXTENCODING_DONTKNOW, + p1, pe, bOctets, EncodeMechanism::All, RTL_TEXTENCODING_DONTKNOW, true, nullptr) || (scanDomain(p1, pe) > 0 && p1 == pe) ) { m_eScheme = INetProtocol::File; // 7th - eMechanism = ENCODE_ALL; + eMechanism = EncodeMechanism::All; nFragmentDelimiter = 0x80000000; } } @@ -1026,7 +1026,7 @@ bool INetURLObject::setAbsURIRef(OUString const & rTheAbsURIRef, ++p1; } if (parseHostOrNetBiosName( - pPos + 2, p1, bOctets, ENCODE_ALL, + pPos + 2, p1, bOctets, EncodeMechanism::All, RTL_TEXTENCODING_DONTKNOW, true, nullptr)) { aSynAbsURIRef.append("//"); @@ -1095,7 +1095,7 @@ bool INetURLObject::setAbsURIRef(OUString const & rTheAbsURIRef, } if ( parseHostOrNetBiosName( - p1, pe, bOctets, ENCODE_ALL, + p1, pe, bOctets, EncodeMechanism::All, RTL_TEXTENCODING_DONTKNOW, true, nullptr) || (scanDomain(p1, pe) > 0 && p1 == pe) ) @@ -1533,7 +1533,7 @@ bool INetURLObject::convertRelToAbs(OUString const & rTheRelURIRef, q, pEnd - q, '\\'); sal_Unicode const * qe = n == -1 ? pEnd : q + n; if (parseHostOrNetBiosName( - q, qe, false/*bOctets*/, ENCODE_ALL, RTL_TEXTENCODING_DONTKNOW, + q, qe, false/*bOctets*/, EncodeMechanism::All, RTL_TEXTENCODING_DONTKNOW, true, nullptr)) { bFSys = true; // 1st @@ -1576,7 +1576,7 @@ bool INetURLObject::convertRelToAbs(OUString const & rTheRelURIRef, if (bRelativeNonURIs) { - eMechanism = ENCODE_ALL; + eMechanism = EncodeMechanism::All; nQueryDelimiter = 0x80000000; nFragmentDelimiter = 0x80000000; ePart = PART_VISIBLE_NONSPECIAL; @@ -2034,7 +2034,7 @@ bool INetURLObject::convertIntToExt(OUString const & rTheIntURIRef, rtl_TextEncoding eCharset) { OUString aSynExtURIRef(encodeText(rTheIntURIRef, bOctets, PART_VISIBLE, - NOT_CANONIC, eCharset, true)); + EncodeMechanism::NotCanonical, eCharset, true)); sal_Unicode const * pBegin = aSynExtURIRef.getStr(); sal_Unicode const * pEnd = pBegin + aSynExtURIRef.getLength(); sal_Unicode const * p = pBegin; @@ -2057,7 +2057,7 @@ bool INetURLObject::convertExtToInt(OUString const & rTheExtURIRef, rtl_TextEncoding eCharset) { OUString aSynIntURIRef(encodeText(rTheExtURIRef, bOctets, PART_VISIBLE, - NOT_CANONIC, eCharset, true)); + EncodeMechanism::NotCanonical, eCharset, true)); sal_Unicode const * pBegin = aSynIntURIRef.getStr(); sal_Unicode const * pEnd = pBegin + aSynIntURIRef.getLength(); sal_Unicode const * p = pBegin; @@ -2236,7 +2236,7 @@ bool INetURLObject::setUser(OUString const & rTheUser, } OUString aNewUser(encodeText(rTheUser, false/*bOctets*/, PART_USER_PASSWORD, - WAS_ENCODED, eCharset, false)); + EncodeMechanism::WasEncoded, eCharset, false)); sal_Int32 nDelta; if (m_aUser.isPresent()) nDelta = m_aUser.set(m_aAbsURIRef, aNewUser); @@ -2291,7 +2291,7 @@ bool INetURLObject::setPassword(OUString const & rThePassword, if (!getSchemeInfo().m_bPassword) return false; OUString aNewAuth(encodeText(rThePassword, false/*bOctets*/, PART_USER_PASSWORD, - WAS_ENCODED, eCharset, false)); + EncodeMechanism::WasEncoded, eCharset, false)); sal_Int32 nDelta; if (m_aAuth.isPresent()) nDelta = m_aAuth.set(m_aAbsURIRef, aNewAuth); @@ -2853,7 +2853,7 @@ bool INetURLObject::setHost(OUString const & rTheHost, } if (!parseHostOrNetBiosName( aSynHost.getStr(), aSynHost.getStr() + aSynHost.getLength(), - false/*bOctets*/, WAS_ENCODED, eCharset, bNetBiosName, &aSynHost)) + false/*bOctets*/, EncodeMechanism::WasEncoded, eCharset, bNetBiosName, &aSynHost)) return false; sal_Int32 nDelta = m_aHost.set(m_aAbsURIRef, aSynHost.makeStringAndClear()); m_aPort += nDelta; @@ -3282,7 +3282,7 @@ bool INetURLObject::insertName(OUString const & rTheName, } aNewPath.append(pSuffixBegin, pPathEnd - pSuffixBegin); - return setPath(aNewPath.makeStringAndClear(), NOT_CANONIC, + return setPath(aNewPath.makeStringAndClear(), EncodeMechanism::NotCanonical, RTL_TEXTENCODING_UTF8); } @@ -3403,7 +3403,7 @@ OUString INetURLObject::decode(sal_Unicode const * pBegin, { EscapeType eEscapeType; sal_uInt32 nUTF32 = getUTF32(pBegin, pEnd, false, - WAS_ENCODED, eCharset, eEscapeType); + EncodeMechanism::WasEncoded, eCharset, eEscapeType); switch (eEscapeType) { case ESCAPE_NO: @@ -3713,7 +3713,7 @@ bool INetURLObject::ConcatData(INetProtocol eTheScheme, { m_aUser.set(m_aAbsURIRef, encodeText(rTheUser, false, PART_USER_PASSWORD, - WAS_ENCODED, RTL_TEXTENCODING_UTF8, false), + EncodeMechanism::WasEncoded, RTL_TEXTENCODING_UTF8, false), m_aAbsURIRef.getLength()); bUserInfo = true; } @@ -3730,7 +3730,7 @@ bool INetURLObject::ConcatData(INetProtocol eTheScheme, m_aAbsURIRef.append(':'); m_aAuth.set(m_aAbsURIRef, encodeText(rThePassword, false, PART_USER_PASSWORD, - WAS_ENCODED, RTL_TEXTENCODING_UTF8, false), + EncodeMechanism::WasEncoded, RTL_TEXTENCODING_UTF8, false), m_aAbsURIRef.getLength()); bUserInfo = true; } @@ -3777,7 +3777,7 @@ bool INetURLObject::ConcatData(INetProtocol eTheScheme, } if (!parseHostOrNetBiosName( aSynHost.getStr(), aSynHost.getStr() + aSynHost.getLength(), - false, WAS_ENCODED, RTL_TEXTENCODING_UTF8, bNetBiosName, &aSynHost)) + false, EncodeMechanism::WasEncoded, RTL_TEXTENCODING_UTF8, bNetBiosName, &aSynHost)) { setInvalid(); return false; @@ -3809,7 +3809,7 @@ bool INetURLObject::ConcatData(INetProtocol eTheScheme, OUStringBuffer aSynPath; sal_Unicode const * p = rThePath.getStr(); sal_Unicode const * pEnd = p + rThePath.getLength(); - if (!parsePath(m_eScheme, &p, pEnd, false, WAS_ENCODED, RTL_TEXTENCODING_UTF8, false, '/', + if (!parsePath(m_eScheme, &p, pEnd, false, EncodeMechanism::WasEncoded, RTL_TEXTENCODING_UTF8, false, '/', 0x80000000, 0x80000000, 0x80000000, aSynPath) || p != pEnd) { @@ -3840,7 +3840,7 @@ OUString INetURLObject::GetAbsURL(OUString const & rTheBaseURIRef, bWasAbsolute, eEncodeMechanism, eCharset, bIgnoreFragment, false, false, FSYS_DETECT) - || eEncodeMechanism != WAS_ENCODED + || eEncodeMechanism != EncodeMechanism::WasEncoded || eDecodeMechanism != DECODE_TO_IURI || eCharset != RTL_TEXTENCODING_UTF8 ? aTheAbsURIRef.GetMainURL(eDecodeMechanism, eCharset) : @@ -3979,7 +3979,7 @@ bool INetURLObject::removeSegment(sal_Int32 nIndex, bool bIgnoreFinalSlash) aNewPath.append('/'); } - return setPath(aNewPath.makeStringAndClear(), NOT_CANONIC, + return setPath(aNewPath.makeStringAndClear(), EncodeMechanism::NotCanonical, RTL_TEXTENCODING_UTF8); } @@ -4026,10 +4026,10 @@ bool INetURLObject::setName(OUString const & rTheName) OUStringBuffer aNewPath; aNewPath.append(pPathBegin, pSegBegin - pPathBegin); aNewPath.append(encodeText(rTheName, false, PART_PCHAR, - WAS_ENCODED, RTL_TEXTENCODING_UTF8, true)); + EncodeMechanism::WasEncoded, RTL_TEXTENCODING_UTF8, true)); aNewPath.append(p, pPathEnd - p); - return setPath(aNewPath.makeStringAndClear(), NOT_CANONIC, + return setPath(aNewPath.makeStringAndClear(), EncodeMechanism::NotCanonical, RTL_TEXTENCODING_UTF8); } @@ -4108,7 +4108,7 @@ bool INetURLObject::setBase(OUString const & rTheBase, sal_Int32 nIndex, eMechanism, eCharset, true)); aNewPath.append(pExtension, pPathEnd - pExtension); - return setPath(aNewPath.makeStringAndClear(), NOT_CANONIC, + return setPath(aNewPath.makeStringAndClear(), EncodeMechanism::NotCanonical, RTL_TEXTENCODING_UTF8); } @@ -4168,10 +4168,10 @@ bool INetURLObject::setExtension(OUString const & rTheExtension, aNewPath.append(pPathBegin, pExtension - pPathBegin); aNewPath.append('.'); aNewPath.append(encodeText(rTheExtension, false, PART_PCHAR, - WAS_ENCODED, eCharset, true)); + EncodeMechanism::WasEncoded, eCharset, true)); aNewPath.append(p, pPathEnd - p); - return setPath(aNewPath.makeStringAndClear(), NOT_CANONIC, + return setPath(aNewPath.makeStringAndClear(), EncodeMechanism::NotCanonical, RTL_TEXTENCODING_UTF8); } @@ -4202,7 +4202,7 @@ bool INetURLObject::removeExtension(sal_Int32 nIndex, bool bIgnoreFinalSlash) aNewPath.append(pPathBegin, pExtension - pPathBegin); aNewPath.append(p, pPathEnd - p); - return setPath(aNewPath.makeStringAndClear(), NOT_CANONIC, + return setPath(aNewPath.makeStringAndClear(), EncodeMechanism::NotCanonical, RTL_TEXTENCODING_UTF8); } @@ -4232,7 +4232,7 @@ bool INetURLObject::setFinalSlash() aNewPath.append(pPathBegin, pPathEnd - pPathBegin); aNewPath.append('/'); - return setPath(aNewPath.makeStringAndClear(), NOT_CANONIC, + return setPath(aNewPath.makeStringAndClear(), EncodeMechanism::NotCanonical, RTL_TEXTENCODING_UTF8); } @@ -4252,7 +4252,7 @@ bool INetURLObject::removeFinalSlash() return false; OUString aNewPath(pPathBegin, pPathEnd - pPathBegin); - return setPath(aNewPath, NOT_CANONIC, RTL_TEXTENCODING_UTF8); + return setPath(aNewPath, EncodeMechanism::NotCanonical, RTL_TEXTENCODING_UTF8); } bool INetURLObject::setFSysPath(OUString const & rFSysPath, @@ -4417,7 +4417,7 @@ bool INetURLObject::setFSysPath(OUString const & rFSysPath, break; } - INetURLObject aTemp(aSynAbsURIRef.makeStringAndClear(), WAS_ENCODED, + INetURLObject aTemp(aSynAbsURIRef.makeStringAndClear(), EncodeMechanism::WasEncoded, RTL_TEXTENCODING_UTF8); if (aTemp.HasError()) return false; @@ -4504,7 +4504,7 @@ OUString INetURLObject::getFSysPath(FSysStyle eStyle, while (p < pEnd) { EscapeType eEscapeType; - sal_uInt32 nUTF32 = getUTF32(p, pEnd, false, WAS_ENCODED, + sal_uInt32 nUTF32 = getUTF32(p, pEnd, false, EncodeMechanism::WasEncoded, RTL_TEXTENCODING_UTF8, eEscapeType); if (eEscapeType == ESCAPE_NO && nUTF32 == '/') @@ -4641,11 +4641,11 @@ sal_uInt32 INetURLObject::getUTF32(sal_Unicode const *& rBegin, INetMIME::getUTF32Character(rBegin, pEnd); switch (eMechanism) { - case ENCODE_ALL: + case EncodeMechanism::All: rEscapeType = ESCAPE_NO; break; - case WAS_ENCODED: + case EncodeMechanism::WasEncoded: { int nWeight1; int nWeight2; @@ -4744,7 +4744,7 @@ sal_uInt32 INetURLObject::getUTF32(sal_Unicode const *& rBegin, break; } - case NOT_CANONIC: + case EncodeMechanism::NotCanonical: { int nWeight1; int nWeight2; @@ -4911,7 +4911,7 @@ OUString INetURLObject::GetPath() const void INetURLObject::SetBase(OUString const & rTheBase) { - setBase(rTheBase, LAST_SEGMENT, ENCODE_ALL); + setBase(rTheBase, LAST_SEGMENT, EncodeMechanism::All); } OUString INetURLObject::GetBase() const diff --git a/vcl/source/bitmap/CommandImageResolver.cxx b/vcl/source/bitmap/CommandImageResolver.cxx index a165adfee9db..d34140d3b9d3 100644 --- a/vcl/source/bitmap/CommandImageResolver.cxx +++ b/vcl/source/bitmap/CommandImageResolver.cxx @@ -90,7 +90,7 @@ bool CommandImageResolver::registerCommands(Sequence<OUString>& aCommandSequence if (aCommandName.indexOf(".uno:") != 0) { - INetURLObject aUrlObject(aCommandName, INetURLObject::ENCODE_ALL); + INetURLObject aUrlObject(aCommandName, INetURLObject::EncodeMechanism::All); aImageName = aUrlObject.GetURLPath(); aImageName = lclConvertToCanonicalName(aImageName); } diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index d07598428ce9..2eb6e6272082 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -3942,7 +3942,7 @@ we check in the following sequence: aLine.append("/GoToR"); aLine.append("/F"); appendLiteralStringEncrypt( bSetRelative ? INetURLObject::GetRelURL( m_aContext.BaseURL, aURLNoMark, - INetURLObject::WAS_ENCODED, + INetURLObject::EncodeMechanism::WasEncoded, INetURLObject::DECODE_WITH_CHARSET ) : aURLNoMark, rLink.m_nObject, aLine, osl_getThreadTextEncoding() ); if( !aFragment.isEmpty() ) @@ -3965,7 +3965,7 @@ we check in the following sequence: } OUString aURL = aTargetURL.GetMainURL( bFileSpec ? INetURLObject::DECODE_WITH_CHARSET : INetURLObject::NO_DECODE ); appendLiteralStringEncrypt(bSetRelative ? INetURLObject::GetRelURL( m_aContext.BaseURL, aURL, - INetURLObject::WAS_ENCODED, + INetURLObject::EncodeMechanism::WasEncoded, bFileSpec ? INetURLObject::DECODE_WITH_CHARSET : INetURLObject::NO_DECODE ) : aURL , rLink.m_nObject, aLine, osl_getThreadTextEncoding() ); diff --git a/vcl/source/image/ImplImageTree.cxx b/vcl/source/image/ImplImageTree.cxx index bd36080633e2..a1628fb281b3 100644 --- a/vcl/source/image/ImplImageTree.cxx +++ b/vcl/source/image/ImplImageTree.cxx @@ -396,7 +396,7 @@ void ImplImageTree::createStyle() INetURLObject aUrl(getIconThemeFolderUrl()); OSL_ASSERT(!aUrl.HasError()); - bool ok = aUrl.Append("images_" + maCurrentStyle, INetURLObject::ENCODE_ALL); + bool ok = aUrl.Append("images_" + maCurrentStyle, INetURLObject::EncodeMechanism::All); OSL_ASSERT(ok); (void) ok; sThemeUrl = aUrl.GetMainURL(INetURLObject::NO_DECODE) + ".zip"; diff --git a/vcl/unx/generic/printer/ppdparser.cxx b/vcl/unx/generic/printer/ppdparser.cxx index bef9ab36e3fd..c2271609d56e 100644 --- a/vcl/unx/generic/printer/ppdparser.cxx +++ b/vcl/unx/generic/printer/ppdparser.cxx @@ -458,7 +458,7 @@ void PPDParser::initPPDFiles(PPDCache &rPPDCache) psp::getPrinterPathList( aPathList, PRINTER_PPDDIR ); for( std::list< OUString >::const_iterator ppd_it = aPathList.begin(); ppd_it != aPathList.end(); ++ppd_it ) { - INetURLObject aPPDDir( *ppd_it, INetProtocol::File, INetURLObject::ENCODE_ALL ); + INetURLObject aPPDDir( *ppd_it, INetProtocol::File, INetURLObject::EncodeMechanism::All ); scanPPDDir( aPPDDir.GetMainURL( INetURLObject::NO_DECODE ) ); } if( rPPDCache.pAllPPDFiles->find( OUString( "SGENPRT" ) ) == rPPDCache.pAllPPDFiles->end() ) @@ -481,7 +481,7 @@ void PPDParser::initPPDFiles(PPDCache &rPPDCache) OUString PPDParser::getPPDFile( const OUString& rFile ) { - INetURLObject aPPD( rFile, INetProtocol::File, INetURLObject::ENCODE_ALL ); + INetURLObject aPPD( rFile, INetProtocol::File, INetURLObject::EncodeMechanism::All ); // someone might enter a full qualified name here PPDDecompressStream aStream( aPPD.PathToFileName() ); if( ! aStream.IsOpen() ) diff --git a/vcl/unx/generic/printer/printerinfomanager.cxx b/vcl/unx/generic/printer/printerinfomanager.cxx index 05881c8c010f..98014c7d4c93 100644 --- a/vcl/unx/generic/printer/printerinfomanager.cxx +++ b/vcl/unx/generic/printer/printerinfomanager.cxx @@ -206,7 +206,7 @@ void PrinterInfoManager::initialize() std::list< OUString >::const_iterator print_dir_it; for( print_dir_it = aDirList.begin(); print_dir_it != aDirList.end(); ++print_dir_it ) { - INetURLObject aFile( *print_dir_it, INetProtocol::File, INetURLObject::ENCODE_ALL ); + INetURLObject aFile( *print_dir_it, INetProtocol::File, INetURLObject::EncodeMechanism::All ); aFile.Append( PRINT_FILENAME ); Config aConfig( aFile.PathToFileName() ); if( aConfig.HasGroup( GLOBAL_DEFAULTS_GROUP ) ) @@ -273,7 +273,7 @@ void PrinterInfoManager::initialize() // now collect all available printers for( print_dir_it = aDirList.begin(); print_dir_it != aDirList.end(); ++print_dir_it ) { - INetURLObject aDir( *print_dir_it, INetProtocol::File, INetURLObject::ENCODE_ALL ); + INetURLObject aDir( *print_dir_it, INetProtocol::File, INetURLObject::EncodeMechanism::All ); INetURLObject aFile( aDir ); aFile.Append( PRINT_FILENAME ); |