diff options
Diffstat (limited to 'sfx2/source/doc/docfile.cxx')
-rw-r--r-- | sfx2/source/doc/docfile.cxx | 74 |
1 files changed, 37 insertions, 37 deletions
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx index 434553bdb226..63b116ef75e8 100644 --- a/sfx2/source/doc/docfile.cxx +++ b/sfx2/source/doc/docfile.cxx @@ -727,7 +727,7 @@ const String& SfxMedium::GetPhysicalName() const //------------------------------------------------------------------ void SfxMedium::CreateFileStream() { - ForceSynchronStream_Impl( TRUE ); + ForceSynchronStream_Impl( sal_True ); GetInStream(); if( pInStream ) { @@ -767,7 +767,7 @@ sal_Bool SfxMedium::Commit() sal_Bool SfxMedium::IsStorage() { if ( pImp->xStorage.is() ) - return TRUE; + return sal_True; if ( bTriedStorage ) return pImp->bIsStorage; @@ -781,13 +781,13 @@ sal_Bool SfxMedium::IsStorage() } pImp->bIsStorage = SotStorage::IsStorageFile( aURL ) && !SotStorage::IsOLEStorage( aURL); if ( !pImp->bIsStorage ) - bTriedStorage = TRUE; + bTriedStorage = sal_True; } else if ( GetInStream() ) { pImp->bIsStorage = SotStorage::IsStorageFile( pInStream ) && !SotStorage::IsOLEStorage( pInStream ); if ( !pInStream->GetError() && !pImp->bIsStorage ) - bTriedStorage = TRUE; + bTriedStorage = sal_True; } return pImp->bIsStorage; @@ -1225,7 +1225,7 @@ sal_Bool SfxMedium::LockOrigFileOnDemand( sal_Bool bLoading, sal_Bool bNoUI ) // the error should be set in case it is storing process // or the document has been opened for editing explicitly - SFX_ITEMSET_ARG( pSet, pReadOnlyItem, SfxBoolItem, SID_DOC_READONLY, FALSE ); + SFX_ITEMSET_ARG( pSet, pReadOnlyItem, SfxBoolItem, SID_DOC_READONLY, sal_False ); if ( !bLoading || (pReadOnlyItem && !pReadOnlyItem->GetValue()) ) SetError( ERRCODE_IO_ACCESSDENIED, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) ); else @@ -1337,7 +1337,7 @@ uno::Reference < embed::XStorage > SfxMedium::GetStorage( sal_Bool bCreateTempIf SFX_ITEMSET_ARG( pSet, pVersion, SfxInt16Item, SID_VERSION, sal_False); - BOOL bResetStorage = FALSE; + sal_Bool bResetStorage = sal_False; if ( pVersion && pVersion->GetValue() ) { // Alle verf"ugbaren Versionen einlesen @@ -1388,11 +1388,11 @@ uno::Reference < embed::XStorage > SfxMedium::GetStorage( sal_Bool bCreateTempIf pImp->aVersions.realloc(0); } else - bResetStorage = TRUE; + bResetStorage = sal_True; } } else - bResetStorage = TRUE; + bResetStorage = sal_True; } if ( bResetStorage ) @@ -1645,7 +1645,7 @@ sal_Bool SfxMedium::TransactedTransferForFS_Impl( const INetURLObject& aSource, sal_Bool bTransactStarted = sal_False; SFX_ITEMSET_ARG( GetItemSet(), pOverWrite, SfxBoolItem, SID_OVERWRITE, sal_False ); SFX_ITEMSET_ARG( GetItemSet(), pRename, SfxBoolItem, SID_RENAME, sal_False ); - sal_Bool bRename = pRename ? pRename->GetValue() : FALSE; + sal_Bool bRename = pRename ? pRename->GetValue() : sal_False; sal_Bool bOverWrite = pOverWrite ? pOverWrite->GetValue() : !bRename; try @@ -2269,7 +2269,7 @@ void SfxMedium::GetMedium_Impl() { GetItemSet()->Put( SfxStringItem( SID_FILE_NAME, aFileName ) ); if( !(nStorOpenMode & STREAM_WRITE ) ) - GetItemSet()->Put( SfxBoolItem( SID_DOC_READONLY, TRUE ) ); + GetItemSet()->Put( SfxBoolItem( SID_DOC_READONLY, sal_True ) ); if (xInteractionHandler.is()) GetItemSet()->Put( SfxUnoAnyItem( SID_INTERACTIONHANDLER, makeAny(xInteractionHandler) ) ); } @@ -2413,7 +2413,7 @@ void SfxMedium::Init_Impl() Reference< XOutputStream > rOutStream; // TODO/LATER: handle lifetime of storages - pImp->bDisposeStorage = FALSE; + pImp->bDisposeStorage = sal_False; SFX_ITEMSET_ARG( pSet, pSalvageItem, SfxStringItem, SID_DOC_SALVAGE, sal_False); if ( pSalvageItem && !pSalvageItem->GetValue().Len() ) @@ -2469,7 +2469,7 @@ void SfxMedium::Init_Impl() if ( aLogicName.Len() ) { // if the logic name is set it should be set in MediaDescriptor as well - SFX_ITEMSET_ARG( pSet, pFileNameItem, SfxStringItem, SID_FILE_NAME, FALSE ); + SFX_ITEMSET_ARG( pSet, pFileNameItem, SfxStringItem, SID_FILE_NAME, sal_False ); if ( !pFileNameItem ) { // let the ItemSet be created if necessary @@ -2515,7 +2515,7 @@ SfxMedium::SfxMedium( const SfxMedium& rMedium, sal_Bool bTemporary ) //------------------------------------------------------------------ -void SfxMedium::UseInteractionHandler( BOOL bUse ) +void SfxMedium::UseInteractionHandler( sal_Bool bUse ) { pImp->bAllowDefaultIntHdl = bUse; } @@ -2649,12 +2649,12 @@ void SfxMedium::Close() pImp->xLockBytes.Clear(); if ( pSet ) pSet->ClearItem( SID_INPUTSTREAM ); - aStorage->SetDeleteStream( TRUE ); + aStorage->SetDeleteStream( sal_True ); } else if ( pStream && pStream == pOutStream ) { pOutStream = NULL; - aStorage->SetDeleteStream( TRUE ); + aStorage->SetDeleteStream( sal_True ); } */ CloseStorage(); @@ -2682,12 +2682,12 @@ void SfxMedium::CloseAndRelease() pImp->xLockBytes.Clear(); if ( pSet ) pSet->ClearItem( SID_INPUTSTREAM ); - aStorage->SetDeleteStream( TRUE ); + aStorage->SetDeleteStream( sal_True ); } else if ( pStream && pStream == pOutStream ) { pOutStream = NULL; - aStorage->SetDeleteStream( TRUE ); + aStorage->SetDeleteStream( sal_True ); } */ CloseStorage(); @@ -2811,7 +2811,7 @@ void SfxMedium::SetIsRemote_Impl() case INET_PROT_IMAP: // case INET_PROT_OUT: case INET_PROT_VIM: - bRemote = TRUE; break; + bRemote = sal_True; break; default: bRemote = ( GetName().CompareToAscii( "private:msgid", 13 ) == COMPARE_EQUAL ); break; @@ -2888,8 +2888,8 @@ sal_Bool SfxMedium::Exists( sal_Bool /*bForceSession*/ ) void SfxMedium::ReOpen() { - BOOL bUseInteractionHandler = pImp->bUseInteractionHandler; - pImp->bUseInteractionHandler = FALSE; + sal_Bool bUseInteractionHandler = pImp->bUseInteractionHandler; + pImp->bUseInteractionHandler = sal_False; GetMedium_Impl(); pImp->bUseInteractionHandler = bUseInteractionHandler; } @@ -2899,8 +2899,8 @@ void SfxMedium::ReOpen() void SfxMedium::CompleteReOpen() { // do not use temporary file for reopen and in case of success throw the temporary file away - BOOL bUseInteractionHandler = pImp->bUseInteractionHandler; - pImp->bUseInteractionHandler = FALSE; + sal_Bool bUseInteractionHandler = pImp->bUseInteractionHandler; + pImp->bUseInteractionHandler = sal_False; ::utl::TempFile* pTmpFile = NULL; if ( pImp->pTempFile ) @@ -2978,7 +2978,7 @@ SfxMedium::SfxMedium( const ::com::sun::star::uno::Sequence< ::com::sun::star::b // if an URL is provided in SalvageItem that means that the FileName refers to a temporary file // that must be copied here - SFX_ITEMSET_ARG( pSet, pFileNameItem, SfxStringItem, SID_FILE_NAME, FALSE ); + SFX_ITEMSET_ARG( pSet, pFileNameItem, SfxStringItem, SID_FILE_NAME, sal_False ); if (!pFileNameItem) throw uno::RuntimeException(); ::rtl::OUString aNewTempFileURL = SfxMedium::CreateTempCopyWithExt( pFileNameItem->GetValue() ); if ( aNewTempFileURL.getLength() ) @@ -2995,16 +2995,16 @@ SfxMedium::SfxMedium( const ::com::sun::star::uno::Sequence< ::com::sun::star::b } } - BOOL bReadOnly = FALSE; - SFX_ITEMSET_ARG( pSet, pReadOnlyItem, SfxBoolItem, SID_DOC_READONLY, FALSE ); + sal_Bool bReadOnly = sal_False; + SFX_ITEMSET_ARG( pSet, pReadOnlyItem, SfxBoolItem, SID_DOC_READONLY, sal_False ); if ( pReadOnlyItem && pReadOnlyItem->GetValue() ) - bReadOnly = TRUE; + bReadOnly = sal_True; - SFX_ITEMSET_ARG( pSet, pFileNameItem, SfxStringItem, SID_FILE_NAME, FALSE ); + SFX_ITEMSET_ARG( pSet, pFileNameItem, SfxStringItem, SID_FILE_NAME, sal_False ); if (!pFileNameItem) throw uno::RuntimeException(); aLogicName = pFileNameItem->GetValue(); nStorOpenMode = bReadOnly ? SFX_STREAM_READONLY : SFX_STREAM_READWRITE; - bDirect = FALSE; + bDirect = sal_False; Init_Impl(); } @@ -3022,7 +3022,7 @@ SfxMedium::SfxMedium( const uno::Reference < embed::XStorage >& rStor, const Str Init_Impl(); pImp->xStorage = rStor; - pImp->bDisposeStorage = FALSE; + pImp->bDisposeStorage = sal_False; // always take BaseURL first, could be overwritten by ItemSet GetItemSet()->Put( SfxStringItem( SID_DOC_BASEURL, rBaseURL ) ); @@ -3104,7 +3104,7 @@ sal_uInt32 SfxMedium::GetMIMEAndRedirect( String& /*rName*/ ) if( eProt == INET_PROT_FTP && SvBinding::ShouldUseFtpProxy( GetURLObject().GetMainURL( INetURLObject::NO_DECODE ) ) ) { Any aAny( UCB_Helper::GetProperty( GetContent(), WID_FLAG_IS_FOLDER ) ); - sal_Bool bIsFolder = FALSE; + sal_Bool bIsFolder = sal_False; if ( ( aAny >>= bIsFolder ) && bIsFolder ) return ERRCODE_NONE; } @@ -3304,7 +3304,7 @@ sal_uInt16 SfxMedium::AddVersion_Impl( util::RevisionTag& rRevision ) sal_uInt16 nKey; for ( nKey=0; nKey<aLongs.Count(); nKey++ ) - if ( aLongs[nKey] > ( ULONG ) nKey+1 ) + if ( aLongs[nKey] > ( sal_uIntPtr ) nKey+1 ) break; String aRevName = DEFINE_CONST_UNICODE( "Version" ); @@ -3595,7 +3595,7 @@ void SfxMedium::SetCharset( ::rtl::OUString aChs ) sal_Bool SfxMedium::SignContents_Impl( sal_Bool bScriptingContent, const ::rtl::OUString& aODFVersion, sal_Bool bHasValidDocumentSignature ) { - sal_Bool bChanges = FALSE; + sal_Bool bChanges = sal_False; // the medium should be closed to be able to sign, the caller is responsible to close it if ( !IsOpen() && !GetError() ) @@ -3658,7 +3658,7 @@ sal_Bool SfxMedium::SignContents_Impl( sal_Bool bScriptingContent, const ::rtl:: // the temporary file has been written, commit it to the original file Commit(); - bChanges = TRUE; + bChanges = sal_True; } } else @@ -3677,7 +3677,7 @@ sal_Bool SfxMedium::SignContents_Impl( sal_Bool bScriptingContent, const ::rtl:: // the temporary file has been written, commit it to the original file Commit(); - bChanges = TRUE; + bChanges = sal_True; } } } @@ -3722,12 +3722,12 @@ void SfxMedium::SetCachedSignatureState_Impl( sal_uInt16 nState ) pImp->m_nSignatureState = nState; } -BOOL SfxMedium::HasStorage_Impl() const +sal_Bool SfxMedium::HasStorage_Impl() const { return pImp->xStorage.is(); } -BOOL SfxMedium::IsOpen() const +sal_Bool SfxMedium::IsOpen() const { return pInStream || pOutStream || pImp->xStorage.is(); } @@ -3834,7 +3834,7 @@ sal_Bool SfxMedium::CallApproveHandler( const uno::Reference< task::XInteraction // remove the readonly state sal_Bool bWasReadonly = sal_False; nStorOpenMode = SFX_STREAM_READWRITE; - SFX_ITEMSET_ARG( pSet, pReadOnlyItem, SfxBoolItem, SID_DOC_READONLY, FALSE ); + SFX_ITEMSET_ARG( pSet, pReadOnlyItem, SfxBoolItem, SID_DOC_READONLY, sal_False ); if ( pReadOnlyItem && pReadOnlyItem->GetValue() ) bWasReadonly = sal_True; GetItemSet()->ClearItem( SID_DOC_READONLY ); |