summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2016-12-05 08:47:18 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2016-12-05 12:49:02 +0200
commitbfde4866e07746eafa2f0d6173c29d805cc35ad0 (patch)
treebe939a44eb70c7187fa5536089b782326b160013 /connectivity
parent803215142efa6437515348f63bd70ffdcf5d45f1 (diff)
convert DecodeMechanism to scoped enum
Change-Id: I5c56634b1bca8e37fa73d02d2428645301b6c547
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/drivers/calc/CConnection.cxx2
-rw-r--r--connectivity/source/drivers/dbase/DTable.cxx30
-rw-r--r--connectivity/source/drivers/file/FConnection.cxx2
-rw-r--r--connectivity/source/drivers/file/FDatabaseMetaData.cxx6
-rw-r--r--connectivity/source/drivers/flat/ETable.cxx2
5 files changed, 21 insertions, 21 deletions
diff --git a/connectivity/source/drivers/calc/CConnection.cxx b/connectivity/source/drivers/calc/CConnection.cxx
index a315bc6b7c45..97f8e333b1d8 100644
--- a/connectivity/source/drivers/calc/CConnection.cxx
+++ b/connectivity/source/drivers/calc/CConnection.cxx
@@ -81,7 +81,7 @@ void OCalcConnection::construct(const OUString& url,const Sequence< PropertyValu
// don't pass invalid URL to loadComponentFromURL
throw SQLException();
}
- m_aFileName = aURL.GetMainURL(INetURLObject::NO_DECODE);
+ m_aFileName = aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE);
m_sPassword.clear();
const char* pPwd = "password";
diff --git a/connectivity/source/drivers/dbase/DTable.cxx b/connectivity/source/drivers/dbase/DTable.cxx
index 11d35d1359a1..13cfc685ee3f 100644
--- a/connectivity/source/drivers/dbase/DTable.cxx
+++ b/connectivity/source/drivers/dbase/DTable.cxx
@@ -525,10 +525,10 @@ void ODbaseTable::construct()
// If the memo file isn't found, the data will be displayed anyhow.
// However, updates can't be done
// but the operation is executed
- m_pMemoStream = createStream_simpleError( aURL.GetMainURL(INetURLObject::NO_DECODE), StreamMode::READWRITE | StreamMode::NOCREATE | StreamMode::SHARE_DENYWRITE);
+ m_pMemoStream = createStream_simpleError( aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE), StreamMode::READWRITE | StreamMode::NOCREATE | StreamMode::SHARE_DENYWRITE);
if ( !m_pMemoStream )
{
- m_pMemoStream = createStream_simpleError( aURL.GetMainURL(INetURLObject::NO_DECODE), StreamMode::READ | StreamMode::NOCREATE | StreamMode::SHARE_DENYNONE);
+ m_pMemoStream = createStream_simpleError( aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE), StreamMode::READ | StreamMode::NOCREATE | StreamMode::SHARE_DENYNONE);
}
if (m_pMemoStream)
ReadMemoHeader();
@@ -701,7 +701,7 @@ void ODbaseTable::refreshIndexes()
aURL.setName(OStringToOUString(aIndexName, m_eEncoding));
try
{
- Content aCnt(aURL.GetMainURL(INetURLObject::NO_DECODE),Reference<XCommandEnvironment>(), comphelper::getProcessComponentContext());
+ Content aCnt(aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE),Reference<XCommandEnvironment>(), comphelper::getProcessComponentContext());
if (aCnt.isDocument())
{
aVector.push_back(aURL.getBase());
@@ -1048,11 +1048,11 @@ bool ODbaseTable::CreateImpl()
try
{
- Content aContent(aURL.GetMainURL(INetURLObject::NO_DECODE),Reference<XCommandEnvironment>(), comphelper::getProcessComponentContext());
+ Content aContent(aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE),Reference<XCommandEnvironment>(), comphelper::getProcessComponentContext());
if (aContent.isDocument())
{
// Only if the file exists with length > 0 raise an error
- SvStream* pFileStream = createStream_simpleError( aURL.GetMainURL(INetURLObject::NO_DECODE), StreamMode::READ);
+ SvStream* pFileStream = createStream_simpleError( aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE), StreamMode::READ);
if (pFileStream && pFileStream->Seek(STREAM_SEEK_TO_END))
{
@@ -1075,7 +1075,7 @@ bool ODbaseTable::CreateImpl()
{
try
{
- Content aContent(aURL.GetMainURL(INetURLObject::NO_DECODE),Reference<XCommandEnvironment>(), comphelper::getProcessComponentContext());
+ Content aContent(aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE),Reference<XCommandEnvironment>(), comphelper::getProcessComponentContext());
aContent.executeCommand( "delete", css::uno::Any( true ) );
}
catch(const Exception&) // an exception is thrown when no file exists
@@ -1092,7 +1092,7 @@ bool ODbaseTable::CreateImpl()
bool bMemoAlreadyExists = false;
try
{
- Content aMemo1Content(aURL.GetMainURL(INetURLObject::NO_DECODE),Reference<XCommandEnvironment>(), comphelper::getProcessComponentContext());
+ Content aMemo1Content(aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE),Reference<XCommandEnvironment>(), comphelper::getProcessComponentContext());
bMemoAlreadyExists = aMemo1Content.isDocument();
}
catch(const Exception&) // an exception is thrown when no file exists
@@ -1103,7 +1103,7 @@ bool ODbaseTable::CreateImpl()
aURL.setExtension(aExt); // kill dbf file
try
{
- Content aMemoContent(aURL.GetMainURL(INetURLObject::NO_DECODE),Reference<XCommandEnvironment>(), comphelper::getProcessComponentContext());
+ Content aMemoContent(aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE),Reference<XCommandEnvironment>(), comphelper::getProcessComponentContext());
aMemoContent.executeCommand( "delete", css::uno::Any( true ) );
}
catch(const Exception&)
@@ -1121,7 +1121,7 @@ bool ODbaseTable::CreateImpl()
aURL.setExtension(aExt); // kill dbf file
try
{
- Content aMemoContent(aURL.GetMainURL(INetURLObject::NO_DECODE),Reference<XCommandEnvironment>(), comphelper::getProcessComponentContext());
+ Content aMemoContent(aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE),Reference<XCommandEnvironment>(), comphelper::getProcessComponentContext());
aMemoContent.executeCommand( "delete", css::uno::Any( true ) );
}
catch(const ContentCreationException&)
@@ -1166,7 +1166,7 @@ bool ODbaseTable::CreateFile(const INetURLObject& aFile, bool& bCreateMemo)
bCreateMemo = false;
Date aDate( Date::SYSTEM ); // current date
- m_pFileStream = createStream_simpleError( aFile.GetMainURL(INetURLObject::NO_DECODE),StreamMode::READWRITE | StreamMode::SHARE_DENYWRITE | StreamMode::TRUNC );
+ m_pFileStream = createStream_simpleError( aFile.GetMainURL(INetURLObject::DecodeMechanism::NONE),StreamMode::READWRITE | StreamMode::SHARE_DENYWRITE | StreamMode::TRUNC );
if (!m_pFileStream)
return false;
@@ -1412,7 +1412,7 @@ bool ODbaseTable::CreateFile(const INetURLObject& aFile, bool& bCreateMemo)
bool ODbaseTable::CreateMemoFile(const INetURLObject& aFile)
{
// filehandling macro for table creation
- m_pMemoStream = createStream_simpleError( aFile.GetMainURL(INetURLObject::NO_DECODE),StreamMode::READWRITE | StreamMode::SHARE_DENYWRITE);
+ m_pMemoStream = createStream_simpleError( aFile.GetMainURL(INetURLObject::DecodeMechanism::NONE),StreamMode::READWRITE | StreamMode::SHARE_DENYWRITE);
if (!m_pMemoStream)
return false;
@@ -1433,14 +1433,14 @@ bool ODbaseTable::Drop_Static(const OUString& _sUrl, bool _bHasMemoFields, OColl
INetURLObject aURL;
aURL.SetURL(_sUrl);
- bool bDropped = ::utl::UCBContentHelper::Kill(aURL.GetMainURL(INetURLObject::NO_DECODE));
+ bool bDropped = ::utl::UCBContentHelper::Kill(aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE));
if(bDropped)
{
if (_bHasMemoFields)
{ // delete the memo fields
aURL.setExtension("dbt");
- bDropped = ::utl::UCBContentHelper::Kill(aURL.GetMainURL(INetURLObject::NO_DECODE));
+ bDropped = ::utl::UCBContentHelper::Kill(aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE));
}
if(bDropped)
@@ -1464,7 +1464,7 @@ bool ODbaseTable::Drop_Static(const OUString& _sUrl, bool _bHasMemoFields, OColl
// as the inf file does not necessarily exist, we aren't allowed to use UCBContentHelper::Kill
try
{
- ::ucbhelper::Content aDeleteContent( aURL.GetMainURL( INetURLObject::NO_DECODE ), Reference< XCommandEnvironment >(), comphelper::getProcessComponentContext() );
+ ::ucbhelper::Content aDeleteContent( aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), Reference< XCommandEnvironment >(), comphelper::getProcessComponentContext() );
aDeleteContent.executeCommand( "delete", makeAny( true ) );
}
catch(const Exception&)
@@ -2339,7 +2339,7 @@ namespace
try
{
- Content aContent(aURL.GetMainURL(INetURLObject::NO_DECODE),Reference<XCommandEnvironment>(), comphelper::getProcessComponentContext());
+ Content aContent(aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE),Reference<XCommandEnvironment>(), comphelper::getProcessComponentContext());
Sequence< PropertyValue > aProps( 1 );
aProps[0].Name = "Title";
diff --git a/connectivity/source/drivers/file/FConnection.cxx b/connectivity/source/drivers/file/FConnection.cxx
index 745c1121ca9c..8937d104e8ab 100644
--- a/connectivity/source/drivers/file/FConnection.cxx
+++ b/connectivity/source/drivers/file/FConnection.cxx
@@ -145,7 +145,7 @@ void OConnection::construct(const OUString& url,const Sequence< PropertyValue >&
aURL.SetSmartURL(aFileName);
- setURL(aURL.GetMainURL(INetURLObject::NO_DECODE));
+ setURL(aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE));
}
if ( m_nTextEncoding == RTL_TEXTENCODING_DONTKNOW )
diff --git a/connectivity/source/drivers/file/FDatabaseMetaData.cxx b/connectivity/source/drivers/file/FDatabaseMetaData.cxx
index f734fbb9924a..e3bc0d7ae89f 100644
--- a/connectivity/source/drivers/file/FDatabaseMetaData.cxx
+++ b/connectivity/source/drivers/file/FDatabaseMetaData.cxx
@@ -89,7 +89,7 @@ namespace
{
aContentURL = INetURLObject( _rFolderOrDoc, INetURLObject::EncodeMechanism::WasEncoded );
aContentURL.Append( _rDocName );
- aContent1 = ::ucbhelper::Content( aContentURL.GetMainURL( INetURLObject::NO_DECODE ), Reference< XCommandEnvironment >(), comphelper::getProcessComponentContext() );
+ aContent1 = ::ucbhelper::Content( aContentURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), Reference< XCommandEnvironment >(), comphelper::getProcessComponentContext() );
}
}
@@ -106,7 +106,7 @@ namespace
INetURLObject aURL2( aContentURL );
if (!sExtension2.isEmpty())
aURL2.SetExtension( sExtension2 );
- if ( aURL2.GetMainURL(INetURLObject::NO_DECODE) == aContentURL.GetMainURL(INetURLObject::NO_DECODE) )
+ if ( aURL2.GetMainURL(INetURLObject::DecodeMechanism::NONE) == aContentURL.GetMainURL(INetURLObject::DecodeMechanism::NONE) )
return -1;
// the second context
@@ -114,7 +114,7 @@ namespace
::ucbhelper::Content aContent2;
try
{
- aContent2 = ::ucbhelper::Content( aURL2.GetMainURL( INetURLObject::NO_DECODE ), Reference< XCommandEnvironment >(), comphelper::getProcessComponentContext() );
+ aContent2 = ::ucbhelper::Content( aURL2.GetMainURL( INetURLObject::DecodeMechanism::NONE ), Reference< XCommandEnvironment >(), comphelper::getProcessComponentContext() );
bCanAccess = aContent2.isDocument();
}
catch( const Exception& )
diff --git a/connectivity/source/drivers/flat/ETable.cxx b/connectivity/source/drivers/flat/ETable.cxx
index 034aa77487ee..54b93c825dee 100644
--- a/connectivity/source/drivers/flat/ETable.cxx
+++ b/connectivity/source/drivers/flat/ETable.cxx
@@ -426,7 +426,7 @@ void OFlatTable::construct()
if(aURL.getExtension() != m_pConnection->getExtension())
aURL.setExtension(m_pConnection->getExtension());
- OUString aFileName = aURL.GetMainURL(INetURLObject::NO_DECODE);
+ OUString aFileName = aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE);
m_pFileStream = createStream_simpleError( aFileName, StreamMode::READWRITE | StreamMode::NOCREATE | StreamMode::SHARE_DENYWRITE);