diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-06-05 15:02:51 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-06-06 08:15:57 +0200 |
commit | de8caac6bee3237ba634e7dce2e4635dc8bba57b (patch) | |
tree | 9260fb99b4f6de1619df46a11aa388ad8d42db63 /tools | |
parent | 690f2f5c4633780734a63305fd16733fb1344c74 (diff) |
replace SVSTREAM_OK with ERRCODE_NONE
since the first is #define'd to the second, and offers no extra value
Change-Id: I2c67e09ea3aa5361b8e7dfe7a20858c6ae054450
Reviewed-on: https://gerrit.libreoffice.org/38406
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/source/ref/pstm.cxx | 2 | ||||
-rw-r--r-- | tools/source/stream/stream.cxx | 12 | ||||
-rw-r--r-- | tools/source/stream/strmunx.cxx | 4 | ||||
-rw-r--r-- | tools/source/stream/strmwnt.cxx | 2 |
4 files changed, 10 insertions, 10 deletions
diff --git a/tools/source/ref/pstm.cxx b/tools/source/ref/pstm.cxx index 5e9a7b450f3d..77856390e2a6 100644 --- a/tools/source/ref/pstm.cxx +++ b/tools/source/ref/pstm.cxx @@ -441,7 +441,7 @@ void SvPersistStream::ReadObj OSL_FAIL( "false version" ); } - if( !(nHdr & P_ID_0) && GetError() == SVSTREAM_OK ) + if( !(nHdr & P_ID_0) && GetError() == ERRCODE_NONE ) { if( P_OBJ & nHdr ) { // read object, nId only set for P_DBGUTIL diff --git a/tools/source/stream/stream.cxx b/tools/source/stream/stream.cxx index 488348719892..a91e6bf16341 100644 --- a/tools/source/stream/stream.cxx +++ b/tools/source/stream/stream.cxx @@ -370,12 +370,12 @@ SvStream::~SvStream() void SvStream::ClearError() { m_isEof = false; - m_nError = SVSTREAM_OK; + m_nError = ERRCODE_NONE; } void SvStream::SetError( sal_uInt32 nErrorCode ) { - if (m_nError == SVSTREAM_OK) + if (m_nError == ERRCODE_NONE) m_nError = nErrorCode; } @@ -691,13 +691,13 @@ bool SvStream::WriteUnicodeOrByteText( const OUString& rStr, rtl_TextEncoding eD if ( eDestCharSet == RTL_TEXTENCODING_UNICODE ) { write_uInt16s_FromOUString(*this, rStr, rStr.getLength()); - return m_nError == SVSTREAM_OK; + return m_nError == ERRCODE_NONE; } else { OString aStr(OUStringToOString(rStr, eDestCharSet)); write_uInt8s_FromOString(*this, aStr, aStr.getLength()); - return m_nError == SVSTREAM_OK; + return m_nError == ERRCODE_NONE; } } @@ -710,7 +710,7 @@ bool SvStream::WriteLine(const OString& rStr) { WriteBytes(rStr.getStr(), rStr.getLength()); endl(*this); - return m_nError == SVSTREAM_OK; + return m_nError == ERRCODE_NONE; } bool SvStream::WriteUniOrByteChar( sal_Unicode ch, rtl_TextEncoding eDestCharSet ) @@ -722,7 +722,7 @@ bool SvStream::WriteUniOrByteChar( sal_Unicode ch, rtl_TextEncoding eDestCharSet OString aStr(&ch, 1, eDestCharSet); WriteBytes(aStr.getStr(), aStr.getLength()); } - return m_nError == SVSTREAM_OK; + return m_nError == ERRCODE_NONE; } void SvStream::StartWritingUnicodeText() diff --git a/tools/source/stream/strmunx.cxx b/tools/source/stream/strmunx.cxx index 5267a6914d2b..46d0bb79c9dc 100644 --- a/tools/source/stream/strmunx.cxx +++ b/tools/source/stream/strmunx.cxx @@ -181,7 +181,7 @@ static sal_uInt32 GetSvError( int nErrno ) { static struct { int nErr; sal_uInt32 sv; } errArr[] = { - { 0, SVSTREAM_OK }, + { 0, ERRCODE_NONE }, { EACCES, SVSTREAM_ACCESS_DENIED }, { EBADF, SVSTREAM_INVALID_HANDLE }, #if defined(NETBSD) || \ @@ -233,7 +233,7 @@ static sal_uInt32 GetSvError( oslFileError nErrno ) { static struct { oslFileError nErr; sal_uInt32 sv; } errArr[] = { - { osl_File_E_None, SVSTREAM_OK }, + { osl_File_E_None, ERRCODE_NONE }, { osl_File_E_ACCES, SVSTREAM_ACCESS_DENIED }, { osl_File_E_BADF, SVSTREAM_INVALID_HANDLE }, { osl_File_E_DEADLK, SVSTREAM_LOCKING_VIOLATION }, diff --git a/tools/source/stream/strmwnt.cxx b/tools/source/stream/strmwnt.cxx index f222bbd7af2b..cfd84f39d7bc 100644 --- a/tools/source/stream/strmwnt.cxx +++ b/tools/source/stream/strmwnt.cxx @@ -48,7 +48,7 @@ static std::size_t GetSvError( DWORD nWntError ) { static struct { DWORD wnt; std::size_t sv; } errArr[] = { - { ERROR_SUCCESS, SVSTREAM_OK }, + { ERROR_SUCCESS, ERRCODE_NONE }, { ERROR_ACCESS_DENIED, SVSTREAM_ACCESS_DENIED }, { ERROR_ACCOUNT_DISABLED, SVSTREAM_ACCESS_DENIED }, { ERROR_ACCOUNT_EXPIRED, SVSTREAM_ACCESS_DENIED }, |