diff options
author | Matteo Casalin <matteo.casalin@yahoo.com> | 2015-09-19 10:56:57 +0200 |
---|---|---|
committer | Matteo Casalin <matteo.casalin@yahoo.com> | 2015-10-27 13:59:09 +0100 |
commit | d1eb389d7081276bb08f4cf3be16e5301a4c39cb (patch) | |
tree | 8428f085d6d8def34f6f68090e2645530a45b768 /sot | |
parent | f8dac0391c4aa6d4d378919326aacd935d7bd462 (diff) |
sal_uLong/long to ErrCode
Change-Id: I2ba2d867785765e4850c60070e86419f66e25f57
Diffstat (limited to 'sot')
-rw-r--r-- | sot/source/sdstor/stg.cxx | 10 | ||||
-rw-r--r-- | sot/source/sdstor/stgcache.cxx | 2 | ||||
-rw-r--r-- | sot/source/sdstor/stgcache.hxx | 6 | ||||
-rw-r--r-- | sot/source/sdstor/stgio.cxx | 6 | ||||
-rw-r--r-- | sot/source/sdstor/storage.cxx | 2 | ||||
-rw-r--r-- | sot/source/sdstor/ucbstorage.cxx | 16 |
6 files changed, 21 insertions, 21 deletions
diff --git a/sot/source/sdstor/stg.cxx b/sot/source/sdstor/stg.cxx index 5156525fbad9..3ee94cfca56f 100644 --- a/sot/source/sdstor/stg.cxx +++ b/sot/source/sdstor/stg.cxx @@ -62,14 +62,14 @@ StorageBase::~StorageBase() // The following three methods are declared as const, since they // may be called from within a const method. -sal_uLong StorageBase::GetError() const +ErrCode StorageBase::GetError() const { - sal_uLong n = m_nError; + const ErrCode n = m_nError; m_nError = SVSTREAM_OK; return n; } -void StorageBase::SetError( sal_uLong n ) const +void StorageBase::SetError( ErrCode n ) const { if( !m_nError ) m_nError = n; @@ -689,7 +689,7 @@ bool Storage::CopyTo( const OUString& rElem, BaseStorage* pDest, const OUString& if ( p2 ) { - sal_uLong nTmpErr = p2->GetError(); + ErrCode nTmpErr = p2->GetError(); if( !nTmpErr ) { p2->SetClassId( p1->GetClassId() ); @@ -718,7 +718,7 @@ bool Storage::CopyTo( const OUString& rElem, BaseStorage* pDest, const OUString& if ( p2 ) { - sal_uLong nTmpErr = p2->GetError(); + ErrCode nTmpErr = p2->GetError(); if( !nTmpErr ) { p1->CopyTo( p2 ); diff --git a/sot/source/sdstor/stgcache.cxx b/sot/source/sdstor/stgcache.cxx index 0ca0e2d4b952..d3b2ec2af99e 100644 --- a/sot/source/sdstor/stgcache.cxx +++ b/sot/source/sdstor/stgcache.cxx @@ -392,7 +392,7 @@ bool StgCache::SetSize( sal_Int32 n ) return Good(); } -void StgCache::SetError( sal_uLong n ) +void StgCache::SetError( ErrCode n ) { if( n && !m_nError ) m_nError = n; diff --git a/sot/source/sdstor/stgcache.hxx b/sot/source/sdstor/stgcache.hxx index 05953b914d85..97cada204e74 100644 --- a/sot/source/sdstor/stgcache.hxx +++ b/sot/source/sdstor/stgcache.hxx @@ -45,7 +45,7 @@ class StgCache typedef std::vector< rtl::Reference< StgPage > > LRUList; - sal_uLong m_nError; // error code + ErrCode m_nError; // error code sal_Int32 m_nPages; // size of data area in pages sal_uInt16 m_nRef; // reference count IndexToStgPage maDirtyPages; // hash of all dirty pages @@ -74,9 +74,9 @@ public: void SetStrm( UCBStorageStream* ); bool IsWritable() { return ( m_pStrm && m_pStrm->IsWritable() ); } bool Good() { return m_nError == SVSTREAM_OK; } - sal_uLong GetError() { return m_nError; } + ErrCode GetError() { return m_nError; } void MoveError( StorageBase& ); - void SetError( sal_uLong ); + void SetError( ErrCode ); void ResetError(); bool Open( const OUString& rName, StreamMode ); void Close(); diff --git a/sot/source/sdstor/stgio.cxx b/sot/source/sdstor/stgio.cxx index c73811a4f9d8..350d0d612ea8 100644 --- a/sot/source/sdstor/stgio.cxx +++ b/sot/source/sdstor/stgio.cxx @@ -127,12 +127,12 @@ bool StgIo::CommitAll() if( m_aHdr.Store( *this ) ) { m_pStrm->Flush(); - sal_uLong n = m_pStrm->GetError(); + const ErrCode n = pStrm->GetError(); SetError( n ); #ifdef DBG_UTIL - if( n==0 ) ValidateFATs(); + if( n==SVSTREAM_OK ) ValidateFATs(); #endif - return n == 0; + return n == SVSTREAM_OK; } } } diff --git a/sot/source/sdstor/storage.cxx b/sot/source/sdstor/storage.cxx index 98fd81692631..77adacd7d19c 100644 --- a/sot/source/sdstor/storage.cxx +++ b/sot/source/sdstor/storage.cxx @@ -469,7 +469,7 @@ SotStorage::SotStorage( BaseStorage * pStor ) } m_pOwnStg = pStor; - sal_uLong nErr = m_pOwnStg ? m_pOwnStg->GetError() : SVSTREAM_CANNOT_MAKE; + const ErrCode nErr = m_pOwnStg ? m_pOwnStg->GetError() : SVSTREAM_CANNOT_MAKE; SetError( nErr ); if ( IsOLEStorage() ) m_nVersion = SOFFICE_FILEFORMAT_50; diff --git a/sot/source/sdstor/ucbstorage.cxx b/sot/source/sdstor/ucbstorage.cxx index b2b5efc8e62a..878af65e5210 100644 --- a/sot/source/sdstor/ucbstorage.cxx +++ b/sot/source/sdstor/ucbstorage.cxx @@ -428,7 +428,7 @@ public: // for read/write streams it's a copy into a temporary file OUString m_aTempURL; // URL of this temporary stream RepresentModes m_nRepresentMode; // should it be used as XInputStream or as SvStream - long m_nError; + ErrCode m_nError; StreamMode m_nMode; // open mode ( read/write/trunc/nocreate/sharing ) bool m_bSourceRead; // Source still contains useful information bool m_bModified; // only modified streams will be sent to the original content @@ -457,7 +457,7 @@ public: // but the writing is done at the end of temporary // pointer position is not changed using SvStream::SetError; - void SetError( sal_uInt32 nError ); + void SetError( ErrCode nError ); void PrepareCachedForReopen( StreamMode nMode ); }; @@ -480,7 +480,7 @@ public: ::ucbhelper::Content* m_pContent; // the content that provides the storage elements ::utl::TempFile* m_pTempFile; // temporary file, only for storages on stream SvStream* m_pSource; // original stream, only for storages on a stream - long m_nError; + ErrCode m_nError; StreamMode m_nMode; // open mode ( read/write/trunc/nocreate/sharing ) bool m_bModified; // only modified elements will be sent to the original content bool m_bCommited; // sending the streams is coordinated by the root storage of the package @@ -524,7 +524,7 @@ public: } UCBStorageElementList_Impl& GetChildrenList() { - long nError = m_nError; + const ErrCode nError = m_nError; ReadContent(); if ( m_nMode & StreamMode::WRITE ) { @@ -538,7 +538,7 @@ public: return m_aChildrenList; } - void SetError( long nError ); + void SetError( ErrCode nError ); }; typedef tools::SvRef<UCBStorage_Impl> UCBStorage_ImplRef; @@ -1038,7 +1038,7 @@ void UCBStorageStream_Impl::FlushData() m_bCommited = true; } -void UCBStorageStream_Impl::SetError( sal_uInt32 nErr ) +void UCBStorageStream_Impl::SetError( ErrCode nErr ) { if ( !m_nError ) { @@ -1078,7 +1078,7 @@ BaseStorage* UCBStorageStream_Impl::CreateStorage() Storage *pStorage = new Storage( *pNewStorageStream, m_bDirect ); // GetError() call cleares error code for OLE storages, must be changed in future - long nTmpErr = pStorage->GetError(); + const ErrCode nTmpErr = pStorage->GetError(); pStorage->SetError( nTmpErr ); m_bIsOLEStorage = !nTmpErr; @@ -1882,7 +1882,7 @@ void UCBStorage_Impl::ReadContent() } } -void UCBStorage_Impl::SetError( long nError ) +void UCBStorage_Impl::SetError( ErrCode nError ) { if ( !m_nError ) { |