diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-04-24 12:33:28 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-04-24 12:36:27 +0200 |
commit | f98ef646e462db3ee7c7242f6b288c5fc2d05a78 (patch) | |
tree | dfe5ac7d0e5f3d6fd526ce541ce22a74c8e36b25 /sot | |
parent | 76e8c614f7bbd74ddd8411b437b3c29f00d7b38d (diff) |
loplugin:simplifybool
Change-Id: If2d2970160803bcaa1feabb8274f83bba0ba722c
Diffstat (limited to 'sot')
-rw-r--r-- | sot/source/sdstor/storage.cxx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sot/source/sdstor/storage.cxx b/sot/source/sdstor/storage.cxx index 46fa4e53deae..f278cc7a967b 100644 --- a/sot/source/sdstor/storage.cxx +++ b/sot/source/sdstor/storage.cxx @@ -403,7 +403,7 @@ void SotStorage::CreateStorage( bool bForceUCBStorage, StreamMode nMode, Storage if ( !(UCBStorage::GetLinkedFile( *m_pStorStm ).isEmpty()) ) { // 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; } else @@ -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 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 { // 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; } } 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 ); } 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 ); } } @@ -440,9 +440,9 @@ void SotStorage::CreateStorage( bool bForceUCBStorage, StreamMode nMode, Storage { // temporary storage 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 - 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(); } @@ -701,7 +701,7 @@ SotStorageStream * SotStorage::OpenSotStream( const OUString & rEleName, nMode |= StreamMode::SHARE_DENYALL; ErrCode nE = m_pOwnStg->GetError(); BaseStorageStream * p = m_pOwnStg->OpenStream( rEleName, nMode, - (nStorageMode & STORAGE_TRANSACTED) ? false : true ); + (nStorageMode & STORAGE_TRANSACTED) == 0 ); pStm = new SotStorageStream( p ); if( !nE ) |