diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-12-05 08:47:18 +0200 |
---|---|---|
committer | Ashod Nakashian <ashod.nakashian@collabora.co.uk> | 2017-12-18 01:07:53 -0500 |
commit | 3c4333c24882d6699b65d109f2cfbf7daf3122c6 (patch) | |
tree | 739dacdd38ddd2053aaa3ad7f0ffc053eb515d52 /connectivity | |
parent | 6b631a02d36aa09f7c06793e8b4482d3b67ab258 (diff) |
convert DecodeMechanism to scoped enum
(cherry picked from commit bfde4866e07746eafa2f0d6173c29d805cc35ad0)
(cherry picked from commit 3de922d4a695e253d4ca2d42b70e0b35b52e9b7c)
Change-Id: I5c56634b1bca8e37fa73d02d2428645301b6c547
Diffstat (limited to 'connectivity')
-rw-r--r-- | connectivity/source/drivers/calc/CConnection.cxx | 2 | ||||
-rw-r--r-- | connectivity/source/drivers/dbase/DTable.cxx | 30 | ||||
-rw-r--r-- | connectivity/source/drivers/file/FConnection.cxx | 2 | ||||
-rw-r--r-- | connectivity/source/drivers/file/FDatabaseMetaData.cxx | 6 | ||||
-rw-r--r-- | connectivity/source/drivers/flat/ETable.cxx | 2 |
5 files changed, 21 insertions, 21 deletions
diff --git a/connectivity/source/drivers/calc/CConnection.cxx b/connectivity/source/drivers/calc/CConnection.cxx index 75746504ef97..8503c7ce28b0 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 06d709032757..d2669d4476b6 100644 --- a/connectivity/source/drivers/dbase/DTable.cxx +++ b/connectivity/source/drivers/dbase/DTable.cxx @@ -533,10 +533,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(); @@ -709,7 +709,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()); @@ -1056,11 +1056,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)) { @@ -1083,7 +1083,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 @@ -1100,7 +1100,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 @@ -1111,7 +1111,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&) @@ -1129,7 +1129,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&) @@ -1174,7 +1174,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; @@ -1420,7 +1420,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; @@ -1441,14 +1441,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) @@ -1472,7 +1472,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&) @@ -2347,7 +2347,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 91318179fd78..65f492392bfc 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); |