diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-12-05 07:59:20 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-12-05 12:49:02 +0200 |
commit | 803215142efa6437515348f63bd70ffdcf5d45f1 (patch) | |
tree | a665854bb7d11f410e3b1e5596e16ae335afadc5 /sfx2 | |
parent | 9d3366c4c62efa4260c1b11d4b53d5982d6fac48 (diff) |
convert INetURLObject::EncodeMechanism to scoped enum
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 | 2 |
6 files changed, 30 insertions, 30 deletions
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() ) |