summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-04-02 18:32:36 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-04-02 18:33:37 +0200
commit54e87df11faf697d3b2666198a3d20b3ee091419 (patch)
tree8cfe316f012a4969ca6980fa6ac2fdb3a9424118 /sfx2
parent3aac11a1233f679ea813fee8b8de134553d7db60 (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')
-rw-r--r--sfx2/source/appl/appdde.cxx2
-rw-r--r--sfx2/source/appl/appopen.cxx12
-rw-r--r--sfx2/source/appl/fileobj.cxx2
-rw-r--r--sfx2/source/appl/imagemgr.cxx4
-rw-r--r--sfx2/source/appl/linkmgr2.cxx6
-rw-r--r--sfx2/source/appl/newhelp.cxx4
-rw-r--r--sfx2/source/appl/opengrf.cxx2
-rw-r--r--sfx2/source/appl/sfxhelp.cxx2
-rw-r--r--sfx2/source/appl/sfxpicklist.cxx6
-rw-r--r--sfx2/source/appl/shutdowniconaqua.mm2
-rw-r--r--sfx2/source/bastyp/helper.cxx2
-rw-r--r--sfx2/source/control/recentdocsviewitem.cxx4
-rw-r--r--sfx2/source/dialog/dinfdlg.cxx14
-rw-r--r--sfx2/source/dialog/filedlghelper.cxx14
-rw-r--r--sfx2/source/dialog/mailmodel.cxx2
-rw-r--r--sfx2/source/dialog/taskpane.cxx2
-rw-r--r--sfx2/source/doc/docfile.cxx20
-rw-r--r--sfx2/source/doc/doctempl.cxx2
-rw-r--r--sfx2/source/doc/doctemplates.cxx4
-rw-r--r--sfx2/source/doc/guisaveas.cxx4
-rw-r--r--sfx2/source/doc/new.cxx2
-rw-r--r--sfx2/source/doc/objmisc.cxx6
-rw-r--r--sfx2/source/doc/objstor.cxx4
-rw-r--r--sfx2/source/doc/printhelper.cxx2
-rw-r--r--sfx2/source/inet/inettbc.cxx4
-rw-r--r--sfx2/source/view/viewfrm.cxx4
-rw-r--r--sfx2/source/view/viewsh.cxx2
27 files changed, 67 insertions, 67 deletions
diff --git a/sfx2/source/appl/appdde.cxx b/sfx2/source/appl/appdde.cxx
index cb0227ead0be..241fedf17166 100644
--- a/sfx2/source/appl/appdde.cxx
+++ b/sfx2/source/appl/appdde.cxx
@@ -84,7 +84,7 @@ namespace
sal_Bool bRet = sal_False;
INetURLObject aObj( rContent );
- DBG_ASSERT( aObj.GetProtocol() != INetProtocol::NOT_VALID, "Invalid URL!" );
+ DBG_ASSERT( aObj.GetProtocol() != INetProtocol::NotValid, "Invalid URL!" );
try
{
diff --git a/sfx2/source/appl/appopen.cxx b/sfx2/source/appl/appopen.cxx
index 8f09e0247eac..582a4b8e935d 100644
--- a/sfx2/source/appl/appopen.cxx
+++ b/sfx2/source/appl/appopen.cxx
@@ -531,7 +531,7 @@ void SfxApplication::NewDocExec_Impl( SfxRequest& rReq )
SfxStringItem aTarget( SID_TARGETNAME, "_default" );
if ( !aTemplateFileName.isEmpty() )
{
- DBG_ASSERT( aObj.GetProtocol() != INetProtocol::NOT_VALID, "Illegal URL!" );
+ DBG_ASSERT( aObj.GetProtocol() != INetProtocol::NotValid, "Illegal URL!" );
SfxStringItem aName( SID_FILE_NAME, aObj.GetMainURL( INetURLObject::NO_DECODE ) );
SfxStringItem aTemplName( SID_TEMPLATE_NAME, aTemplateName );
@@ -826,7 +826,7 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
SvtExtendedSecurityOptions aExtendedSecurityOptions;
SvtExtendedSecurityOptions::OpenHyperlinkMode eMode = aExtendedSecurityOptions.GetOpenHyperlinkMode();
- if ( eMode == SvtExtendedSecurityOptions::OPEN_NEVER && aINetProtocol != INetProtocol::VND_SUN_STAR_HELP )
+ if ( eMode == SvtExtendedSecurityOptions::OPEN_NEVER && aINetProtocol != INetProtocol::VndSunStarHelp )
{
SolarMutexGuard aGuard;
vcl::Window *pWindow = SfxGetpApp()->GetTopWindow();
@@ -845,15 +845,15 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
if (!pFilter || !lcl_isFilterNativelySupported(*pFilter))
{
// hyperlink does not link to own type => special handling (http, ftp) browser and (other external protocols) OS
- if ( aINetProtocol == INetProtocol::MAILTO )
+ if ( aINetProtocol == INetProtocol::Mailto )
{
// don't dispatch mailto hyperlink to desktop dispatcher
rReq.RemoveItem( SID_TARGETNAME );
rReq.AppendItem( SfxStringItem( SID_TARGETNAME, OUString("_self") ) );
}
- else if ( aINetProtocol == INetProtocol::FTP ||
- aINetProtocol == INetProtocol::HTTP ||
- aINetProtocol == INetProtocol::HTTPS )
+ else if ( aINetProtocol == INetProtocol::Ftp ||
+ aINetProtocol == INetProtocol::Http ||
+ aINetProtocol == INetProtocol::Https )
{
sfx2::openUriExternally(aURL.Complete, true);
return;
diff --git a/sfx2/source/appl/fileobj.cxx b/sfx2/source/appl/fileobj.cxx
index 7c5434fe99f1..d80f24ca2348 100644
--- a/sfx2/source/appl/fileobj.cxx
+++ b/sfx2/source/appl/fileobj.cxx
@@ -555,7 +555,7 @@ bool SvFileObject::IsDataComplete() const
{
INetURLObject aUrl( sFileNm );
if( aUrl.HasError() ||
- INetProtocol::NOT_VALID == aUrl.GetProtocol() )
+ INetProtocol::NotValid == aUrl.GetProtocol() )
bRet = true;
}
}
diff --git a/sfx2/source/appl/imagemgr.cxx b/sfx2/source/appl/imagemgr.cxx
index 06fdb6fdd190..08a945328d45 100644
--- a/sfx2/source/appl/imagemgr.cxx
+++ b/sfx2/source/appl/imagemgr.cxx
@@ -76,7 +76,7 @@ Image SAL_CALL GetImage(
xModel = xController->getModel();
OUString aCommandURL( aURL );
- if ( nProtocol == INetProtocol::SLOT )
+ if ( nProtocol == INetProtocol::Slot )
{
sal_uInt16 nId = ( sal_uInt16 ) aURL.copy(5).toInt32();
const SfxSlot* pSlot = 0;
@@ -192,7 +192,7 @@ Image SAL_CALL GetImage(
if ( !!aImage )
return aImage;
- else if ( nProtocol != INetProtocol::UNO && nProtocol != INetProtocol::SLOT )
+ else if ( nProtocol != INetProtocol::Uno && nProtocol != INetProtocol::Slot )
return SvFileInformationManager::GetImageNoDefault( aObj, bBig );
}
}
diff --git a/sfx2/source/appl/linkmgr2.cxx b/sfx2/source/appl/linkmgr2.cxx
index 50461699fd4e..a64704b0503b 100644
--- a/sfx2/source/appl/linkmgr2.cxx
+++ b/sfx2/source/appl/linkmgr2.cxx
@@ -563,7 +563,7 @@ OUString lcl_DDE_RelToAbs( const OUString& rTopic, const OUString& rBaseURL )
{
OUString sRet;
INetURLObject aURL( rTopic );
- if( INetProtocol::NOT_VALID == aURL.GetProtocol() )
+ if( INetProtocol::NotValid == aURL.GetProtocol() )
utl::LocalFileHelper::ConvertSystemPathToURL( rTopic, rBaseURL, sRet );
if( sRet.isEmpty() )
sRet = URIHelper::SmartRel2Abs( INetURLObject(rBaseURL), rTopic, URIHelper::GetMaybeFileHdl(), true );
@@ -657,8 +657,8 @@ bool SvxInternalLink::Connect( sfx2::SvBaseLink* pLink )
INetURLObject aURL( sTopic );
INetProtocol eOld = aURL.GetProtocol();
aURL.SetURL( sTopic = lcl_DDE_RelToAbs( sTopic, sReferer ) );
- if( INetProtocol::NOT_VALID != eOld ||
- INetProtocol::HTTP != aURL.GetProtocol() )
+ if( INetProtocol::NotValid != eOld ||
+ INetProtocol::Http != aURL.GetProtocol() )
{
SfxStringItem aName( SID_FILE_NAME, sTopic );
SfxBoolItem aMinimized(SID_MINIMIZED, true);
diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx
index 312e7d365324..d16ed6a01af4 100644
--- a/sfx2/source/appl/newhelp.cxx
+++ b/sfx2/source/appl/newhelp.cxx
@@ -2900,7 +2900,7 @@ void SfxHelpWindow_Impl::openDone(const OUString& sURL ,
bool bSuccess)
{
INetURLObject aObj( sURL );
- if ( aObj.GetProtocol() == INetProtocol::VND_SUN_STAR_HELP )
+ if ( aObj.GetProtocol() == INetProtocol::VndSunStarHelp )
SetFactory( aObj.GetHost() );
if ( IsWait() )
LeaveWait();
@@ -3042,7 +3042,7 @@ void SfxHelpWindow_Impl::SetFactory( const OUString& rFactory )
void SfxHelpWindow_Impl::SetHelpURL( const OUString& rURL )
{
INetURLObject aObj( rURL );
- if ( aObj.GetProtocol() == INetProtocol::VND_SUN_STAR_HELP )
+ if ( aObj.GetProtocol() == INetProtocol::VndSunStarHelp )
SetFactory( aObj.GetHost() );
}
diff --git a/sfx2/source/appl/opengrf.cxx b/sfx2/source/appl/opengrf.cxx
index 24b66809894e..2a533bb29ed8 100644
--- a/sfx2/source/appl/opengrf.cxx
+++ b/sfx2/source/appl/opengrf.cxx
@@ -126,7 +126,7 @@ short SvxOpenGraphicDialog::Execute()
sal_uInt16 nFound = USHRT_MAX;
// non-local?
- if ( INetProtocol::FILE != aObj.GetProtocol() )
+ if ( INetProtocol::File != aObj.GetProtocol() )
{
SfxMedium aMed( aObj.GetMainURL( INetURLObject::NO_DECODE ), StreamMode::READ );
aMed.Download();
diff --git a/sfx2/source/appl/sfxhelp.cxx b/sfx2/source/appl/sfxhelp.cxx
index fce5ddb1e0c3..4e0e195f2a32 100644
--- a/sfx2/source/appl/sfxhelp.cxx
+++ b/sfx2/source/appl/sfxhelp.cxx
@@ -549,7 +549,7 @@ bool SfxHelp::Start_Impl(const OUString& rURL, const vcl::Window* pWindow, const
switch ( nProtocol )
{
- case INetProtocol::VND_SUN_STAR_HELP:
+ case INetProtocol::VndSunStarHelp:
// already a vnd.sun.star.help URL -> nothing to do
aHelpURL = rURL;
break;
diff --git a/sfx2/source/appl/sfxpicklist.cxx b/sfx2/source/appl/sfxpicklist.cxx
index 3b4261b73536..1e6550b1abb2 100644
--- a/sfx2/source/appl/sfxpicklist.cxx
+++ b/sfx2/source/appl/sfxpicklist.cxx
@@ -96,7 +96,7 @@ void SfxPickList::CreatePicklistMenuTitle( Menu* pMenu, sal_uInt16 nItemId, cons
OUString aTipHelpText;
OUString aAccessibleName = aPickEntry.toString();
- if ( aURL.GetProtocol() == INetProtocol::FILE )
+ if ( aURL.GetProtocol() == INetProtocol::File )
{
// Do handle file URL differently => convert it to a system
// path and abbreviate it with a special function:
@@ -172,7 +172,7 @@ void SfxPickList::AddDocumentToPickList( SfxObjectShell* pDocSh )
// Help not in History
INetURLObject aURL( pDocSh->IsDocShared() ? pDocSh->GetSharedFileURL() : OUString( pMed->GetOrigURL() ) );
- if ( aURL.GetProtocol() == INetProtocol::VND_SUN_STAR_HELP )
+ if ( aURL.GetProtocol() == INetProtocol::VndSunStarHelp )
return;
if ( !pMed->IsUpdatePickList() )
@@ -226,7 +226,7 @@ void SfxPickList::AddDocumentToPickList( SfxObjectShell* pDocSh )
OUString(),
aThumbnail);
- if ( aURL.GetProtocol() == INetProtocol::FILE )
+ if ( aURL.GetProtocol() == INetProtocol::File )
Application::AddToRecentDocumentList( aURL.GetURLNoPass( INetURLObject::NO_DECODE ),
(pFilter) ? pFilter->GetMimeType() : OUString(),
(pFilter) ? pFilter->GetServiceName() : OUString() );
diff --git a/sfx2/source/appl/shutdowniconaqua.mm b/sfx2/source/appl/shutdowniconaqua.mm
index ef20b8cb027d..eeda5694858d 100644
--- a/sfx2/source/appl/shutdowniconaqua.mm
+++ b/sfx2/source/appl/shutdowniconaqua.mm
@@ -221,7 +221,7 @@ class RecentFilesStringLength : public ::cppu::WeakImplHelper1< ::com::sun::star
rtl::OUString aMenuTitle;
INetURLObject aURL( (*m_pRecentFilesItems)[i].aURL );
- if ( aURL.GetProtocol() == INetProtocol::FILE )
+ if ( aURL.GetProtocol() == INetProtocol::File )
{
// Do handle file URL differently => convert it to a system
// path and abbreviate it with a special function:
diff --git a/sfx2/source/bastyp/helper.cxx b/sfx2/source/bastyp/helper.cxx
index 21a411852672..a45f2654777b 100644
--- a/sfx2/source/bastyp/helper.cxx
+++ b/sfx2/source/bastyp/helper.cxx
@@ -248,7 +248,7 @@ sal_Int64 SfxContentHelper::GetSize( const OUString& rContent )
{
sal_Int64 nSize = 0;
INetURLObject aObj( rContent );
- DBG_ASSERT( aObj.GetProtocol() != INetProtocol::NOT_VALID, "Invalid URL!" );
+ DBG_ASSERT( aObj.GetProtocol() != INetProtocol::NotValid, "Invalid URL!" );
try
{
::ucbhelper::Content aCnt( aObj.GetMainURL( INetURLObject::NO_DECODE ), uno::Reference< ucb::XCommandEnvironment >(), comphelper::getProcessComponentContext() );
diff --git a/sfx2/source/control/recentdocsviewitem.cxx b/sfx2/source/control/recentdocsviewitem.cxx
index bf64b6a2c04c..d5da3ca8abb4 100644
--- a/sfx2/source/control/recentdocsviewitem.cxx
+++ b/sfx2/source/control/recentdocsviewitem.cxx
@@ -41,7 +41,7 @@ RecentDocsViewItem::RecentDocsViewItem(ThumbnailView &rView, const OUString &rUR
OUString aTitle(rTitle);
INetURLObject aURLObj(rURL);
- if( aURLObj.GetProtocol() == INetProtocol::FILE )
+ if( aURLObj.GetProtocol() == INetProtocol::File )
m_sHelpText = aURLObj.getFSysPath(INetURLObject::FSYS_DETECT);
if( m_sHelpText.isEmpty() )
m_sHelpText = aURLObj.GetURLNoPass();
@@ -50,7 +50,7 @@ RecentDocsViewItem::RecentDocsViewItem(ThumbnailView &rView, const OUString &rUR
aTitle = aURLObj.GetName(INetURLObject::DECODE_WITH_CHARSET);
BitmapEx aThumbnail(rThumbnail);
- if (aThumbnail.IsEmpty() && aURLObj.GetProtocol() == INetProtocol::FILE)
+ if (aThumbnail.IsEmpty() && aURLObj.GetProtocol() == INetProtocol::File)
aThumbnail = ThumbnailView::readThumbnail(rURL);
if (aThumbnail.IsEmpty())
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 );
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index f76633b3ea33..407a64947ce5 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -932,9 +932,9 @@ namespace
INetURLObject aUrl( rLogicName );
INetProtocol eProt = aUrl.GetProtocol();
#if HAVE_FEATURE_MACOSX_SANDBOX
- return eProt == INetProtocol::SFTP;
+ return eProt == INetProtocol::Sftp;
#else
- return eProt == INetProtocol::FILE || eProt == INetProtocol::SFTP;
+ return eProt == INetProtocol::File || eProt == INetProtocol::Sftp;
#endif
}
}
@@ -2420,7 +2420,7 @@ void SfxMedium::Init_Impl()
{
INetURLObject aUrl( pImp->m_aLogicName );
INetProtocol eProt = aUrl.GetProtocol();
- if ( eProt == INetProtocol::NOT_VALID )
+ if ( eProt == INetProtocol::NotValid )
{
SAL_WARN( "sfx.doc", "Unknown protocol!" );
}
@@ -2683,13 +2683,13 @@ void SfxMedium::SetIsRemote_Impl()
INetURLObject aObj( GetName() );
switch( aObj.GetProtocol() )
{
- case INetProtocol::FTP:
- case INetProtocol::HTTP:
- case INetProtocol::HTTPS:
- case INetProtocol::POP3:
- case INetProtocol::NEWS:
- case INetProtocol::IMAP:
- case INetProtocol::VIM:
+ case INetProtocol::Ftp:
+ case INetProtocol::Http:
+ case INetProtocol::Https:
+ case INetProtocol::Pop3:
+ case INetProtocol::News:
+ case INetProtocol::Imap:
+ case INetProtocol::Vim:
pImp->m_bRemote = true;
break;
default:
diff --git a/sfx2/source/doc/doctempl.cxx b/sfx2/source/doc/doctempl.cxx
index def4e05ac0ac..140e62cd044c 100644
--- a/sfx2/source/doc/doctempl.cxx
+++ b/sfx2/source/doc/doctempl.cxx
@@ -1186,7 +1186,7 @@ bool SfxDocumentTemplates::GetLogicNames
INetURLObject aFullPath;
- aFullPath.SetSmartProtocol( INetProtocol::FILE );
+ aFullPath.SetSmartProtocol( INetProtocol::File );
aFullPath.SetURL( rPath );
OUString aPath( aFullPath.GetMainURL( INetURLObject::NO_DECODE ) );
diff --git a/sfx2/source/doc/doctemplates.cxx b/sfx2/source/doc/doctemplates.cxx
index 15f175efefd3..346dd0d90607 100644
--- a/sfx2/source/doc/doctemplates.cxx
+++ b/sfx2/source/doc/doctemplates.cxx
@@ -570,7 +570,7 @@ void SfxDocTplService_Impl::getDirList()
for (sal_Int32 i = 0; i < nCount; ++i)
{
- aURL.SetSmartProtocol( INetProtocol::FILE );
+ aURL.SetSmartProtocol( INetProtocol::File );
aURL.SetURL( aDirs.getToken( i, C_DELIM ) );
maTemplateDirs[i] = aURL.GetMainURL( INetURLObject::NO_DECODE );
@@ -2907,7 +2907,7 @@ void SfxURLRelocator_Impl::initOfficeInstDirs()
void SfxURLRelocator_Impl::implExpandURL( OUString& io_url )
{
const INetURLObject aParser( io_url );
- if ( aParser.GetProtocol() != INetProtocol::VND_SUN_STAR_EXPAND )
+ if ( aParser.GetProtocol() != INetProtocol::VndSunStarExpand )
return;
io_url = aParser.GetURLPath( INetURLObject::DECODE_WITH_CHARSET );
diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx
index b1e580cba74c..c75786910d38 100644
--- a/sfx2/source/doc/guisaveas.cxx
+++ b/sfx2/source/doc/guisaveas.cxx
@@ -1280,7 +1280,7 @@ OUString ModelData_Impl::GetRecommendedName( const OUString& aSuggestedName, con
uno::UNO_QUERY );
if ( xTypeDetection.is() )
{
- INetURLObject aObj( "c:/" + aRecommendedName, INetProtocol::FILE,
+ INetURLObject aObj( "c:/" + aRecommendedName, INetProtocol::File,
INetURLObject::ENCODE_ALL, RTL_TEXTENCODING_UTF8, INetURLObject::FSYS_DOS );
uno::Sequence< beans::PropertyValue > aTypeNameProps;
@@ -1618,7 +1618,7 @@ bool SfxStoringHelper::GUIStoreModel( uno::Reference< frame::XModel > xModel,
OUString aFileName;
aFileNameIter->second >>= aFileName;
aURL.SetURL( aFileName );
- DBG_ASSERT( aURL.GetProtocol() != INetProtocol::NOT_VALID, "Illegal URL!" );
+ DBG_ASSERT( aURL.GetProtocol() != INetProtocol::NotValid, "Illegal URL!" );
::comphelper::SequenceAsHashMap::const_iterator aIter =
aModelData.GetMediaDescr().find( sFilterNameString );
diff --git a/sfx2/source/doc/new.cxx b/sfx2/source/doc/new.cxx
index b30e6f1c1e07..8a718b99338f 100644
--- a/sfx2/source/doc/new.cxx
+++ b/sfx2/source/doc/new.cxx
@@ -191,7 +191,7 @@ IMPL_LINK_NOARG(SfxNewFileDialog_Impl, Update)
OUString aFileName = aTemplates.GetPath( m_pRegionLb->GetSelectEntryPos(), nEntry-1);
INetURLObject aTestObj( aFileName );
- if( aTestObj.GetProtocol() == INetProtocol::NOT_VALID )
+ if( aTestObj.GetProtocol() == INetProtocol::NotValid )
{
// temp. fix until Templates are managed by UCB compatible service
// does NOT work with locally cached components !
diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx
index 3f7b183e3ae5..8ec5d45a9d63 100644
--- a/sfx2/source/doc/objmisc.cxx
+++ b/sfx2/source/doc/objmisc.cxx
@@ -860,7 +860,7 @@ OUString SfxObjectShell::GetTitle
if ( pMed && ( nMaxLength == SFX_TITLE_CAPTION || nMaxLength == SFX_TITLE_PICKLIST ) )
{
// If a specific title was given at open:
- // important for URLs: use INetProtocol::FILE for which the set title is not
+ // important for URLs: use INetProtocol::File for which the set title is not
// considered. (See below, analysis of aTitleMap_Impl)
SFX_ITEMSET_ARG( pMed->GetItemSet(), pNameItem, SfxStringItem, SID_DOCINFO_TITLE, false );
if ( pNameItem )
@@ -891,7 +891,7 @@ OUString SfxObjectShell::GetTitle
if ( nMaxLength > SFX_TITLE_CAPTION && nMaxLength <= SFX_TITLE_HISTORY )
{
sal_uInt16 nRemote;
- if( !pMed || aURL.GetProtocol() == INetProtocol::FILE )
+ if( !pMed || aURL.GetProtocol() == INetProtocol::File )
nRemote = 0;
else
nRemote = 1;
@@ -899,7 +899,7 @@ OUString SfxObjectShell::GetTitle
}
// Local file?
- if ( aURL.GetProtocol() == INetProtocol::FILE )
+ if ( aURL.GetProtocol() == INetProtocol::File )
{
OUString aName( aURL.HasMark() ? INetURLObject( aURL.GetURLNoMark() ).PathToFileName() : aURL.PathToFileName() );
if ( nMaxLength == SFX_TITLE_FULLNAME )
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index cafa4b26ed3c..91c385548117 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -2108,7 +2108,7 @@ void SfxObjectShell::AddToRecentlyUsedList()
{
INetURLObject aUrl( pMedium->GetOrigURL() );
- if ( aUrl.GetProtocol() == INetProtocol::FILE )
+ if ( aUrl.GetProtocol() == INetProtocol::File )
{
const SfxFilter* pOrgFilter = pMedium->GetOrigFilter();
Application::AddToRecentDocumentList( aUrl.GetURLNoPass( INetURLObject::NO_DECODE ),
@@ -2644,7 +2644,7 @@ bool SfxObjectShell::CommonSaveAs_Impl
}
}
- DBG_ASSERT( aURL.GetProtocol() != INetProtocol::NOT_VALID, "Illegal URL!" );
+ DBG_ASSERT( aURL.GetProtocol() != INetProtocol::NotValid, "Illegal URL!" );
DBG_ASSERT( aParams->Count() != 0, "Incorrect Parameter");
SFX_ITEMSET_ARG( aParams, pSaveToItem, SfxBoolItem, SID_SAVETO, false );
diff --git a/sfx2/source/doc/printhelper.cxx b/sfx2/source/doc/printhelper.cxx
index c988ac704806..1d056eb69900 100644
--- a/sfx2/source/doc/printhelper.cxx
+++ b/sfx2/source/doc/printhelper.cxx
@@ -638,7 +638,7 @@ void SAL_CALL SfxPrintHelper::print(const uno::Sequence< beans::PropertyValue >&
OUString sPath ;
OUString sURL (sTemp);
INetURLObject aCheck(sURL );
- if (aCheck.GetProtocol()==INetProtocol::NOT_VALID)
+ if (aCheck.GetProtocol()==INetProtocol::NotValid)
{
// OK - it's not a valid URL. But may it's a simple
// system path directly. It will be supported for historical
diff --git a/sfx2/source/inet/inettbc.cxx b/sfx2/source/inet/inettbc.cxx
index 7e433b5959e1..29a5168987f0 100644
--- a/sfx2/source/inet/inettbc.cxx
+++ b/sfx2/source/inet/inettbc.cxx
@@ -85,7 +85,7 @@ void SfxURLToolBoxControl_Impl::OpenURL( const OUString& rName, bool /*bNew*/ )
OUString aOptions;
INetURLObject aObj( rName );
- if ( aObj.GetProtocol() == INetProtocol::NOT_VALID )
+ if ( aObj.GetProtocol() == INetProtocol::NotValid )
{
OUString aBaseURL = GetURLBox()->GetBaseURL();
aName = SvtURLBox::ParseSmart( rName, aBaseURL, SvtPathOptions().GetWorkPath() );
@@ -247,7 +247,7 @@ void SfxURLToolBoxControl_Impl::StateChanged
OUString aRep( pURL->GetValue() );
INetURLObject aURL( aRep );
INetProtocol eProt = aURL.GetProtocol();
- if ( eProt == INetProtocol::FILE )
+ if ( eProt == INetProtocol::File )
{
pURLBox->SetText( aURL.PathToFileName() );
}
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index 0b359c9ec673..4f1a03a27d4b 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -443,7 +443,7 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
// the logic below is following, if the document seems not to need to be reloaded and the physical name is different
// to the logical one, then on file system it can be checked that the copy is still newer than the original and no document reload is required
- if ( ( !bNeedsReload && ( (aMedObj.GetProtocol() == INetProtocol::FILE &&
+ if ( ( !bNeedsReload && ( (aMedObj.GetProtocol() == INetProtocol::File &&
aMedObj.getFSysPath(INetURLObject::FSYS_DETECT) != aPhysObj.getFSysPath(INetURLObject::FSYS_DETECT) &&
!::utl::UCBContentHelper::IsYounger( aMedObj.GetMainURL( INetURLObject::NO_DECODE ), aPhysObj.GetMainURL( INetURLObject::NO_DECODE ) ))
|| pMed->IsRemote() ) )
@@ -596,7 +596,7 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
aURL = pMedium->GetName();
bool bHandsOff =
- ( pMedium->GetURLObject().GetProtocol() == INetProtocol::FILE && !xOldObj->IsDocShared() );
+ ( pMedium->GetURLObject().GetProtocol() == INetProtocol::File && !xOldObj->IsDocShared() );
// Emty existing SfxMDIFrames for this Document
// in native format or R/O, open it now for editing?
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index 0c7620e7fcdf..e27660c64014 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -670,7 +670,7 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq )
OUString aLocation = xStorable->getLocation();
INetURLObject aFileObj( aLocation );
- bool bPrivateProtocol = ( aFileObj.GetProtocol() == INetProtocol::PRIV_SOFFICE );
+ bool bPrivateProtocol = ( aFileObj.GetProtocol() == INetProtocol::PrivSoffice );
bool bHasLocation = !aLocation.isEmpty() && !bPrivateProtocol;
css::uno::Reference< css::container::XContainerQuery > xContainerQuery(