diff options
author | Ocke Janssen <oj@openoffice.org> | 2002-08-01 06:16:43 +0000 |
---|---|---|
committer | Ocke Janssen <oj@openoffice.org> | 2002-08-01 06:16:43 +0000 |
commit | e28a6090f89f5cce7c5b6ac5ea886c7fdcfe0bee (patch) | |
tree | 61a17020fad755eb075eb6f6a3f95e7ecff73d61 /connectivity/source/drivers/file/FDriver.cxx | |
parent | 660e86f7355d88a585e024f1e76ac3ae3f96e6be (diff) |
#101764# check if url is correct
Diffstat (limited to 'connectivity/source/drivers/file/FDriver.cxx')
-rw-r--r-- | connectivity/source/drivers/file/FDriver.cxx | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/connectivity/source/drivers/file/FDriver.cxx b/connectivity/source/drivers/file/FDriver.cxx index 72cbc044a88c..c4d6e95f23ff 100644 --- a/connectivity/source/drivers/file/FDriver.cxx +++ b/connectivity/source/drivers/file/FDriver.cxx @@ -2,9 +2,9 @@ * * $RCSfile: FDriver.cxx,v $ * - * $Revision: 1.7 $ + * $Revision: 1.8 $ * - * last change: $Author: oj $ $Date: 2002-07-05 07:46:24 $ + * last change: $Author: oj $ $Date: 2002-08-01 07:16:43 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -74,6 +74,9 @@ #ifndef _COMPHELPER_TYPES_HXX_ #include <comphelper/types.hxx> #endif +#ifndef _DBHELPER_DBEXCEPTION_HXX_ +#include "connectivity/dbexception.hxx" +#endif using namespace connectivity::file; using namespace com::sun::star::uno; @@ -166,6 +169,8 @@ sal_Bool SAL_CALL OFileDriver::acceptsURL( const ::rtl::OUString& url ) // -------------------------------------------------------------------------------- Sequence< DriverPropertyInfo > SAL_CALL OFileDriver::getPropertyInfo( const ::rtl::OUString& url, const Sequence< PropertyValue >& info ) throw(SQLException, RuntimeException) { + if ( ! acceptsURL(url) ) + ::dbtools::throwGenericSQLException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Invalid URL!")) ,*this); return Sequence< DriverPropertyInfo >(); } // -------------------------------------------------------------------------------- @@ -210,6 +215,8 @@ Reference< XTablesSupplier > SAL_CALL OFileDriver::getDataDefinitionByConnection // -------------------------------------------------------------------------------- Reference< XTablesSupplier > SAL_CALL OFileDriver::getDataDefinitionByURL( const ::rtl::OUString& url, const Sequence< PropertyValue >& info ) throw(::com::sun::star::sdbc::SQLException, RuntimeException) { + if ( ! acceptsURL(url) ) + ::dbtools::throwGenericSQLException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Invalid URL!")) ,*this); return getDataDefinitionByConnection(connect(url,info)); } // ----------------------------------------------------------------------------- |