diff options
author | Mathias Bauer <mba@openoffice.org> | 2001-06-20 08:32:09 +0000 |
---|---|---|
committer | Mathias Bauer <mba@openoffice.org> | 2001-06-20 08:32:09 +0000 |
commit | 5126c41cd3042d0a95b79153ec8a4452f54f325f (patch) | |
tree | 7505bb527196956fd34c54c22f868edeea0b25a5 /sfx2 | |
parent | 06b42f674186821d300d44196688ee6158d2fb23 (diff) |
#86708#: support segment size as parameter
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/doc/docfile.cxx | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx index 5c6b70907c45..12f1c16e3e13 100644 --- a/sfx2/source/doc/docfile.cxx +++ b/sfx2/source/doc/docfile.cxx @@ -2,9 +2,9 @@ * * $RCSfile: docfile.cxx,v $ * - * $Revision: 1.56 $ + * $Revision: 1.57 $ * - * last change: $Author: mba $ $Date: 2001-06-14 11:26:33 $ + * last change: $Author: mba $ $Date: 2001-06-20 09:32:09 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -1264,6 +1264,24 @@ void SfxMedium::Transfer_Impl() return; } + SFX_ITEMSET_ARG( GetItemSet(), pSegmentSize, SfxInt32Item, SID_SEGMENTSIZE, sal_False); + if ( pSegmentSize ) + { + // this file must be stored into a disk spanned package + SotStorageRef xStor = new SotStorage( TRUE, GetName(), STREAM_STD_READWRITE | STREAM_TRUNC, STORAGE_TRANSACTED ); + if ( xStor->GetError() == ERRCODE_NONE ) + { + ::com::sun::star::uno::Any aAny; + aAny <<= pSegmentSize->GetValue(); + xStor->SetProperty( String::CreateFromAscii("SegmentSize"), aAny ); + GetStorage()->CopyTo( xStor ); + xStor->Commit(); + } + else + eError = ERRCODE_IO_GENERAL; + return; + } + sal_Bool bSuccess = sal_False; // check wether the the temp file has the same protocol |