summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorOcke Janssen <oj@openoffice.org>2001-04-27 10:38:26 +0000
committerOcke Janssen <oj@openoffice.org>2001-04-27 10:38:26 +0000
commit9f819eba8756ba7cd27eb1ccad536fadc33784c4 (patch)
tree9da3bf18bb233690689ccb7cf8cf4b6111e67eca /connectivity
parent47bfeb2b60950bf5c4faa476639596194c0c769f (diff)
#86293# impl copyCtr
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/drivers/ado/ACatalog.cxx6
-rw-r--r--connectivity/source/drivers/ado/AColumn.cxx9
-rw-r--r--connectivity/source/drivers/ado/AColumns.cxx16
-rw-r--r--connectivity/source/drivers/ado/ATables.cxx12
-rw-r--r--connectivity/source/drivers/ado/AViews.cxx17
-rw-r--r--connectivity/source/inc/ado/AColumn.hxx6
-rw-r--r--connectivity/source/inc/ado/AViews.hxx22
-rw-r--r--connectivity/source/inc/ado/Awrapadox.hxx12
8 files changed, 73 insertions, 27 deletions
diff --git a/connectivity/source/drivers/ado/ACatalog.cxx b/connectivity/source/drivers/ado/ACatalog.cxx
index 1ab7671026ff..8300c5f1a360 100644
--- a/connectivity/source/drivers/ado/ACatalog.cxx
+++ b/connectivity/source/drivers/ado/ACatalog.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: ACatalog.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: oj $ $Date: 2001-04-12 12:31:30 $
+ * last change: $Author: oj $ $Date: 2001-04-27 11:38:25 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -153,7 +153,7 @@ void OCatalog::refreshViews()
if(m_pViews)
delete m_pViews;
- m_pViews = new OViews(*this,m_aMutex,aVector,pViews,m_pConnection->getMetaData()->storesMixedCaseQuotedIdentifiers());
+ m_pViews = new OViews(this,m_aMutex,aVector,pViews,m_pConnection->getMetaData()->storesMixedCaseQuotedIdentifiers());
}
// -------------------------------------------------------------------------
void OCatalog::refreshGroups()
diff --git a/connectivity/source/drivers/ado/AColumn.cxx b/connectivity/source/drivers/ado/AColumn.cxx
index 211dabd09ac1..7d75b4956a94 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.6 $
+ * $Revision: 1.7 $
*
- * last change: $Author: oj $ $Date: 2001-04-12 12:31:30 $
+ * last change: $Author: oj $ $Date: 2001-04-27 11:38:25 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -308,6 +308,11 @@ void OAdoColumn::fillPropertyValues()
}
}
// -----------------------------------------------------------------------------
+WpADOColumn OAdoColumn::getColumnImpl() const
+{
+ return m_aColumn;
+}
+// -----------------------------------------------------------------------------
diff --git a/connectivity/source/drivers/ado/AColumns.cxx b/connectivity/source/drivers/ado/AColumns.cxx
index 4c2a6f2f2fac..9607b1d12718 100644
--- a/connectivity/source/drivers/ado/AColumns.cxx
+++ b/connectivity/source/drivers/ado/AColumns.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: AColumns.cxx,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: oj $ $Date: 2001-04-12 12:31:30 $
+ * last change: $Author: oj $ $Date: 2001-04-27 11:38:25 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -65,6 +65,12 @@
#ifndef _CONNECTIVITY_ADO_COLUMN_HXX_
#include "ado/AColumn.hxx"
#endif
+#ifndef _CONNECTIVITY_ADO_ACONNECTION_HXX_
+#include "ado/AConnection.hxx"
+#endif
+#ifndef _CONNECTIVITY_ADO_AWRAPADO_HXX_
+#include "ado/Awrapado.hxx"
+#endif
#ifndef _COM_SUN_STAR_SDBC_XROW_HPP_
#include <com/sun/star/sdbc/XRow.hpp>
#endif
@@ -123,7 +129,11 @@ void SAL_CALL OColumns::appendByDescriptor( const Reference< XPropertySet >& des
{
OAdoColumn* pColumn = (OAdoColumn*)xTunnel->getSomething(OAdoColumn::getUnoTunnelImplementationId());
if(pColumn)
- m_pCollection->Append(OLEVariant(pColumn->getColumnImpl()));
+ {
+ WpADOColumn aColumn = pColumn->getColumnImpl();
+ m_pCollection->Append(OLEVariant(aColumn));
+ ADOS::ThrowException(*m_pConnection->getConnection(),*this);
+ }
else
throw SQLException(::rtl::OUString::createFromAscii("Could not append column!"),*this,SQLSTATE_GENERAL,1000,Any());
}
diff --git a/connectivity/source/drivers/ado/ATables.cxx b/connectivity/source/drivers/ado/ATables.cxx
index 018b477ba474..0720065db007 100644
--- a/connectivity/source/drivers/ado/ATables.cxx
+++ b/connectivity/source/drivers/ado/ATables.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: ATables.cxx,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: oj $ $Date: 2001-04-12 12:31:30 $
+ * last change: $Author: oj $ $Date: 2001-04-27 11:38:25 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -86,6 +86,9 @@
#ifndef _CONNECTIVITY_ADO_BCONNECTION_HXX_
#include "ado/AConnection.hxx"
#endif
+#ifndef _CONNECTIVITY_ADO_AWRAPADO_HXX_
+#include "ado/Awrapado.hxx"
+#endif
#define CONNECTIVITY_PROPERTY_NAME_SPACE ado
#ifndef _CONNECTIVITY_PROPERTYIDS_HXX_
#include "propertyids.hxx"
@@ -132,7 +135,10 @@ void SAL_CALL OTables::appendByDescriptor( const Reference< XPropertySet >& desc
{
OAdoTable* pTable = (OAdoTable*)xTunnel->getSomething(OAdoTable:: getUnoTunnelImplementationId());
if(pTable)
+ {
m_pCollection->Append(OLEVariant(pTable->getImpl()));
+ ADOS::ThrowException(*m_pCatalog->getConnection()->getConnection(),*this);
+ }
else
throw SQLException(::rtl::OUString::createFromAscii("Could not append table!"),*this,SQLSTATE_GENERAL,1000,Any());
}
@@ -146,6 +152,7 @@ void SAL_CALL OTables::dropByName( const ::rtl::OUString& elementName ) throw(SQ
::osl::MutexGuard aGuard(m_rMutex);
m_pCollection->Delete(OLEVariant(elementName));
+ ADOS::ThrowException(*m_pCatalog->getConnection()->getConnection(),*this);
OCollection_TYPE::dropByName(elementName);
}
@@ -157,6 +164,7 @@ void SAL_CALL OTables::dropByIndex( sal_Int32 index ) throw(SQLException, IndexO
throw IndexOutOfBoundsException(::rtl::OUString::valueOf(index),*this);
m_pCollection->Delete(OLEVariant(index));
+ ADOS::ThrowException(*m_pCatalog->getConnection()->getConnection(),*this);
OCollection_TYPE::dropByIndex(index);
}
diff --git a/connectivity/source/drivers/ado/AViews.cxx b/connectivity/source/drivers/ado/AViews.cxx
index b6b4ae4ee3b3..2cfc89f9436d 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.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: oj $ $Date: 2001-04-12 12:31:30 $
+ * last change: $Author: oj $ $Date: 2001-04-27 11:38:25 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -89,6 +89,10 @@
#ifndef _CONNECTIVITY_PROPERTYIDS_HXX_
#include "propertyids.hxx"
#endif
+#ifndef _CONNECTIVITY_ADO_AWRAPADO_HXX_
+#include "ado/Awrapado.hxx"
+#endif
+
using namespace connectivity::ado;
using namespace com::sun::star::uno;
using namespace com::sun::star::lang;
@@ -103,7 +107,7 @@ Reference< XNamed > OViews::createObject(const ::rtl::OUString& _rName)
ADOView* pView = NULL;
m_pCollection->get_Item(OLEVariant(_rName),&pView);
- Reference< XNamed > xRet = new OAdoView(isCaseSensitive(),pView);
+ Reference< XNamed > xRet = new OAdoView(isCaseSensitive(),pView);
return xRet;
}
@@ -124,12 +128,15 @@ void SAL_CALL OViews::appendByDescriptor( const Reference< XPropertySet >& descr
{
::osl::MutexGuard aGuard(m_rMutex);
- Reference< ::com::sun::star::lang::XUnoTunnel> xTunnel(descriptor,UNO_QUERY);
+ Reference< ::com::sun::star::lang::XUnoTunnel> xTunnel(descriptor,UNO_QUERY);
if(xTunnel.is())
{
OAdoView* pView = (OAdoView*)xTunnel->getSomething(OAdoView:: getUnoTunnelImplementationId());
if(pView)
+ {
m_pCollection->Append(OLEString(getString(descriptor->getPropertyValue(PROPERTY_NAME))),(IDispatch *)pView->getImpl());
+ ADOS::ThrowException(*m_pCatalog->getConnection()->getConnection(),*this);
+ }
else
throw SQLException(::rtl::OUString::createFromAscii("Could not append view!"),*this,SQLSTATE_GENERAL,1000,Any());
}
@@ -143,6 +150,7 @@ void SAL_CALL OViews::dropByName( const ::rtl::OUString& elementName ) throw(SQL
::osl::MutexGuard aGuard(m_rMutex);
m_pCollection->Delete(OLEVariant(elementName));
+ ADOS::ThrowException(*m_pCatalog->getConnection()->getConnection(),*this);
OCollection_TYPE::dropByName(elementName);
}
@@ -154,6 +162,7 @@ void SAL_CALL OViews::dropByIndex( sal_Int32 index ) throw(SQLException, IndexOu
throw IndexOutOfBoundsException(::rtl::OUString::valueOf(index),*this);
m_pCollection->Delete(OLEVariant(index));
+ ADOS::ThrowException(*m_pCatalog->getConnection()->getConnection(),*this);
OCollection_TYPE::dropByIndex(index);
}
diff --git a/connectivity/source/inc/ado/AColumn.hxx b/connectivity/source/inc/ado/AColumn.hxx
index 5feb4333cff5..e4e464a65ae7 100644
--- a/connectivity/source/inc/ado/AColumn.hxx
+++ b/connectivity/source/inc/ado/AColumn.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: AColumn.hxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: oj $ $Date: 2001-04-12 12:32:56 $
+ * last change: $Author: oj $ $Date: 2001-04-27 11:38:26 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -100,7 +100,7 @@ namespace connectivity
virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException);
static ::com::sun::star::uno::Sequence< sal_Int8 > getUnoTunnelImplementationId();
- WpADOColumn getColumnImpl() const { return m_aColumn;}
+ WpADOColumn getColumnImpl() const;
};
}
}
diff --git a/connectivity/source/inc/ado/AViews.hxx b/connectivity/source/inc/ado/AViews.hxx
index dfc254e0e8b4..61badef21678 100644
--- a/connectivity/source/inc/ado/AViews.hxx
+++ b/connectivity/source/inc/ado/AViews.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: AViews.hxx,v $
*
- * $Revision: 1.1.1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: hr $ $Date: 2000-09-18 16:14:25 $
+ * last change: $Author: oj $ $Date: 2001-04-27 11:38:26 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -68,6 +68,10 @@
#ifndef _CONNECTIVITY_ADO_AWRAPADOX_HXX_
#include "ado/Awrapadox.hxx"
#endif
+#ifndef _CONNECTIVITY_ADO_CATALOG_HXX_
+#include "ado/ACatalog.hxx"
+#endif
+
namespace connectivity
{
@@ -76,17 +80,19 @@ namespace connectivity
class OViews : public sdbcx::OCollection
{
- ADOViews* m_pCollection;
+ ADOViews* m_pCollection;
+ OCatalog* m_pCatalog;
protected:
virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNamed > createObject(const ::rtl::OUString& _rName);
virtual void impl_refresh() throw(::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > createEmptyObject();
void setComments(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& descriptor ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
public:
- OViews(::cppu::OWeakObject& _rParent, ::osl::Mutex& _rMutex,
+ OViews(OCatalog* _pParent, ::osl::Mutex& _rMutex,
const ::std::vector< ::rtl::OUString> &_rVector,
- ADOViews* _pCollection,sal_Bool _bCase) : sdbcx::OCollection(_rParent,_bCase,_rMutex,_rVector)
+ ADOViews* _pCollection,sal_Bool _bCase) : sdbcx::OCollection(*_pParent,_bCase,_rMutex,_rVector)
,m_pCollection(_pCollection)
+ ,m_pCatalog(_pParent)
{
if(m_pCollection)
m_pCollection->AddRef();
@@ -99,10 +105,10 @@ namespace connectivity
}
// XAppend
- virtual void SAL_CALL appendByDescriptor( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& descriptor ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::container::ElementExistException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL appendByDescriptor( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& descriptor ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::container::ElementExistException, ::com::sun::star::uno::RuntimeException);
// XDrop
- virtual void SAL_CALL dropByName( const ::rtl::OUString& elementName ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL dropByIndex( sal_Int32 index ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL dropByName( const ::rtl::OUString& elementName ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL dropByIndex( sal_Int32 index ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
};
}
}
diff --git a/connectivity/source/inc/ado/Awrapadox.hxx b/connectivity/source/inc/ado/Awrapadox.hxx
index 38ffd2dd0398..c906c69f1afe 100644
--- a/connectivity/source/inc/ado/Awrapadox.hxx
+++ b/connectivity/source/inc/ado/Awrapadox.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: Awrapadox.hxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: oj $ $Date: 2001-04-12 12:32:56 $
+ * last change: $Author: oj $ $Date: 2001-04-27 11:38:26 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -125,6 +125,7 @@ namespace connectivity
{
public:
WpADOColumn(_ADOColumn* pInt=NULL) : WpOLEBase<_ADOColumn>(pInt){}
+ WpADOColumn(const WpADOColumn& rhs){operator=(rhs);}
void Create();
@@ -227,6 +228,7 @@ namespace connectivity
{
public:
WpADOKey(ADOKey* pInt=NULL) : WpOLEBase<ADOKey>(pInt){}
+ WpADOKey(const WpADOKey& rhs){operator=(rhs);}
inline WpADOKey& operator=(const WpADOKey& rhs)
{WpOLEBase<ADOKey>::operator=(rhs); return *this;}
@@ -309,6 +311,7 @@ namespace connectivity
{
public:
WpADOIndex(_ADOIndex* pInt=NULL) : WpOLEBase<_ADOIndex>(pInt){}
+ WpADOIndex(const WpADOIndex& rhs){operator=(rhs);}
inline WpADOIndex& operator=(const WpADOIndex& rhs)
{WpOLEBase<_ADOIndex>::operator=(rhs); return *this;}
@@ -377,6 +380,7 @@ namespace connectivity
{
public:
WpADOCatalog(_ADOCatalog* pInt = NULL) : WpOLEBase<_ADOCatalog>(pInt){}
+ WpADOCatalog(const WpADOCatalog& rhs){operator=(rhs);}
inline WpADOCatalog& operator=(const WpADOCatalog& rhs)
{WpOLEBase<_ADOCatalog>::operator=(rhs); return *this;}
@@ -430,6 +434,7 @@ namespace connectivity
{
public:
WpADOTable(_ADOTable* pInt=NULL) : WpOLEBase<_ADOTable>(pInt){}
+ WpADOTable(const WpADOTable& rhs){operator=(rhs);}
inline WpADOTable& operator=(const WpADOTable& rhs)
{WpOLEBase<_ADOTable>::operator=(rhs); return *this;}
@@ -497,6 +502,7 @@ namespace connectivity
{
public:
WpADOView(ADOView* pInt=NULL) : WpOLEBase<ADOView>(pInt){}
+ WpADOView(const WpADOView& rhs){operator=(rhs);}
inline WpADOView& operator=(const WpADOView& rhs)
{WpOLEBase<ADOView>::operator=(rhs); return *this;}
@@ -525,6 +531,7 @@ namespace connectivity
{
public:
WpADOGroup(_ADOGroup* pInt=NULL) : WpOLEBase<_ADOGroup>(pInt){}
+ WpADOGroup(const WpADOGroup& rhs){operator=(rhs);}
inline WpADOGroup& operator=(const WpADOGroup& rhs)
{WpOLEBase<_ADOGroup>::operator=(rhs); return *this;}
@@ -579,6 +586,7 @@ namespace connectivity
{
public:
WpADOUser(_ADOUser* pInt=NULL) : WpOLEBase<_ADOUser>(pInt){}
+ WpADOUser(const WpADOUser& rhs){operator=(rhs);}
inline WpADOUser& operator=(const WpADOUser& rhs)
{WpOLEBase<_ADOUser>::operator=(rhs); return *this;}