CVS wrapper -- version: 1.104 Index: dbloader2.cxx =================================================================== RCS file: /cvs/dba/dbaccess/source/filter/xml/dbloader2.cxx,v retrieving revision 1.36 diff -c -r1.36 dbloader2.cxx *** dbloader2.cxx 25 Jun 2008 12:33:55 -0000 1.36 --- dbloader2.cxx 1 Sep 2008 07:02:21 -0000 *************** *** 143,152 **** --- 143,155 ---- try { ::comphelper::NamedValueCollection aMedia( Descriptor ); + sal_Bool bStreamFromDescr = sal_False; + Reference< XInputStream > xInStream( aMedia.getOrDefault( "InputStream", Reference< XInputStream >() ) ); Reference< XPropertySet > xStorageProperties; if ( xInStream.is() ) { + bStreamFromDescr = sal_True; xStorageProperties.set( ::comphelper::OStorageHelper::GetStorageFromInputStream( xInStream, m_aContext.getLegacyServiceFactory() ), UNO_QUERY ); } *************** *** 168,174 **** --- 171,187 ---- ::rtl::OUString sMediaType; xStorageProperties->getPropertyValue( INFO_MEDIATYPE ) >>= sMediaType; if ( sMediaType.equalsAscii(MIMETYPE_OASIS_OPENDOCUMENT_DATABASE_ASCII) || sMediaType.equalsAscii(MIMETYPE_VND_SUN_XML_BASE_ASCII) ) + { + if ( bStreamFromDescr ) + { + // After fixing of the i88522 issue ( use the new file locking for database files ) the stream from the type detection can be used further + // for now the file should be reopened to have read/write access + aMedia.remove( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "InputStream" ) ) ); + aMedia >>= Descriptor; + } + return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("StarBase")); + } ::comphelper::disposeComponent(xStorageProperties); } } catch(Exception&){}