summaryrefslogtreecommitdiff
path: root/sot
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2004-02-25 16:28:06 +0000
committerKurt Zenker <kz@openoffice.org>2004-02-25 16:28:06 +0000
commit1821b209a7c696ac252d1baad3206258243ebbd0 (patch)
treea2f4567c42eab590a8daecaaebcd8124d099e0ab /sot
parentac7332e28de16fbef1872d107348bf58b480c4e4 (diff)
INTEGRATION: CWS layoutmanager (1.80.6); FILE MERGED
2004/02/19 13:07:36 cd 1.80.6.3: RESYNC: (1.80-1.82); FILE MERGED 2004/01/21 18:08:20 cd 1.80.6.2: #114906# Better error detection 2004/01/19 12:48:25 mav 1.80.6.1: #114906# catalog can have no manifest.xml
Diffstat (limited to 'sot')
-rw-r--r--sot/source/sdstor/ucbstorage.cxx42
1 files changed, 25 insertions, 17 deletions
diff --git a/sot/source/sdstor/ucbstorage.cxx b/sot/source/sdstor/ucbstorage.cxx
index 774f1450b3c8..601753df738f 100644
--- a/sot/source/sdstor/ucbstorage.cxx
+++ b/sot/source/sdstor/ucbstorage.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: ucbstorage.cxx,v $
*
- * $Revision: 1.82 $
+ * $Revision: 1.83 $
*
- * last change: $Author: hr $ $Date: 2004-02-04 12:32:11 $
+ * last change: $Author: kz $ $Date: 2004-02-25 17:28:06 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -1911,21 +1911,29 @@ void UCBStorage_Impl::Init()
// create input stream
SvStream* pStream = ::utl::UcbStreamHelper::CreateStream( aObj.GetMainURL( INetURLObject::NO_DECODE ), STREAM_STD_READ );
- ::utl::OInputStreamWrapper* pHelper = new ::utl::OInputStreamWrapper( *pStream );
- com::sun::star::uno::Reference < ::com::sun::star::io::XInputStream > xInputStream( pHelper );
-
- // create a manifest reader object that will read in the manifest from the stream
- Reference < ::com::sun::star::packages::manifest::XManifestReader > xReader =
- Reference< ::com::sun::star::packages::manifest::XManifestReader >
- ( ::comphelper::getProcessServiceFactory()->createInstance(
- ::rtl::OUString::createFromAscii( "com.sun.star.packages.manifest.ManifestReader" )), UNO_QUERY) ;
- Sequence < Sequence < PropertyValue > > aProps = xReader->readManifestSequence( xInputStream );
-
- // cleanup
- xReader = NULL;
- xInputStream = NULL;
- delete pStream;
- SetProps( aProps, String() );
+ // no stream means no manifest.xml
+ if ( pStream )
+ {
+ if ( !pStream->GetError() )
+ {
+ ::utl::OInputStreamWrapper* pHelper = new ::utl::OInputStreamWrapper( *pStream );
+ com::sun::star::uno::Reference < ::com::sun::star::io::XInputStream > xInputStream( pHelper );
+
+ // create a manifest reader object that will read in the manifest from the stream
+ Reference < ::com::sun::star::packages::manifest::XManifestReader > xReader =
+ Reference< ::com::sun::star::packages::manifest::XManifestReader >
+ ( ::comphelper::getProcessServiceFactory()->createInstance(
+ ::rtl::OUString::createFromAscii( "com.sun.star.packages.manifest.ManifestReader" )), UNO_QUERY) ;
+ Sequence < Sequence < PropertyValue > > aProps = xReader->readManifestSequence( xInputStream );
+
+ // cleanup
+ xReader = NULL;
+ xInputStream = NULL;
+ SetProps( aProps, String() );
+ }
+
+ delete pStream;
+ }
}
}
else