Tag: cws_src680_hsqlcsv
User: fs      
Date: 2006/10/11 00:39:24

Modified:
   dba/connectivity/source/drivers/hsqldb/HDriver.cxx

Log:
 RESYNC: (1.18-1.21); FILE MERGED

File Changes:

Directory: /dba/connectivity/source/drivers/hsqldb/
===================================================

File [changed]: HDriver.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/hsqldb/HDriver.cxx?r1=1.18.16.1&r2=1.18.16.2
Delta lines:  +8 -5
-------------------
--- HDriver.cxx 14 Sep 2006 11:42:52 -0000      1.18.16.1
+++ HDriver.cxx 11 Oct 2006 07:39:21 -0000      1.18.16.2
@@ -33,6 +33,9 @@
  *
  ************************************************************************/
 
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_connectivity.hxx"
+
 #ifndef CONNECTIVITY_HSQLDB_DRIVER_HXX
 #include "hsqldb/HDriver.hxx"
 #endif
@@ -217,7 +220,7 @@
                                ::rtl::OUString sSystemPath;
                                osl_getSystemPathFromFileURL( sURL.pData, 
&sSystemPath.pData );
                                sal_Int32 nIndex = sSystemPath.lastIndexOf('.');
-                               if ( nIndex == -1 )
+                               if ( !sURL.getLength() )
                                        throw 
SQLException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("File URL is not 
correct."))
                                                ,*this
                                                
,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HY0000"))
@@ -228,7 +231,7 @@
                                Sequence< PropertyValue > 
aConvertedProperties(8);
                                sal_Int32 nPos = 0;
                                aConvertedProperties[nPos].Name = 
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("storage_key"));
-                ::rtl::OUString sConnPartURL = sSystemPath.copy(0,nIndex);
+                               ::rtl::OUString sConnPartURL = 
sSystemPath.copy(0,::std::max<sal_Int32>(nIndex,sSystemPath.getLength()));
                                ::rtl::OUString sKey = 
StorageContainer::registerStorage(xStorage,sConnPartURL);
                                aConvertedProperties[nPos++].Value <<= sKey;
                                aConvertedProperties[nPos].Name = 
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("storage_class_name"));




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

Reply via email to