diff options
author | Mathias Bauer <mba@openoffice.org> | 2001-02-26 11:07:45 +0000 |
---|---|---|
committer | Mathias Bauer <mba@openoffice.org> | 2001-02-26 11:07:45 +0000 |
commit | 6f2dfafc9eb6638047c936c4f6988f2c5ebda958 (patch) | |
tree | fe5936bb1cef01232c9ecb11abfc85b3cb77685b /sfx2 | |
parent | 6fa3cfef47799dc3e662e8799cb52ffa79114e47 (diff) |
#84124#: allow append mode for saving with GetOutputStorage
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/doc/docfile.cxx | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx index 0e741469bccc..80f1e752f11b 100644 --- a/sfx2/source/doc/docfile.cxx +++ b/sfx2/source/doc/docfile.cxx @@ -2,9 +2,9 @@ * * $RCSfile: docfile.cxx,v $ * - * $Revision: 1.43 $ + * $Revision: 1.44 $ * - * last change: $Author: mba $ $Date: 2001-02-22 09:28:10 $ + * last change: $Author: mba $ $Date: 2001-02-26 12:07:45 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -1452,6 +1452,9 @@ void SfxMedium::GetMedium_Impl() { if ( !pInStream ) { + if ( !SfxContentHelper::Exists( GetName() ) ) + return; + pImp->bDownloadDone = sal_False; pImp->bStreamReady = sal_False; @@ -2323,11 +2326,13 @@ const SfxVersionTableDtor* SfxMedium::GetVersionList() } else { +#if SUPD>622 SfxVersionTableDtor *pList = new SfxVersionTableDtor; if ( SfxXMLVersList_Impl::ReadInfo( GetStorage(), pList ) ) pImp->pVersions = pList; else delete pList; +#endif } } @@ -2413,7 +2418,9 @@ sal_Bool SfxMedium::SaveVersionList_Impl( sal_Bool bUseXML ) if ( bUseXML ) { +#if SUPD>622 SfxXMLVersList_Impl::WriteInfo( aStorage, pImp->pVersions ); +#endif return sal_True; } else @@ -2454,7 +2461,11 @@ sal_Bool SfxMedium::IsReadOnly() void SfxMedium::CreateTempFile() { if ( pImp->pTempFile ) - delete pImp->pTempFile; + DELETEZ( pImp->pTempFile ); + + BOOL bDeleteInputStream = ( pInStream == 0); + GetInStream(); + ResetError(); String aParentName; INetURLObject aParent = GetURLObject(); @@ -2467,6 +2478,13 @@ void SfxMedium::CreateTempFile() aName = pImp->pTempFile->GetFileName(); + GetOutStream(); + if ( pInStream && pOutStream ) + { + *pInStream >> *pOutStream; + CloseInStream(); + } + CloseOutStream_Impl(); CloseStorage(); } |