Tag: cws_src680_fwk33
User: mav     
Date: 06/03/01 01:32:58

Modified:
 /dba/dbaccess/source/filter/xml/
  dbloader2.cxx

Log:
 #i62202# use the provided stream for the detection

File Changes:

Directory: /dba/dbaccess/source/filter/xml/
===========================================

File [changed]: dbloader2.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/filter/xml/dbloader2.cxx?r1=1.17&r2=1.17.46.1
Delta lines:  +25 -14
---------------------
--- dbloader2.cxx       3 Jan 2006 16:15:06 -0000       1.17
+++ dbloader2.cxx       1 Mar 2006 09:32:55 -0000       1.17.46.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: dbloader2.cxx,v $
  *
- *  $Revision: 1.17 $
+ *  $Revision: 1.17.46.1 $
  *
- *  last change: $Author: kz $ $Date: 2006/01/03 16:15:06 $
+ *  last change: $Author: mav $ $Date: 2006/03/01 09:32:55 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -227,12 +227,24 @@
        try
        {
                ::comphelper::SequenceAsHashMap aTemp(Descriptor);
+               Reference< XInputStream > xInStream = 
aTemp.getUnpackedValueOrDefault(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("InputStream")),
 Reference< XInputStream >() );
+
+               Reference<XPropertySet> xProp;
+               if ( xInStream.is() )
+               {
+                       
xProp.set(::comphelper::OStorageHelper::GetStorageFromInputStream(xInStream,m_xServiceFactory),UNO_QUERY);
+               }
+               else
+               {
                ::rtl::OUString sTemp = 
aTemp.getUnpackedValueOrDefault(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("URL")),::rtl::OUString());
 
                if ( sTemp.getLength() )
                {
                        INetURLObject aURL(sTemp);
-                       Reference<XPropertySet> 
xProp(::comphelper::OStorageHelper::GetStorageFromURL(sTemp,ElementModes::READ,m_xServiceFactory),UNO_QUERY);
+                               
xProp.set(::comphelper::OStorageHelper::GetStorageFromURL(sTemp,ElementModes::READ,m_xServiceFactory),UNO_QUERY);
+                       }
+               }
+
                        if ( xProp.is() )
                        {
                                ::rtl::OUString sMediaType;
@@ -241,7 +253,6 @@
                                        return 
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("StarBase"));
                                ::comphelper::disposeComponent(xProp);
                        }
-               } // if ( sTemp.getLength() )
        } catch(Exception&){}
        return ::rtl::OUString();
 }




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to