summaryrefslogtreecommitdiff
path: root/connectivity/source/drivers/dbase/DConnection.cxx
diff options
context:
space:
mode:
authorFrank Schönheit <fs@openoffice.org>2001-05-17 14:11:19 +0000
committerFrank Schönheit <fs@openoffice.org>2001-05-17 14:11:19 +0000
commitff302494b41cc5e56eb06415e797b7df788275e4 (patch)
treea7cee021f48b33b91b3ce83c4e7327ae8d699152 /connectivity/source/drivers/dbase/DConnection.cxx
parentec81a958e9b7990a2671e13336da757da388bc66 (diff)
#87182# overwrite connect for parameter checking
Diffstat (limited to 'connectivity/source/drivers/dbase/DConnection.cxx')
-rw-r--r--connectivity/source/drivers/dbase/DConnection.cxx47
1 files changed, 41 insertions, 6 deletions
diff --git a/connectivity/source/drivers/dbase/DConnection.cxx b/connectivity/source/drivers/dbase/DConnection.cxx
index 0a79324e7e0c..b87fffc24d66 100644
--- a/connectivity/source/drivers/dbase/DConnection.cxx
+++ b/connectivity/source/drivers/dbase/DConnection.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: DConnection.cxx,v $
*
- * $Revision: 1.8 $
+ * $Revision: 1.9 $
*
- * last change: $Author: oj $ $Date: 2001-05-17 06:46:55 $
+ * last change: $Author: fs $ $Date: 2001-05-17 15:11:19 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -111,6 +111,45 @@ ODbaseConnection::~ODbaseConnection()
{
}
+// --------------------------------------------------------------------------------
+void ODbaseConnection::construct(const ::rtl::OUString& _rUrl,const Sequence< PropertyValue >& _rInfo ) throw(SQLException)
+{
+ // check the arguments for settings which are not allowed here
+ // Normally, the base class would just ignore such settings. But there are settings which are recognized
+ // by the base class, but not allowed for ourself anymore.
+
+ const PropertyValue* pSetting = _rInfo.getConstArray();
+ const PropertyValue* pSettingEnd = pSetting + _rInfo.getLength();
+
+ Sequence< PropertyValue > aPatchedInfo(_rInfo);
+ // (cheap (till now) as the sequences are ref-counted)
+ PropertyValue* pNextPatchedInfo = NULL;
+
+ for (;pSetting < pSettingEnd; ++pSetting)
+ {
+ if (0 == pSetting->Name.compareToAscii("Extension"))
+ {
+ if (!pNextPatchedInfo)
+ // never found such an invalid setting before
+ pNextPatchedInfo = aPatchedInfo.getArray() + (pSetting - _rInfo.getConstArray());
+ }
+ else
+ {
+ if (pNextPatchedInfo)
+ {
+ *pNextPatchedInfo = *pSetting;
+ ++pNextPatchedInfo;
+ }
+ }
+ }
+
+ if (pNextPatchedInfo)
+ // we omitted at least one setting
+ aPatchedInfo.realloc(pNextPatchedInfo - aPatchedInfo.getArray());
+
+ ODbaseConnection_Base::construct(_rUrl, aPatchedInfo);
+}
+
// XServiceInfo
// --------------------------------------------------------------------------------
IMPLEMENT_SERVICE_INFO(ODbaseConnection, "com.sun.star.sdbc.drivers.dbase.Connection", "com.sun.star.sdbc.Connection")
@@ -176,7 +215,3 @@ Reference< XPreparedStatement > SAL_CALL ODbaseConnection::prepareCall( const ::
return NULL;
}
-// -----------------------------------------------------------------------------
-
-
-