summaryrefslogtreecommitdiff
path: root/sot/source/sdstor
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-05-07 10:52:27 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-05-07 11:05:07 +0200
commit9b1b3c9fdd6022fd8547af19cce62ce18ed6e383 (patch)
treecff3a503414c4898dd1956f0ad81fad8e8920fdf /sot/source/sdstor
parent79d853e31826c9e8b7e86bf90e5c1f9b7dd0c43a (diff)
Reduce enum class StorageMode to bool transacted
Change-Id: I04e53d7de9f2f26e9338a82f7d5ae5dab1682712
Diffstat (limited to 'sot/source/sdstor')
-rw-r--r--sot/source/sdstor/storage.cxx20
1 files changed, 10 insertions, 10 deletions
diff --git a/sot/source/sdstor/storage.cxx b/sot/source/sdstor/storage.cxx
index 4d32dc2ca2f3..faa6fcd5d787 100644
--- a/sot/source/sdstor/storage.cxx
+++ b/sot/source/sdstor/storage.cxx
@@ -337,12 +337,12 @@ SotStorage::SotStorage( const OUString & rName, StreamMode nMode, bool transacte
INIT_SotStorage()
{
m_aName = rName; // Namen merken
- CreateStorage( true, nMode, transacted ? StorageMode::Transacted : StorageMode::Default );
+ CreateStorage( true, nMode, transacted );
if ( IsOLEStorage() )
m_nVersion = SOFFICE_FILEFORMAT_50;
}
-void SotStorage::CreateStorage( bool bForceUCBStorage, StreamMode nMode, StorageMode nStorageMode )
+void SotStorage::CreateStorage( bool bForceUCBStorage, StreamMode nMode, bool transacted )
{
DBG_ASSERT( !m_pStorStm && !m_pOwnStg, "Use only in ctor!" );
if( !m_aName.isEmpty() )
@@ -378,31 +378,31 @@ 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 & StorageMode::Transacted) );
+ m_pOwnStg = new UCBStorage( *m_pStorStm, !transacted );
m_bDelStm = true;
}
else
{
// UCBStorage always works directly on the UCB content, so discard the stream first
DELETEZ( m_pStorStm );
- m_pOwnStg = new UCBStorage( m_aName, nMode, !(nStorageMode & StorageMode::Transacted) );
+ m_pOwnStg = new UCBStorage( m_aName, nMode, !transacted );
}
}
else
{
// OLEStorage can be opened with a stream
- m_pOwnStg = new Storage( *m_pStorStm, !(nStorageMode & StorageMode::Transacted) );
+ m_pOwnStg = new Storage( *m_pStorStm, !transacted );
m_bDelStm = true;
}
}
else if ( bForceUCBStorage )
{
- m_pOwnStg = new UCBStorage( m_aName, nMode, !(nStorageMode & StorageMode::Transacted) );
+ m_pOwnStg = new UCBStorage( m_aName, nMode, !transacted );
SetError( ERRCODE_IO_NOTSUPPORTED );
}
else
{
- m_pOwnStg = new Storage( m_aName, nMode, !(nStorageMode & StorageMode::Transacted) );
+ m_pOwnStg = new Storage( m_aName, nMode, !transacted );
SetError( ERRCODE_IO_NOTSUPPORTED );
}
}
@@ -410,9 +410,9 @@ void SotStorage::CreateStorage( bool bForceUCBStorage, StreamMode nMode, Storage
{
// temporary storage
if ( bForceUCBStorage )
- m_pOwnStg = new UCBStorage( m_aName, nMode, !(nStorageMode & StorageMode::Transacted) );
+ m_pOwnStg = new UCBStorage( m_aName, nMode, !transacted );
else
- m_pOwnStg = new Storage( m_aName, nMode, !(nStorageMode & StorageMode::Transacted) );
+ m_pOwnStg = new Storage( m_aName, nMode, !transacted );
m_aName = m_pOwnStg->GetName();
}
@@ -425,7 +425,7 @@ SotStorage::SotStorage( bool bUCBStorage, const OUString & rName, StreamMode nMo
INIT_SotStorage()
{
m_aName = rName;
- CreateStorage( bUCBStorage, nMode, StorageMode::Default );
+ CreateStorage( bUCBStorage, nMode, false );
if ( IsOLEStorage() )
m_nVersion = SOFFICE_FILEFORMAT_50;
}