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 /sfx2/source/dialog | |
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 'sfx2/source/dialog')
-rw-r--r-- | sfx2/source/dialog/dinfdlg.cxx | 14 | ||||
-rw-r--r-- | sfx2/source/dialog/filedlghelper.cxx | 14 | ||||
-rw-r--r-- | sfx2/source/dialog/mailmodel.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/dialog/taskpane.cxx | 2 |
4 files changed, 16 insertions, 16 deletions
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx index ab7833624d17..1237d4c16045 100644 --- a/sfx2/source/dialog/dinfdlg.cxx +++ b/sfx2/source/dialog/dinfdlg.cxx @@ -988,12 +988,12 @@ void SfxDocumentPage::Reset( const SfxItemSet* rSet ) // determine name INetURLObject aURL(aFile); OUString aName = aURL.GetName( INetURLObject::DECODE_WITH_CHARSET ); - if ( aName.isEmpty() || aURL.GetProtocol() == INetProtocol::PRIV_SOFFICE ) + if ( aName.isEmpty() || aURL.GetProtocol() == INetProtocol::PrivSoffice ) aName = SfxResId( STR_NONAME ).toString(); m_pNameED->SetText( aName ); // determine context symbol - aURL.SetSmartProtocol( INetProtocol::FILE ); + aURL.SetSmartProtocol( INetProtocol::File ); aURL.SetSmartURL( aFactory); const OUString& rMainURL = aURL.GetMainURL( INetURLObject::NO_DECODE ); Image aImage = SvFileInformationManager::GetImage( aURL, true ); @@ -1009,7 +1009,7 @@ void SfxDocumentPage::Reset( const SfxItemSet* rSet ) // determine size and type OUString aSizeText( m_aUnknownSize ); - if ( aURL.GetProtocol() == INetProtocol::FILE ) + if ( aURL.GetProtocol() == INetProtocol::File ) aSizeText = CreateSizeText( SfxContentHelper::GetSize( aURL.GetMainURL( INetURLObject::NO_DECODE ) ) ); m_pShowSizeFT->SetText( aSizeText ); @@ -1020,7 +1020,7 @@ void SfxDocumentPage::Reset( const SfxItemSet* rSet ) // determine location aURL.SetSmartURL( aFile); - if ( aURL.GetProtocol() == INetProtocol::FILE ) + if ( aURL.GetProtocol() == INetProtocol::File ) { INetURLObject aPath( aURL ); aPath.setFinalSlash(); @@ -1030,7 +1030,7 @@ void SfxDocumentPage::Reset( const SfxItemSet* rSet ) OUString aText( aPath.PathToFileName() ); //! (pb) MaxLen? m_pFileValFt->SetText( aText ); } - else if ( aURL.GetProtocol() != INetProtocol::PRIV_SOFFICE ) + else if ( aURL.GetProtocol() != INetProtocol::PrivSoffice ) m_pFileValFt->SetText( aURL.GetPartBeforeLastName() ); // handle access data @@ -1136,9 +1136,9 @@ SfxDocumentInfoDialog::SfxDocumentInfoDialog( vcl::Window* pParent, OUString aFile( rInfoItem.GetValue() ); INetURLObject aURL; - aURL.SetSmartProtocol( INetProtocol::FILE ); + aURL.SetSmartProtocol( INetProtocol::File ); aURL.SetSmartURL( aFile); - if ( INetProtocol::PRIV_SOFFICE != aURL.GetProtocol() ) + if ( INetProtocol::PrivSoffice != aURL.GetProtocol() ) { OUString aLastName( aURL.GetLastName() ); if ( !aLastName.isEmpty() ) diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx index a6f641a5bd3b..33f532b9b293 100644 --- a/sfx2/source/dialog/filedlghelper.cxx +++ b/sfx2/source/dialog/filedlghelper.cxx @@ -607,7 +607,7 @@ void FileDialogHelper_Impl::updateVersions() { INetURLObject aObj( aPathSeq[0] ); - if ( ( aObj.GetProtocol() == INetProtocol::FILE ) && + if ( ( aObj.GetProtocol() == INetProtocol::File ) && ( utl::UCBContentHelper::IsDocument( aObj.GetMainURL( INetURLObject::NO_DECODE ) ) ) ) { try @@ -757,9 +757,9 @@ ErrCode FileDialogHelper_Impl::getGraphic( const OUString& rURL, INetURLObject aURLObj( rURL ); - if ( aURLObj.HasError() || INetProtocol::NOT_VALID == aURLObj.GetProtocol() ) + if ( aURLObj.HasError() || INetProtocol::NotValid == aURLObj.GetProtocol() ) { - aURLObj.SetSmartProtocol( INetProtocol::FILE ); + aURLObj.SetSmartProtocol( INetProtocol::File ); aURLObj.SetSmartURL( rURL ); } @@ -767,7 +767,7 @@ ErrCode FileDialogHelper_Impl::getGraphic( const OUString& rURL, sal_uInt32 nFilterImportFlags = GRFILTER_I_FLAGS_SET_LOGSIZE_FOR_JPEG; // non-local? - if ( INetProtocol::FILE != aURLObj.GetProtocol() ) + if ( INetProtocol::File != aURLObj.GetProtocol() ) { SvStream* pStream = ::utl::UcbStreamHelper::CreateStream( rURL, StreamMode::READ ); @@ -1144,7 +1144,7 @@ void FileDialogHelper_Impl::setControlHelpIds( const sal_Int16* _pControlId, con { while ( *_pControlId ) { - DBG_ASSERT( INetURLObject( OStringToOUString( *_pHelpId, RTL_TEXTENCODING_UTF8 ) ).GetProtocol() == INetProtocol::NOT_VALID, "Wrong HelpId!" ); + DBG_ASSERT( INetURLObject( OStringToOUString( *_pHelpId, RTL_TEXTENCODING_UTF8 ) ).GetProtocol() == INetProtocol::NotValid, "Wrong HelpId!" ); OUString sId( sHelpIdPrefix ); sId += OUString( *_pHelpId, strlen( *_pHelpId ), RTL_TEXTENCODING_UTF8 ); xControlAccess->setValue( *_pControlId, ControlActions::SET_HELP_URL, makeAny( sId ) ); @@ -1567,7 +1567,7 @@ void FileDialogHelper_Impl::verifyPath() return; } INetURLObject url(maPath); - if (url.GetProtocol() != INetProtocol::FILE + if (url.GetProtocol() != INetProtocol::File || url.getName(0, true, INetURLObject::DECODE_WITH_CHARSET) != "tmp") { return; @@ -1923,7 +1923,7 @@ void FileDialogHelper_Impl::saveConfig() INetURLObject aObj( getPath() ); - if ( aObj.GetProtocol() == INetProtocol::FILE ) + if ( aObj.GetProtocol() == INetProtocol::File ) SetToken( aUserData, 2, ' ', aObj.GetMainURL( INetURLObject::NO_DECODE ) ); OUString aFilter = getFilter(); diff --git a/sfx2/source/dialog/mailmodel.cxx b/sfx2/source/dialog/mailmodel.cxx index e6f2c2d7a5ce..ff9e9e56b862 100644 --- a/sfx2/source/dialog/mailmodel.cxx +++ b/sfx2/source/dialog/mailmodel.cxx @@ -310,7 +310,7 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat( OUString aLocation = xStorable->getLocation(); INetURLObject aFileObj( aLocation ); - bool bPrivateProtocol = ( aFileObj.GetProtocol() == INetProtocol::PRIV_SOFFICE ); + bool bPrivateProtocol = ( aFileObj.GetProtocol() == INetProtocol::PrivSoffice ); bHasLocation = !aLocation.isEmpty() && !bPrivateProtocol; OSL_ASSERT( !bPrivateProtocol ); diff --git a/sfx2/source/dialog/taskpane.cxx b/sfx2/source/dialog/taskpane.cxx index e982e561e0bd..c5273b485fab 100644 --- a/sfx2/source/dialog/taskpane.cxx +++ b/sfx2/source/dialog/taskpane.cxx @@ -401,7 +401,7 @@ namespace sfx2 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 ); |