Tag: cws_src680_dbwizard3 User: bc Date: 05/02/17 09:51:53 Modified: /dba/dbaccess/source/ui/misc/ dsntypes.cxx
Log: RESYNC: (1.22-1.23); FILE MERGED File Changes: Directory: /dba/dbaccess/source/ui/misc/ ======================================== File [changed]: dsntypes.cxx Url: http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/misc/dsntypes.cxx?r1=1.22.10.1&r2=1.22.10.2 Delta lines: +19 -5 -------------------- --- dsntypes.cxx 16 Jan 2005 16:32:05 -0000 1.22.10.1 +++ dsntypes.cxx 17 Feb 2005 17:51:51 -0000 1.22.10.2 @@ -91,6 +91,12 @@ #include <osl/file.hxx> #endif // --- +#ifndef _COM_SUN_STAR_SDBC_XDRIVERACCESS_HPP_ +#include <com/sun/star/sdbc/XDriverAccess.hpp> +#endif +#ifndef DBACCESS_SHARED_DBUSTRINGS_HRC +#include "dbustrings.hrc" +#endif //......................................................................... namespace dbaui { @@ -99,6 +105,7 @@ using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; using namespace ::com::sun::star::lang; + using namespace ::com::sun::star::sdbc; namespace { @@ -330,7 +337,7 @@ } if ( _rsHostname.Len() ) _rsHostname = _rsHostname.GetToken(_rsHostname.GetTokenCount('@') - 1,'@'); - _rsHostname = sUrl.GetToken(sUrl.GetTokenCount(':') - 1,':'); + _sDatabaseName = sUrl.GetToken(sUrl.GetTokenCount(':') - 1,':'); break; case DST_LDAP: lcl_extractHostAndPort(sUrl,_sDatabaseName,_nPortNumber); @@ -616,7 +623,14 @@ DATASOURCE_TYPE eRet = DST_DBASE; ::utl::OConfigurationNode aEmbeddedDatabase = lcl_getEmbeddedDatabase(_rxORB); if ( aEmbeddedDatabase.isValid() ) + { + ::rtl::OUString sURLPrefix = getEmbeddedDatabaseURL(_rxORB); + Reference< XDriverAccess > xDriverManager(_rxORB->createInstance(SERVICE_SDBC_DRIVERMANAGER), UNO_QUERY); + if ( xDriverManager.is() && xDriverManager->getDriverByURL(sURLPrefix).is() ) + { eRet = DST_EMBEDDED; + } + } return eRet; } // ----------------------------------------------------------------------------- --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
