summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-06-05 15:02:51 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-06-06 08:15:57 +0200
commitde8caac6bee3237ba634e7dce2e4635dc8bba57b (patch)
tree9260fb99b4f6de1619df46a11aa388ad8d42db63 /sfx2
parent690f2f5c4633780734a63305fd16733fb1344c74 (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 'sfx2')
-rw-r--r--sfx2/source/doc/docfile.cxx12
-rw-r--r--sfx2/source/doc/objstor.cxx4
-rw-r--r--sfx2/source/doc/oleprops.cxx8
3 files changed, 12 insertions, 12 deletions
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index 30d7eb19b0a7..82aaa9468953 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -244,7 +244,7 @@ public:
SfxMedium_Impl::SfxMedium_Impl() :
m_nStorOpenMode(SFX_STREAM_READWRITE),
- m_eError(SVSTREAM_OK),
+ m_eError(ERRCODE_NONE),
bUpdatePickList(true),
bIsTemp( false ),
bDownloadDone( true ),
@@ -291,7 +291,7 @@ SfxMedium_Impl::~SfxMedium_Impl()
void SfxMedium::ResetError()
{
- pImpl->m_eError = SVSTREAM_OK;
+ pImpl->m_eError = ERRCODE_NONE;
if( pImpl->m_pInStream )
pImpl->m_pInStream->ResetError();
if( pImpl->m_pOutStream )
@@ -649,13 +649,13 @@ bool SfxMedium::Commit()
else if( pImpl->m_pInStream )
pImpl->m_pInStream->Flush();
- if ( GetError() == SVSTREAM_OK )
+ if ( GetError() == ERRCODE_NONE )
{
// does something only in case there is a temporary file ( means aName points to different location than aLogicName )
Transfer_Impl();
}
- bool bResult = ( GetError() == SVSTREAM_OK );
+ bool bResult = ( GetError() == ERRCODE_NONE );
if ( bResult && DocNeedsFileDateCheck() )
GetInitFileDate( true );
@@ -1353,7 +1353,7 @@ uno::Reference < embed::XStorage > SfxMedium::GetStorage( bool bCreateTempIfNo )
// impossibility to create the storage is no error
}
- if( ( pImpl->nLastStorageError = GetError() ) != SVSTREAM_OK )
+ if( ( pImpl->nLastStorageError = GetError() ) != ERRCODE_NONE )
{
pImpl->xStorage = nullptr;
if ( pImpl->m_pInStream )
@@ -1399,7 +1399,7 @@ uno::Reference < embed::XStorage > SfxMedium::GetStorage( bool bCreateTempIfNo )
// There the version is stored as packed Stream
uno::Reference < io::XStream > xStr = xSub->openStreamElement( rTag.Identifier, embed::ElementModes::READ );
SvStream* pStream = utl::UcbStreamHelper::CreateStream( xStr );
- if ( pStream && pStream->GetError() == SVSTREAM_OK )
+ if ( pStream && pStream->GetError() == ERRCODE_NONE )
{
// Unpack Stream in TempDir
::utl::TempFile aTempFile;
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index 759cc16b987c..5c0a26a900a7 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -2105,7 +2105,7 @@ bool SfxObjectShell::ConvertFrom
*xStream >> ...;
// Do not call 'rMedium.CloseInStream()'! Keep File locked!
- return SVSTREAM_OK == rMedium.GetError();
+ return ERRCODE_NONE == rMedium.GetError();
}
return false;
@@ -2430,7 +2430,7 @@ bool SfxObjectShell::ConvertTo
*xStream << ...;
rMedium.CloseOutStream(); // opens the InStream automatically
- return SVSTREAM_OK == rMedium.GetError();
+ return ERRCODE_NONE == rMedium.GetError();
}
return false ;
}
diff --git a/sfx2/source/doc/oleprops.cxx b/sfx2/source/doc/oleprops.cxx
index 318f981ee460..d5e7348a8945 100644
--- a/sfx2/source/doc/oleprops.cxx
+++ b/sfx2/source/doc/oleprops.cxx
@@ -688,7 +688,7 @@ void SfxOleDictionaryProperty::ImplLoad( SvStream& rStrm )
sal_Int32 nNameCount = GetPropType();
// read property ID/name pairs
maPropNameMap.clear();
- for( sal_Int32 nIdx = 0; (nIdx < nNameCount) && (rStrm.GetErrorCode() == SVSTREAM_OK) && !rStrm.IsEof(); ++nIdx )
+ for( sal_Int32 nIdx = 0; (nIdx < nNameCount) && (rStrm.GetErrorCode() == ERRCODE_NONE) && !rStrm.IsEof(); ++nIdx )
{
sal_Int32 nPropId(0);
rStrm.ReadInt32( nPropId );
@@ -953,7 +953,7 @@ void SfxOleSection::ImplLoad( SvStream& rStrm )
// read property ID/position pairs
typedef ::std::map< sal_Int32, sal_uInt32 > SfxOlePropPosMap;
SfxOlePropPosMap aPropPosMap;
- for( sal_Int32 nPropIdx = 0; (nPropIdx < nPropCount) && (rStrm.GetErrorCode() == SVSTREAM_OK) && !rStrm.IsEof(); ++nPropIdx )
+ for( sal_Int32 nPropIdx = 0; (nPropIdx < nPropCount) && (rStrm.GetErrorCode() == ERRCODE_NONE) && !rStrm.IsEof(); ++nPropIdx )
{
sal_Int32 nPropId(0);
sal_uInt32 nPropPos(0);
@@ -1034,7 +1034,7 @@ void SfxOleSection::ImplSave( SvStream& rStrm )
bool SfxOleSection::SeekToPropertyPos( SvStream& rStrm, sal_uInt32 nPropPos ) const
{
rStrm.Seek( static_cast< std::size_t >( mnStartPos + nPropPos ) );
- return rStrm.GetErrorCode() == SVSTREAM_OK;
+ return rStrm.GetErrorCode() == ERRCODE_NONE;
}
void SfxOleSection::LoadProperty( SvStream& rStrm, sal_Int32 nPropId )
@@ -1099,7 +1099,7 @@ ErrCode SfxOlePropertySet::LoadPropertySet( SotStorage* pStrg, const OUString& r
if( pStrg )
{
tools::SvRef<SotStorageStream> xStrm = pStrg->OpenSotStream( rStrmName, StreamMode::STD_READ );
- if( xStrm.is() && (xStrm->GetError() == SVSTREAM_OK) )
+ if( xStrm.is() && (xStrm->GetError() == ERRCODE_NONE) )
{
xStrm->SetBufferSize( STREAM_BUFFER_SIZE );
Load( *xStrm );