Kaydet (Commit) f98ef646 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

loplugin:simplifybool

Change-Id: If2d2970160803bcaa1feabb8274f83bba0ba722c
üst 76e8c614
...@@ -403,7 +403,7 @@ void SotStorage::CreateStorage( bool bForceUCBStorage, StreamMode nMode, Storage ...@@ -403,7 +403,7 @@ void SotStorage::CreateStorage( bool bForceUCBStorage, StreamMode nMode, Storage
if ( !(UCBStorage::GetLinkedFile( *m_pStorStm ).isEmpty()) ) if ( !(UCBStorage::GetLinkedFile( *m_pStorStm ).isEmpty()) )
{ {
// detect special unpacked storages // detect special unpacked storages
m_pOwnStg = new UCBStorage( *m_pStorStm, (nStorageMode & STORAGE_TRANSACTED) ? false : true ); m_pOwnStg = new UCBStorage( *m_pStorStm, (nStorageMode & STORAGE_TRANSACTED) == 0 );
m_bDelStm = true; m_bDelStm = true;
} }
else else
...@@ -414,24 +414,24 @@ void SotStorage::CreateStorage( bool bForceUCBStorage, StreamMode nMode, Storage ...@@ -414,24 +414,24 @@ void SotStorage::CreateStorage( bool bForceUCBStorage, StreamMode nMode, Storage
// UCBStorage always works directly on the UCB content, so discard the stream first // UCBStorage always works directly on the UCB content, so discard the stream first
DELETEZ( m_pStorStm ); DELETEZ( m_pStorStm );
m_pOwnStg = new UCBStorage( m_aName, nMode, (nStorageMode & STORAGE_TRANSACTED) ? false : true ); m_pOwnStg = new UCBStorage( m_aName, nMode, (nStorageMode & STORAGE_TRANSACTED) == 0 );
} }
} }
else else
{ {
// OLEStorage can be opened with a stream // OLEStorage can be opened with a stream
m_pOwnStg = new Storage( *m_pStorStm, (nStorageMode & STORAGE_TRANSACTED) ? false : true ); m_pOwnStg = new Storage( *m_pStorStm, (nStorageMode & STORAGE_TRANSACTED) == 0 );
m_bDelStm = true; m_bDelStm = true;
} }
} }
else if ( bForceUCBStorage ) else if ( bForceUCBStorage )
{ {
m_pOwnStg = new UCBStorage( m_aName, nMode, (nStorageMode & STORAGE_TRANSACTED) ? false : true ); m_pOwnStg = new UCBStorage( m_aName, nMode, (nStorageMode & STORAGE_TRANSACTED) == 0 );
SetError( ERRCODE_IO_NOTSUPPORTED ); SetError( ERRCODE_IO_NOTSUPPORTED );
} }
else else
{ {
m_pOwnStg = new Storage( m_aName, nMode, (nStorageMode & STORAGE_TRANSACTED) ? false : true ); m_pOwnStg = new Storage( m_aName, nMode, (nStorageMode & STORAGE_TRANSACTED) == 0 );
SetError( ERRCODE_IO_NOTSUPPORTED ); SetError( ERRCODE_IO_NOTSUPPORTED );
} }
} }
...@@ -440,9 +440,9 @@ void SotStorage::CreateStorage( bool bForceUCBStorage, StreamMode nMode, Storage ...@@ -440,9 +440,9 @@ void SotStorage::CreateStorage( bool bForceUCBStorage, StreamMode nMode, Storage
{ {
// temporary storage // temporary storage
if ( bForceUCBStorage ) if ( bForceUCBStorage )
m_pOwnStg = new UCBStorage( m_aName, nMode, (nStorageMode & STORAGE_TRANSACTED) ? false : true ); m_pOwnStg = new UCBStorage( m_aName, nMode, (nStorageMode & STORAGE_TRANSACTED) == 0 );
else else
m_pOwnStg = new Storage( m_aName, nMode, (nStorageMode & STORAGE_TRANSACTED) ? false : true ); m_pOwnStg = new Storage( m_aName, nMode, (nStorageMode & STORAGE_TRANSACTED) == 0 );
m_aName = m_pOwnStg->GetName(); m_aName = m_pOwnStg->GetName();
} }
...@@ -701,7 +701,7 @@ SotStorageStream * SotStorage::OpenSotStream( const OUString & rEleName, ...@@ -701,7 +701,7 @@ SotStorageStream * SotStorage::OpenSotStream( const OUString & rEleName,
nMode |= StreamMode::SHARE_DENYALL; nMode |= StreamMode::SHARE_DENYALL;
ErrCode nE = m_pOwnStg->GetError(); ErrCode nE = m_pOwnStg->GetError();
BaseStorageStream * p = m_pOwnStg->OpenStream( rEleName, nMode, BaseStorageStream * p = m_pOwnStg->OpenStream( rEleName, nMode,
(nStorageMode & STORAGE_TRANSACTED) ? false : true ); (nStorageMode & STORAGE_TRANSACTED) == 0 );
pStm = new SotStorageStream( p ); pStm = new SotStorageStream( p );
if( !nE ) if( !nE )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment