diff options
Diffstat (limited to 'sfx2/source/doc')
-rw-r--r-- | sfx2/source/doc/docfile.cxx | 12 | ||||
-rw-r--r-- | sfx2/source/doc/objmisc.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/doc/objstor.cxx | 8 | ||||
-rw-r--r-- | sfx2/source/doc/oleprops.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/doc/sfxbasemodel.cxx | 2 |
5 files changed, 13 insertions, 13 deletions
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx index 6fcd374c269d..8422c5eca23a 100644 --- a/sfx2/source/doc/docfile.cxx +++ b/sfx2/source/doc/docfile.cxx @@ -488,7 +488,7 @@ SvStream* SfxMedium::GetInStream() pImp->m_eError = pImp->m_pInStream->GetError(); - if (!pImp->m_eError && (pImp->m_nStorOpenMode & STREAM_WRITE) + if (!pImp->m_eError && (pImp->m_nStorOpenMode & StreamMode::WRITE) && ! pImp->m_pInStream->IsWritable() ) { pImp->m_eError = ERRCODE_IO_ACCESSDENIED; @@ -667,7 +667,7 @@ bool SfxMedium::Commit() GetInitFileDate( true ); // remove truncation mode from the flags - pImp->m_nStorOpenMode &= (~STREAM_TRUNC); + pImp->m_nStorOpenMode &= (~StreamMode::TRUNC); return bResult; } @@ -2269,7 +2269,7 @@ void SfxMedium::GetMedium_Impl() if ( !bFromTempFile ) { GetItemSet()->Put( SfxStringItem( SID_FILE_NAME, aFileName ) ); - if( !(pImp->m_nStorOpenMode & STREAM_WRITE) ) + if( !(pImp->m_nStorOpenMode & StreamMode::WRITE) ) GetItemSet()->Put( SfxBoolItem( SID_DOC_READONLY, true ) ); if (xInteractionHandler.is()) GetItemSet()->Put( SfxUnoAnyItem( SID_INTERACTIONHANDLER, makeAny(xInteractionHandler) ) ); @@ -2696,7 +2696,7 @@ void SfxMedium::SetIsRemote_Impl() // As files that are written to the remote transmission must also be able // to be read. if (pImp->m_bRemote) - pImp->m_nStorOpenMode |= STREAM_READ; + pImp->m_nStorOpenMode |= StreamMode::READ; } @@ -3180,7 +3180,7 @@ bool SfxMedium::IsReadOnly() const // b) if filter allow read/write contents .. check open mode of the storage if (!bReadOnly) - bReadOnly = !( GetOpenMode() & STREAM_WRITE ); + bReadOnly = !( GetOpenMode() & StreamMode::WRITE ); // c) the API can force the readonly state! if (!bReadOnly) @@ -3250,7 +3250,7 @@ void SfxMedium::CreateTempFile( bool bReplace ) return; } - if ( !(pImp->m_nStorOpenMode & STREAM_TRUNC) ) + if ( !(pImp->m_nStorOpenMode & StreamMode::TRUNC) ) { bool bTransferSuccess = false; diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx index 230d19a461b6..6fe904b6f725 100644 --- a/sfx2/source/doc/objmisc.cxx +++ b/sfx2/source/doc/objmisc.cxx @@ -1271,7 +1271,7 @@ void SfxObjectShell::FinishedLoading( sal_uInt16 nFlags ) else { // if a readonly medium has storage then it's stream is already based on temporary file - if( !(pMedium->GetOpenMode() & STREAM_WRITE) && !pMedium->HasStorage_Impl() ) + if( !(pMedium->GetOpenMode() & StreamMode::WRITE) && !pMedium->HasStorage_Impl() ) // don't lock file opened read only pMedium->CloseInStream(); } diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx index 5d841a710a80..3de8c4918ca8 100644 --- a/sfx2/source/doc/objstor.cxx +++ b/sfx2/source/doc/objstor.cxx @@ -2011,7 +2011,7 @@ bool SfxObjectShell::DoSaveCompleted( SfxMedium* pNewMed ) } else { - if( pMedium->GetOpenMode() & STREAM_WRITE ) + if( pMedium->GetOpenMode() & StreamMode::WRITE ) pMedium->GetInStream(); xStorage = GetStorage(); } @@ -2040,7 +2040,7 @@ bool SfxObjectShell::DoSaveCompleted( SfxMedium* pNewMed ) { if( pMedium ) { - if( pFilter && !IsPackageStorageFormat_Impl( *pMedium ) && (pMedium->GetOpenMode() & STREAM_WRITE )) + if( pFilter && !IsPackageStorageFormat_Impl( *pMedium ) && (pMedium->GetOpenMode() & StreamMode::WRITE )) { pMedium->ReOpen(); bOk = SaveCompletedChildren( false ); @@ -2590,7 +2590,7 @@ bool SfxObjectShell::Save_Impl( const SfxItemSet* pSet ) pFilter = SfxFilterMatcher( OUString::createFromAscii( GetFactory().GetShortName()) ).GetFilter4FilterName( aFilterName ); SfxMedium *pMed = new SfxMedium( - pSalvageItem->GetValue(), STREAM_READWRITE | STREAM_SHARE_DENYWRITE | STREAM_TRUNC, pFilter ); + pSalvageItem->GetValue(), STREAM_READWRITE | StreamMode::SHARE_DENYWRITE | StreamMode::TRUNC, pFilter ); SFX_ITEMSET_ARG( GetMedium()->GetItemSet(), pPasswordItem, SfxStringItem, SID_PASSWORD, false ); if ( pPasswordItem ) @@ -2801,7 +2801,7 @@ bool SfxObjectShell::PreDoSaveAs_Impl pParams = pMergedParams; // create a medium for the target URL - SfxMedium *pNewFile = new SfxMedium( rFileName, STREAM_READWRITE | STREAM_SHARE_DENYWRITE | STREAM_TRUNC, 0, pParams ); + SfxMedium *pNewFile = new SfxMedium( rFileName, STREAM_READWRITE | StreamMode::SHARE_DENYWRITE | StreamMode::TRUNC, 0, pParams ); // set filter; if no filter is given, take the default filter of the factory if ( !aFilterName.isEmpty() ) diff --git a/sfx2/source/doc/oleprops.cxx b/sfx2/source/doc/oleprops.cxx index 9516e31871cb..8eaa6956aedb 100644 --- a/sfx2/source/doc/oleprops.cxx +++ b/sfx2/source/doc/oleprops.cxx @@ -1168,7 +1168,7 @@ ErrCode SfxOlePropertySet::SavePropertySet( SotStorage* pStrg, const OUString& r { if( pStrg ) { - SotStorageStreamRef xStrm = pStrg->OpenSotStream( rStrmName, STREAM_TRUNC | STREAM_STD_WRITE ); + SotStorageStreamRef xStrm = pStrg->OpenSotStream( rStrmName, StreamMode::TRUNC | STREAM_STD_WRITE ); if( xStrm.Is() ) Save( *xStrm ); else diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx index 79fc4e371f3a..96ea1b99fe20 100644 --- a/sfx2/source/doc/sfxbasemodel.cxx +++ b/sfx2/source/doc/sfxbasemodel.cxx @@ -1989,7 +1989,7 @@ Any SAL_CALL SfxBaseModel::getTransferData( const datatransfer::DataFlavor& aFla utl::TempFile aTmp; aTmp.EnableKillingFile( true ); storeToURL( aTmp.GetURL(), Sequence < beans::PropertyValue >() ); - SvStream* pStream = aTmp.GetStream( STREAM_READ ); + SvStream* pStream = aTmp.GetStream( StreamMode::READ ); const sal_uInt32 nLen = pStream->Seek( STREAM_SEEK_TO_END ); Sequence< sal_Int8 > aSeq( nLen ); pStream->Seek( STREAM_SEEK_TO_BEGIN ); |