diff options
author | Noel Grandin <noel@peralex.com> | 2015-01-07 09:28:42 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-01-07 11:20:44 +0200 |
commit | 7f8f277b94704a289fbbd1b836e4e5d66311580d (patch) | |
tree | 2400b7306a0a2a3ea63aee2e5bfc336b52102635 /svtools/source/misc | |
parent | 8db77209e0755d21d9efc34f70a2978d1df5d2c6 (diff) |
fdo#84938: convert STREAM_ #defines to 'enum class'
Change-Id: Ibbf14c7e9a5c1883c1311d4c86f948f74f8e473e
Diffstat (limited to 'svtools/source/misc')
-rw-r--r-- | svtools/source/misc/imap.cxx | 8 | ||||
-rw-r--r-- | svtools/source/misc/imap3.cxx | 8 | ||||
-rw-r--r-- | svtools/source/misc/templatefoldercache.cxx | 2 | ||||
-rw-r--r-- | svtools/source/misc/transfer.cxx | 4 |
4 files changed, 11 insertions, 11 deletions
diff --git a/svtools/source/misc/imap.cxx b/svtools/source/misc/imap.cxx index 6ff356b22ade..37f794cc0d3d 100644 --- a/svtools/source/misc/imap.cxx +++ b/svtools/source/misc/imap.cxx @@ -92,7 +92,7 @@ void IMapObject::Write( SvStream& rOStm, const OUString& rBaseURL ) const rOStm.WriteUChar( bActive ); write_uInt16_lenPrefixed_uInt8s_FromOUString(rOStm, aTarget, eEncoding); - boost::scoped_ptr<IMapCompat> pCompat(new IMapCompat( rOStm, STREAM_WRITE )); + boost::scoped_ptr<IMapCompat> pCompat(new IMapCompat( rOStm, StreamMode::WRITE )); WriteIMapObject( rOStm ); aEventList.Write( rOStm ); // V4 @@ -121,7 +121,7 @@ void IMapObject::Read( SvStream& rIStm, const OUString& rBaseURL ) // make URL absolute aURL = URIHelper::SmartRel2Abs( INetURLObject(rBaseURL), aURL, URIHelper::GetMaybeFileHdl(), true, false, INetURLObject::WAS_ENCODED, INetURLObject::DECODE_UNAMBIGUOUS ); - boost::scoped_ptr<IMapCompat> pCompat(new IMapCompat( rIStm, STREAM_READ )); + boost::scoped_ptr<IMapCompat> pCompat(new IMapCompat( rIStm, StreamMode::READ )); ReadIMapObject( rIStm ); @@ -959,7 +959,7 @@ void ImageMap::Write( SvStream& rOStm, const OUString& rBaseURL ) const rOStm.WriteUInt16( nCount ); write_uInt16_lenPrefixed_uInt8s_FromOUString(rOStm, aImageName, eEncoding); - pCompat = new IMapCompat( rOStm, STREAM_WRITE ); + pCompat = new IMapCompat( rOStm, StreamMode::WRITE ); // here one can insert in newer versions @@ -1001,7 +1001,7 @@ void ImageMap::Read( SvStream& rIStm, const OUString& rBaseURL ) rIStm.ReadUInt16( nCount ); read_uInt16_lenPrefixed_uInt8s_ToOString(rIStm); // Dummy - pCompat = new IMapCompat( rIStm, STREAM_READ ); + pCompat = new IMapCompat( rIStm, StreamMode::READ ); // here one can read in newer versions diff --git a/svtools/source/misc/imap3.cxx b/svtools/source/misc/imap3.cxx index 90114cd4be05..b0a198a7fa53 100644 --- a/svtools/source/misc/imap3.cxx +++ b/svtools/source/misc/imap3.cxx @@ -28,17 +28,17 @@ |* \******************************************************************************/ -IMapCompat::IMapCompat( SvStream& rStm, const sal_uInt16 nStreamMode ) +IMapCompat::IMapCompat( SvStream& rStm, const StreamMode nStreamMode ) : pRWStm(&rStm) , nCompatPos(0) , nTotalSize(0) , nStmMode(nStreamMode) { - DBG_ASSERT( nStreamMode == STREAM_READ || nStreamMode == STREAM_WRITE, "Wrong Mode!" ); + DBG_ASSERT( nStreamMode == StreamMode::READ || nStreamMode == StreamMode::WRITE, "Wrong Mode!" ); if ( !pRWStm->GetError() ) { - if ( nStmMode == STREAM_WRITE ) + if ( nStmMode == StreamMode::WRITE ) { nCompatPos = pRWStm->Tell(); pRWStm->SeekRel( 4 ); @@ -65,7 +65,7 @@ IMapCompat::~IMapCompat() { if ( !pRWStm->GetError() ) { - if ( nStmMode == STREAM_WRITE ) + if ( nStmMode == StreamMode::WRITE ) { const sal_uLong nEndPos = pRWStm->Tell(); diff --git a/svtools/source/misc/templatefoldercache.cxx b/svtools/source/misc/templatefoldercache.cxx index 8d2c992a5bbf..8c1e2a4eadf3 100644 --- a/svtools/source/misc/templatefoldercache.cxx +++ b/svtools/source/misc/templatefoldercache.cxx @@ -763,7 +763,7 @@ namespace svt // open the stream m_pCacheStream = UcbStreamHelper::CreateStream( aStorageURL.GetMainURL( INetURLObject::DECODE_TO_IURI ), - _bForRead ? STREAM_READ | STREAM_NOCREATE : STREAM_WRITE | STREAM_TRUNC ); + _bForRead ? StreamMode::READ | StreamMode::NOCREATE : StreamMode::WRITE | StreamMode::TRUNC ); DBG_ASSERT( m_pCacheStream, "TemplateFolderCacheImpl::openCacheStream: could not open/create the cache stream!" ); if ( m_pCacheStream && m_pCacheStream->GetErrorCode() ) { diff --git a/svtools/source/misc/transfer.cxx b/svtools/source/misc/transfer.cxx index 7bf8f637dfba..81defcc9f04f 100644 --- a/svtools/source/misc/transfer.cxx +++ b/svtools/source/misc/transfer.cxx @@ -350,7 +350,7 @@ Any SAL_CALL TransferableHelper::getTransferData2( const DataFlavor& rFlavor, co if( maAny >>= aSeq ) { - boost::scoped_ptr<SvMemoryStream> pSrcStm(new SvMemoryStream( (char*) aSeq.getConstArray(), aSeq.getLength(), STREAM_WRITE | STREAM_TRUNC )); + boost::scoped_ptr<SvMemoryStream> pSrcStm(new SvMemoryStream( (char*) aSeq.getConstArray(), aSeq.getLength(), StreamMode::WRITE | StreamMode::TRUNC )); GDIMetaFile aMtf; ReadGDIMetaFile( *pSrcStm, aMtf ); @@ -380,7 +380,7 @@ Any SAL_CALL TransferableHelper::getTransferData2( const DataFlavor& rFlavor, co if( maAny >>= aSeq ) { - boost::scoped_ptr<SvMemoryStream> pSrcStm(new SvMemoryStream( (char*) aSeq.getConstArray(), aSeq.getLength(), STREAM_WRITE | STREAM_TRUNC )); + boost::scoped_ptr<SvMemoryStream> pSrcStm(new SvMemoryStream( (char*) aSeq.getConstArray(), aSeq.getLength(), StreamMode::WRITE | StreamMode::TRUNC )); GDIMetaFile aMtf; ReadGDIMetaFile( *pSrcStm, aMtf ); |