summaryrefslogtreecommitdiffstats
path: root/dbaccess
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-04-02 15:58:06 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-04-02 16:30:34 +0200
commit44b3e56bb4a4df59f53447c4ca4d8e02fe926206 (patch)
tree71a9efde3a6a2a00688e8feb8e3086cb32eceb4f /dbaccess
parentModel o3tl::enumarray after std::array to allow aggregate initialization (diff)
downloadcore-44b3e56bb4a4df59f53447c4ca4d8e02fe926206.tar.gz
core-44b3e56bb4a4df59f53447c4ca4d8e02fe926206.zip
Change INetProtocol to scoped enumeration
...and fix o3tl::enumarray::operator [] const overload Change-Id: I749b1b9d68686b03a97074253478d9d2d9d32b0b
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/source/core/dataaccess/ModelImpl.cxx2
-rw-r--r--dbaccess/source/core/dataaccess/databasecontext.cxx2
-rw-r--r--dbaccess/source/core/dataaccess/databaseregistrations.cxx2
-rw-r--r--dbaccess/source/core/dataaccess/datasource.cxx2
-rw-r--r--dbaccess/source/ext/macromigration/macromigrationpages.cxx2
-rw-r--r--dbaccess/source/ui/app/AppController.cxx2
-rw-r--r--dbaccess/source/ui/browser/unodatbr.cxx4
-rw-r--r--dbaccess/source/ui/dlg/ConnectionHelper.cxx2
-rw-r--r--dbaccess/source/ui/dlg/dbfindex.cxx6
-rw-r--r--dbaccess/source/ui/dlg/dbwizsetup.cxx2
-rw-r--r--dbaccess/source/ui/dlg/sqlmessage.cxx2
-rw-r--r--dbaccess/source/ui/misc/UITools.cxx2
12 files changed, 15 insertions, 15 deletions
diff --git a/dbaccess/source/core/dataaccess/ModelImpl.cxx b/dbaccess/source/core/dataaccess/ModelImpl.cxx
index 143cc198c5ba..30967d8e1369 100644
--- a/dbaccess/source/core/dataaccess/ModelImpl.cxx
+++ b/dbaccess/source/core/dataaccess/ModelImpl.cxx
@@ -1245,7 +1245,7 @@ void ODatabaseModelImpl::impl_switchToLogicalURL( const OUString& i_rDocumentURL
)
{
INetURLObject aURL( i_rDocumentURL );
- if ( aURL.GetProtocol() != INET_PROT_NOT_VALID )
+ if ( aURL.GetProtocol() != INetProtocol::NOT_VALID )
{
m_sName = i_rDocumentURL;
// TODO: our data source must broadcast the change of the Name property
diff --git a/dbaccess/source/core/dataaccess/databasecontext.cxx b/dbaccess/source/core/dataaccess/databasecontext.cxx
index 25fc583b2ec4..98a305059a80 100644
--- a/dbaccess/source/core/dataaccess/databasecontext.cxx
+++ b/dbaccess/source/core/dataaccess/databasecontext.cxx
@@ -313,7 +313,7 @@ Reference< XInterface > ODatabaseContext::getRegisteredObject(const OUString& _
Reference< XInterface > ODatabaseContext::loadObjectFromURL(const OUString& _rName,const OUString& _sURL)
{
INetURLObject aURL( _sURL );
- if ( aURL.GetProtocol() == INET_PROT_NOT_VALID )
+ if ( aURL.GetProtocol() == INetProtocol::NOT_VALID )
throw NoSuchElementException( _rName, *this );
try
diff --git a/dbaccess/source/core/dataaccess/databaseregistrations.cxx b/dbaccess/source/core/dataaccess/databaseregistrations.cxx
index 7039a1abba43..9d2d9b7f6c0d 100644
--- a/dbaccess/source/core/dataaccess/databaseregistrations.cxx
+++ b/dbaccess/source/core/dataaccess/databaseregistrations.cxx
@@ -239,7 +239,7 @@ namespace dbaccess
throw IllegalArgumentException( OUString(), *this, 2 );
INetURLObject aURL( _rLocation );
- if ( aURL.GetProtocol() == INET_PROT_NOT_VALID )
+ if ( aURL.GetProtocol() == INetProtocol::NOT_VALID )
throw IllegalArgumentException( OUString(), *this, 2 );
}
diff --git a/dbaccess/source/core/dataaccess/datasource.cxx b/dbaccess/source/core/dataaccess/datasource.cxx
index b6c57087c0ae..021e9736bd98 100644
--- a/dbaccess/source/core/dataaccess/datasource.cxx
+++ b/dbaccess/source/core/dataaccess/datasource.cxx
@@ -1091,7 +1091,7 @@ Reference< XConnection > SAL_CALL ODatabaseSource::connectWithCompletion( const
// the name which should be referred in the login dialog
OUString sServerName( m_pImpl->m_sName );
INetURLObject aURLCheck( sServerName );
- if ( aURLCheck.GetProtocol() != INET_PROT_NOT_VALID )
+ if ( aURLCheck.GetProtocol() != INetProtocol::NOT_VALID )
sServerName = aURLCheck.getBase( INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_UNAMBIGUOUS );
// the request
diff --git a/dbaccess/source/ext/macromigration/macromigrationpages.cxx b/dbaccess/source/ext/macromigration/macromigrationpages.cxx
index 3a2f559fdab8..658a14a32bce 100644
--- a/dbaccess/source/ext/macromigration/macromigrationpages.cxx
+++ b/dbaccess/source/ext/macromigration/macromigrationpages.cxx
@@ -119,7 +119,7 @@ namespace dbmm
// get the document's current URL
Reference< XModel > xDocument( getDialog().getDocument(), UNO_QUERY_THROW );
INetURLObject aURLParser( xDocument->getURL() );
- OSL_ENSURE( aURLParser.GetProtocol() != INET_PROT_NOT_VALID, "SaveDBDocPage::initializePage: illegal document URL!" );
+ OSL_ENSURE( aURLParser.GetProtocol() != INetProtocol::NOT_VALID, "SaveDBDocPage::initializePage: illegal document URL!" );
OUStringBuffer aBaseName( aURLParser.getBase() );
aBaseName.appendAscii( ".backup" );
diff --git a/dbaccess/source/ui/app/AppController.cxx b/dbaccess/source/ui/app/AppController.cxx
index 618237e17f7e..53759bc083be 100644
--- a/dbaccess/source/ui/app/AppController.cxx
+++ b/dbaccess/source/ui/app/AppController.cxx
@@ -404,7 +404,7 @@ void SAL_CALL OApplicationController::disposing()
OUString());
// add to recent document list
- if ( aURL.GetProtocol() == INET_PROT_FILE )
+ if ( aURL.GetProtocol() == INetProtocol::FILE )
Application::AddToRecentDocumentList( aURL.GetURLNoPass( INetURLObject::NO_DECODE ),
(pFilter) ? pFilter->GetMimeType() : OUString(),
(pFilter) ? pFilter->GetServiceName() : OUString() );
diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx
index 93250faa87c5..11614688dfd1 100644
--- a/dbaccess/source/ui/browser/unodatbr.cxx
+++ b/dbaccess/source/ui/browser/unodatbr.cxx
@@ -1089,7 +1089,7 @@ namespace
bool getDataSourceDisplayName_isURL( const OUString& _rDS, OUString& _rDisplayName, OUString& _rUniqueId )
{
INetURLObject aURL( _rDS );
- if ( aURL.GetProtocol() != INET_PROT_NOT_VALID )
+ if ( aURL.GetProtocol() != INetProtocol::NOT_VALID )
{
_rDisplayName = aURL.getBase(INetURLObject::LAST_SEGMENT,true,INetURLObject::DECODE_WITH_CHARSET);
_rUniqueId = aURL.GetMainURL( INetURLObject::NO_DECODE );
@@ -3653,7 +3653,7 @@ OUString SbaTableQueryBrowser::getPrivateTitle() const
OUString sName = m_pTreeView->getListBox().GetEntryText(m_pCurrentlyDisplayed);
sTitle = GetEntryText( pConnection );
INetURLObject aURL(sTitle);
- if ( aURL.GetProtocol() != INET_PROT_NOT_VALID )
+ if ( aURL.GetProtocol() != INetProtocol::NOT_VALID )
sTitle = aURL.getBase(INetURLObject::LAST_SEGMENT,true,INetURLObject::DECODE_WITH_CHARSET);
if ( !sName.isEmpty() )
{
diff --git a/dbaccess/source/ui/dlg/ConnectionHelper.cxx b/dbaccess/source/ui/dlg/ConnectionHelper.cxx
index 06afe78cdc97..3f914c73f706 100644
--- a/dbaccess/source/ui/dlg/ConnectionHelper.cxx
+++ b/dbaccess/source/ui/dlg/ConnectionHelper.cxx
@@ -612,7 +612,7 @@ namespace dbaui
::ucbhelper::Content aParent(aParser.GetMainURL(INetURLObject::NO_DECODE), xEmptyEnv, comphelper::getProcessComponentContext());
OUString sContentType;
- if ( INET_PROT_FILE == eProtocol )
+ if ( INetProtocol::FILE == eProtocol )
{
sContentType = "application/vnd.sun.staroffice.fsys-folder";
// the file UCP currently does not support the ContentType property
diff --git a/dbaccess/source/ui/dlg/dbfindex.cxx b/dbaccess/source/ui/dlg/dbfindex.cxx
index 238a8ba415aa..847f69f2946f 100644
--- a/dbaccess/source/ui/dlg/dbfindex.cxx
+++ b/dbaccess/source/ui/dlg/dbfindex.cxx
@@ -268,7 +268,7 @@ void ODbaseIndexDialog::Init()
// if the string does not contain a path, cut the string
INetURLObject aURL;
- aURL.SetSmartProtocol(INET_PROT_FILE);
+ aURL.SetSmartProtocol(INetProtocol::FILE);
{
SvtPathOptions aPathOptions;
m_aDSN = aPathOptions.SubstituteVariable(m_aDSN);
@@ -300,7 +300,7 @@ void ODbaseIndexDialog::Init()
const OUString *pBegin = aFolderContent.getConstArray();
const OUString *pEnd = pBegin + aFolderContent.getLength();
- aURL.SetSmartProtocol(INET_PROT_FILE);
+ aURL.SetSmartProtocol(INetProtocol::FILE);
for(;pBegin != pEnd;++pBegin)
{
OUString aName;
@@ -408,7 +408,7 @@ void OTableInfo::WriteInfFile( const OUString& rDSN ) const
{
// open INF file
INetURLObject aURL;
- aURL.SetSmartProtocol(INET_PROT_FILE);
+ aURL.SetSmartProtocol(INetProtocol::FILE);
OUString aDsn = rDSN;
{
SvtPathOptions aPathOptions;
diff --git a/dbaccess/source/ui/dlg/dbwizsetup.cxx b/dbaccess/source/ui/dlg/dbwizsetup.cxx
index 7111764d0f3a..725f79c99653 100644
--- a/dbaccess/source/ui/dlg/dbwizsetup.cxx
+++ b/dbaccess/source/ui/dlg/dbwizsetup.cxx
@@ -815,7 +815,7 @@ bool ODbTypeWizDialogSetup::SaveDatabaseDocument()
{
m_aDocURL = INetURLObject(aFileDlg.GetPath());
- if( m_aDocURL.GetProtocol() != INET_PROT_NOT_VALID )
+ if( m_aDocURL.GetProtocol() != INetProtocol::NOT_VALID )
{
OUString sFileName = m_aDocURL.GetMainURL( INetURLObject::NO_DECODE );
if ( ::utl::UCBContentHelper::IsDocument(sFileName) )
diff --git a/dbaccess/source/ui/dlg/sqlmessage.cxx b/dbaccess/source/ui/dlg/sqlmessage.cxx
index a3ded92849bf..951e41f7e933 100644
--- a/dbaccess/source/ui/dlg/sqlmessage.cxx
+++ b/dbaccess/source/ui/dlg/sqlmessage.cxx
@@ -595,7 +595,7 @@ void OSQLMessageBox::impl_createStandardButtons( WinBits _nStyle )
OUString aTmp;
INetURLObject aHID( m_sHelpURL );
- if ( aHID.GetProtocol() == INET_PROT_HID )
+ if ( aHID.GetProtocol() == INetProtocol::HID )
aTmp = aHID.GetURLPath();
else
aTmp = m_sHelpURL;
diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx
index b51ae0bb4430..9dca902eaeea 100644
--- a/dbaccess/source/ui/misc/UITools.cxx
+++ b/dbaccess/source/ui/misc/UITools.cxx
@@ -1081,7 +1081,7 @@ OUString getStrippedDatabaseName(const Reference<XPropertySet>& _xDataSource,OUS
}
OUString sName = _rsDatabaseName;
INetURLObject aURL(sName);
- if ( aURL.GetProtocol() != INET_PROT_NOT_VALID )
+ if ( aURL.GetProtocol() != INetProtocol::NOT_VALID )
sName = aURL.getBase(INetURLObject::LAST_SEGMENT,true,INetURLObject::DECODE_UNAMBIGUOUS);
return sName;
}