diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-12-05 08:47:18 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-12-05 12:49:02 +0200 |
commit | bfde4866e07746eafa2f0d6173c29d805cc35ad0 (patch) | |
tree | be939a44eb70c7187fa5536089b782326b160013 /cui/source/dialogs | |
parent | 803215142efa6437515348f63bd70ffdcf5d45f1 (diff) |
convert DecodeMechanism to scoped enum
Change-Id: I5c56634b1bca8e37fa73d02d2428645301b6c547
Diffstat (limited to 'cui/source/dialogs')
-rw-r--r-- | cui/source/dialogs/cuigaldlg.cxx | 10 | ||||
-rw-r--r-- | cui/source/dialogs/hldocntp.cxx | 12 | ||||
-rw-r--r-- | cui/source/dialogs/hlinettp.cxx | 4 | ||||
-rw-r--r-- | cui/source/dialogs/hlmailtp.cxx | 2 | ||||
-rw-r--r-- | cui/source/dialogs/hltpbase.cxx | 6 | ||||
-rw-r--r-- | cui/source/dialogs/insdlg.cxx | 6 | ||||
-rw-r--r-- | cui/source/dialogs/linkdlg.cxx | 6 | ||||
-rw-r--r-- | cui/source/dialogs/multipat.cxx | 4 |
8 files changed, 25 insertions, 25 deletions
diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx index b41dd0052a89..a4946e40a429 100644 --- a/cui/source/dialogs/cuigaldlg.cxx +++ b/cui/source/dialogs/cuigaldlg.cxx @@ -118,7 +118,7 @@ void SearchThread::ImplSearch( const INetURLObject& rStartURL, try { css::uno::Reference< XCommandEnvironment > xEnv; - Content aCnt( rStartURL.GetMainURL( INetURLObject::NO_DECODE ), xEnv, comphelper::getProcessComponentContext() ); + Content aCnt( rStartURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), xEnv, comphelper::getProcessComponentContext() ); Sequence< OUString > aProps( 2 ); aProps.getArray()[ 0 ] = "IsFolder"; @@ -166,7 +166,7 @@ void SearchThread::ImplSearch( const INetURLObject& rStartURL, SolarMutexGuard aGuard; mpBrowser->aFoundList.push_back( - aFoundURL.GetMainURL( INetURLObject::NO_DECODE ) + aFoundURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ) ); mpBrowser->m_pLbxFound->InsertEntry( GetReducedString( aFoundURL, 50 ), @@ -661,7 +661,7 @@ void TPGalleryThemeGeneral::SetXChgData( ExchangeData* _pData ) aType += CUI_RES( RID_SVXSTR_GALLERY_READONLY ); m_pFtMSShowType->SetText( aType ); - m_pFtMSShowPath->SetText( pThm->GetSdgURL().GetMainURL( INetURLObject::DECODE_UNAMBIGUOUS ) ); + m_pFtMSShowPath->SetText( pThm->GetSdgURL().GetMainURL( INetURLObject::DecodeMechanism::Unambiguous ) ); // singular or plural? if ( 1 == pThm->GetObjectCount() ) @@ -1075,9 +1075,9 @@ void TPGalleryThemeProperties::DoPreview() ErrorHandler::HandleError( ERRCODE_IO_NOTEXISTSPATH ); GetParent()->EnterWait(); } - else if( ::avmedia::MediaWindow::isMediaURL( _aURL.GetMainURL( INetURLObject::DECODE_UNAMBIGUOUS ), "" ) ) + else if( ::avmedia::MediaWindow::isMediaURL( _aURL.GetMainURL( INetURLObject::DecodeMechanism::Unambiguous ), "" ) ) { - xMediaPlayer = ::avmedia::MediaWindow::createPlayer( _aURL.GetMainURL( INetURLObject::NO_DECODE ), "" ); + xMediaPlayer = ::avmedia::MediaWindow::createPlayer( _aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), "" ); if( xMediaPlayer.is() ) xMediaPlayer->start(); } diff --git a/cui/source/dialogs/hldocntp.cxx b/cui/source/dialogs/hldocntp.cxx index 1c61efb91c20..b4bac2b0574e 100644 --- a/cui/source/dialogs/hldocntp.cxx +++ b/cui/source/dialogs/hldocntp.cxx @@ -233,7 +233,7 @@ void SvxHyperlinkNewDocTp::GetCurentItemData ( OUString& rStrURL, OUString& aStr INetURLObject aURL; if ( ImplGetURLObject( rStrURL, m_pCbbPath->GetBaseURL(), aURL ) ) { - rStrURL = aURL.GetMainURL( INetURLObject::NO_DECODE ); + rStrURL = aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ); } GetDataFromCommonFields( aStrName, aStrIntName, aStrFrame, eMode ); @@ -305,7 +305,7 @@ void SvxHyperlinkNewDocTp::DoApply () // create Document - aStrNewName = aURL.GetURLPath( INetURLObject::NO_DECODE ); + aStrNewName = aURL.GetURLPath( INetURLObject::DecodeMechanism::NONE ); SfxViewFrame *pViewFrame = nullptr; try { @@ -313,7 +313,7 @@ void SvxHyperlinkNewDocTp::DoApply () // check if file exists, warn before we overwrite it { - SvStream* pIStm = ::utl::UcbStreamHelper::CreateStream( aURL.GetMainURL( INetURLObject::NO_DECODE ), StreamMode::READ ); + SvStream* pIStm = ::utl::UcbStreamHelper::CreateStream( aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), StreamMode::READ ); bool bOk = pIStm && ( pIStm->GetError() == 0); @@ -364,7 +364,7 @@ void SvxHyperlinkNewDocTp::DoApply () pViewFrame = pItem->GetFrame(); if (pViewFrame) { - SfxStringItem aNewName( SID_FILE_NAME, aURL.GetMainURL( INetURLObject::NO_DECODE ) ); + SfxStringItem aNewName( SID_FILE_NAME, aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ) ); pViewFrame->GetDispatcher()->ExecuteList( SID_SAVEASDOC, SfxCallMode::SYNCHRON, @@ -454,11 +454,11 @@ IMPL_LINK_NOARG(SvxHyperlinkNewDocTp, ClickNewHdl_Impl, Button*, void) if( aNewURL.GetProtocol() == INetProtocol::File ) { - osl::FileBase::getSystemPathFromFileURL(aNewURL.GetMainURL( INetURLObject::NO_DECODE ), aStrTmp); + osl::FileBase::getSystemPathFromFileURL(aNewURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), aStrTmp); } else { - aStrTmp = aNewURL.GetMainURL( INetURLObject::DECODE_UNAMBIGUOUS ); + aStrTmp = aNewURL.GetMainURL( INetURLObject::DecodeMechanism::Unambiguous ); } m_pCbbPath->SetText ( aStrTmp ); diff --git a/cui/source/dialogs/hlinettp.cxx b/cui/source/dialogs/hlinettp.cxx index 0f6d2c6efd30..402fb9c6246b 100644 --- a/cui/source/dialogs/hlinettp.cxx +++ b/cui/source/dialogs/hlinettp.cxx @@ -118,7 +118,7 @@ void SvxHyperlinkInternetTp::FillDlgFields(const OUString& rStrURL) // set URL-field // Show the scheme, #72740 if ( aURL.GetProtocol() != INetProtocol::NotValid ) - m_pCbbTarget->SetText( aURL.GetMainURL( INetURLObject::DECODE_UNAMBIGUOUS ) ); + m_pCbbTarget->SetText( aURL.GetMainURL( INetURLObject::DecodeMechanism::Unambiguous ) ); else m_pCbbTarget->SetText(rStrURL); @@ -182,7 +182,7 @@ OUString SvxHyperlinkInternetTp::CreateAbsoluteURL() const aURL.SetUserAndPass ( m_pEdLogin->GetText(), m_pEdPassword->GetText() ); if ( aURL.GetProtocol() != INetProtocol::NotValid ) - return aURL.GetMainURL( INetURLObject::DECODE_TO_IURI ); + return aURL.GetMainURL( INetURLObject::DecodeMechanism::ToIUri ); else //#105788# always create a URL even if it is not valid return aStrURL; } diff --git a/cui/source/dialogs/hlmailtp.cxx b/cui/source/dialogs/hlmailtp.cxx index 73dd0b7e8719..3050e15ebe7d 100644 --- a/cui/source/dialogs/hlmailtp.cxx +++ b/cui/source/dialogs/hlmailtp.cxx @@ -161,7 +161,7 @@ OUString SvxHyperlinkMailTp::CreateAbsoluteURL() const } if ( aURL.GetProtocol() != INetProtocol::NotValid ) - return aURL.GetMainURL( INetURLObject::DECODE_WITH_CHARSET ); + return aURL.GetMainURL( INetURLObject::DecodeMechanism::WithCharset ); else //#105788# always create a URL even if it is not valid return aStrURL; } diff --git a/cui/source/dialogs/hltpbase.cxx b/cui/source/dialogs/hltpbase.cxx index f6d48add9a56..c8a73f663764 100644 --- a/cui/source/dialogs/hltpbase.cxx +++ b/cui/source/dialogs/hltpbase.cxx @@ -45,19 +45,19 @@ OUString CreateUiNameFromURL( const OUString& aStrURL ) switch(aURLObj.GetProtocol()) { case INetProtocol::File: - osl::FileBase::getSystemPathFromFileURL(aURLObj.GetMainURL(INetURLObject::NO_DECODE), aStrUiURL); + osl::FileBase::getSystemPathFromFileURL(aURLObj.GetMainURL(INetURLObject::DecodeMechanism::NONE), aStrUiURL); break; case INetProtocol::Ftp : { //remove password from name INetURLObject aTmpURL(aURLObj); aTmpURL.SetPass(""); - aStrUiURL = aTmpURL.GetMainURL( INetURLObject::DECODE_UNAMBIGUOUS ); + aStrUiURL = aTmpURL.GetMainURL( INetURLObject::DecodeMechanism::Unambiguous ); } break; default : { - aStrUiURL = aURLObj.GetMainURL(INetURLObject::DECODE_UNAMBIGUOUS); + aStrUiURL = aURLObj.GetMainURL(INetURLObject::DecodeMechanism::Unambiguous); } } if(aStrUiURL.isEmpty()) diff --git a/cui/source/dialogs/insdlg.cxx b/cui/source/dialogs/insdlg.cxx index 47af4955c749..189193706409 100644 --- a/cui/source/dialogs/insdlg.cxx +++ b/cui/source/dialogs/insdlg.cxx @@ -296,7 +296,7 @@ short SvInsertOleDlg::Execute() INetURLObject aURL; aURL.SetSmartProtocol( INetProtocol::File ); aURL.SetSmartURL( aFileName ); - aFileName = aURL.GetMainURL( INetURLObject::NO_DECODE ); + aFileName = aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ); bool bLink = m_pCbFilelink->IsChecked(); if ( !aFileName.isEmpty() ) @@ -522,7 +522,7 @@ short SfxInsertFloatingFrameDialog::Execute() INetURLObject aObj; aObj.SetSmartProtocol( INetProtocol::File ); if ( aObj.SetSmartURL( m_pEDURL->GetText() ) ) - aURL = aObj.GetMainURL( INetURLObject::NO_DECODE ); + aURL = aObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ); } if ( !m_xObj.is() && !aURL.isEmpty() ) @@ -626,7 +626,7 @@ IMPL_LINK_NOARG( SfxInsertFloatingFrameDialog, OpenHdl, Button*, void) // show the dialog if ( aFileDlg.Execute() == ERRCODE_NONE ) m_pEDURL->SetText( - INetURLObject( aFileDlg.GetPath() ).GetMainURL( INetURLObject::DECODE_WITH_CHARSET ) ); + INetURLObject( aFileDlg.GetPath() ).GetMainURL( INetURLObject::DecodeMechanism::WithCharset ) ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cui/source/dialogs/linkdlg.cxx b/cui/source/dialogs/linkdlg.cxx index d8201ba0e89a..bba24a8e707c 100644 --- a/cui/source/dialogs/linkdlg.cxx +++ b/cui/source/dialogs/linkdlg.cxx @@ -243,7 +243,7 @@ IMPL_LINK( SvBaseLinksDlg, LinksSelectHdl, SvTreeListBox *, pSvTabListBox, void OUString aFileName; sfx2::LinkManager::GetDisplayNames( pLink, &sType, &aFileName, pLinkNm, pFilter ); - aFileName = INetURLObject::decode(aFileName, INetURLObject::DECODE_UNAMBIGUOUS); + aFileName = INetURLObject::decode(aFileName, INetURLObject::DecodeMechanism::Unambiguous); m_pFtFullFileName->SetText( aFileName ); m_pFtFullSourceName->SetText( sLink ); m_pFtFullTypeName->SetText( sType ); @@ -389,7 +389,7 @@ IMPL_LINK_NOARG( SvBaseLinksDlg, ChangeSourceClickHdl, Button *, void ) aUrl2.insertName( aUrl_.getName() ); OUString sNewLinkName; MakeLnkName( sNewLinkName, nullptr , - aUrl2.GetMainURL(INetURLObject::DECODE_TO_IURI), sLinkName, &sFilter); + aUrl2.GetMainURL(INetURLObject::DecodeMechanism::ToIUri), sLinkName, &sFilter); pLink->SetLinkSourceName( sNewLinkName ); pLink->Update(); } @@ -631,7 +631,7 @@ void SvBaseLinksDlg::InsertEntry( const SvBaseLink& rLink, sal_uLong nPos, bool OUString aTxt = m_pTbLinks->GetEllipsisString( sFileNm, nWidthPixel, DrawTextFlags::PathEllipsis ); INetURLObject aPath( sFileNm, INetProtocol::File ); OUString aFileName = aPath.getName(); - aFileName = INetURLObject::decode(aFileName, INetURLObject::DECODE_UNAMBIGUOUS); + aFileName = INetURLObject::decode(aFileName, INetURLObject::DecodeMechanism::Unambiguous); if( aFileName.getLength() > aTxt.getLength() ) aTxt = aFileName; diff --git a/cui/source/dialogs/multipat.cxx b/cui/source/dialogs/multipat.cxx index f20db7a4583c..145077bd5c89 100644 --- a/cui/source/dialogs/multipat.cxx +++ b/cui/source/dialogs/multipat.cxx @@ -75,7 +75,7 @@ IMPL_LINK_NOARG(SvxMultiPathDialog, AddHdl_Impl, Button*, void) { INetURLObject aPath( xFolderPicker->getDirectory() ); aPath.removeFinalSlash(); - OUString aURL = aPath.GetMainURL( INetURLObject::NO_DECODE ); + OUString aURL = aPath.GetMainURL( INetURLObject::DecodeMechanism::NONE ); OUString sInsPath; osl::FileBase::getSystemPathFromFileURL(aURL, sInsPath); @@ -108,7 +108,7 @@ IMPL_LINK_NOARG(SvxPathSelectDialog, AddHdl_Impl, Button*, void) { INetURLObject aPath( xFolderPicker->getDirectory() ); aPath.removeFinalSlash(); - OUString aURL = aPath.GetMainURL( INetURLObject::NO_DECODE ); + OUString aURL = aPath.GetMainURL( INetURLObject::DecodeMechanism::NONE ); OUString sInsPath; osl::FileBase::getSystemPathFromFileURL(aURL, sInsPath); |