diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-04-02 18:32:36 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-04-02 18:33:37 +0200 |
commit | 54e87df11faf697d3b2666198a3d20b3ee091419 (patch) | |
tree | 8cfe316f012a4969ca6980fa6ac2fdb3a9424118 /svtools | |
parent | 3aac11a1233f679ea813fee8b8de134553d7db60 (diff) |
Change INetProtocol enumerators to CamelCase
...to avoid clashes with macros and poor warnings about hiding global FILE
Change-Id: I444e8b958f029201b228937e088efabc4b6d3050
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/contnr/contentenumeration.cxx | 2 | ||||
-rw-r--r-- | svtools/source/contnr/fileview.cxx | 2 | ||||
-rw-r--r-- | svtools/source/control/filectrl.cxx | 2 | ||||
-rw-r--r-- | svtools/source/control/fileurlbox.cxx | 2 | ||||
-rw-r--r-- | svtools/source/control/inettbc.cxx | 40 | ||||
-rw-r--r-- | svtools/source/control/urlcontrol.cxx | 2 | ||||
-rw-r--r-- | svtools/source/dialogs/ServerDetailsControls.cxx | 4 | ||||
-rw-r--r-- | svtools/source/dialogs/addresstemplate.cxx | 6 | ||||
-rw-r--r-- | svtools/source/misc/imagemgr.cxx | 4 | ||||
-rw-r--r-- | svtools/source/misc/templatefoldercache.cxx | 8 | ||||
-rw-r--r-- | svtools/source/uno/wizard/unowizard.cxx | 4 |
11 files changed, 38 insertions, 38 deletions
diff --git a/svtools/source/contnr/contentenumeration.cxx b/svtools/source/contnr/contentenumeration.cxx index 7d4b546b0cfd..bb07a8b5fcf6 100644 --- a/svtools/source/contnr/contentenumeration.cxx +++ b/svtools/source/contnr/contentenumeration.cxx @@ -244,7 +244,7 @@ namespace svt pData->maSize = xRow->getLong( ROW_SIZE ); if ( bHasTargetURL && - INetURLObject( aContentURL ).GetProtocol() == INetProtocol::VND_SUN_STAR_HIER ) + INetURLObject( aContentURL ).GetProtocol() == INetProtocol::VndSunStarHier ) { ::ucbhelper::Content aCnt( aTargetURL, xEnvironment, comphelper::getProcessComponentContext() ); try diff --git a/svtools/source/contnr/fileview.cxx b/svtools/source/contnr/fileview.cxx index f3cc0d580a48..8ef7f1867411 100644 --- a/svtools/source/contnr/fileview.cxx +++ b/svtools/source/contnr/fileview.cxx @@ -1607,7 +1607,7 @@ FileViewResult SvtFileView_Impl::GetFolderContent_Impl( { ::osl::ClearableMutexGuard aGuard( maMutex ); INetURLObject aFolderObj( rFolder ); - DBG_ASSERT( aFolderObj.GetProtocol() != INetProtocol::NOT_VALID, "Invalid URL!" ); + DBG_ASSERT( aFolderObj.GetProtocol() != INetProtocol::NotValid, "Invalid URL!" ); // prepare name translation SetActualFolder( aFolderObj ); diff --git a/svtools/source/control/filectrl.cxx b/svtools/source/control/filectrl.cxx index fba5ac31fdeb..5f938cb002b2 100644 --- a/svtools/source/control/filectrl.cxx +++ b/svtools/source/control/filectrl.cxx @@ -236,7 +236,7 @@ void FileControl::ImplBrowseFile( ) { OUString aNewText = aPathSeq[0]; INetURLObject aObj( aNewText ); - if ( aObj.GetProtocol() == INetProtocol::FILE ) + if ( aObj.GetProtocol() == INetProtocol::File ) aNewText = aObj.PathToFileName(); SetText( aNewText ); maEdit.GetModifyHdl().Call( &maEdit ); diff --git a/svtools/source/control/fileurlbox.cxx b/svtools/source/control/fileurlbox.cxx index 3974b10bc6ed..68e046af6397 100644 --- a/svtools/source/control/fileurlbox.cxx +++ b/svtools/source/control/fileurlbox.cxx @@ -31,7 +31,7 @@ namespace svt FileURLBox::FileURLBox( vcl::Window* _pParent, WinBits _nStyle ) - :SvtURLBox( _pParent, _nStyle, INetProtocol::FILE ) + :SvtURLBox( _pParent, _nStyle, INetProtocol::File ) { DisableHistory(); } diff --git a/svtools/source/control/inettbc.cxx b/svtools/source/control/inettbc.cxx index ef15f02e3b45..a6ffa9c5d33d 100644 --- a/svtools/source/control/inettbc.cxx +++ b/svtools/source/control/inettbc.cxx @@ -351,7 +351,7 @@ void SvtMatchContext_Impl::ReadFolder( const OUString& rURL, sal_Int32 nMatchLen = aMatchName.getLength(); INetURLObject aFolderObj( rURL ); - DBG_ASSERT( aFolderObj.GetProtocol() != INetProtocol::NOT_VALID, "Invalid URL!" ); + DBG_ASSERT( aFolderObj.GetProtocol() != INetProtocol::NotValid, "Invalid URL!" ); try { @@ -494,7 +494,7 @@ OUString SvtURLBox::ParseSmart( const OUString& _aText, const OUString& _aBaseUR aTemp += aTextURL; INetURLObject aTmp( aTemp ); - if ( !aTmp.HasError() && aTmp.GetProtocol() != INetProtocol::NOT_VALID ) + if ( !aTmp.HasError() && aTmp.GetProtocol() != INetProtocol::NotValid ) aMatch = aTmp.GetMainURL( INetURLObject::NO_DECODE ); } else @@ -537,7 +537,7 @@ OUString SvtURLBox::ParseSmart( const OUString& _aText, const OUString& _aBaseUR // INetURLObject appends a final slash for the directories "." and "..", this is a bug! // Remove it as a workaround aTmp.removeFinalSlash(); - if ( !aTmp.HasError() && aTmp.GetProtocol() != INetProtocol::NOT_VALID ) + if ( !aTmp.HasError() && aTmp.GetProtocol() != INetProtocol::NotValid ) aMatch = aTmp.GetMainURL( INetURLObject::NO_DECODE ); } } @@ -587,12 +587,12 @@ void SvtMatchContext_Impl::doExecute() // if the user input is a valid URL, go on with it // otherwise it could be parsed smart with a predefined smart protocol // ( or if this is not set with the protocol of a predefined base URL ) - if( eProt == INetProtocol::NOT_VALID || eProt == eSmartProt || (eSmartProt == INetProtocol::NOT_VALID && eProt == eBaseProt) ) + if( eProt == INetProtocol::NotValid || eProt == eSmartProt || (eSmartProt == INetProtocol::NotValid && eProt == eBaseProt) ) { // not stopped yet ? if( schedule() ) { - if ( eProt == INetProtocol::NOT_VALID ) + if ( eProt == INetProtocol::NotValid ) aMatch = SvtURLBox::ParseSmart( aText, aBaseURL, aWorkDir ); else aMatch = aText; @@ -607,7 +607,7 @@ void SvtMatchContext_Impl::doExecute() // SvtMatchContext_Impl::Stop does not guarantee a speedy // return: if ( !aMainURL.isEmpty() - && aURLObject.GetProtocol() == INetProtocol::FILE ) + && aURLObject.GetProtocol() == INetProtocol::File ) { // if text input is a directory, it must be part of the match list! Until then it is scanned bool folder = false; @@ -691,7 +691,7 @@ void SvtMatchContext_Impl::doExecute() aURLObject.removeSegment(); // scan directory and insert all matches - ReadFolder( aURLObject.GetMainURL( INetURLObject::NO_DECODE ), aMatch, eProt == INetProtocol::NOT_VALID ); + ReadFolder( aURLObject.GetMainURL( INetURLObject::NO_DECODE ), aMatch, eProt == INetProtocol::NotValid ); } } } @@ -706,7 +706,7 @@ void SvtMatchContext_Impl::doExecute() INetURLObject aCurObj; OUString aEmpty, aCurString, aCurMainURL; INetURLObject aObj; - aObj.SetSmartProtocol( eSmartProt == INetProtocol::NOT_VALID ? INetProtocol::HTTP : eSmartProt ); + aObj.SetSmartProtocol( eSmartProt == INetProtocol::NotValid ? INetProtocol::Http : eSmartProt ); for( ;; ) { for(std::vector<OUString>::iterator i = aPickList.begin(); schedule() && i != aPickList.end(); ++i) @@ -715,19 +715,19 @@ void SvtMatchContext_Impl::doExecute() aCurObj.SetSmartURL( aCurObj.GetURLNoPass()); aCurMainURL = aCurObj.GetMainURL( INetURLObject::NO_DECODE ); - if( eProt != INetProtocol::NOT_VALID && aCurObj.GetProtocol() != eProt ) + if( eProt != INetProtocol::NotValid && aCurObj.GetProtocol() != eProt ) continue; - if( eSmartProt != INetProtocol::NOT_VALID && aCurObj.GetProtocol() != eSmartProt ) + if( eSmartProt != INetProtocol::NotValid && aCurObj.GetProtocol() != eSmartProt ) continue; switch( aCurObj.GetProtocol() ) { - case INetProtocol::HTTP: - case INetProtocol::HTTPS: - case INetProtocol::FTP: + case INetProtocol::Http: + case INetProtocol::Https: + case INetProtocol::Ftp: { - if( eProt == INetProtocol::NOT_VALID && !bFull ) + if( eProt == INetProtocol::NotValid && !bFull ) { aObj.SetSmartURL( aText ); if( aObj.GetURLPath().getLength() > 1 ) @@ -735,7 +735,7 @@ void SvtMatchContext_Impl::doExecute() } aCurString = aCurMainURL; - if( eProt == INetProtocol::NOT_VALID ) + if( eProt == INetProtocol::NotValid ) { // try if text matches the scheme OUString aScheme( INetURLObject::GetScheme( aCurObj.GetProtocol() ) ); @@ -771,7 +771,7 @@ void SvtMatchContext_Impl::doExecute() } OUString aURL( aMatch ); - if( eProt == INetProtocol::NOT_VALID ) + if( eProt == INetProtocol::NotValid ) aMatch = aMatch.copy( INetURLObject::GetScheme( aCurObj.GetProtocol() ).getLength() ); if( aText.getLength() < aMatch.getLength() ) @@ -868,7 +868,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeSvtURLBox(vcl::Window { WinBits nWinBits = WB_LEFT|WB_VCENTER|WB_3DLOOK|WB_TABSTOP| WB_DROPDOWN|WB_AUTOSIZE|WB_AUTOHSCROLL; - SvtURLBox* pListBox = new SvtURLBox(pParent, nWinBits, INetProtocol::NOT_VALID, false); + SvtURLBox* pListBox = new SvtURLBox(pParent, nWinBits, INetProtocol::NotValid, false); pListBox->EnableAutoSize(true); return pListBox; } @@ -966,7 +966,7 @@ void SvtURLBox::UpdatePicklistForSmartProtocol_Impl() seqPropertySet[nProperty].Value >>= sURL; aCurObj.SetURL( sURL ); - if ( !sURL.isEmpty() && ( eSmartProtocol != INetProtocol::NOT_VALID ) ) + if ( !sURL.isEmpty() && ( eSmartProtocol != INetProtocol::NotValid ) ) { if( aCurObj.GetProtocol() != eSmartProtocol ) break; @@ -1209,7 +1209,7 @@ OUString SvtURLBox::GetURL() { // no autocompletion for wildcards INetURLObject aTempObj; - if ( eSmartProtocol != INetProtocol::NOT_VALID ) + if ( eSmartProtocol != INetProtocol::NotValid ) aTempObj.SetSmartProtocol( eSmartProtocol ); if ( aTempObj.SetSmartURL( aText ) ) return aTempObj.GetMainURL( INetURLObject::NO_DECODE ); @@ -1217,7 +1217,7 @@ OUString SvtURLBox::GetURL() return aText; } - if ( aObj.GetProtocol() == INetProtocol::NOT_VALID ) + if ( aObj.GetProtocol() == INetProtocol::NotValid ) { OUString aName = ParseSmart( aText, aBaseURL, SvtPathOptions().GetWorkPath() ); aObj.SetURL(aName); diff --git a/svtools/source/control/urlcontrol.cxx b/svtools/source/control/urlcontrol.cxx index a21e835e2caa..8f74b9c0e960 100644 --- a/svtools/source/control/urlcontrol.cxx +++ b/svtools/source/control/urlcontrol.cxx @@ -27,7 +27,7 @@ namespace svt { //= OFileURLControl OFileURLControl::OFileURLControl(vcl::Window* _pParent, WinBits nStyle) - : SvtURLBox(_pParent, nStyle, INetProtocol::FILE) + : SvtURLBox(_pParent, nStyle, INetProtocol::File) { DisableHistory(); } diff --git a/svtools/source/dialogs/ServerDetailsControls.cxx b/svtools/source/dialogs/ServerDetailsControls.cxx index 263a533903f9..f7aebdf36b40 100644 --- a/svtools/source/dialogs/ServerDetailsControls.cxx +++ b/svtools/source/dialogs/ServerDetailsControls.cxx @@ -225,7 +225,7 @@ INetURLObject SmbDetailsContainer::getUrl( ) bool SmbDetailsContainer::setUrl( const INetURLObject& rUrl ) { - bool bSuccess = rUrl.GetProtocol() == INetProtocol::SMB; + bool bSuccess = rUrl.GetProtocol() == INetProtocol::Smb; if ( bSuccess ) { @@ -324,7 +324,7 @@ INetURLObject CmisDetailsContainer::getUrl( ) bool CmisDetailsContainer::setUrl( const INetURLObject& rUrl ) { - bool bSuccess = rUrl.GetProtocol() == INetProtocol::CMIS; + bool bSuccess = rUrl.GetProtocol() == INetProtocol::Cmis; if ( bSuccess ) { diff --git a/svtools/source/dialogs/addresstemplate.cxx b/svtools/source/dialogs/addresstemplate.cxx index 9d0729160d9b..419b2b9efcc3 100644 --- a/svtools/source/dialogs/addresstemplate.cxx +++ b/svtools/source/dialogs/addresstemplate.cxx @@ -707,7 +707,7 @@ void AssignmentPersistentData::ImplCommit() { OUString sName = m_pImpl->pConfigData->getDatasourceName(); INetURLObject aURL( sName ); - if( aURL.GetProtocol() != INetProtocol::NOT_VALID ) + if( aURL.GetProtocol() != INetProtocol::NotValid ) { OFileNotation aFileNotation( aURL.GetMainURL( INetURLObject::NO_DECODE ) ); sName = aFileNotation.get(OFileNotation::N_SYSTEM); @@ -828,7 +828,7 @@ void AssignmentPersistentData::ImplCommit() // get the data source the user has chosen and let it build a connection INetURLObject aURL( sSelectedDS ); - if ( aURL.GetProtocol() != INetProtocol::NOT_VALID || m_xDatabaseContext->hasByName(sSelectedDS) ) + if ( aURL.GetProtocol() != INetProtocol::NotValid || m_xDatabaseContext->hasByName(sSelectedDS) ) m_xDatabaseContext->getByName( sSelectedDS ) >>= xDS; } else @@ -1198,7 +1198,7 @@ void AssignmentPersistentData::ImplCommit() xProp->getPropertyValue("DataSourceName") >>= sName; INetURLObject aURL( sName ); - if( aURL.GetProtocol() != INetProtocol::NOT_VALID ) + if( aURL.GetProtocol() != INetProtocol::NotValid ) { OFileNotation aFileNotation( aURL.GetMainURL( INetURLObject::NO_DECODE ) ); sName = aFileNotation.get(OFileNotation::N_SYSTEM); diff --git a/svtools/source/misc/imagemgr.cxx b/svtools/source/misc/imagemgr.cxx index 1e1e327d97c2..0cf60364ca55 100644 --- a/svtools/source/misc/imagemgr.cxx +++ b/svtools/source/misc/imagemgr.cxx @@ -356,7 +356,7 @@ static sal_uInt16 GetImageId_Impl( const INetURLObject& rObject, bool bDetectFol OUString aExt, sURL = rObject.GetMainURL( INetURLObject::NO_DECODE ); sal_uInt16 nImage = IMG_FILE; - if ( rObject.GetProtocol() == INetProtocol::PRIV_SOFFICE ) + if ( rObject.GetProtocol() == INetProtocol::PrivSoffice ) { OUString aURLPath = sURL.copy( URL_PREFIX_PRIV_SOFFICE_LEN ); OUString aType = aURLPath.getToken( 0, '/' ); @@ -534,7 +534,7 @@ OUString SvFileInformationManager::GetDescription_Impl( const INetURLObject& rOb { if ( !bDetected ) { - if ( rObject.GetProtocol() == INetProtocol::PRIV_SOFFICE ) + if ( rObject.GetProtocol() == INetProtocol::PrivSoffice ) { OUString aURLPath = sURL.copy( URL_PREFIX_PRIV_SOFFICE_LEN ); OUString aType = aURLPath.getToken( 0, '/' ); diff --git a/svtools/source/misc/templatefoldercache.cxx b/svtools/source/misc/templatefoldercache.cxx index 0a9a867947e1..399a31562760 100644 --- a/svtools/source/misc/templatefoldercache.cxx +++ b/svtools/source/misc/templatefoldercache.cxx @@ -163,7 +163,7 @@ namespace svt TemplateContent::TemplateContent( const INetURLObject& _rURL ) :m_aURL( _rURL ) { - DBG_ASSERT( INetProtocol::NOT_VALID != m_aURL.GetProtocol(), "TemplateContent::TemplateContent: invalid URL!" ); + DBG_ASSERT( INetProtocol::NotValid != m_aURL.GetProtocol(), "TemplateContent::TemplateContent: invalid URL!" ); m_sLocalName = m_aURL.getName(); implResetDate(); } @@ -562,9 +562,9 @@ namespace svt OUString TemplateFolderCacheImpl::implParseSmart( const OUString& _rPath ) { INetURLObject aParser; - aParser.SetSmartProtocol( INetProtocol::FILE ); + aParser.SetSmartProtocol( INetProtocol::File ); aParser.SetURL( _rPath, INetURLObject::WAS_ENCODED ); - if ( INetProtocol::NOT_VALID == aParser.GetProtocol() ) + if ( INetProtocol::NotValid == aParser.GetProtocol() ) { OUString sURL; LocalFileHelper::ConvertPhysicalNameToURL( _rPath, sURL ); @@ -752,7 +752,7 @@ namespace svt // get the storage directory OUString sStorageURL = implParseSmart( SvtPathOptions().GetStoragePath() ); INetURLObject aStorageURL( sStorageURL ); - if ( INetProtocol::NOT_VALID == aStorageURL.GetProtocol() ) + if ( INetProtocol::NotValid == aStorageURL.GetProtocol() ) { OSL_FAIL( "TemplateFolderCacheImpl::openCacheStream: invalid storage path!" ); return false; diff --git a/svtools/source/uno/wizard/unowizard.cxx b/svtools/source/uno/wizard/unowizard.cxx index 4e078fa71772..c9d4a8f7d8e3 100644 --- a/svtools/source/uno/wizard/unowizard.cxx +++ b/svtools/source/uno/wizard/unowizard.cxx @@ -248,7 +248,7 @@ namespace { static OString lcl_getHelpId( const OUString& _rHelpURL ) { INetURLObject aHID( _rHelpURL ); - if ( aHID.GetProtocol() == INetProtocol::HID ) + if ( aHID.GetProtocol() == INetProtocol::Hid ) return OUStringToOString( aHID.GetURLPath(), RTL_TEXTENCODING_UTF8 ); else return OUStringToOString( _rHelpURL, RTL_TEXTENCODING_UTF8 ); @@ -261,7 +261,7 @@ namespace { OUString aTmp( OStringToOUString( sHelpId, RTL_TEXTENCODING_UTF8 ) ); INetURLObject aHID( aTmp ); - if ( aHID.GetProtocol() == INetProtocol::NOT_VALID ) + if ( aHID.GetProtocol() == INetProtocol::NotValid ) aBuffer.appendAscii( INET_HID_SCHEME ); aBuffer.append( aTmp.getStr() ); return aBuffer.makeStringAndClear(); |