diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-04-02 15:58:06 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-04-02 16:30:34 +0200 |
commit | 44b3e56bb4a4df59f53447c4ca4d8e02fe926206 (patch) | |
tree | 71a9efde3a6a2a00688e8feb8e3086cb32eceb4f /cui/source | |
parent | 0b4965bcd7ec911951e7ca3a4cd48062843b2634 (diff) |
Change INetProtocol to scoped enumeration
...and fix o3tl::enumarray::operator [] const overload
Change-Id: I749b1b9d68686b03a97074253478d9d2d9d32b0b
Diffstat (limited to 'cui/source')
-rw-r--r-- | cui/source/dialogs/cuigaldlg.cxx | 2 | ||||
-rw-r--r-- | cui/source/dialogs/cuihyperdlg.cxx | 16 | ||||
-rw-r--r-- | cui/source/dialogs/hldocntp.cxx | 10 | ||||
-rw-r--r-- | cui/source/dialogs/hldoctp.cxx | 6 | ||||
-rw-r--r-- | cui/source/dialogs/hlinettp.cxx | 14 | ||||
-rw-r--r-- | cui/source/dialogs/hlmailtp.cxx | 12 | ||||
-rw-r--r-- | cui/source/dialogs/hltpbase.cxx | 8 | ||||
-rw-r--r-- | cui/source/dialogs/insdlg.cxx | 6 | ||||
-rw-r--r-- | cui/source/dialogs/linkdlg.cxx | 6 | ||||
-rw-r--r-- | cui/source/inc/hltpbase.hxx | 2 | ||||
-rw-r--r-- | cui/source/options/doclinkdialog.cxx | 4 | ||||
-rw-r--r-- | cui/source/options/optlingu.cxx | 4 | ||||
-rw-r--r-- | cui/source/options/optpath.cxx | 6 | ||||
-rw-r--r-- | cui/source/options/treeopt.cxx | 2 | ||||
-rw-r--r-- | cui/source/tabpages/backgrnd.cxx | 4 | ||||
-rw-r--r-- | cui/source/tabpages/numpages.cxx | 4 | ||||
-rw-r--r-- | cui/source/tabpages/tpbitmap.cxx | 4 | ||||
-rw-r--r-- | cui/source/tabpages/tpcolor.cxx | 2 | ||||
-rw-r--r-- | cui/source/tabpages/tpgradnt.cxx | 4 | ||||
-rw-r--r-- | cui/source/tabpages/tphatch.cxx | 4 | ||||
-rw-r--r-- | cui/source/tabpages/tpline.cxx | 4 | ||||
-rw-r--r-- | cui/source/tabpages/tplnedef.cxx | 4 | ||||
-rw-r--r-- | cui/source/tabpages/tplneend.cxx | 4 |
23 files changed, 66 insertions, 66 deletions
diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx index b1b045158301..9996a86811c4 100644 --- a/cui/source/dialogs/cuigaldlg.cxx +++ b/cui/source/dialogs/cuigaldlg.cxx @@ -145,7 +145,7 @@ void SearchThread::ImplSearch( const INetURLObject& rStartURL, while( xResultSet->next() && schedule() ) { INetURLObject aFoundURL( xContentAccess->queryContentIdentifierString() ); - DBG_ASSERT( aFoundURL.GetProtocol() != INET_PROT_NOT_VALID, "invalid URL" ); + DBG_ASSERT( aFoundURL.GetProtocol() != INetProtocol::NOT_VALID, "invalid URL" ); bool bFolder = xRow->getBoolean( 1 ); // property "IsFolder" if ( xRow->wasNull() ) diff --git a/cui/source/dialogs/cuihyperdlg.cxx b/cui/source/dialogs/cuihyperdlg.cxx index d1107873e9e9..2daa9e51f186 100644 --- a/cui/source/dialogs/cuihyperdlg.cxx +++ b/cui/source/dialogs/cuihyperdlg.cxx @@ -305,17 +305,17 @@ sal_uInt16 SvxHpLinkDlg::SetPage ( SvxHyperlinkItem* pItem ) switch ( eProtocolTyp ) { - case INET_PROT_HTTP : - case INET_PROT_FTP : + case INetProtocol::HTTP : + case INetProtocol::FTP : nPageId = RID_SVXPAGE_HYPERLINK_INTERNET; break; - case INET_PROT_FILE : - case INET_PROT_POP3 : - case INET_PROT_IMAP : + case INetProtocol::FILE : + case INetProtocol::POP3 : + case INetProtocol::IMAP : nPageId = RID_SVXPAGE_HYPERLINK_DOCUMENT; break; - case INET_PROT_MAILTO : - case INET_PROT_NEWS : + case INetProtocol::MAILTO : + case INetProtocol::NEWS : nPageId = RID_SVXPAGE_HYPERLINK_MAIL; break; default : @@ -323,7 +323,7 @@ sal_uInt16 SvxHpLinkDlg::SetPage ( SvxHyperlinkItem* pItem ) nPageId = RID_SVXPAGE_HYPERLINK_DOCUMENT; else { - eProtocolTyp = INET_PROT_NOT_VALID; + eProtocolTyp = INetProtocol::NOT_VALID; nPageId = GetCurPageId(); } break; diff --git a/cui/source/dialogs/hldocntp.cxx b/cui/source/dialogs/hldocntp.cxx index 2686b482c54c..f74809b8a640 100644 --- a/cui/source/dialogs/hldocntp.cxx +++ b/cui/source/dialogs/hldocntp.cxx @@ -64,7 +64,7 @@ bool SvxHyperlinkNewDocTp::ImplGetURLObject( const OUString& rPath, const OUStri if ( bIsValidURL ) { aURLObject.SetURL( rPath ); - if ( aURLObject.GetProtocol() == INET_PROT_NOT_VALID ) // test if the source is already a valid url + if ( aURLObject.GetProtocol() == INetProtocol::NOT_VALID ) // test if the source is already a valid url { // if not we have to create a url from a physical file name bool wasAbs; INetURLObject base(rBase); @@ -73,7 +73,7 @@ bool SvxHyperlinkNewDocTp::ImplGetURLObject( const OUString& rPath, const OUStri rPath, wasAbs, true, INetURLObject::ENCODE_ALL, RTL_TEXTENCODING_UTF8, true); } - bIsValidURL = aURLObject.GetProtocol() != INET_PROT_NOT_VALID; + bIsValidURL = aURLObject.GetProtocol() != INetProtocol::NOT_VALID; if ( bIsValidURL ) { OUString aBase( aURLObject.getName( INetURLObject::LAST_SEGMENT, false ) ); @@ -103,7 +103,7 @@ SvxHyperlinkNewDocTp::SvxHyperlinkNewDocTp ( vcl::Window *pParent, IconChoiceDia get(m_pRbtEditNow, "editnow"); get(m_pRbtEditLater, "editlater"); get(m_pCbbPath, "path"); - m_pCbbPath->SetSmartProtocol(INET_PROT_FILE); + m_pCbbPath->SetSmartProtocol(INetProtocol::FILE); get(m_pBtCreate, "create"); m_pBtCreate->SetModeImage(Image(CUI_RES(RID_SVXBMP_NEWDOC))); get(m_pLbDocTypes, "types"); @@ -417,7 +417,7 @@ IMPL_LINK_NOARG(SvxHyperlinkNewDocTp, ClickNewHdl_Impl) { sal_Char const sSlash[] = "/"; - INetURLObject aURL( aStrURL, INET_PROT_FILE ); + INetURLObject aURL( aStrURL, INetProtocol::FILE ); OUString aStrName; if( bHandleFileName ) aStrName = bZeroPath? aTempStrURL : OUString(aURL.getName()); @@ -442,7 +442,7 @@ IMPL_LINK_NOARG(SvxHyperlinkNewDocTp, ClickNewHdl_Impl) aNewURL.setExtension( static_cast<DocumentTypeData*>(m_pLbDocTypes->GetEntryData( nPos ))->aStrExt ); } - if( aNewURL.GetProtocol() == INET_PROT_FILE ) + if( aNewURL.GetProtocol() == INetProtocol::FILE ) { utl::LocalFileHelper::ConvertURLToSystemPath( aNewURL.GetMainURL( INetURLObject::NO_DECODE ), aStrTmp ); } diff --git a/cui/source/dialogs/hldoctp.cxx b/cui/source/dialogs/hldoctp.cxx index 2f5b8f7efb1a..12d73d1966ad 100644 --- a/cui/source/dialogs/hldoctp.cxx +++ b/cui/source/dialogs/hldoctp.cxx @@ -39,7 +39,7 @@ SvxHyperlinkDocTp::SvxHyperlinkDocTp ( vcl::Window *pParent, IconChoiceDialog* p mbMarkWndOpen ( false ) { get(m_pCbbPath, "path"); - m_pCbbPath->SetSmartProtocol(INET_PROT_FILE); + m_pCbbPath->SetSmartProtocol(INetProtocol::FILE); get(m_pBtFileopen, "fileopen"); m_pBtFileopen->SetModeImage(Image(CUI_RES(RID_SVXBMP_FILEOPEN))); get(m_pEdTarget, "target"); @@ -113,7 +113,7 @@ OUString SvxHyperlinkDocTp::GetCurrentURL () if ( aStrPath != aEmptyStr ) { INetURLObject aURL( aStrPath ); - if ( aURL.GetProtocol() != INET_PROT_NOT_VALID ) // maybe the path is already a valid + if ( aURL.GetProtocol() != INetProtocol::NOT_VALID ) // maybe the path is already a valid aStrURL = aStrPath; // hyperlink, then we can use this path directly else utl::LocalFileHelper::ConvertSystemPathToURL( aStrPath, aBaseURL, aStrURL ); @@ -341,7 +341,7 @@ void SvxHyperlinkDocTp::SetMarkStr ( const OUString& aStrMark ) SvxHyperlinkDocTp::EPathType SvxHyperlinkDocTp::GetPathType ( const OUString& rStrPath ) { - INetURLObject aURL( rStrPath, INET_PROT_FILE ); + INetURLObject aURL( rStrPath, INetProtocol::FILE ); if( aURL.HasError() ) return Type_Invalid; diff --git a/cui/source/dialogs/hlinettp.cxx b/cui/source/dialogs/hlinettp.cxx index 76088ba157d9..0471571facf9 100644 --- a/cui/source/dialogs/hlinettp.cxx +++ b/cui/source/dialogs/hlinettp.cxx @@ -44,7 +44,7 @@ SvxHyperlinkInternetTp::SvxHyperlinkInternetTp ( vcl::Window *pParent, get(m_pRbtLinktypInternet, "linktyp_internet"); get(m_pRbtLinktypFTP, "linktyp_ftp"); get(m_pCbbTarget, "target"); - m_pCbbTarget->SetSmartProtocol(INET_PROT_HTTP); + m_pCbbTarget->SetSmartProtocol(INetProtocol::HTTP); get(m_pBtBrowse, "browse"); m_pBtBrowse->SetModeImage(Image(CUI_RES (RID_SVXBMP_BROWSE))); get(m_pFtLogin, "login_label"); @@ -111,7 +111,7 @@ void SvxHyperlinkInternetTp::FillDlgFields(const OUString& rStrURL) // set URL-field // Show the scheme, #72740 - if ( aURL.GetProtocol() != INET_PROT_NOT_VALID ) + if ( aURL.GetProtocol() != INetProtocol::NOT_VALID ) m_pCbbTarget->SetText( aURL.GetMainURL( INetURLObject::DECODE_UNAMBIGUOUS ) ); else m_pCbbTarget->SetText(rStrURL); // #77696# @@ -165,17 +165,17 @@ OUString SvxHyperlinkInternetTp::CreateAbsoluteURL() const INetURLObject aURL(aStrURL); - if( aURL.GetProtocol() == INET_PROT_NOT_VALID ) + if( aURL.GetProtocol() == INetProtocol::NOT_VALID ) { aURL.SetSmartProtocol( GetSmartProtocolFromButtons() ); aURL.SetSmartURL(aStrURL); } // username and password for ftp-url - if( aURL.GetProtocol() == INET_PROT_FTP && !m_pEdLogin->GetText().isEmpty() ) + if( aURL.GetProtocol() == INetProtocol::FTP && !m_pEdLogin->GetText().isEmpty() ) aURL.SetUserAndPass ( m_pEdLogin->GetText(), m_pEdPassword->GetText() ); - if ( aURL.GetProtocol() != INET_PROT_NOT_VALID ) + if ( aURL.GetProtocol() != INetProtocol::NOT_VALID ) return aURL.GetMainURL( INetURLObject::DECODE_TO_IURI ); else //#105788# always create a URL even if it is not valid return aStrURL; @@ -321,9 +321,9 @@ INetProtocol SvxHyperlinkInternetTp::GetSmartProtocolFromButtons() const { if( m_pRbtLinktypFTP->IsChecked() ) { - return INET_PROT_FTP; + return INetProtocol::FTP; } - return INET_PROT_HTTP; + return INetProtocol::HTTP; } /************************************************************************* diff --git a/cui/source/dialogs/hlmailtp.cxx b/cui/source/dialogs/hlmailtp.cxx index de79f64a3d12..60d8142b028f 100644 --- a/cui/source/dialogs/hlmailtp.cxx +++ b/cui/source/dialogs/hlmailtp.cxx @@ -44,7 +44,7 @@ SvxHyperlinkMailTp::SvxHyperlinkMailTp ( vcl::Window *pParent, IconChoiceDialog* get(m_pRbtMail, "linktyp_mail"); get(m_pRbtNews, "linktyp_news"); get(m_pCbbReceiver, "receiver"); - m_pCbbReceiver->SetSmartProtocol(INET_PROT_MAILTO); + m_pCbbReceiver->SetSmartProtocol(INetProtocol::MAILTO); get(m_pBtAdrBook, "adressbook"); m_pBtAdrBook->SetModeImage(Image(CUI_RES(RID_SVXBMP_ADRESSBOOK))); get(m_pFtSubject, "subject_label"); @@ -139,14 +139,14 @@ OUString SvxHyperlinkMailTp::CreateAbsoluteURL() const OUString aStrURL = m_pCbbReceiver->GetText(); INetURLObject aURL(aStrURL); - if( aURL.GetProtocol() == INET_PROT_NOT_VALID ) + if( aURL.GetProtocol() == INetProtocol::NOT_VALID ) { aURL.SetSmartProtocol( GetSmartProtocolFromButtons() ); aURL.SetSmartURL(aStrURL); } // subject for EMail-url - if( aURL.GetProtocol() == INET_PROT_MAILTO ) + if( aURL.GetProtocol() == INetProtocol::MAILTO ) { if ( m_pEdSubject->GetText() != OUString(aEmptyStr) ) { @@ -156,7 +156,7 @@ OUString SvxHyperlinkMailTp::CreateAbsoluteURL() const } } - if ( aURL.GetProtocol() != INET_PROT_NOT_VALID ) + if ( aURL.GetProtocol() != INetProtocol::NOT_VALID ) return aURL.GetMainURL( INetURLObject::DECODE_WITH_CHARSET ); else //#105788# always create a URL even if it is not valid return aStrURL; @@ -238,9 +238,9 @@ INetProtocol SvxHyperlinkMailTp::GetSmartProtocolFromButtons() const { if( m_pRbtNews->IsChecked() ) { - return INET_PROT_NEWS; + return INetProtocol::NEWS; } - return INET_PROT_MAILTO; + return INetProtocol::MAILTO; } /************************************************************************* diff --git a/cui/source/dialogs/hltpbase.cxx b/cui/source/dialogs/hltpbase.cxx index 92c9703cc7f5..fcaaed8f7f75 100644 --- a/cui/source/dialogs/hltpbase.cxx +++ b/cui/source/dialogs/hltpbase.cxx @@ -43,7 +43,7 @@ SvxHyperURLBox::SvxHyperURLBox( vcl::Window* pParent, INetProtocol eSmart ) extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeSvxHyperURLBox(vcl::Window *pParent, VclBuilder::stringmap &) { - return new SvxHyperURLBox(pParent, INET_PROT_HTTP); + return new SvxHyperURLBox(pParent, INetProtocol::HTTP); } sal_Int8 SvxHyperURLBox::AcceptDrop( const AcceptDropEvent& /* rEvt */ ) @@ -383,7 +383,7 @@ OUString SvxHyperlinkTabPageBase::GetSchemeFromURL( const OUString& rStrURL ) // #77696# // our new INetUrlObject now has the ability // to detect if an Url is valid or not :-( - if ( aProtocol == INET_PROT_NOT_VALID ) + if ( aProtocol == INetProtocol::NOT_VALID ) { if ( rStrURL.startsWithIgnoreAsciiCase( INET_HTTP_SCHEME ) ) { @@ -474,10 +474,10 @@ OUString SvxHyperlinkTabPageBase::CreateUiNameFromURL( const OUString& aStrURL ) switch(aURLObj.GetProtocol()) { - case INET_PROT_FILE: + case INetProtocol::FILE: utl::LocalFileHelper::ConvertURLToSystemPath( aURLObj.GetMainURL(INetURLObject::NO_DECODE), aStrUiURL ); break; - case INET_PROT_FTP : + case INetProtocol::FTP : { //remove password from name INetURLObject aTmpURL(aURLObj); diff --git a/cui/source/dialogs/insdlg.cxx b/cui/source/dialogs/insdlg.cxx index 84c2fd7296dc..b8cd08bc29aa 100644 --- a/cui/source/dialogs/insdlg.cxx +++ b/cui/source/dialogs/insdlg.cxx @@ -295,7 +295,7 @@ short SvInsertOleDlg::Execute() { aFileName = GetFilePath(); INetURLObject aURL; - aURL.SetSmartProtocol( INET_PROT_FILE ); + aURL.SetSmartProtocol( INetProtocol::FILE ); aURL.SetSmartURL( aFileName ); aFileName = aURL.GetMainURL( INetURLObject::NO_DECODE ); bool bLink = IsLinked(); @@ -433,7 +433,7 @@ short SvInsertPlugInDialog::Execute() OUString aURL = GetPlugInFile(); // URL can be a valid and absolute URL or a system file name - m_pURL->SetSmartProtocol( INET_PROT_FILE ); + m_pURL->SetSmartProtocol( INetProtocol::FILE ); if ( aURL.isEmpty() || m_pURL->SetSmartURL( aURL ) ) { // create a plugin object @@ -618,7 +618,7 @@ short SfxInsertFloatingFrameDialog::Execute() { // URL can be a valid and absolute URL or a system file name INetURLObject aObj; - aObj.SetSmartProtocol( INET_PROT_FILE ); + aObj.SetSmartProtocol( INetProtocol::FILE ); if ( aObj.SetSmartURL( m_pEDURL->GetText() ) ) aURL = aObj.GetMainURL( INetURLObject::NO_DECODE ); } diff --git a/cui/source/dialogs/linkdlg.cxx b/cui/source/dialogs/linkdlg.cxx index fc0c4d67cf58..bde358525512 100644 --- a/cui/source/dialogs/linkdlg.cxx +++ b/cui/source/dialogs/linkdlg.cxx @@ -361,7 +361,7 @@ IMPL_LINK( SvBaseLinksDlg, ChangeSourceClickHdl, PushButton *, pPushButton ) SvBaseLink* pLink = static_cast<SvBaseLink*>(pEntry->GetUserData()); pLinkMgr->GetDisplayNames( pLink, &sType, &sFile, 0, 0 ); INetURLObject aUrl(sFile); - if(aUrl.GetProtocol() == INET_PROT_FILE) + if(aUrl.GetProtocol() == INetProtocol::FILE) { OUString sOldPath(aUrl.PathToFileName()); sal_Int32 nLen = aUrl.GetName().getLength(); @@ -386,7 +386,7 @@ IMPL_LINK( SvBaseLinksDlg, ChangeSourceClickHdl, PushButton *, pPushButton ) continue; pLinkMgr->GetDisplayNames( pLink, &sType, &sFile, &sLinkName, &sFilter ); INetURLObject aUrl_(sFile); - INetURLObject aUrl2(aPath, INET_PROT_FILE); + INetURLObject aUrl2(aPath, INetProtocol::FILE); aUrl2.insertName( aUrl_.getName() ); OUString sNewLinkName; MakeLnkName( sNewLinkName, 0 , @@ -639,7 +639,7 @@ void SvBaseLinksDlg::InsertEntry( const SvBaseLink& rLink, sal_uLong nPos, bool long nWidthPixel = m_pTbLinks->GetLogicTab( 2 ) - m_pTbLinks->GetLogicTab( 1 ); nWidthPixel -= SV_TAB_BORDER; OUString aTxt = m_pTbLinks->GetEllipsisString( sFileNm, nWidthPixel, TEXT_DRAW_PATHELLIPSIS ); - INetURLObject aPath( sFileNm, INET_PROT_FILE ); + INetURLObject aPath( sFileNm, INetProtocol::FILE ); OUString aFileName = aPath.getName(); aFileName = INetURLObject::decode(aFileName, '%', INetURLObject::DECODE_UNAMBIGUOUS); diff --git a/cui/source/inc/hltpbase.hxx b/cui/source/inc/hltpbase.hxx index 8b645e84d619..b338534d0b81 100644 --- a/cui/source/inc/hltpbase.hxx +++ b/cui/source/inc/hltpbase.hxx @@ -59,7 +59,7 @@ protected: virtual bool PreNotify( NotifyEvent& rNEvt ) SAL_OVERRIDE; public: - SvxHyperURLBox( vcl::Window* pParent, INetProtocol eSmart = INET_PROT_FILE ); + SvxHyperURLBox( vcl::Window* pParent, INetProtocol eSmart = INetProtocol::FILE ); }; diff --git a/cui/source/options/doclinkdialog.cxx b/cui/source/options/doclinkdialog.cxx index 068f361ce61d..6a4eba8777fb 100644 --- a/cui/source/options/doclinkdialog.cxx +++ b/cui/source/options/doclinkdialog.cxx @@ -121,7 +121,7 @@ namespace svx return 0L; } // if (!bFileExists) INetURLObject aURL( sURL ); - if ( aURL.GetProtocol() != INET_PROT_FILE ) + if ( aURL.GetProtocol() != INetProtocol::FILE ) { OUString sMsg = CUI_RES(STR_LINKEDDOC_NO_SYSTEM_FILE); sMsg = sMsg.replaceFirst("$file$", m_pURL->GetText()); @@ -176,7 +176,7 @@ namespace svx { // default the name to the base of the chosen URL INetURLObject aParser; - aParser.SetSmartProtocol(INET_PROT_FILE); + aParser.SetSmartProtocol(INetProtocol::FILE); aParser.SetSmartURL(aFileDlg.GetPath()); m_pName->SetText(aParser.getBase(INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET)); diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx index 29151a2961ff..33fe5cb3b34b 100644 --- a/cui/source/options/optlingu.cxx +++ b/cui/source/options/optlingu.cxx @@ -1676,9 +1676,9 @@ IMPL_LINK( SvxLinguTabPage, ClickHdl_Impl, PushButton *, pBtn ) { OUString sURL = xStor->getLocation(); INetURLObject aObj(sURL); - DBG_ASSERT( aObj.GetProtocol() == INET_PROT_FILE, + DBG_ASSERT( aObj.GetProtocol() == INetProtocol::FILE, "non-file URLs cannot be deleted" ); - if ( aObj.GetProtocol() == INET_PROT_FILE ) + if ( aObj.GetProtocol() == INetProtocol::FILE ) { KillFile_Impl( aObj.GetMainURL( INetURLObject::NO_DECODE ) ); } diff --git a/cui/source/options/optpath.cxx b/cui/source/options/optpath.cxx index 747b310bf612..512c61f1fc94 100644 --- a/cui/source/options/optpath.cxx +++ b/cui/source/options/optpath.cxx @@ -150,7 +150,7 @@ OUString Convert_Impl( const OUString& rValue ) { OUString aValue = rValue.getToken( i, cDelim ); INetURLObject aObj( aValue ); - if ( aObj.GetProtocol() == INET_PROT_FILE ) + if ( aObj.GetProtocol() == INetProtocol::FILE ) aReturn += aObj.PathToFileName(); else if ( ::utl::LocalFileHelper::IsFileContent( aValue ) ) aReturn += aObj.GetURLPath( INetURLObject::DECODE_WITH_CHARSET ); @@ -482,7 +482,7 @@ void SvxPathTabPage::ChangeCurrentEntry( const OUString& _rFolder ) // old path is an URL? INetURLObject aObj( sWritable ); - bool bURL = ( aObj.GetProtocol() != INET_PROT_NOT_VALID ); + bool bURL = ( aObj.GetProtocol() != INetProtocol::NOT_VALID ); OUString aPathStr( _rFolder ); INetURLObject aNewObj( aPathStr ); aNewObj.removeFinalSlash(); @@ -607,7 +607,7 @@ IMPL_LINK_NOARG(SvxPathTabPage, PathHdl_Impl) Reference < XComponentContext > xContext( ::comphelper::getProcessComponentContext() ); xFolderPicker = FolderPicker::create(xContext);; - INetURLObject aURL( sWritable, INET_PROT_FILE ); + INetURLObject aURL( sWritable, INetProtocol::FILE ); xFolderPicker->setDisplayDirectory( aURL.GetMainURL( INetURLObject::NO_DECODE ) ); Reference< XAsynchronousExecutableDialog > xAsyncDlg( xFolderPicker, UNO_QUERY ); diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx index 36d63573a9f1..81fb8af0d09b 100644 --- a/cui/source/options/treeopt.cxx +++ b/cui/source/options/treeopt.cxx @@ -830,7 +830,7 @@ void OfaTreeOptionsDialog::ActivateLastSelection() : pLastPageSaver->m_sLastPageURL_Tools; } - bool bMustExpand = ( INetURLObject( sLastURL ).GetProtocol() == INET_PROT_FILE ); + bool bMustExpand = ( INetURLObject( sLastURL ).GetProtocol() == INetProtocol::FILE ); SvTreeListEntry* pTemp = pTreeLB->First(); while( !pEntry && pTemp ) diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx index af67a18f11bf..12e0f1740dbb 100644 --- a/cui/source/tabpages/backgrnd.cxx +++ b/cui/source/tabpages/backgrnd.cxx @@ -1340,7 +1340,7 @@ IMPL_LINK( SvxBackgroundTabPage, FileClickHdl_Impl, CheckBox*, pBox ) m_pFtUnlinked->Hide(); INetURLObject aObj( aBgdGraphicPath ); OUString aFilePath; - if ( aObj.GetProtocol() == INET_PROT_FILE ) + if ( aObj.GetProtocol() == INetProtocol::FILE ) aFilePath = aObj.getFSysPath( INetURLObject::FSYS_DETECT ); else aFilePath = aBgdGraphicPath; @@ -1745,7 +1745,7 @@ void SvxBackgroundTabPage::FillControls_Impl( const SvxBrushItem& rBgdAttr, { #ifdef DBG_UTIL INetURLObject aObj( aStrLink ); - DBG_ASSERT( aObj.GetProtocol() != INET_PROT_NOT_VALID, "Invalid URL!" ); + DBG_ASSERT( aObj.GetProtocol() != INetProtocol::NOT_VALID, "Invalid URL!" ); #endif aBgdGraphicPath = aStrLink; m_pBtnLink->Check( true ); diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx index 531a4a76a483..14b76460262b 100644 --- a/cui/source/tabpages/numpages.cxx +++ b/cui/source/tabpages/numpages.cxx @@ -799,7 +799,7 @@ SvxBitmapPickTabPage::SvxBitmapPickTabPage(vcl::Window* pParent, m_pExamplesVS->InsertItem( i + 1, i); INetURLObject aObj(*it); - if(aObj.GetProtocol() == INET_PROT_FILE) + if(aObj.GetProtocol() == INetProtocol::FILE) *it = aObj.PathToFileName(); m_pExamplesVS->SetItemText( i + 1, *it ); @@ -1978,7 +1978,7 @@ IMPL_LINK_NOARG(SvxNumOptionsTabPage, PopupActivateHdl_Impl) { sGrfName = *it; INetURLObject aObj(sGrfName); - if(aObj.GetProtocol() == INET_PROT_FILE) + if(aObj.GetProtocol() == INetProtocol::FILE) sGrfName = aObj.PathToFileName(); if(GalleryExplorer::GetGraphicObj( GALLERY_THEME_BULLETS, i, &aGraphic)) diff --git a/cui/source/tabpages/tpbitmap.cxx b/cui/source/tabpages/tpbitmap.cxx index 1e9e466acb89..6170eb482e51 100644 --- a/cui/source/tabpages/tpbitmap.cxx +++ b/cui/source/tabpages/tpbitmap.cxx @@ -190,7 +190,7 @@ void SvxBitmapTabPage::ActivatePage( const SfxItemSet& ) INetURLObject aURL( pBitmapList->GetPath() ); aURL.Append( pBitmapList->GetName() ); - DBG_ASSERT( aURL.GetProtocol() != INET_PROT_NOT_VALID, "invalid URL" ); + DBG_ASSERT( aURL.GetProtocol() != INetProtocol::NOT_VALID, "invalid URL" ); if( aURL.getBase().getLength() > 18 ) { @@ -857,7 +857,7 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ClickSaveHdl_Impl) aDlg.AddFilter( aStrFilterType, aStrFilterType ); INetURLObject aFile( SvtPathOptions().GetPalettePath() ); - DBG_ASSERT( aFile.GetProtocol() != INET_PROT_NOT_VALID, "invalid URL" ); + DBG_ASSERT( aFile.GetProtocol() != INetProtocol::NOT_VALID, "invalid URL" ); if( !pBitmapList->GetName().isEmpty() ) { diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx index ed3668b8ab25..8ed80122c414 100644 --- a/cui/source/tabpages/tpcolor.cxx +++ b/cui/source/tabpages/tpcolor.cxx @@ -210,7 +210,7 @@ IMPL_LINK_NOARG(SvxColorTabPage, ClickSaveHdl_Impl) aDlg.AddFilter( aStrFilterType, aStrFilterType ); INetURLObject aFile( SvtPathOptions().GetPalettePath() ); - DBG_ASSERT( aFile.GetProtocol() != INET_PROT_NOT_VALID, "invalid URL" ); + DBG_ASSERT( aFile.GetProtocol() != INetProtocol::NOT_VALID, "invalid URL" ); XPropertyListRef pList = GetList(); diff --git a/cui/source/tabpages/tpgradnt.cxx b/cui/source/tabpages/tpgradnt.cxx index 46b001bd88ae..aab58f2d49eb 100644 --- a/cui/source/tabpages/tpgradnt.cxx +++ b/cui/source/tabpages/tpgradnt.cxx @@ -203,7 +203,7 @@ void SvxGradientTabPage::ActivatePage( const SfxItemSet& ) INetURLObject aURL( pGradientList->GetPath() ); aURL.Append( pGradientList->GetName() ); - DBG_ASSERT( aURL.GetProtocol() != INET_PROT_NOT_VALID, "invalid URL" ); + DBG_ASSERT( aURL.GetProtocol() != INetProtocol::NOT_VALID, "invalid URL" ); if ( aURL.getBase().getLength() > 18 ) { @@ -712,7 +712,7 @@ IMPL_LINK_NOARG(SvxGradientTabPage, ClickSaveHdl_Impl) aDlg.AddFilter( aStrFilterType, aStrFilterType ); INetURLObject aFile( SvtPathOptions().GetPalettePath() ); - DBG_ASSERT( aFile.GetProtocol() != INET_PROT_NOT_VALID, "invalid URL" ); + DBG_ASSERT( aFile.GetProtocol() != INetProtocol::NOT_VALID, "invalid URL" ); if( !pGradientList->GetName().isEmpty() ) { diff --git a/cui/source/tabpages/tphatch.cxx b/cui/source/tabpages/tphatch.cxx index a8ce8ca49283..7754a07b11fe 100644 --- a/cui/source/tabpages/tphatch.cxx +++ b/cui/source/tabpages/tphatch.cxx @@ -187,7 +187,7 @@ void SvxHatchTabPage::ActivatePage( const SfxItemSet& rSet ) INetURLObject aURL( pHatchingList->GetPath() ); aURL.Append( pHatchingList->GetName() ); - DBG_ASSERT( aURL.GetProtocol() != INET_PROT_NOT_VALID, "invalid URL" ); + DBG_ASSERT( aURL.GetProtocol() != INetProtocol::NOT_VALID, "invalid URL" ); if ( aURL.getBase().getLength() > 18 ) { @@ -745,7 +745,7 @@ IMPL_LINK_NOARG(SvxHatchTabPage, ClickSaveHdl_Impl) aDlg.AddFilter( aStrFilterType, aStrFilterType ); INetURLObject aFile( SvtPathOptions().GetPalettePath() ); - DBG_ASSERT( aFile.GetProtocol() != INET_PROT_NOT_VALID, "invalid URL" ); + DBG_ASSERT( aFile.GetProtocol() != INetProtocol::NOT_VALID, "invalid URL" ); if( !pHatchingList->GetName().isEmpty() ) { diff --git a/cui/source/tabpages/tpline.cxx b/cui/source/tabpages/tpline.cxx index 85a7cbe85a8b..6fffcef3d64d 100644 --- a/cui/source/tabpages/tpline.cxx +++ b/cui/source/tabpages/tpline.cxx @@ -562,7 +562,7 @@ void SvxLineTabPage::ActivatePage( const SfxItemSet& rSet ) INetURLObject aDashURL( pDashList->GetPath() ); aDashURL.Append( pDashList->GetName() ); - DBG_ASSERT( aDashURL.GetProtocol() != INET_PROT_NOT_VALID, "invalid URL" ); + DBG_ASSERT( aDashURL.GetProtocol() != INetProtocol::NOT_VALID, "invalid URL" ); // LineEnd list if( ( *pnLineEndListState & CT_MODIFIED ) || ( *pnLineEndListState & CT_CHANGED ) ) { @@ -601,7 +601,7 @@ void SvxLineTabPage::ActivatePage( const SfxItemSet& rSet ) INetURLObject aLineURL( pLineEndList->GetPath() ); aLineURL.Append( pLineEndList->GetName() ); - DBG_ASSERT( aLineURL.GetProtocol() != INET_PROT_NOT_VALID, "invalid URL" ); + DBG_ASSERT( aLineURL.GetProtocol() != INetProtocol::NOT_VALID, "invalid URL" ); // Evaluate if another TabPage set another fill type if( m_pLbLineStyle->GetSelectEntryPos() != 0 ) { diff --git a/cui/source/tabpages/tplnedef.cxx b/cui/source/tabpages/tplnedef.cxx index bfc053efafcb..4fe1be6d4859 100644 --- a/cui/source/tabpages/tplnedef.cxx +++ b/cui/source/tabpages/tplnedef.cxx @@ -184,7 +184,7 @@ void SvxLineDefTabPage::ActivatePage( const SfxItemSet& ) INetURLObject aURL( pDashList->GetPath() ); aURL.Append( pDashList->GetName() ); - DBG_ASSERT( aURL.GetProtocol() != INET_PROT_NOT_VALID, "invalid URL" ); + DBG_ASSERT( aURL.GetProtocol() != INetProtocol::NOT_VALID, "invalid URL" ); *pPageType = 0; // 2 *pPosDashLb = LISTBOX_ENTRY_NOTFOUND; @@ -801,7 +801,7 @@ IMPL_LINK_NOARG(SvxLineDefTabPage, ClickSaveHdl_Impl) aDlg.AddFilter( aStrFilterType, aStrFilterType ); INetURLObject aFile( SvtPathOptions().GetPalettePath() ); - DBG_ASSERT( aFile.GetProtocol() != INET_PROT_NOT_VALID, "invalid URL" ); + DBG_ASSERT( aFile.GetProtocol() != INetProtocol::NOT_VALID, "invalid URL" ); if( !pDashList->GetName().isEmpty() ) { diff --git a/cui/source/tabpages/tplneend.cxx b/cui/source/tabpages/tplneend.cxx index b69f9d9e0b34..d00f37474ad0 100644 --- a/cui/source/tabpages/tplneend.cxx +++ b/cui/source/tabpages/tplneend.cxx @@ -163,7 +163,7 @@ void SvxLineEndDefTabPage::ActivatePage( const SfxItemSet& ) INetURLObject aURL( pLineEndList->GetPath() ); aURL.Append( pLineEndList->GetName() ); - DBG_ASSERT( aURL.GetProtocol() != INET_PROT_NOT_VALID, "invalid URL" ); + DBG_ASSERT( aURL.GetProtocol() != INetProtocol::NOT_VALID, "invalid URL" ); *pPageType = 0; // 3 *pPosLineEndLb = LISTBOX_ENTRY_NOTFOUND; } @@ -623,7 +623,7 @@ IMPL_LINK_NOARG(SvxLineEndDefTabPage, ClickSaveHdl_Impl) aDlg.AddFilter( aStrFilterType, aStrFilterType ); INetURLObject aFile( SvtPathOptions().GetPalettePath() ); - DBG_ASSERT( aFile.GetProtocol() != INET_PROT_NOT_VALID, "invalid URL" ); + DBG_ASSERT( aFile.GetProtocol() != INetProtocol::NOT_VALID, "invalid URL" ); if( !pLineEndList->GetName().isEmpty() ) { |