diff options
author | Rüdiger Timm <rt@openoffice.org> | 2004-11-26 15:16:12 +0000 |
---|---|---|
committer | Rüdiger Timm <rt@openoffice.org> | 2004-11-26 15:16:12 +0000 |
commit | f884201b5cdaa259e2ad55435ba36aade7a39183 (patch) | |
tree | 8dd1de12a3ed237e1730456b78b5ca742b45692e /sfx2 | |
parent | a312fdf1fc083c6c124f346f006763ef9fdd767a (diff) |
INTEGRATION: CWS cd03 (1.145.4); FILE MERGED
2004/11/18 13:27:34 mav 1.145.4.4: #i37232# check whether the medium is based on storage is done in storage
2004/11/18 13:02:55 mav 1.145.4.3: #i37232# check whether the medium is based on storage
2004/11/18 12:47:17 mav 1.145.4.2: #i37232# check whether the medium is based on storage
2004/11/17 17:33:29 mav 1.145.4.1: #i37232# saving and loading of version info
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/doc/docfile.cxx | 44 |
1 files changed, 10 insertions, 34 deletions
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx index 3b4fcb3cfb08..b3e040ed7815 100644 --- a/sfx2/source/doc/docfile.cxx +++ b/sfx2/source/doc/docfile.cxx @@ -2,9 +2,9 @@ * * $RCSfile: docfile.cxx,v $ * - * $Revision: 1.148 $ + * $Revision: 1.149 $ * - * last change: $Author: rt $ $Date: 2004-11-26 15:13:25 $ + * last change: $Author: rt $ $Date: 2004-11-26 16:16:12 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -2687,23 +2687,11 @@ const SfxVersionTableDtor* SfxMedium::GetVersionList() try { - uno::Reference < io::XStream > xStream = GetStorage()->openStreamElement( DEFINE_CONST_UNICODE( "VersionList" ), - embed::ElementModes::READ ); - if ( xStream.is() ) - { - SvStream* pStr = utl::UcbStreamHelper::CreateStream( xStream ); - pImp->pVersions = new SfxVersionTableDtor; - pImp->pVersions->Read( *pStr ); - delete pStr; - } + SfxVersionTableDtor *pList = new SfxVersionTableDtor; + if ( SfxXMLVersList_Impl::ReadInfo( GetStorage(), pList ) ) + pImp->pVersions = pList; else - { - SfxVersionTableDtor *pList = new SfxVersionTableDtor; - if ( SfxXMLVersList_Impl::ReadInfo( GetStorage(), pList ) ) - pImp->pVersions = pList; - else - delete pList; - } + delete pList; } catch ( uno::Exception& ) { @@ -2719,23 +2707,11 @@ SfxVersionTableDtor* SfxMedium::GetVersionList( const uno::Reference < embed::XS SfxVersionTableDtor* pVersions = NULL; if( xStor.is() ) { - uno::Reference < io::XStream > xStream = xStor->openStreamElement( DEFINE_CONST_UNICODE( "VersionList" ), - embed::ElementModes::READ ); - if ( xStream.is() ) - { - SvStream* pStr = utl::UcbStreamHelper::CreateStream( xStream ); - pVersions = new SfxVersionTableDtor; - pVersions->Read( *pStr ); - delete pStr; - } + SfxVersionTableDtor *pList = new SfxVersionTableDtor; + if ( SfxXMLVersList_Impl::ReadInfo( xStor, pList ) ) + pVersions = pList; else - { - SfxVersionTableDtor *pList = new SfxVersionTableDtor; - if ( SfxXMLVersList_Impl::ReadInfo( xStor, pList ) ) - pVersions = pList; - else - delete pList; - } + delete pList; } return pVersions; |