summaryrefslogtreecommitdiff
path: root/connectivity/source/sdbcx
diff options
context:
space:
mode:
Diffstat (limited to 'connectivity/source/sdbcx')
-rw-r--r--connectivity/source/sdbcx/VCatalog.cxx31
-rw-r--r--connectivity/source/sdbcx/VCollection.cxx11
-rw-r--r--connectivity/source/sdbcx/VColumn.cxx41
-rw-r--r--connectivity/source/sdbcx/VGroup.cxx29
-rw-r--r--connectivity/source/sdbcx/VIndex.cxx29
-rw-r--r--connectivity/source/sdbcx/VIndexColumn.cxx13
-rw-r--r--connectivity/source/sdbcx/VKey.cxx26
-rw-r--r--connectivity/source/sdbcx/VKeyColumn.cxx13
-rw-r--r--connectivity/source/sdbcx/VTable.cxx46
-rw-r--r--connectivity/source/sdbcx/VUser.cxx35
-rw-r--r--connectivity/source/sdbcx/VView.cxx21
11 files changed, 137 insertions, 158 deletions
diff --git a/connectivity/source/sdbcx/VCatalog.cxx b/connectivity/source/sdbcx/VCatalog.cxx
index 86904c1649d9..dca34fae78c2 100644
--- a/connectivity/source/sdbcx/VCatalog.cxx
+++ b/connectivity/source/sdbcx/VCatalog.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: VCatalog.cxx,v $
*
- * $Revision: 1.8 $
+ * $Revision: 1.9 $
*
- * last change: $Author: oj $ $Date: 2001-04-30 09:59:54 $
+ * last change: $Author: oj $ $Date: 2001-05-14 11:34:03 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -68,18 +68,17 @@
#ifndef _COM_SUN_STAR_LANG_DISPOSEDEXCEPTION_HPP_
#include <com/sun/star/lang/DisposedException.hpp>
#endif
-#define CONNECTIVITY_PROPERTY_NAME_SPACE dbtools
-#ifndef _CONNECTIVITY_PROPERTYIDS_HXX_
-#include "propertyids.hxx"
-#endif
#ifndef _CONNECTIVITY_SDBCX_COLLECTION_HXX_
#include "connectivity/sdbcx/VCollection.hxx"
#endif
#ifndef _CONNECTIVITY_SDBCX_DESCRIPTOR_HXX_
#include "connectivity/sdbcx/VDescriptor.hxx"
#endif
+#ifndef CONNECTIVITY_CONNECTION_HXX
+#include "TConnection.hxx"
+#endif
-using namespace connectivity::dbtools;
+using namespace connectivity;
using namespace connectivity::sdbcx;
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::uno;
@@ -139,8 +138,8 @@ void SAL_CALL OCatalog::disposing()
Reference< XNameAccess > SAL_CALL OCatalog::getTables( ) throw(RuntimeException)
{
::osl::MutexGuard aGuard(m_aMutex);
- if (OCatalog_BASE::rBHelper.bDisposed)
- throw DisposedException();
+ checkDisposed(OCatalog_BASE::rBHelper.bDisposed);
+
return const_cast<OCatalog*>(this)->m_pTables;
}
@@ -149,8 +148,8 @@ Reference< XNameAccess > SAL_CALL OCatalog::getTables( ) throw(RuntimeException
Reference< XNameAccess > SAL_CALL OCatalog::getViews( ) throw(RuntimeException)
{
::osl::MutexGuard aGuard(m_aMutex);
- if (OCatalog_BASE::rBHelper.bDisposed)
- throw DisposedException();
+ checkDisposed(OCatalog_BASE::rBHelper.bDisposed);
+
return const_cast<OCatalog*>(this)->m_pViews;
}
@@ -159,8 +158,8 @@ Reference< XNameAccess > SAL_CALL OCatalog::getViews( ) throw(RuntimeException)
Reference< XNameAccess > SAL_CALL OCatalog::getUsers( ) throw(RuntimeException)
{
::osl::MutexGuard aGuard(m_aMutex);
- if (OCatalog_BASE::rBHelper.bDisposed)
- throw DisposedException();
+ checkDisposed(OCatalog_BASE::rBHelper.bDisposed);
+
return const_cast<OCatalog*>(this)->m_pUsers;
}
@@ -169,8 +168,8 @@ Reference< XNameAccess > SAL_CALL OCatalog::getUsers( ) throw(RuntimeException)
Reference< XNameAccess > SAL_CALL OCatalog::getGroups( ) throw(RuntimeException)
{
::osl::MutexGuard aGuard(m_aMutex);
- if (OCatalog_BASE::rBHelper.bDisposed)
- throw DisposedException();
+ checkDisposed(OCatalog_BASE::rBHelper.bDisposed);
+
return const_cast<OCatalog*>(this)->m_pGroups;
}
@@ -178,7 +177,7 @@ Reference< XNameAccess > SAL_CALL OCatalog::getGroups( ) throw(RuntimeException
void ODescriptor::construct()
{
sal_Int32 nAttrib = isNew() ? 0 : ::com::sun::star::beans::PropertyAttribute::READONLY;
- registerProperty(PROPERTY_NAME, PROPERTY_ID_NAME ,nAttrib,&m_Name,::getCppuType(reinterpret_cast< ::rtl::OUString*>(NULL)));
+ registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME), PROPERTY_ID_NAME ,nAttrib,&m_Name,::getCppuType(reinterpret_cast< ::rtl::OUString*>(NULL)));
}
// -------------------------------------------------------------------------
ODescriptor::~ODescriptor()
diff --git a/connectivity/source/sdbcx/VCollection.cxx b/connectivity/source/sdbcx/VCollection.cxx
index 55ce8341dac6..f32084b14a0c 100644
--- a/connectivity/source/sdbcx/VCollection.cxx
+++ b/connectivity/source/sdbcx/VCollection.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: VCollection.cxx,v $
*
- * $Revision: 1.16 $
+ * $Revision: 1.17 $
*
- * last change: $Author: oj $ $Date: 2001-05-04 09:58:45 $
+ * last change: $Author: oj $ $Date: 2001-05-14 11:34:03 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -75,9 +75,8 @@
#ifndef _COMPHELPER_TYPES_HXX_
#include <comphelper/types.hxx>
#endif
-#define CONNECTIVITY_PROPERTY_NAME_SPACE dbtools
-#ifndef _CONNECTIVITY_PROPERTYIDS_HXX_
-#include "propertyids.hxx"
+#ifndef CONNECTIVITY_CONNECTION_HXX
+#include "TConnection.hxx"
#endif
using namespace connectivity::sdbcx;
@@ -295,7 +294,7 @@ sal_Int32 SAL_CALL OCollection::findColumn( const ::rtl::OUString& columnName )
{
ObjectIter aIter = m_aNameMap.find(columnName);
if(aIter == m_aNameMap.end())
- throw SQLException(::rtl::OUString::createFromAscii("Unknown column name!"),*this,connectivity::dbtools::SQLSTATE_GENERAL,1000,makeAny(NoSuchElementException(columnName,*this)) );
+ throw SQLException(::rtl::OUString::createFromAscii("Unknown column name!"),*this,OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_HY0000),1000,makeAny(NoSuchElementException(columnName,*this)) );
return m_aElements.size() - (m_aElements.end() - ::std::find(m_aElements.begin(),m_aElements.end(),aIter)) +1; // because cloumns start at one
}
diff --git a/connectivity/source/sdbcx/VColumn.cxx b/connectivity/source/sdbcx/VColumn.cxx
index 62a1c1b70dc4..e6af610ef556 100644
--- a/connectivity/source/sdbcx/VColumn.cxx
+++ b/connectivity/source/sdbcx/VColumn.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: VColumn.cxx,v $
*
- * $Revision: 1.10 $
+ * $Revision: 1.11 $
*
- * last change: $Author: oj $ $Date: 2001-04-30 09:59:54 $
+ * last change: $Author: oj $ $Date: 2001-05-14 11:34:03 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -64,16 +64,15 @@
#ifndef _COM_SUN_STAR_LANG_DISPOSEDEXCEPTION_HPP_
#include <com/sun/star/lang/DisposedException.hpp>
#endif
-#define CONNECTIVITY_PROPERTY_NAME_SPACE dbtools
-#ifndef _CONNECTIVITY_PROPERTYIDS_HXX_
-#include "propertyids.hxx"
-#endif
#ifndef _COMPHELPER_SEQUENCE_HXX_
#include <comphelper/sequence.hxx>
#endif
+#ifndef CONNECTIVITY_CONNECTION_HXX
+#include "TConnection.hxx"
+#endif
// -------------------------------------------------------------------------
-using namespace connectivity::dbtools;
+using namespace connectivity;
using namespace connectivity::sdbcx;
using namespace cppu;
using namespace connectivity;
@@ -207,16 +206,16 @@ void OColumn::construct()
sal_Int32 nAttrib = isNew() ? 0 : PropertyAttribute::READONLY;
- registerProperty(PROPERTY_TYPENAME, PROPERTY_ID_TYPENAME, nAttrib,&m_TypeName, ::getCppuType(reinterpret_cast< ::rtl::OUString*>(NULL)));
- registerProperty(PROPERTY_DESCRIPTION, PROPERTY_ID_DESCRIPTION, nAttrib,&m_Description, ::getCppuType(reinterpret_cast< ::rtl::OUString*>(NULL)));
- registerProperty(PROPERTY_DEFAULTVALUE, PROPERTY_ID_DEFAULTVALUE, nAttrib,&m_DefaultValue, ::getCppuType(reinterpret_cast< ::rtl::OUString*>(NULL)));
- registerProperty(PROPERTY_PRECISION, PROPERTY_ID_PRECISION, nAttrib,&m_Precision, ::getCppuType(reinterpret_cast<sal_Int32*>(NULL)));
- registerProperty(PROPERTY_TYPE, PROPERTY_ID_TYPE, nAttrib,&m_Type, ::getCppuType(reinterpret_cast<sal_Int32*>(NULL)));
- registerProperty(PROPERTY_SCALE, PROPERTY_ID_SCALE, nAttrib,&m_Scale, ::getCppuType(reinterpret_cast<sal_Int32*>(NULL)));
- registerProperty(PROPERTY_ISNULLABLE, PROPERTY_ID_ISNULLABLE, nAttrib,&m_IsNullable, ::getCppuType(reinterpret_cast<sal_Int32*>(NULL)));
- registerProperty(PROPERTY_ISAUTOINCREMENT, PROPERTY_ID_ISAUTOINCREMENT, nAttrib,&m_IsAutoIncrement, ::getBooleanCppuType());
- registerProperty(PROPERTY_ISROWVERSION, PROPERTY_ID_ISROWVERSION, nAttrib,&m_IsRowVersion, ::getBooleanCppuType());
- registerProperty(PROPERTY_ISCURRENCY, PROPERTY_ID_ISCURRENCY, nAttrib,&m_IsCurrency, ::getBooleanCppuType());
+ registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPENAME), PROPERTY_ID_TYPENAME, nAttrib,&m_TypeName, ::getCppuType(reinterpret_cast< ::rtl::OUString*>(NULL)));
+ registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_DESCRIPTION), PROPERTY_ID_DESCRIPTION, nAttrib,&m_Description, ::getCppuType(reinterpret_cast< ::rtl::OUString*>(NULL)));
+ registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_DEFAULTVALUE), PROPERTY_ID_DEFAULTVALUE, nAttrib,&m_DefaultValue, ::getCppuType(reinterpret_cast< ::rtl::OUString*>(NULL)));
+ registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_PRECISION), PROPERTY_ID_PRECISION, nAttrib,&m_Precision, ::getCppuType(reinterpret_cast<sal_Int32*>(NULL)));
+ registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE), PROPERTY_ID_TYPE, nAttrib,&m_Type, ::getCppuType(reinterpret_cast<sal_Int32*>(NULL)));
+ registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_SCALE), PROPERTY_ID_SCALE, nAttrib,&m_Scale, ::getCppuType(reinterpret_cast<sal_Int32*>(NULL)));
+ registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISNULLABLE), PROPERTY_ID_ISNULLABLE, nAttrib,&m_IsNullable, ::getCppuType(reinterpret_cast<sal_Int32*>(NULL)));
+ registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISAUTOINCREMENT), PROPERTY_ID_ISAUTOINCREMENT, nAttrib,&m_IsAutoIncrement, ::getBooleanCppuType());
+ registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISROWVERSION), PROPERTY_ID_ISROWVERSION, nAttrib,&m_IsRowVersion, ::getBooleanCppuType());
+ registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISCURRENCY), PROPERTY_ID_ISCURRENCY, nAttrib,&m_IsCurrency, ::getBooleanCppuType());
}
// -------------------------------------------------------------------------
void OColumn::disposing(void)
@@ -224,15 +223,15 @@ void OColumn::disposing(void)
OPropertySetHelper::disposing();
::osl::MutexGuard aGuard(m_aMutex);
- if (OColumnDescriptor_BASE::rBHelper.bDisposed)
- throw DisposedException();
+ checkDisposed(OColumnDescriptor_BASE::rBHelper.bDisposed);
+
}
// -------------------------------------------------------------------------
Reference< XPropertySet > SAL_CALL OColumn::createDataDescriptor( ) throw(RuntimeException)
{
::osl::MutexGuard aGuard(m_aMutex);
- if (OColumnDescriptor_BASE::rBHelper.bDisposed)
- throw DisposedException();
+ checkDisposed(OColumnDescriptor_BASE::rBHelper.bDisposed);
+
OColumn* pNewColumn = new OColumn( m_Name,
m_TypeName,
diff --git a/connectivity/source/sdbcx/VGroup.cxx b/connectivity/source/sdbcx/VGroup.cxx
index beb0637276b9..46143cf57e78 100644
--- a/connectivity/source/sdbcx/VGroup.cxx
+++ b/connectivity/source/sdbcx/VGroup.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: VGroup.cxx,v $
*
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
- * last change: $Author: oj $ $Date: 2001-04-30 09:59:54 $
+ * last change: $Author: oj $ $Date: 2001-05-14 11:34:03 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -74,17 +74,12 @@
#ifndef _COM_SUN_STAR_SDBCX_PRIVILEGEOBJECT_HPP_
#include <com/sun/star/sdbcx/PrivilegeObject.hpp>
#endif
-#define CONNECTIVITY_PROPERTY_NAME_SPACE dbtools
-#ifndef _CONNECTIVITY_PROPERTYIDS_HXX_
-#include "propertyids.hxx"
-#endif
#ifndef _COMPHELPER_SEQUENCE_HXX_
#include <comphelper/sequence.hxx>
#endif
// -------------------------------------------------------------------------
-using namespace connectivity::dbtools;
using namespace connectivity::sdbcx;
using namespace connectivity;
using namespace ::com::sun::star::sdbc;
@@ -151,8 +146,8 @@ void OGroup::disposing(void)
Reference< XNameAccess > SAL_CALL OGroup::getUsers( ) throw(RuntimeException)
{
::osl::MutexGuard aGuard(m_aMutex);
- if (OGroup_BASE::rBHelper.bDisposed)
- throw DisposedException();
+ checkDisposed(OGroup_BASE::rBHelper.bDisposed);
+
return const_cast<OGroup*>(this)->m_pUsers;
}
@@ -161,8 +156,8 @@ Reference< XNameAccess > SAL_CALL OGroup::getUsers( ) throw(RuntimeException)
sal_Int32 SAL_CALL OGroup::getPrivileges( const ::rtl::OUString& objName, sal_Int32 objType ) throw(::com::sun::star::sdbc::SQLException, RuntimeException)
{
::osl::MutexGuard aGuard(m_aMutex);
- if (OGroup_BASE::rBHelper.bDisposed)
- throw DisposedException();
+ checkDisposed(OGroup_BASE::rBHelper.bDisposed);
+
return 0;
}
@@ -170,8 +165,8 @@ sal_Int32 SAL_CALL OGroup::getPrivileges( const ::rtl::OUString& objName, sal_In
sal_Int32 SAL_CALL OGroup::getGrantablePrivileges( const ::rtl::OUString& objName, sal_Int32 objType ) throw(::com::sun::star::sdbc::SQLException, RuntimeException)
{
::osl::MutexGuard aGuard(m_aMutex);
- if (OGroup_BASE::rBHelper.bDisposed)
- throw DisposedException();
+ checkDisposed(OGroup_BASE::rBHelper.bDisposed);
+
return 0;
}
@@ -179,15 +174,15 @@ sal_Int32 SAL_CALL OGroup::getGrantablePrivileges( const ::rtl::OUString& objNam
void SAL_CALL OGroup::grantPrivileges( const ::rtl::OUString& objName, sal_Int32 objType, sal_Int32 objPrivileges ) throw(::com::sun::star::sdbc::SQLException, RuntimeException)
{
::osl::MutexGuard aGuard(m_aMutex);
- if (OGroup_BASE::rBHelper.bDisposed)
- throw DisposedException();
+ checkDisposed(OGroup_BASE::rBHelper.bDisposed);
+
}
// -------------------------------------------------------------------------
void SAL_CALL OGroup::revokePrivileges( const ::rtl::OUString& objName, sal_Int32 objType, sal_Int32 objPrivileges ) throw(::com::sun::star::sdbc::SQLException, RuntimeException)
{
::osl::MutexGuard aGuard(m_aMutex);
- if (OGroup_BASE::rBHelper.bDisposed)
- throw DisposedException();
+ checkDisposed(OGroup_BASE::rBHelper.bDisposed);
+
}
// -----------------------------------------------------------------------------
::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL OGroup::getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException)
diff --git a/connectivity/source/sdbcx/VIndex.cxx b/connectivity/source/sdbcx/VIndex.cxx
index 23e12c5554d0..a9e64fd60730 100644
--- a/connectivity/source/sdbcx/VIndex.cxx
+++ b/connectivity/source/sdbcx/VIndex.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: VIndex.cxx,v $
*
- * $Revision: 1.10 $
+ * $Revision: 1.11 $
*
- * last change: $Author: oj $ $Date: 2001-04-30 09:59:54 $
+ * last change: $Author: oj $ $Date: 2001-05-14 11:34:03 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -65,10 +65,6 @@
#ifndef _COM_SUN_STAR_LANG_DISPOSEDEXCEPTION_HPP_
#include <com/sun/star/lang/DisposedException.hpp>
#endif
-#define CONNECTIVITY_PROPERTY_NAME_SPACE dbtools
-#ifndef _CONNECTIVITY_PROPERTYIDS_HXX_
-#include "propertyids.hxx"
-#endif
#ifndef _CONNECTIVITY_SDBCX_COLUMN_HXX_
#include "connectivity/sdbcx/VColumn.hxx"
#endif
@@ -78,8 +74,11 @@
#ifndef _CONNECTIVITY_SDBCX_COLLECTION_HXX_
#include "connectivity/sdbcx/VCollection.hxx"
#endif
+#ifndef CONNECTIVITY_CONNECTION_HXX
+#include "TConnection.hxx"
+#endif
// -------------------------------------------------------------------------
-using namespace connectivity::dbtools;
+using namespace connectivity;
using namespace connectivity;
using namespace connectivity::sdbcx;
using namespace cppu;
@@ -189,10 +188,10 @@ void OIndex::construct()
sal_Int32 nAttrib = isNew() ? 0 : PropertyAttribute::READONLY;
- registerProperty(PROPERTY_CATALOG, PROPERTY_ID_CATALOG, nAttrib,&m_Catalog, ::getCppuType(reinterpret_cast< ::rtl::OUString*>(NULL)));
- registerProperty(PROPERTY_ISUNIQUE, PROPERTY_ID_ISUNIQUE, nAttrib,&m_IsUnique, ::getBooleanCppuType());
- registerProperty(PROPERTY_ISPRIMARYKEYINDEX,PROPERTY_ID_ISPRIMARYKEYINDEX, nAttrib,&m_IsPrimaryKeyIndex, ::getBooleanCppuType());
- registerProperty(PROPERTY_ISCLUSTERED, PROPERTY_ID_ISCLUSTERED, nAttrib,&m_IsClustered, ::getBooleanCppuType());
+ registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_CATALOG), PROPERTY_ID_CATALOG, nAttrib,&m_Catalog, ::getCppuType(reinterpret_cast< ::rtl::OUString*>(NULL)));
+ registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISUNIQUE), PROPERTY_ID_ISUNIQUE, nAttrib,&m_IsUnique, ::getBooleanCppuType());
+ registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISPRIMARYKEYINDEX),PROPERTY_ID_ISPRIMARYKEYINDEX, nAttrib,&m_IsPrimaryKeyIndex, ::getBooleanCppuType());
+ registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISCLUSTERED), PROPERTY_ID_ISCLUSTERED, nAttrib,&m_IsClustered, ::getBooleanCppuType());
}
// -------------------------------------------------------------------------
void OIndex::disposing(void)
@@ -208,8 +207,8 @@ void OIndex::disposing(void)
Reference< ::com::sun::star::container::XNameAccess > SAL_CALL OIndex::getColumns( ) throw(RuntimeException)
{
::osl::MutexGuard aGuard(m_aMutex);
- if (ODescriptor_BASE::rBHelper.bDisposed)
- throw DisposedException();
+ checkDisposed(ODescriptor_BASE::rBHelper.bDisposed);
+
if(!m_pColumns)
refreshColumns();
@@ -220,8 +219,8 @@ Reference< ::com::sun::star::container::XNameAccess > SAL_CALL OIndex::getColumn
Reference< XPropertySet > SAL_CALL OIndex::createDataDescriptor( ) throw(RuntimeException)
{
::osl::MutexGuard aGuard(m_aMutex);
- if (ODescriptor_BASE::rBHelper.bDisposed)
- throw DisposedException();
+ checkDisposed(ODescriptor_BASE::rBHelper.bDisposed);
+
return this;
}
diff --git a/connectivity/source/sdbcx/VIndexColumn.cxx b/connectivity/source/sdbcx/VIndexColumn.cxx
index c03de357e10d..8dd43e82297a 100644
--- a/connectivity/source/sdbcx/VIndexColumn.cxx
+++ b/connectivity/source/sdbcx/VIndexColumn.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: VIndexColumn.cxx,v $
*
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
- * last change: $Author: fs $ $Date: 2001-03-16 16:28:45 $
+ * last change: $Author: oj $ $Date: 2001-05-14 11:34:03 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -61,12 +61,11 @@
#ifndef _CONNECTIVITY_SDBCX_INDEXCOLUMN_HXX_
#include "connectivity/sdbcx/VIndexColumn.hxx"
#endif
-#define CONNECTIVITY_PROPERTY_NAME_SPACE dbtools
-#ifndef _CONNECTIVITY_PROPERTYIDS_HXX_
-#include "propertyids.hxx"
+#ifndef CONNECTIVITY_CONNECTION_HXX
+#include "TConnection.hxx"
#endif
-using namespace connectivity::dbtools;
+using namespace connectivity;
using namespace connectivity::sdbcx;
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::uno;
@@ -150,7 +149,7 @@ OIndexColumn::OIndexColumn( sal_Bool _IsAscending,
void OIndexColumn::construct()
{
sal_Int32 nAttrib = isNew() ? 0 : PropertyAttribute::READONLY;
- registerProperty(PROPERTY_ISASCENDING, PROPERTY_ID_ISASCENDING, nAttrib,&m_IsAscending, ::getBooleanCppuType());
+ registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISASCENDING), PROPERTY_ID_ISASCENDING, nAttrib,&m_IsAscending, ::getBooleanCppuType());
}
// -----------------------------------------------------------------------------
diff --git a/connectivity/source/sdbcx/VKey.cxx b/connectivity/source/sdbcx/VKey.cxx
index 99a6e41f89ed..e846a00a1613 100644
--- a/connectivity/source/sdbcx/VKey.cxx
+++ b/connectivity/source/sdbcx/VKey.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: VKey.cxx,v $
*
- * $Revision: 1.8 $
+ * $Revision: 1.9 $
*
- * last change: $Author: oj $ $Date: 2001-04-30 09:59:54 $
+ * last change: $Author: oj $ $Date: 2001-05-14 11:34:03 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -78,12 +78,10 @@
#ifndef _CONNECTIVITY_SDBCX_COLLECTION_HXX_
#include "connectivity/sdbcx/VCollection.hxx"
#endif
-#define CONNECTIVITY_PROPERTY_NAME_SPACE dbtools
-#ifndef _CONNECTIVITY_PROPERTYIDS_HXX_
-#include "propertyids.hxx"
+#ifndef CONNECTIVITY_CONNECTION_HXX
+#include "TConnection.hxx"
#endif
// -------------------------------------------------------------------------
-using namespace connectivity::dbtools;
using namespace connectivity;
using namespace connectivity::sdbcx;
using namespace ::com::sun::star::beans;
@@ -178,10 +176,10 @@ void OKey::construct()
sal_Int32 nAttrib = isNew() ? 0 : PropertyAttribute::READONLY;
- registerProperty(PROPERTY_REFERENCEDTABLE, PROPERTY_ID_REFERENCEDTABLE, nAttrib,&m_ReferencedTable, ::getCppuType(reinterpret_cast< ::rtl::OUString*>(NULL)));
- registerProperty(PROPERTY_TYPE, PROPERTY_ID_TYPE, nAttrib,&m_Type, ::getCppuType(reinterpret_cast<sal_Int32*>(NULL)));
- registerProperty(PROPERTY_UPDATERULE, PROPERTY_ID_UPDATERULE, nAttrib,&m_UpdateRule, ::getCppuType(reinterpret_cast<sal_Int32*>(NULL)));
- registerProperty(PROPERTY_DELETERULE, PROPERTY_ID_DELETERULE, nAttrib,&m_DeleteRule, ::getCppuType(reinterpret_cast<sal_Int32*>(NULL)));
+ registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_REFERENCEDTABLE), PROPERTY_ID_REFERENCEDTABLE, nAttrib,&m_ReferencedTable, ::getCppuType(reinterpret_cast< ::rtl::OUString*>(NULL)));
+ registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE), PROPERTY_ID_TYPE, nAttrib,&m_Type, ::getCppuType(reinterpret_cast<sal_Int32*>(NULL)));
+ registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_UPDATERULE), PROPERTY_ID_UPDATERULE, nAttrib,&m_UpdateRule, ::getCppuType(reinterpret_cast<sal_Int32*>(NULL)));
+ registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_DELETERULE), PROPERTY_ID_DELETERULE, nAttrib,&m_DeleteRule, ::getCppuType(reinterpret_cast<sal_Int32*>(NULL)));
}
// -------------------------------------------------------------------------
void OKey::disposing(void)
@@ -212,8 +210,8 @@ void OKey::disposing(void)
Reference< ::com::sun::star::container::XNameAccess > SAL_CALL OKey::getColumns( ) throw(RuntimeException)
{
::osl::MutexGuard aGuard(m_aMutex);
- if (ODescriptor_BASE::rBHelper.bDisposed)
- throw DisposedException();
+ checkDisposed(ODescriptor_BASE::rBHelper.bDisposed);
+
if(!m_pColumns)
refreshColumns();
@@ -224,8 +222,8 @@ Reference< ::com::sun::star::container::XNameAccess > SAL_CALL OKey::getColumns(
Reference< XPropertySet > SAL_CALL OKey::createDataDescriptor( ) throw(RuntimeException)
{
::osl::MutexGuard aGuard(m_aMutex);
- if (ODescriptor_BASE::rBHelper.bDisposed)
- throw DisposedException();
+ checkDisposed(ODescriptor_BASE::rBHelper.bDisposed);
+
return this;
}
diff --git a/connectivity/source/sdbcx/VKeyColumn.cxx b/connectivity/source/sdbcx/VKeyColumn.cxx
index f6978b47630b..ace1e097a977 100644
--- a/connectivity/source/sdbcx/VKeyColumn.cxx
+++ b/connectivity/source/sdbcx/VKeyColumn.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: VKeyColumn.cxx,v $
*
- * $Revision: 1.7 $
+ * $Revision: 1.8 $
*
- * last change: $Author: oj $ $Date: 2001-03-02 15:26:27 $
+ * last change: $Author: oj $ $Date: 2001-05-14 11:34:03 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -62,12 +62,11 @@
#ifndef _CONNECTIVITY_SDBCX_KEYCOLUMN_HXX_
#include "connectivity/sdbcx/VKeyColumn.hxx"
#endif
-#define CONNECTIVITY_PROPERTY_NAME_SPACE dbtools
-#ifndef _CONNECTIVITY_PROPERTYIDS_HXX_
-#include "propertyids.hxx"
+#ifndef CONNECTIVITY_CONNECTION_HXX
+#include "TConnection.hxx"
#endif
-using namespace connectivity::dbtools;
+using namespace connectivity;
using namespace connectivity::sdbcx;
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::uno;
@@ -155,7 +154,7 @@ OKeyColumn::~OKeyColumn()
void OKeyColumn::construct()
{
sal_Int32 nAttrib = isNew() ? 0 : PropertyAttribute::READONLY;
- registerProperty(PROPERTY_RELATEDCOLUMN, PROPERTY_ID_RELATEDCOLUMN, nAttrib,&m_ReferencedColumn, ::getCppuType(reinterpret_cast< ::rtl::OUString*>(NULL)));
+ registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_RELATEDCOLUMN), PROPERTY_ID_RELATEDCOLUMN, nAttrib,&m_ReferencedColumn, ::getCppuType(reinterpret_cast< ::rtl::OUString*>(NULL)));
}
// -----------------------------------------------------------------------------
diff --git a/connectivity/source/sdbcx/VTable.cxx b/connectivity/source/sdbcx/VTable.cxx
index 3524eb9e399f..41a20d0089f6 100644
--- a/connectivity/source/sdbcx/VTable.cxx
+++ b/connectivity/source/sdbcx/VTable.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: VTable.cxx,v $
*
- * $Revision: 1.10 $
+ * $Revision: 1.11 $
*
- * last change: $Author: oj $ $Date: 2001-04-30 09:59:54 $
+ * last change: $Author: oj $ $Date: 2001-05-14 11:34:03 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -74,9 +74,8 @@
#ifndef _CONNECTIVITY_SDBCX_COLLECTION_HXX_
#include "connectivity/sdbcx/VCollection.hxx"
#endif
-#define CONNECTIVITY_PROPERTY_NAME_SPACE dbtools
-#ifndef _CONNECTIVITY_PROPERTYIDS_HXX_
-#include "propertyids.hxx"
+#ifndef CONNECTIVITY_CONNECTION_HXX
+#include "TConnection.hxx"
#endif
#ifndef _CONNECTIVITY_SDBCX_COLUMN_HXX_
#include "connectivity/sdbcx/VColumn.hxx"
@@ -87,7 +86,6 @@
// -------------------------------------------------------------------------
-using namespace connectivity::dbtools;
using namespace connectivity;
using namespace connectivity::sdbcx;
using namespace ::com::sun::star::beans;
@@ -165,10 +163,10 @@ void OTable::construct()
sal_Int32 nAttrib = isNew() ? 0 : PropertyAttribute::READONLY;
- registerProperty(PROPERTY_CATALOGNAME, PROPERTY_ID_CATALOGNAME,nAttrib,&m_CatalogName, ::getCppuType(reinterpret_cast< ::rtl::OUString*>(NULL)));
- registerProperty(PROPERTY_SCHEMANAME, PROPERTY_ID_SCHEMANAME, nAttrib,&m_SchemaName, ::getCppuType(reinterpret_cast< ::rtl::OUString*>(NULL)));
- registerProperty(PROPERTY_DESCRIPTION, PROPERTY_ID_DESCRIPTION,nAttrib,&m_Description, ::getCppuType(reinterpret_cast< ::rtl::OUString*>(NULL)));
- registerProperty(PROPERTY_TYPE, PROPERTY_ID_TYPE, nAttrib,&m_Type, ::getCppuType(reinterpret_cast< ::rtl::OUString*>(NULL)));
+ registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_CATALOGNAME), PROPERTY_ID_CATALOGNAME,nAttrib,&m_CatalogName, ::getCppuType(reinterpret_cast< ::rtl::OUString*>(NULL)));
+ registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_SCHEMANAME), PROPERTY_ID_SCHEMANAME, nAttrib,&m_SchemaName, ::getCppuType(reinterpret_cast< ::rtl::OUString*>(NULL)));
+ registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_DESCRIPTION), PROPERTY_ID_DESCRIPTION,nAttrib,&m_Description, ::getCppuType(reinterpret_cast< ::rtl::OUString*>(NULL)));
+ registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE), PROPERTY_ID_TYPE, nAttrib,&m_Type, ::getCppuType(reinterpret_cast< ::rtl::OUString*>(NULL)));
}
// -----------------------------------------------------------------------------
void SAL_CALL OTable::acquire() throw(::com::sun::star::uno::RuntimeException)
@@ -223,8 +221,8 @@ void SAL_CALL OTable::disposing(void)
Reference< XNameAccess > SAL_CALL OTable::getColumns( ) throw(RuntimeException)
{
::osl::MutexGuard aGuard(m_aMutex);
- if (OTableDescriptor_BASE::rBHelper.bDisposed)
- throw DisposedException();
+ checkDisposed(OTableDescriptor_BASE::rBHelper.bDisposed);
+
if(!m_pColumns)
refreshColumns();
@@ -237,8 +235,8 @@ Reference< XNameAccess > SAL_CALL OTable::getColumns( ) throw(RuntimeException)
Reference< XIndexAccess > SAL_CALL OTable::getKeys( ) throw(RuntimeException)
{
::osl::MutexGuard aGuard(m_aMutex);
- if (OTableDescriptor_BASE::rBHelper.bDisposed)
- throw DisposedException();
+ checkDisposed(OTableDescriptor_BASE::rBHelper.bDisposed);
+
if(!m_pKeys)
refreshKeys();
@@ -262,8 +260,8 @@ cppu::IPropertyArrayHelper & OTable::getInfoHelper()
Reference< XPropertySet > SAL_CALL OTable::createDataDescriptor( ) throw(RuntimeException)
{
::osl::MutexGuard aGuard(m_aMutex);
- if (OTableDescriptor_BASE::rBHelper.bDisposed)
- throw DisposedException();
+ checkDisposed(OTableDescriptor_BASE::rBHelper.bDisposed);
+
return this;
}
@@ -272,8 +270,8 @@ Reference< XPropertySet > SAL_CALL OTable::createDataDescriptor( ) throw(Runtim
Reference< XNameAccess > SAL_CALL OTable::getIndexes( ) throw(RuntimeException)
{
::osl::MutexGuard aGuard(m_aMutex);
- if (OTableDescriptor_BASE::rBHelper.bDisposed)
- throw DisposedException();
+ checkDisposed(OTableDescriptor_BASE::rBHelper.bDisposed);
+
if(!m_pIndexes)
refreshIndexes();
@@ -285,8 +283,8 @@ Reference< XNameAccess > SAL_CALL OTable::getIndexes( ) throw(RuntimeException)
void SAL_CALL OTable::rename( const ::rtl::OUString& newName ) throw(SQLException, ElementExistException, RuntimeException)
{
::osl::MutexGuard aGuard(m_aMutex);
- if (OTableDescriptor_BASE::rBHelper.bDisposed)
- throw DisposedException();
+ checkDisposed(OTableDescriptor_BASE::rBHelper.bDisposed);
+
}
// -------------------------------------------------------------------------
@@ -294,16 +292,16 @@ void SAL_CALL OTable::rename( const ::rtl::OUString& newName ) throw(SQLExceptio
void SAL_CALL OTable::alterColumnByName( const ::rtl::OUString& colName, const Reference< XPropertySet >& descriptor ) throw(SQLException, NoSuchElementException, RuntimeException)
{
::osl::MutexGuard aGuard(m_aMutex);
- if (OTableDescriptor_BASE::rBHelper.bDisposed)
- throw DisposedException();
+ checkDisposed(OTableDescriptor_BASE::rBHelper.bDisposed);
+
}
// -------------------------------------------------------------------------
void SAL_CALL OTable::alterColumnByIndex( sal_Int32 index, const Reference< XPropertySet >& descriptor ) throw(SQLException, ::com::sun::star::lang::IndexOutOfBoundsException, RuntimeException)
{
::osl::MutexGuard aGuard(m_aMutex);
- if (OTableDescriptor_BASE::rBHelper.bDisposed)
- throw DisposedException();
+ checkDisposed(OTableDescriptor_BASE::rBHelper.bDisposed);
+
}
// -------------------------------------------------------------------------
diff --git a/connectivity/source/sdbcx/VUser.cxx b/connectivity/source/sdbcx/VUser.cxx
index fdb0326b8bf8..8e83142b8784 100644
--- a/connectivity/source/sdbcx/VUser.cxx
+++ b/connectivity/source/sdbcx/VUser.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: VUser.cxx,v $
*
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
- * last change: $Author: oj $ $Date: 2001-04-30 09:59:54 $
+ * last change: $Author: oj $ $Date: 2001-05-14 11:34:03 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -73,9 +73,8 @@
#ifndef _COM_SUN_STAR_SDBCX_PRIVILEGEOBJECT_HPP_
#include <com/sun/star/sdbcx/PrivilegeObject.hpp>
#endif
-#define CONNECTIVITY_PROPERTY_NAME_SPACE dbtools
-#ifndef _CONNECTIVITY_PROPERTYIDS_HXX_
-#include "propertyids.hxx"
+#ifndef CONNECTIVITY_CONNECTION_HXX
+#include "TConnection.hxx"
#endif
#ifndef _CONNECTIVITY_SDBCX_COLLECTION_HXX_
#include "connectivity/sdbcx/VCollection.hxx"
@@ -85,7 +84,6 @@
#endif
// -------------------------------------------------------------------------
-using namespace connectivity::dbtools;
using namespace connectivity;
using namespace connectivity::sdbcx;
using namespace ::com::sun::star::sdbc;
@@ -152,18 +150,15 @@ Sequence< Type > SAL_CALL OUser::getTypes( ) throw(RuntimeException)
void SAL_CALL OUser::changePassword( const ::rtl::OUString& objPassword, const ::rtl::OUString& newPassword ) throw(::com::sun::star::sdbc::SQLException, RuntimeException)
{
::osl::MutexGuard aGuard(m_aMutex);
- if (OUser_BASE::rBHelper.bDisposed)
- throw DisposedException();
-
-
+ checkDisposed(OUser_BASE::rBHelper.bDisposed);
}
// -------------------------------------------------------------------------
// XGroupsSupplier
Reference< XNameAccess > SAL_CALL OUser::getGroups( ) throw(RuntimeException)
{
::osl::MutexGuard aGuard(m_aMutex);
- if (OUser_BASE::rBHelper.bDisposed)
- throw DisposedException();
+ checkDisposed(OUser_BASE::rBHelper.bDisposed);
+
return const_cast<OUser*>(this)->m_pGroups;
}
@@ -173,8 +168,8 @@ Reference< XNameAccess > SAL_CALL OUser::getGroups( ) throw(RuntimeException)
sal_Int32 SAL_CALL OUser::getPrivileges( const ::rtl::OUString& objName, sal_Int32 objType ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
{
::osl::MutexGuard aGuard(m_aMutex);
- if (OUser_BASE::rBHelper.bDisposed)
- throw DisposedException();
+ checkDisposed(OUser_BASE::rBHelper.bDisposed);
+
return 0;
}
@@ -182,8 +177,8 @@ sal_Int32 SAL_CALL OUser::getPrivileges( const ::rtl::OUString& objName, sal_Int
sal_Int32 SAL_CALL OUser::getGrantablePrivileges( const ::rtl::OUString& objName, sal_Int32 objType ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
{
::osl::MutexGuard aGuard(m_aMutex);
- if (OUser_BASE::rBHelper.bDisposed)
- throw DisposedException();
+ checkDisposed(OUser_BASE::rBHelper.bDisposed);
+
return 0;
}
@@ -191,15 +186,15 @@ sal_Int32 SAL_CALL OUser::getGrantablePrivileges( const ::rtl::OUString& objName
void SAL_CALL OUser::grantPrivileges( const ::rtl::OUString& objName, sal_Int32 objType, sal_Int32 objPrivileges ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
{
::osl::MutexGuard aGuard(m_aMutex);
- if (OUser_BASE::rBHelper.bDisposed)
- throw DisposedException();
+ checkDisposed(OUser_BASE::rBHelper.bDisposed);
+
}
// -------------------------------------------------------------------------
void SAL_CALL OUser::revokePrivileges( const ::rtl::OUString& objName, sal_Int32 objType, sal_Int32 objPrivileges ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
{
::osl::MutexGuard aGuard(m_aMutex);
- if (OUser_BASE::rBHelper.bDisposed)
- throw DisposedException();
+ checkDisposed(OUser_BASE::rBHelper.bDisposed);
+
}
// -----------------------------------------------------------------------------
::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL OUser::getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException)
diff --git a/connectivity/source/sdbcx/VView.cxx b/connectivity/source/sdbcx/VView.cxx
index 5b7bedbbda3f..d63103f02804 100644
--- a/connectivity/source/sdbcx/VView.cxx
+++ b/connectivity/source/sdbcx/VView.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: VView.cxx,v $
*
- * $Revision: 1.8 $
+ * $Revision: 1.9 $
*
- * last change: $Author: oj $ $Date: 2001-04-30 09:59:54 $
+ * last change: $Author: oj $ $Date: 2001-05-14 11:34:03 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -66,19 +66,18 @@
#ifndef _COM_SUN_STAR_LANG_DISPOSEDEXCEPTION_HPP_
#include <com/sun/star/lang/DisposedException.hpp>
#endif
-#define CONNECTIVITY_PROPERTY_NAME_SPACE dbtools
-#ifndef _CONNECTIVITY_PROPERTYIDS_HXX_
-#include "propertyids.hxx"
-#endif
#ifndef _COMPHELPER_SEQUENCE_HXX_
#include <comphelper/sequence.hxx>
#endif
#ifndef _CONNECTIVITY_DBTOOLS_HXX_
#include "connectivity/dbtools.hxx"
#endif
+#ifndef CONNECTIVITY_CONNECTION_HXX
+#include "TConnection.hxx"
+#endif
+
// -------------------------------------------------------------------------
using namespace connectivity;
-using namespace connectivity::dbtools;
using namespace connectivity::sdbcx;
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::uno;
@@ -123,10 +122,10 @@ void OView::construct()
sal_Int32 nAttrib = isNew() ? 0 : PropertyAttribute::READONLY;
- registerProperty(PROPERTY_CATALOGNAME, PROPERTY_ID_CATALOGNAME,nAttrib,&m_CatalogName, ::getCppuType(reinterpret_cast< ::rtl::OUString*>(NULL)));
- registerProperty(PROPERTY_SCHEMANAME, PROPERTY_ID_SCHEMANAME, nAttrib,&m_SchemaName, ::getCppuType(reinterpret_cast< ::rtl::OUString*>(NULL)));
- registerProperty(PROPERTY_COMMAND, PROPERTY_ID_COMMAND, nAttrib,&m_Command, ::getCppuType(reinterpret_cast< ::rtl::OUString*>(NULL)));
- registerProperty(PROPERTY_CHECKOPTION, PROPERTY_ID_CHECKOPTION,nAttrib,&m_CheckOption, ::getCppuType(reinterpret_cast< sal_Int32*>(NULL)));
+ registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_CATALOGNAME), PROPERTY_ID_CATALOGNAME,nAttrib,&m_CatalogName, ::getCppuType(reinterpret_cast< ::rtl::OUString*>(NULL)));
+ registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_SCHEMANAME), PROPERTY_ID_SCHEMANAME, nAttrib,&m_SchemaName, ::getCppuType(reinterpret_cast< ::rtl::OUString*>(NULL)));
+ registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_COMMAND), PROPERTY_ID_COMMAND, nAttrib,&m_Command, ::getCppuType(reinterpret_cast< ::rtl::OUString*>(NULL)));
+ registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_CHECKOPTION), PROPERTY_ID_CHECKOPTION,nAttrib,&m_CheckOption, ::getCppuType(reinterpret_cast< sal_Int32*>(NULL)));
}
// -------------------------------------------------------------------------
void OView::disposing(void)