diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-12-05 07:59:20 +0200 |
---|---|---|
committer | Ashod Nakashian <ashod.nakashian@collabora.co.uk> | 2017-12-18 01:07:52 -0500 |
commit | 6b631a02d36aa09f7c06793e8b4482d3b67ab258 (patch) | |
tree | c69d5d75274bf3943f98cdb5a661053ece11c1dd /sfx2 | |
parent | 32e74cdd3ff79fbbc21e1edba55145cc43c5be39 (diff) |
convert INetURLObject::EncodeMechanism to scoped enum
(cherry picked from commit 803215142efa6437515348f63bd70ffdcf5d45f1)
(cherry picked from commit 736cd289d4cdb0db61d92134bcc9d48aa7e79613)
Change-Id: I50ea17c7779c7b5cacddf548f1773fd7d6c8bade
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/appl/newhelp.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/dialog/filedlghelper.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/dialog/mailmodel.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/doc/doctempl.cxx | 12 | ||||
-rw-r--r-- | sfx2/source/doc/doctemplates.cxx | 40 | ||||
-rw-r--r-- | sfx2/source/doc/guisaveas.cxx | 4 |
6 files changed, 31 insertions, 31 deletions
diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx index 9d2bb1a6fe92..206657bd983a 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 16f1e683d913..8b893f14d736 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 d7d2b55d3984..ebf8845d7c64 100644 --- a/sfx2/source/dialog/mailmodel.cxx +++ b/sfx2/source/dialog/mailmodel.cxx @@ -785,7 +785,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 c0b6491e015f..938cd1f79002 100644 --- a/sfx2/source/doc/guisaveas.cxx +++ b/sfx2/source/doc/guisaveas.cxx @@ -1210,7 +1210,7 @@ OUString ModelData_Impl::GetRecommendedDir( const OUString& aSuggestedDir ) aLocation = INetURLObject( SvtPathOptions().GetWorkPath() ); } - OUString sLocationURL( aLocation.GetMainURL( INetURLObject::NO_DECODE ) ); + OUString sLocationURL( aLocation.GetMainURL( INetURLObject::DecodeMechanism::NONE) ); bool bIsInTempPath( false ); OUString sSysTempPath; if( osl::FileBase::getTempDirURL( sSysTempPath ) == osl::FileBase::E_None ) @@ -1272,7 +1272,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() ) |