summaryrefslogtreecommitdiff
path: root/connectivity/source/drivers/ado
diff options
context:
space:
mode:
authorOcke Janssen <oj@openoffice.org>2001-05-18 07:51:34 +0000
committerOcke Janssen <oj@openoffice.org>2001-05-18 07:51:34 +0000
commit370c89378b42d968967dfb4f9a63929de71ba881 (patch)
tree2f8a3ce0a992c6977588194acdca2083a565ccb4 /connectivity/source/drivers/ado
parent42b04415ff98819aaf195ad80e9da8cee1c6d9d0 (diff)
#86528# size changes
Diffstat (limited to 'connectivity/source/drivers/ado')
-rw-r--r--connectivity/source/drivers/ado/AColumn.cxx9
-rw-r--r--connectivity/source/drivers/ado/ADatabaseMetaData.cxx9
-rw-r--r--connectivity/source/drivers/ado/AIndex.cxx9
-rw-r--r--connectivity/source/drivers/ado/AIndexes.cxx9
-rw-r--r--connectivity/source/drivers/ado/AKeys.cxx9
-rw-r--r--connectivity/source/drivers/ado/AResultSet.cxx9
-rw-r--r--connectivity/source/drivers/ado/AStatement.cxx25
-rw-r--r--connectivity/source/drivers/ado/ATable.cxx9
-rw-r--r--connectivity/source/drivers/ado/AViews.cxx9
-rw-r--r--connectivity/source/drivers/ado/Aolevariant.cxx26
-rw-r--r--connectivity/source/drivers/ado/Awrapado.cxx94
11 files changed, 168 insertions, 49 deletions
diff --git a/connectivity/source/drivers/ado/AColumn.cxx b/connectivity/source/drivers/ado/AColumn.cxx
index 118311fa3648..3cf29278419a 100644
--- a/connectivity/source/drivers/ado/AColumn.cxx
+++ b/connectivity/source/drivers/ado/AColumn.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: AColumn.cxx,v $
*
- * $Revision: 1.9 $
+ * $Revision: 1.10 $
*
- * last change: $Author: oj $ $Date: 2001-05-14 11:41:55 $
+ * last change: $Author: oj $ $Date: 2001-05-18 08:48:07 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -80,6 +80,11 @@
#ifndef _COMPHELPER_EXTRACT_HXX_
#include <comphelper/extract.hxx>
#endif
+#ifndef _COMPHELPER_TYPES_HXX_
+#include <comphelper/types.hxx>
+#endif
+
+using namespace ::comphelper;
using namespace connectivity::ado;
using namespace com::sun::star::uno;
diff --git a/connectivity/source/drivers/ado/ADatabaseMetaData.cxx b/connectivity/source/drivers/ado/ADatabaseMetaData.cxx
index 32efad26a173..31052e3e5ab1 100644
--- a/connectivity/source/drivers/ado/ADatabaseMetaData.cxx
+++ b/connectivity/source/drivers/ado/ADatabaseMetaData.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: ADatabaseMetaData.cxx,v $
*
- * $Revision: 1.7 $
+ * $Revision: 1.8 $
*
- * last change: $Author: oj $ $Date: 2001-05-17 07:26:59 $
+ * last change: $Author: oj $ $Date: 2001-05-18 08:48:07 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -85,6 +85,11 @@
#ifndef _CONNECTIVITY_FDATABASEMETADATARESULTSET_HXX_
#include "FDatabaseMetaDataResultSet.hxx"
#endif
+#ifndef _COMPHELPER_TYPES_HXX_
+#include <comphelper/types.hxx>
+#endif
+
+using namespace ::comphelper;
using namespace connectivity;
using namespace connectivity::ado;
diff --git a/connectivity/source/drivers/ado/AIndex.cxx b/connectivity/source/drivers/ado/AIndex.cxx
index 4582db03ff4f..153f7897f614 100644
--- a/connectivity/source/drivers/ado/AIndex.cxx
+++ b/connectivity/source/drivers/ado/AIndex.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: AIndex.cxx,v $
*
- * $Revision: 1.10 $
+ * $Revision: 1.11 $
*
- * last change: $Author: oj $ $Date: 2001-05-14 11:40:04 $
+ * last change: $Author: oj $ $Date: 2001-05-18 08:48:07 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -83,6 +83,11 @@
#ifndef CONNECTIVITY_CONNECTION_HXX
#include "TConnection.hxx"
#endif
+#ifndef _COMPHELPER_TYPES_HXX_
+#include <comphelper/types.hxx>
+#endif
+
+using namespace ::comphelper;
using namespace connectivity::ado;
using namespace com::sun::star::uno;
diff --git a/connectivity/source/drivers/ado/AIndexes.cxx b/connectivity/source/drivers/ado/AIndexes.cxx
index 8115897e2af4..1679d3c9d2df 100644
--- a/connectivity/source/drivers/ado/AIndexes.cxx
+++ b/connectivity/source/drivers/ado/AIndexes.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: AIndexes.cxx,v $
*
- * $Revision: 1.7 $
+ * $Revision: 1.8 $
*
- * last change: $Author: oj $ $Date: 2001-05-14 11:40:04 $
+ * last change: $Author: oj $ $Date: 2001-05-18 08:48:07 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -76,6 +76,11 @@
#ifndef CONNECTIVITY_CONNECTION_HXX
#include "TConnection.hxx"
#endif
+#ifndef _COMPHELPER_TYPES_HXX_
+#include <comphelper/types.hxx>
+#endif
+
+using namespace ::comphelper;
using namespace connectivity;
diff --git a/connectivity/source/drivers/ado/AKeys.cxx b/connectivity/source/drivers/ado/AKeys.cxx
index 9536b828c8f9..b92058b874fe 100644
--- a/connectivity/source/drivers/ado/AKeys.cxx
+++ b/connectivity/source/drivers/ado/AKeys.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: AKeys.cxx,v $
*
- * $Revision: 1.7 $
+ * $Revision: 1.8 $
*
- * last change: $Author: oj $ $Date: 2001-05-14 11:40:04 $
+ * last change: $Author: oj $ $Date: 2001-05-18 08:48:07 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -80,8 +80,11 @@
#ifndef CONNECTIVITY_CONNECTION_HXX
#include "TConnection.hxx"
#endif
+#ifndef _COMPHELPER_TYPES_HXX_
+#include <comphelper/types.hxx>
+#endif
-
+using namespace ::comphelper;
using namespace connectivity;
using namespace connectivity::ado;
using namespace com::sun::star::uno;
diff --git a/connectivity/source/drivers/ado/AResultSet.cxx b/connectivity/source/drivers/ado/AResultSet.cxx
index 40665d39c37c..41a58c259d2f 100644
--- a/connectivity/source/drivers/ado/AResultSet.cxx
+++ b/connectivity/source/drivers/ado/AResultSet.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: AResultSet.cxx,v $
*
- * $Revision: 1.10 $
+ * $Revision: 1.11 $
*
- * last change: $Author: oj $ $Date: 2001-05-17 09:13:23 $
+ * last change: $Author: oj $ $Date: 2001-05-18 08:48:07 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -105,6 +105,11 @@
#ifndef _DBHELPER_DBEXCEPTION_HXX_
#include "connectivity/dbexception.hxx"
#endif
+#ifndef _COMPHELPER_TYPES_HXX_
+#include <comphelper/types.hxx>
+#endif
+
+using namespace ::comphelper;
#include <oledb.h>
diff --git a/connectivity/source/drivers/ado/AStatement.cxx b/connectivity/source/drivers/ado/AStatement.cxx
index ac9b93bcc540..356a1f54f73e 100644
--- a/connectivity/source/drivers/ado/AStatement.cxx
+++ b/connectivity/source/drivers/ado/AStatement.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: AStatement.cxx,v $
*
- * $Revision: 1.11 $
+ * $Revision: 1.12 $
*
- * last change: $Author: oj $ $Date: 2001-05-17 09:13:23 $
+ * last change: $Author: oj $ $Date: 2001-05-18 08:48:07 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -94,6 +94,11 @@
#ifndef _DBHELPER_DBEXCEPTION_HXX_
#include "connectivity/dbexception.hxx"
#endif
+#ifndef _COMPHELPER_TYPES_HXX_
+#include <comphelper/types.hxx>
+#endif
+
+using namespace ::comphelper;
#define CHECK_RETURN(x) \
if(!x) \
@@ -764,28 +769,28 @@ void OStatement_Base::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const A
switch(nHandle)
{
case PROPERTY_ID_QUERYTIMEOUT:
- setQueryTimeOut(connectivity::getINT32(rValue));
+ setQueryTimeOut(comphelper::getINT32(rValue));
break;
case PROPERTY_ID_MAXFIELDSIZE:
- setMaxFieldSize(connectivity::getINT32(rValue));
+ setMaxFieldSize(comphelper::getINT32(rValue));
break;
case PROPERTY_ID_MAXROWS:
- setMaxRows(connectivity::getINT32(rValue));
+ setMaxRows(comphelper::getINT32(rValue));
break;
case PROPERTY_ID_CURSORNAME:
- setCursorName(connectivity::getString(rValue));
+ setCursorName(comphelper::getString(rValue));
break;
case PROPERTY_ID_RESULTSETCONCURRENCY:
- setResultSetConcurrency(connectivity::getINT32(rValue));
+ setResultSetConcurrency(comphelper::getINT32(rValue));
break;
case PROPERTY_ID_RESULTSETTYPE:
- setResultSetType(connectivity::getINT32(rValue));
+ setResultSetType(comphelper::getINT32(rValue));
break;
case PROPERTY_ID_FETCHDIRECTION:
- setFetchDirection(connectivity::getINT32(rValue));
+ setFetchDirection(comphelper::getINT32(rValue));
break;
case PROPERTY_ID_FETCHSIZE:
- setFetchSize(connectivity::getINT32(rValue));
+ setFetchSize(comphelper::getINT32(rValue));
break;
case PROPERTY_ID_ESCAPEPROCESSING:
// return ::comphelper::tryPropertyValue(rConvertedValue, rOldValue, rValue, m_bAsLink);
diff --git a/connectivity/source/drivers/ado/ATable.cxx b/connectivity/source/drivers/ado/ATable.cxx
index d239a155d11b..041f2edaa38c 100644
--- a/connectivity/source/drivers/ado/ATable.cxx
+++ b/connectivity/source/drivers/ado/ATable.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: ATable.cxx,v $
*
- * $Revision: 1.13 $
+ * $Revision: 1.14 $
*
- * last change: $Author: oj $ $Date: 2001-05-17 07:26:59 $
+ * last change: $Author: oj $ $Date: 2001-05-18 08:48:07 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -104,6 +104,11 @@
#ifndef CONNECTIVITY_CONNECTION_HXX
#include "TConnection.hxx"
#endif
+#ifndef _COMPHELPER_TYPES_HXX_
+#include <comphelper/types.hxx>
+#endif
+
+using namespace ::comphelper;
using namespace connectivity;
using namespace connectivity::ado;
diff --git a/connectivity/source/drivers/ado/AViews.cxx b/connectivity/source/drivers/ado/AViews.cxx
index 6fa4ba273539..ba0ba76fcb3a 100644
--- a/connectivity/source/drivers/ado/AViews.cxx
+++ b/connectivity/source/drivers/ado/AViews.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: AViews.cxx,v $
*
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
- * last change: $Author: oj $ $Date: 2001-05-14 11:40:04 $
+ * last change: $Author: oj $ $Date: 2001-05-18 08:48:07 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -91,6 +91,11 @@
#ifndef CONNECTIVITY_CONNECTION_HXX
#include "TConnection.hxx"
#endif
+#ifndef _COMPHELPER_TYPES_HXX_
+#include <comphelper/types.hxx>
+#endif
+
+using namespace ::comphelper;
using namespace connectivity;
using namespace connectivity::ado;
diff --git a/connectivity/source/drivers/ado/Aolevariant.cxx b/connectivity/source/drivers/ado/Aolevariant.cxx
index 86f935b75e98..9ab9092d4b0a 100644
--- a/connectivity/source/drivers/ado/Aolevariant.cxx
+++ b/connectivity/source/drivers/ado/Aolevariant.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: Aolevariant.cxx,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: oj $ $Date: 2001-05-17 09:15:34 $
+ * last change: $Author: oj $ $Date: 2001-05-18 08:48:07 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -61,6 +61,22 @@
#ifndef _CONNECTIVITY_ADO_AOLEVARIANT_HXX_
#include "ado/Aolevariant.hxx"
#endif
+#ifndef _DBHELPER_DBCONVERSION_HXX_
+#include "connectivity/dbconversion.hxx"
+#endif
+#ifndef _COM_SUN_STAR_SDBC_SQLEXCEPTION_HPP_
+#include <com/sun/star/sdbc/SQLException.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UTIL_TIME_HPP_
+#include <com/sun/star/util/Time.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UTIL_DATE_HPP_
+#include <com/sun/star/util/Date.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UTIL_DATETIME_HPP_
+#include <com/sun/star/util/DateTime.hpp>
+#endif
+
using namespace connectivity::ado;
@@ -248,15 +264,15 @@ VARTYPE OLEVariant::getType() const { return vt; }
OLEVariant::operator ::com::sun::star::util::Date() const
{
- return connectivity::DateConversion::toDate(date,::com::sun::star::util::Date(30,12,1899));
+ return ::dbtools::DBTypeConversion::toDate(date,::com::sun::star::util::Date(30,12,1899));
}
OLEVariant::operator ::com::sun::star::util::Time() const
{
- return connectivity::DateConversion::toTime(date);
+ return ::dbtools::DBTypeConversion::toTime(date);
}
OLEVariant::operator ::com::sun::star::util::DateTime()const
{
- return connectivity::DateConversion::toDateTime(date,::com::sun::star::util::Date(30,12,1899));
+ return ::dbtools::DBTypeConversion::toDateTime(date,::com::sun::star::util::Date(30,12,1899));
}
VARIANT_BOOL OLEVariant::VariantBool(sal_Bool bEinBoolean)
diff --git a/connectivity/source/drivers/ado/Awrapado.cxx b/connectivity/source/drivers/ado/Awrapado.cxx
index e98093d4ebb5..6f3f9cb06517 100644
--- a/connectivity/source/drivers/ado/Awrapado.cxx
+++ b/connectivity/source/drivers/ado/Awrapado.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: Awrapado.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: oj $ $Date: 2001-05-17 07:26:59 $
+ * last change: $Author: oj $ $Date: 2001-05-18 08:48:07 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -261,21 +261,21 @@ void WpADOCommand::put_ActiveConnection(/* [in] */ const OLEVariant& vConn)
void WpADOCommand::Create()
{
- IClassFactory2* pIUnknown = NULL;
+ IClassFactory2* pInterface2 = NULL;
IUnknown *pOuter = NULL;
HRESULT hr;
hr = CoGetClassObject( ADOS::CLSID_ADOCOMMAND_21,
CLSCTX_INPROC_SERVER,
NULL,
IID_IClassFactory2,
- (void**)&pIUnknown );
+ (void**)&pInterface2 );
if( !FAILED( hr ) )
{
- pIUnknown->AddRef();
+ pInterface2->AddRef();
ADOCommand* pCommand=NULL;
- hr = pIUnknown->CreateInstanceLic( pOuter,
+ hr = pInterface2->CreateInstanceLic( pOuter,
NULL,
ADOS::IID_ADOCOMMAND_21,
ADOS::GetKeyStr(),
@@ -286,7 +286,7 @@ void WpADOCommand::Create()
pInterface = pCommand;
pInterface->AddRef();
}
- pIUnknown->Release();
+ pInterface2->Release();
}
}
@@ -614,21 +614,21 @@ sal_Bool WpADOCommand::Cancel()
}
void WpADORecordset::Create()
{
- IClassFactory2* pIUnknown = NULL;
+ IClassFactory2* pInterface2 = NULL;
IUnknown *pOuter = NULL;
HRESULT hr;
hr = CoGetClassObject( ADOS::CLSID_ADORECORDSET_21,
CLSCTX_INPROC_SERVER,
NULL,
IID_IClassFactory2,
- (void**)&pIUnknown );
+ (void**)&pInterface2 );
if( !FAILED( hr ) )
{
- pIUnknown->AddRef();
+ pInterface2->AddRef();
ADORecordset *pRec = NULL;
- hr = pIUnknown->CreateInstanceLic( pOuter,
+ hr = pInterface2->CreateInstanceLic( pOuter,
NULL,
ADOS::IID_ADORECORDSET_21,
ADOS::GetKeyStr(),
@@ -639,7 +639,7 @@ sal_Bool WpADOCommand::Cancel()
pInterface = pRec;
pInterface->AddRef();
}
- pIUnknown->Release();
+ pInterface2->Release();
}
}
@@ -692,14 +692,14 @@ PositionEnum WpADORecordset::get_AbsolutePosition()
return aTemp;
}
- void WpADORecordset::GetDataSource(IUnknown** pIUnknown) const
+ void WpADORecordset::GetDataSource(IUnknown** _pInterface) const
{
- pInterface->get_DataSource(pIUnknown);
+ pInterface->get_DataSource(_pInterface);
}
- void WpADORecordset::PutRefDataSource(IUnknown* pIUnknown)
+ void WpADORecordset::PutRefDataSource(IUnknown* _pInterface)
{
- pInterface->putref_DataSource(pIUnknown);
+ pInterface->putref_DataSource(_pInterface);
}
void WpADORecordset::GetBookmark(VARIANT& var)
@@ -1320,4 +1320,64 @@ sal_Bool WpADOUser::SetPermissions(
OLEVariant ObjectTypeId;
ObjectTypeId.setNoArg();
return SUCCEEDED(pInterface->SetPermissions(Name,ObjectType,Action,Rights,adInheritNone,ObjectTypeId));
-} \ No newline at end of file
+}
+
+WpBase::WpBase()
+{
+ pIUnknown = NULL;
+};
+WpBase::WpBase(IDispatch* pInt)
+ :pIUnknown(pInt)
+{
+}
+
+//inline
+WpBase& WpBase::operator=(const WpBase& rhs)
+{
+ if (rhs.pIUnknown != pIUnknown)
+ {
+ if (pIUnknown) pIUnknown->Release();
+ pIUnknown = rhs.pIUnknown;
+ if (pIUnknown) pIUnknown->AddRef();
+ }
+ return *this;
+};
+
+WpBase& WpBase::operator=(IDispatch* rhs)
+{
+ if (pIUnknown != rhs)
+ {
+ if (pIUnknown) pIUnknown->Release();
+ pIUnknown = rhs;
+ if (pIUnknown) pIUnknown->AddRef();
+ }
+ return *this;
+}
+
+WpBase::WpBase(const WpBase& aWrapper)
+{
+ operator=(aWrapper);
+}
+
+WpBase::~WpBase()
+{
+ if (pIUnknown)
+ {
+ pIUnknown->Release();
+ pIUnknown = NULL;
+ }
+}
+
+void WpBase::clear()
+{
+ if (pIUnknown)
+ {
+ pIUnknown->Release();
+ pIUnknown = NULL;
+ }
+}
+
+
+sal_Bool WpBase::IsValid() const {return pIUnknown != NULL;};
+WpBase::operator IDispatch*() { return pIUnknown; }
+