summaryrefslogtreecommitdiff
path: root/connectivity/source/drivers/ado/AViews.cxx
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/source/drivers/ado/AViews.cxx
parent47bfeb2b60950bf5c4faa476639596194c0c769f (diff)
#86293# impl copyCtr
Diffstat (limited to 'connectivity/source/drivers/ado/AViews.cxx')
-rw-r--r--connectivity/source/drivers/ado/AViews.cxx17
1 files changed, 13 insertions, 4 deletions
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);
}