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 /fpicker | |
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 'fpicker')
-rw-r--r-- | fpicker/source/office/OfficeControlAccess.cxx | 4 | ||||
-rw-r--r-- | fpicker/source/office/iodlg.cxx | 28 |
2 files changed, 16 insertions, 16 deletions
diff --git a/fpicker/source/office/OfficeControlAccess.cxx b/fpicker/source/office/OfficeControlAccess.cxx index d7b0aab20c8f..f2116e7ec79f 100644 --- a/fpicker/source/office/OfficeControlAccess.cxx +++ b/fpicker/source/office/OfficeControlAccess.cxx @@ -182,7 +182,7 @@ namespace svt { OUString sHelpID( sHelpURL ); INetURLObject aHID( sHelpURL ); - if ( aHID.GetProtocol() == INetProtocol::HID ) + if ( aHID.GetProtocol() == INetProtocol::Hid ) sHelpID = aHID.GetURLPath(); // URLs should always be UTF8 encoded and escaped @@ -205,7 +205,7 @@ namespace svt OUString sHelpURL; OUString aTmp( OStringToOUString( aHelpId, RTL_TEXTENCODING_UTF8 ) ); INetURLObject aHID( aTmp ); - if ( aHID.GetProtocol() == INetProtocol::NOT_VALID ) + if ( aHID.GetProtocol() == INetProtocol::NotValid ) sHelpURL = INET_HID_SCHEME; sHelpURL += aTmp; return sHelpURL; diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx index b13e5ec20273..ab74874c35f7 100644 --- a/fpicker/source/office/iodlg.cxx +++ b/fpicker/source/office/iodlg.cxx @@ -210,13 +210,13 @@ namespace // So we have to check if the file name denotes a folder or a file. // For performance reasons, we do this for file urls only INetURLObject aURL( aNewFile ); - if ( INetProtocol::NOT_VALID == aURL.GetProtocol() ) + if ( INetProtocol::NotValid == aURL.GetProtocol() ) { OUString sURL; if ( ::utl::LocalFileHelper::ConvertPhysicalNameToURL( aNewFile, sURL ) ) aURL = INetURLObject( sURL ); } - if ( INetProtocol::FILE == aURL.GetProtocol() ) + if ( INetProtocol::File == aURL.GetProtocol() ) { try { @@ -277,7 +277,7 @@ namespace static OUString lcl_ensureFinalSlash( const OUString& _rDir ) { - INetURLObject aWorkPathObj( _rDir, INetProtocol::FILE ); + INetURLObject aWorkPathObj( _rDir, INetProtocol::File ); aWorkPathObj.setFinalSlash(); return aWorkPathObj.GetMainURL( INetURLObject::NO_DECODE ); } @@ -916,7 +916,7 @@ IMPL_STATIC_LINK( SvtFileDialog, OpenHdl_Impl, void*, pVoid ) { INetURLObject aFileObject( aFileName ); - if ( ( aFileObject.GetProtocol() == INetProtocol::NOT_VALID ) && !aFileName.isEmpty() ) + if ( ( aFileObject.GetProtocol() == INetProtocol::NotValid ) && !aFileName.isEmpty() ) { OUString sCompleted = SvtURLBox::ParseSmart( aFileName, pThis->_pFileView->GetViewURL(), SvtPathOptions().GetWorkPath() ); if ( !sCompleted.isEmpty() ) @@ -1073,7 +1073,7 @@ IMPL_STATIC_LINK( SvtFileDialog, OpenHdl_Impl, void*, pVoid ) { // do an existence check herein, again - if ( INetProtocol::FILE == aFileObj.GetProtocol( ) ) + if ( INetProtocol::File == aFileObj.GetProtocol( ) ) { bool bExists = pThis->m_aContent.is( aFileObj.GetMainURL( INetURLObject::NO_DECODE ) ); @@ -1082,7 +1082,7 @@ IMPL_STATIC_LINK( SvtFileDialog, OpenHdl_Impl, void*, pVoid ) OUString sError( SVT_RESSTR( RID_FILEOPEN_NOTEXISTENTFILE ) ); OUString sInvalidFile( aFileObj.GetMainURL( INetURLObject::DECODE_TO_IURI ) ); - if ( INetProtocol::FILE == aFileObj.GetProtocol() ) + if ( INetProtocol::File == aFileObj.GetProtocol() ) { // if it's a file URL, transform the URL into system notation OUString sURL( sInvalidFile ); OUString sSystem; @@ -1394,7 +1394,7 @@ void SvtFileDialog::UpdateControls( const OUString& rURL ) { OUString sText; - DBG_ASSERT( INetProtocol::NOT_VALID != aObj.GetProtocol(), "SvtFileDialog::UpdateControls: Invalid URL!" ); + DBG_ASSERT( INetProtocol::NotValid != aObj.GetProtocol(), "SvtFileDialog::UpdateControls: Invalid URL!" ); if ( aObj.getSegmentCount() ) { @@ -1402,7 +1402,7 @@ void SvtFileDialog::UpdateControls( const OUString& rURL ) if ( !sText.isEmpty() ) { // no Fsys path for server file system ( only UCB has mountpoints! ) - if ( INetProtocol::FILE != aObj.GetProtocol() ) + if ( INetProtocol::File != aObj.GetProtocol() ) sText = rURL.copy( INetURLObject::GetScheme( aObj.GetProtocol() ).getLength() ); } @@ -1449,7 +1449,7 @@ IMPL_LINK( SvtFileDialog, SelectHdl_Impl, SvTabListBox*, pBox ) INetURLObject aObj( pUserData->maURL ); if ( FILEDLG_TYPE_PATHDLG == _pImp->_eDlgType ) { - if ( aObj.GetProtocol() == INetProtocol::FILE ) + if ( aObj.GetProtocol() == INetProtocol::File ) { if ( !pUserData->mbIsFolder ) aObj.removeSegment(); @@ -1524,7 +1524,7 @@ IMPL_LINK( SvtFileDialog, OpenDoneHdl_Impl, SvtFileView*, pView ) { // additional check: the parent folder should not be prohibited INetURLObject aCurrentFolder( sCurrentFolder ); - DBG_ASSERT( INetProtocol::NOT_VALID != aCurrentFolder.GetProtocol(), + DBG_ASSERT( INetProtocol::NotValid != aCurrentFolder.GetProtocol(), "SvtFileDialog::OpenDoneHdl_Impl: invalid current URL!" ); aCurrentFolder.removeSegment(); @@ -1719,7 +1719,7 @@ short SvtFileDialog::Execute() if ( RET_OK == nResult ) { INetURLObject aURL( _aPath ); - if ( aURL.GetProtocol() == INetProtocol::FILE ) + if ( aURL.GetProtocol() == INetProtocol::File ) { // remember the selected directory only for file URLs not for virtual folders sal_Int32 nLevel = aURL.getSegmentCount(); @@ -2004,7 +2004,7 @@ short SvtFileDialog::PrepareExecute() } INetURLObject aObj = aFolderURL; - if ( aObj.GetProtocol() == INetProtocol::FILE ) + if ( aObj.GetProtocol() == INetProtocol::File ) { // set folder as current directory aObj.setFinalSlash(); @@ -2076,7 +2076,7 @@ void SvtFileDialog::SetStandardDir( const OUString& rStdDir ) { INetURLObject aObj( rStdDir ); - DBG_ASSERT( aObj.GetProtocol() != INetProtocol::NOT_VALID, "Invalid protocol!" ); + DBG_ASSERT( aObj.GetProtocol() != INetProtocol::NotValid, "Invalid protocol!" ); aObj.setFinalSlash(); _pImp->SetStandardDir( aObj.GetMainURL( INetURLObject::NO_DECODE ) ); } @@ -2269,7 +2269,7 @@ bool SvtFileDialog::IsolateFilterFromPath_Impl( OUString& rPath, OUString& rFilt // use question mark as wildcard only for files INetProtocol eProt = INetURLObject::CompareProtocolScheme( rPath ); - if ( INetProtocol::NOT_VALID != eProt && INetProtocol::FILE != eProt ) + if ( INetProtocol::NotValid != eProt && INetProtocol::File != eProt ) nQuestionMarkPos = -1; nWildCardPos = std::min( nWildCardPos, nQuestionMarkPos ); |