summaryrefslogtreecommitdiff
path: root/dbaccess/source
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2021-11-11 12:49:37 +0100
committerJulien Nabet <serval2412@yahoo.fr>2021-11-11 15:39:36 +0100
commitf1dbe5fdb68b72c4fedd43ddab9cffcf44c9d9b0 (patch)
tree4b4bd97b491ce43e013b838dcc3416ebda0b84c4 /dbaccess/source
parent9b96b748f324294cdf4b2d60bcea689757e08334 (diff)
Replace some macros in dbaccess part 6
Remove DECL_PROP_IMPL + ELEMENT_COUNT + HANDLE_SQL_ERRORS + DO_SAFE Change-Id: I2208a22329f7611a7fdc896e25bb0ef0bb378abd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125050 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'dbaccess/source')
-rw-r--r--dbaccess/source/core/api/CRowSetColumn.cxx42
-rw-r--r--dbaccess/source/core/api/CRowSetDataColumn.cxx42
-rw-r--r--dbaccess/source/core/api/definitioncolumn.cxx28
-rw-r--r--dbaccess/source/core/api/resultcolumn.cxx42
-rw-r--r--dbaccess/source/core/api/resultset.cxx12
-rw-r--r--dbaccess/source/core/api/statement.cxx20
-rw-r--r--dbaccess/source/core/dataaccess/datasource.cxx27
-rw-r--r--dbaccess/source/inc/apitools.hxx4
-rw-r--r--dbaccess/source/ui/app/AppDetailPageHelper.hxx4
-rw-r--r--dbaccess/source/ui/app/AppDetailView.cxx2
-rw-r--r--dbaccess/source/ui/browser/brwctrlr.cxx109
11 files changed, 177 insertions, 155 deletions
diff --git a/dbaccess/source/core/api/CRowSetColumn.cxx b/dbaccess/source/core/api/CRowSetColumn.cxx
index a8b375168968..556b1250eec0 100644
--- a/dbaccess/source/core/api/CRowSetColumn.cxx
+++ b/dbaccess/source/core/api/CRowSetColumn.cxx
@@ -46,27 +46,27 @@ ORowSetColumn::ORowSetColumn( const Reference < XResultSetMetaData >& _xMetaData
css::beans::Property* pDesc = aDescriptor.getArray();
sal_Int32 nPos = 0;
- DECL_PROP_IMPL(CATALOGNAME, cppu::UnoType<OUString>::get()) css::beans::PropertyAttribute::READONLY );
- DECL_PROP_IMPL(DISPLAYSIZE, cppu::UnoType<sal_Int32>::get()) css::beans::PropertyAttribute::READONLY );
- DECL_PROP_IMPL(ISAUTOINCREMENT, cppu::UnoType<bool>::get()) css::beans::PropertyAttribute::READONLY );
- DECL_PROP_IMPL(ISCASESENSITIVE, cppu::UnoType<bool>::get()) css::beans::PropertyAttribute::READONLY );
- DECL_PROP_IMPL(ISCURRENCY, cppu::UnoType<bool>::get()) css::beans::PropertyAttribute::READONLY );
- DECL_PROP_IMPL(ISDEFINITELYWRITABLE, cppu::UnoType<bool>::get()) css::beans::PropertyAttribute::READONLY );
- DECL_PROP_IMPL(ISNULLABLE, cppu::UnoType<sal_Int32>::get()) css::beans::PropertyAttribute::READONLY );
- DECL_PROP_IMPL(ISREADONLY, cppu::UnoType<bool>::get()) css::beans::PropertyAttribute::BOUND );
- DECL_PROP_IMPL(ISROWVERSION, cppu::UnoType<bool>::get()) css::beans::PropertyAttribute::READONLY );
- DECL_PROP_IMPL(ISSEARCHABLE, cppu::UnoType<bool>::get()) css::beans::PropertyAttribute::READONLY );
- DECL_PROP_IMPL(ISSIGNED, cppu::UnoType<bool>::get()) css::beans::PropertyAttribute::READONLY );
- DECL_PROP_IMPL(ISWRITABLE, cppu::UnoType<bool>::get()) css::beans::PropertyAttribute::READONLY );
- DECL_PROP_IMPL(LABEL, cppu::UnoType<OUString>::get()) css::beans::PropertyAttribute::READONLY );
- DECL_PROP_IMPL(PRECISION, cppu::UnoType<sal_Int32>::get()) css::beans::PropertyAttribute::READONLY );
- DECL_PROP_IMPL(SCALE, cppu::UnoType<sal_Int32>::get()) css::beans::PropertyAttribute::READONLY );
- DECL_PROP_IMPL(SCHEMANAME, cppu::UnoType<OUString>::get()) css::beans::PropertyAttribute::READONLY );
- DECL_PROP_IMPL(SERVICENAME, cppu::UnoType<OUString>::get()) css::beans::PropertyAttribute::READONLY );
- DECL_PROP_IMPL(TABLENAME, cppu::UnoType<OUString>::get()) css::beans::PropertyAttribute::READONLY );
- DECL_PROP_IMPL(TYPE, cppu::UnoType<sal_Int32>::get()) css::beans::PropertyAttribute::READONLY );
- DECL_PROP_IMPL(TYPENAME, cppu::UnoType<OUString>::get()) css::beans::PropertyAttribute::READONLY );
- DECL_PROP_IMPL(VALUE, cppu::UnoType<Any>::get()) css::beans::PropertyAttribute::READONLY | css::beans::PropertyAttribute::BOUND);
+ pDesc[nPos++] = css::beans::Property(PROPERTY_CATALOGNAME, PROPERTY_ID_CATALOGNAME, cppu::UnoType<OUString>::get(), css::beans::PropertyAttribute::READONLY );
+ pDesc[nPos++] = css::beans::Property(PROPERTY_DISPLAYSIZE, PROPERTY_ID_DISPLAYSIZE, cppu::UnoType<sal_Int32>::get(), css::beans::PropertyAttribute::READONLY );
+ pDesc[nPos++] = css::beans::Property(PROPERTY_ISAUTOINCREMENT, PROPERTY_ID_ISAUTOINCREMENT, cppu::UnoType<bool>::get(), css::beans::PropertyAttribute::READONLY );
+ pDesc[nPos++] = css::beans::Property(PROPERTY_ISCASESENSITIVE, PROPERTY_ID_ISCASESENSITIVE, cppu::UnoType<bool>::get(), css::beans::PropertyAttribute::READONLY );
+ pDesc[nPos++] = css::beans::Property(PROPERTY_ISCURRENCY, PROPERTY_ID_ISCURRENCY, cppu::UnoType<bool>::get(), css::beans::PropertyAttribute::READONLY );
+ pDesc[nPos++] = css::beans::Property(PROPERTY_ISDEFINITELYWRITABLE, PROPERTY_ID_ISDEFINITELYWRITABLE, cppu::UnoType<bool>::get(), css::beans::PropertyAttribute::READONLY );
+ pDesc[nPos++] = css::beans::Property(PROPERTY_ISNULLABLE, PROPERTY_ID_ISNULLABLE, cppu::UnoType<sal_Int32>::get(), css::beans::PropertyAttribute::READONLY );
+ pDesc[nPos++] = css::beans::Property(PROPERTY_ISREADONLY, PROPERTY_ID_ISREADONLY, cppu::UnoType<bool>::get(), css::beans::PropertyAttribute::BOUND );
+ pDesc[nPos++] = css::beans::Property(PROPERTY_ISROWVERSION, PROPERTY_ID_ISROWVERSION, cppu::UnoType<bool>::get(), css::beans::PropertyAttribute::READONLY );
+ pDesc[nPos++] = css::beans::Property(PROPERTY_ISSEARCHABLE, PROPERTY_ID_ISSEARCHABLE, cppu::UnoType<bool>::get(), css::beans::PropertyAttribute::READONLY );
+ pDesc[nPos++] = css::beans::Property(PROPERTY_ISSIGNED, PROPERTY_ID_ISSIGNED, cppu::UnoType<bool>::get(), css::beans::PropertyAttribute::READONLY );
+ pDesc[nPos++] = css::beans::Property(PROPERTY_ISWRITABLE, PROPERTY_ID_ISWRITABLE, cppu::UnoType<bool>::get(), css::beans::PropertyAttribute::READONLY );
+ pDesc[nPos++] = css::beans::Property(PROPERTY_LABEL, PROPERTY_ID_LABEL, cppu::UnoType<OUString>::get(), css::beans::PropertyAttribute::READONLY );
+ pDesc[nPos++] = css::beans::Property(PROPERTY_PRECISION, PROPERTY_ID_PRECISION, cppu::UnoType<sal_Int32>::get(), css::beans::PropertyAttribute::READONLY );
+ pDesc[nPos++] = css::beans::Property(PROPERTY_SCALE, PROPERTY_ID_SCALE, cppu::UnoType<sal_Int32>::get(), css::beans::PropertyAttribute::READONLY );
+ pDesc[nPos++] = css::beans::Property(PROPERTY_SCHEMANAME, PROPERTY_ID_SCHEMANAME, cppu::UnoType<OUString>::get(), css::beans::PropertyAttribute::READONLY );
+ pDesc[nPos++] = css::beans::Property(PROPERTY_SERVICENAME, PROPERTY_ID_SERVICENAME, cppu::UnoType<OUString>::get(), css::beans::PropertyAttribute::READONLY );
+ pDesc[nPos++] = css::beans::Property(PROPERTY_TABLENAME, PROPERTY_ID_TABLENAME, cppu::UnoType<OUString>::get(), css::beans::PropertyAttribute::READONLY );
+ pDesc[nPos++] = css::beans::Property(PROPERTY_TYPE, PROPERTY_ID_TYPE, cppu::UnoType<sal_Int32>::get(), css::beans::PropertyAttribute::READONLY );
+ pDesc[nPos++] = css::beans::Property(PROPERTY_TYPENAME, PROPERTY_ID_TYPENAME, cppu::UnoType<OUString>::get(), css::beans::PropertyAttribute::READONLY );
+ pDesc[nPos++] = css::beans::Property(PROPERTY_VALUE, PROPERTY_ID_VALUE, cppu::UnoType<Any>::get(), css::beans::PropertyAttribute::READONLY | css::beans::PropertyAttribute::BOUND);
OSL_ENSURE(nPos == aDescriptor.getLength(), "forgot to adjust the count ?");
diff --git a/dbaccess/source/core/api/CRowSetDataColumn.cxx b/dbaccess/source/core/api/CRowSetDataColumn.cxx
index f1b7e782e7be..e55063b6e2a8 100644
--- a/dbaccess/source/core/api/CRowSetDataColumn.cxx
+++ b/dbaccess/source/core/api/CRowSetDataColumn.cxx
@@ -66,27 +66,27 @@ ORowSetDataColumn::~ORowSetDataColumn()
css::uno::Sequence< css::beans::Property> aDescriptor(21);
css::beans::Property* pDesc = aDescriptor.getArray();
sal_Int32 nPos = 0;
- DECL_PROP_IMPL(CATALOGNAME, cppu::UnoType<OUString>::get()) css::beans::PropertyAttribute::READONLY );
- DECL_PROP_IMPL(DISPLAYSIZE, cppu::UnoType<sal_Int32>::get()) css::beans::PropertyAttribute::READONLY );
- DECL_PROP_IMPL(ISAUTOINCREMENT, cppu::UnoType<bool>::get()) css::beans::PropertyAttribute::READONLY );
- DECL_PROP_IMPL(ISCASESENSITIVE, cppu::UnoType<bool>::get()) css::beans::PropertyAttribute::READONLY );
- DECL_PROP_IMPL(ISCURRENCY, cppu::UnoType<bool>::get()) css::beans::PropertyAttribute::READONLY );
- DECL_PROP_IMPL(ISDEFINITELYWRITABLE, cppu::UnoType<bool>::get()) css::beans::PropertyAttribute::READONLY );
- DECL_PROP_IMPL(ISNULLABLE, cppu::UnoType<sal_Int32>::get()) css::beans::PropertyAttribute::READONLY );
- DECL_PROP_IMPL(ISREADONLY, cppu::UnoType<bool>::get()) css::beans::PropertyAttribute::BOUND );
- DECL_PROP_IMPL(ISROWVERSION, cppu::UnoType<bool>::get()) css::beans::PropertyAttribute::READONLY );
- DECL_PROP_IMPL(ISSEARCHABLE, cppu::UnoType<bool>::get()) css::beans::PropertyAttribute::READONLY );
- DECL_PROP_IMPL(ISSIGNED, cppu::UnoType<bool>::get()) css::beans::PropertyAttribute::READONLY );
- DECL_PROP_IMPL(ISWRITABLE, cppu::UnoType<bool>::get()) css::beans::PropertyAttribute::READONLY );
- DECL_PROP_IMPL(LABEL, cppu::UnoType<OUString>::get()) css::beans::PropertyAttribute::READONLY );
- DECL_PROP_IMPL(PRECISION, cppu::UnoType<sal_Int32>::get()) css::beans::PropertyAttribute::READONLY );
- DECL_PROP_IMPL(SCALE, cppu::UnoType<sal_Int32>::get()) css::beans::PropertyAttribute::READONLY );
- DECL_PROP_IMPL(SCHEMANAME, cppu::UnoType<OUString>::get()) css::beans::PropertyAttribute::READONLY );
- DECL_PROP_IMPL(SERVICENAME, cppu::UnoType<OUString>::get()) css::beans::PropertyAttribute::READONLY );
- DECL_PROP_IMPL(TABLENAME, cppu::UnoType<OUString>::get()) css::beans::PropertyAttribute::READONLY );
- DECL_PROP_IMPL(TYPE, cppu::UnoType<sal_Int32>::get()) css::beans::PropertyAttribute::READONLY );
- DECL_PROP_IMPL(TYPENAME, cppu::UnoType<OUString>::get()) css::beans::PropertyAttribute::READONLY );
- DECL_PROP_IMPL(VALUE, cppu::UnoType<Any>::get()) css::beans::PropertyAttribute::BOUND );
+ pDesc[nPos++] = css::beans::Property(PROPERTY_CATALOGNAME, PROPERTY_ID_CATALOGNAME, cppu::UnoType<OUString>::get(), css::beans::PropertyAttribute::READONLY );
+ pDesc[nPos++] = css::beans::Property(PROPERTY_DISPLAYSIZE, PROPERTY_ID_DISPLAYSIZE, cppu::UnoType<sal_Int32>::get(), css::beans::PropertyAttribute::READONLY );
+ pDesc[nPos++] = css::beans::Property(PROPERTY_ISAUTOINCREMENT, PROPERTY_ID_ISAUTOINCREMENT, cppu::UnoType<bool>::get(), css::beans::PropertyAttribute::READONLY );
+ pDesc[nPos++] = css::beans::Property(PROPERTY_ISCASESENSITIVE, PROPERTY_ID_ISCASESENSITIVE, cppu::UnoType<bool>::get(), css::beans::PropertyAttribute::READONLY );
+ pDesc[nPos++] = css::beans::Property(PROPERTY_ISCURRENCY, PROPERTY_ID_ISCURRENCY, cppu::UnoType<bool>::get(), css::beans::PropertyAttribute::READONLY );
+ pDesc[nPos++] = css::beans::Property(PROPERTY_ISDEFINITELYWRITABLE, PROPERTY_ID_ISDEFINITELYWRITABLE, cppu::UnoType<bool>::get(), css::beans::PropertyAttribute::READONLY );
+ pDesc[nPos++] = css::beans::Property(PROPERTY_ISNULLABLE, PROPERTY_ID_ISNULLABLE, cppu::UnoType<sal_Int32>::get(), css::beans::PropertyAttribute::READONLY );
+ pDesc[nPos++] = css::beans::Property(PROPERTY_ISREADONLY, PROPERTY_ID_ISREADONLY, cppu::UnoType<bool>::get(), css::beans::PropertyAttribute::BOUND );
+ pDesc[nPos++] = css::beans::Property(PROPERTY_ISROWVERSION, PROPERTY_ID_ISROWVERSION, cppu::UnoType<bool>::get(), css::beans::PropertyAttribute::READONLY );
+ pDesc[nPos++] = css::beans::Property(PROPERTY_ISSEARCHABLE, PROPERTY_ID_ISSEARCHABLE, cppu::UnoType<bool>::get(), css::beans::PropertyAttribute::READONLY );
+ pDesc[nPos++] = css::beans::Property(PROPERTY_ISSIGNED, PROPERTY_ID_ISSIGNED, cppu::UnoType<bool>::get(), css::beans::PropertyAttribute::READONLY );
+ pDesc[nPos++] = css::beans::Property(PROPERTY_ISWRITABLE, PROPERTY_ID_ISWRITABLE, cppu::UnoType<bool>::get(), css::beans::PropertyAttribute::READONLY );
+ pDesc[nPos++] = css::beans::Property(PROPERTY_LABEL, PROPERTY_ID_LABEL, cppu::UnoType<OUString>::get(), css::beans::PropertyAttribute::READONLY );
+ pDesc[nPos++] = css::beans::Property(PROPERTY_PRECISION, PROPERTY_ID_PRECISION, cppu::UnoType<sal_Int32>::get(), css::beans::PropertyAttribute::READONLY );
+ pDesc[nPos++] = css::beans::Property(PROPERTY_SCALE, PROPERTY_ID_SCALE, cppu::UnoType<sal_Int32>::get(), css::beans::PropertyAttribute::READONLY );
+ pDesc[nPos++] = css::beans::Property(PROPERTY_SCHEMANAME, PROPERTY_ID_SCHEMANAME, cppu::UnoType<OUString>::get(), css::beans::PropertyAttribute::READONLY );
+ pDesc[nPos++] = css::beans::Property(PROPERTY_SERVICENAME, PROPERTY_ID_SERVICENAME, cppu::UnoType<OUString>::get(), css::beans::PropertyAttribute::READONLY );
+ pDesc[nPos++] = css::beans::Property(PROPERTY_TABLENAME, PROPERTY_ID_TABLENAME, cppu::UnoType<OUString>::get(), css::beans::PropertyAttribute::READONLY );
+ pDesc[nPos++] = css::beans::Property(PROPERTY_TYPE, PROPERTY_ID_TYPE, cppu::UnoType<sal_Int32>::get(), css::beans::PropertyAttribute::READONLY );
+ pDesc[nPos++] = css::beans::Property(PROPERTY_TYPENAME, PROPERTY_ID_TYPENAME, cppu::UnoType<OUString>::get(), css::beans::PropertyAttribute::READONLY );
+ pDesc[nPos++] = css::beans::Property(PROPERTY_VALUE, PROPERTY_ID_VALUE, cppu::UnoType<Any>::get(), css::beans::PropertyAttribute::BOUND );
OSL_ENSURE(nPos == aDescriptor.getLength(), "forgot to adjust the count ?");
diff --git a/dbaccess/source/core/api/definitioncolumn.cxx b/dbaccess/source/core/api/definitioncolumn.cxx
index 73a11373324c..6307e64eddcd 100644
--- a/dbaccess/source/core/api/definitioncolumn.cxx
+++ b/dbaccess/source/core/api/definitioncolumn.cxx
@@ -448,41 +448,41 @@ Sequence< OUString > OTableColumnDescriptorWrapper::getSupportedServiceNames( )
css::beans::Property* pDesc = aDescriptor.getArray();
sal_Int32 nPos = 0;
- DECL_PROP_IMPL(ISAUTOINCREMENT, cppu::UnoType<bool>::get()) 0);
- DECL_PROP_IMPL(ISCURRENCY, cppu::UnoType<bool>::get()) 0);
- DECL_PROP_IMPL(ISNULLABLE, cppu::UnoType<sal_Int32 >::get()) 0);
- DECL_PROP_IMPL(PRECISION, cppu::UnoType<sal_Int32 >::get()) 0);
- DECL_PROP_IMPL(SCALE, cppu::UnoType<sal_Int32 >::get()) 0);
- DECL_PROP_IMPL(TYPE, cppu::UnoType<sal_Int32 >::get()) 0);
- DECL_PROP_IMPL(TYPENAME, cppu::UnoType<OUString >::get()) 0);
+ pDesc[nPos++] = css::beans::Property(PROPERTY_ISAUTOINCREMENT, PROPERTY_ID_ISAUTOINCREMENT, cppu::UnoType<bool>::get(), 0);
+ pDesc[nPos++] = css::beans::Property(PROPERTY_ISCURRENCY, PROPERTY_ID_ISCURRENCY, cppu::UnoType<bool>::get(), 0);
+ pDesc[nPos++] = css::beans::Property(PROPERTY_ISNULLABLE, PROPERTY_ID_ISNULLABLE, cppu::UnoType<sal_Int32>::get(), 0);
+ pDesc[nPos++] = css::beans::Property(PROPERTY_PRECISION, PROPERTY_ID_PRECISION, cppu::UnoType<sal_Int32>::get(), 0);
+ pDesc[nPos++] = css::beans::Property(PROPERTY_SCALE, PROPERTY_ID_SCALE, cppu::UnoType<sal_Int32>::get(), 0);
+ pDesc[nPos++] = css::beans::Property(PROPERTY_TYPE, PROPERTY_ID_TYPE, cppu::UnoType<sal_Int32>::get(), 0);
+ pDesc[nPos++] = css::beans::Property(PROPERTY_TYPENAME, PROPERTY_ID_TYPENAME, cppu::UnoType<OUString >::get(), 0);
if ( nId & HAS_AUTOINCREMENT_CREATION )
{
- DECL_PROP_IMPL(AUTOINCREMENTCREATION, cppu::UnoType<OUString>::get()) css::beans::PropertyAttribute::MAYBEVOID );
+ pDesc[nPos++] = css::beans::Property(PROPERTY_AUTOINCREMENTCREATION, PROPERTY_ID_AUTOINCREMENTCREATION, cppu::UnoType<OUString>::get(), css::beans::PropertyAttribute::MAYBEVOID );
}
if ( nId & HAS_DEFAULTVALUE )
{
- DECL_PROP_IMPL(DEFAULTVALUE, cppu::UnoType<OUString >::get()) 0);
+ pDesc[nPos++] = css::beans::Property(PROPERTY_DEFAULTVALUE, PROPERTY_ID_DEFAULTVALUE, cppu::UnoType<OUString >::get(), 0);
}
if ( nId & HAS_DESCRIPTION )
{
- DECL_PROP_IMPL(DESCRIPTION, cppu::UnoType<OUString >::get()) 0);
+ pDesc[nPos++] = css::beans::Property(PROPERTY_DESCRIPTION, PROPERTY_ID_DESCRIPTION, cppu::UnoType<OUString >::get(), 0);
}
if ( nId & HAS_ROWVERSION )
{
- DECL_PROP_IMPL(ISROWVERSION, cppu::UnoType<bool>::get()) 0);
+ pDesc[nPos++] = css::beans::Property(PROPERTY_ISROWVERSION, PROPERTY_ID_ISROWVERSION, cppu::UnoType<bool>::get(), 0);
}
if ( nId & HAS_CATALOGNAME )
{
- DECL_PROP_IMPL(CATALOGNAME, cppu::UnoType<OUString >::get()) 0);
+ pDesc[nPos++] = css::beans::Property(PROPERTY_CATALOGNAME, PROPERTY_ID_CATALOGNAME, cppu::UnoType<OUString >::get(), 0);
}
if ( nId & HAS_SCHEMANAME )
{
- DECL_PROP_IMPL(SCHEMANAME, cppu::UnoType<OUString >::get()) 0);
+ pDesc[nPos++] = css::beans::Property(PROPERTY_SCHEMANAME, PROPERTY_ID_SCHEMANAME, cppu::UnoType<OUString >::get(), 0);
}
if ( nId & HAS_TABLENAME )
{
- DECL_PROP_IMPL(TABLENAME, cppu::UnoType<OUString >::get()) 0);
+ pDesc[nPos++] = css::beans::Property(PROPERTY_TABLENAME, PROPERTY_ID_TABLENAME, cppu::UnoType<OUString >::get(), 0);
}
OSL_ENSURE(nPos == aDescriptor.getLength(), "forgot to adjust the count ?");
diff --git a/dbaccess/source/core/api/resultcolumn.cxx b/dbaccess/source/core/api/resultcolumn.cxx
index ceb233137d16..8852da26c94a 100644
--- a/dbaccess/source/core/api/resultcolumn.cxx
+++ b/dbaccess/source/core/api/resultcolumn.cxx
@@ -127,27 +127,27 @@ void OResultColumn::disposing()
css::uno::Sequence< css::beans::Property> aDescriptor(21);
css::beans::Property* pDesc = aDescriptor.getArray();
sal_Int32 nPos = 0;
- DECL_PROP_IMPL(CATALOGNAME, cppu::UnoType<OUString>::get()) css::beans::PropertyAttribute::READONLY);
- DECL_PROP_IMPL(DISPLAYSIZE, cppu::UnoType<sal_Int32>::get()) css::beans::PropertyAttribute::READONLY);
- DECL_PROP_IMPL(ISAUTOINCREMENT, cppu::UnoType<bool>::get()) css::beans::PropertyAttribute::READONLY);
- DECL_PROP_IMPL(ISCASESENSITIVE, cppu::UnoType<bool>::get()) css::beans::PropertyAttribute::READONLY);
- DECL_PROP_IMPL(ISCURRENCY, cppu::UnoType<bool>::get()) css::beans::PropertyAttribute::READONLY);
- DECL_PROP_IMPL(ISDEFINITELYWRITABLE, cppu::UnoType<bool>::get()) css::beans::PropertyAttribute::READONLY);
- DECL_PROP_IMPL(ISNULLABLE, cppu::UnoType<sal_Int32>::get()) css::beans::PropertyAttribute::READONLY);
- DECL_PROP_IMPL(ISREADONLY, cppu::UnoType<bool>::get()) css::beans::PropertyAttribute::READONLY);
- DECL_PROP_IMPL(ISROWVERSION, cppu::UnoType<bool>::get()) css::beans::PropertyAttribute::READONLY);
- DECL_PROP_IMPL(ISSEARCHABLE, cppu::UnoType<bool>::get()) css::beans::PropertyAttribute::READONLY);
- DECL_PROP_IMPL(ISSIGNED, cppu::UnoType<bool>::get()) css::beans::PropertyAttribute::READONLY);
- DECL_PROP_IMPL(ISWRITABLE, cppu::UnoType<bool>::get()) css::beans::PropertyAttribute::READONLY);
- DECL_PROP_IMPL(LABEL, cppu::UnoType<OUString>::get()) css::beans::PropertyAttribute::READONLY);
- DECL_PROP_IMPL(NAME, cppu::UnoType<OUString>::get()) css::beans::PropertyAttribute::READONLY);
- DECL_PROP_IMPL(PRECISION, cppu::UnoType<sal_Int32>::get()) css::beans::PropertyAttribute::READONLY);
- DECL_PROP_IMPL(SCALE, cppu::UnoType<sal_Int32>::get()) css::beans::PropertyAttribute::READONLY);
- DECL_PROP_IMPL(SCHEMANAME, cppu::UnoType<OUString>::get()) css::beans::PropertyAttribute::READONLY);
- DECL_PROP_IMPL(SERVICENAME, cppu::UnoType<OUString>::get()) css::beans::PropertyAttribute::READONLY);
- DECL_PROP_IMPL(TABLENAME, cppu::UnoType<OUString>::get()) css::beans::PropertyAttribute::READONLY);
- DECL_PROP_IMPL(TYPE, cppu::UnoType<sal_Int32>::get()) css::beans::PropertyAttribute::READONLY);
- DECL_PROP_IMPL(TYPENAME, cppu::UnoType<OUString>::get()) css::beans::PropertyAttribute::READONLY);
+ pDesc[nPos++] = css::beans::Property(PROPERTY_CATALOGNAME, PROPERTY_ID_CATALOGNAME, cppu::UnoType<OUString>::get(), css::beans::PropertyAttribute::READONLY);
+ pDesc[nPos++] = css::beans::Property(PROPERTY_DISPLAYSIZE, PROPERTY_ID_DISPLAYSIZE, cppu::UnoType<sal_Int32>::get(), css::beans::PropertyAttribute::READONLY);
+ pDesc[nPos++] = css::beans::Property(PROPERTY_ISAUTOINCREMENT, PROPERTY_ID_ISAUTOINCREMENT, cppu::UnoType<bool>::get(), css::beans::PropertyAttribute::READONLY);
+ pDesc[nPos++] = css::beans::Property(PROPERTY_ISCASESENSITIVE, PROPERTY_ID_ISCASESENSITIVE, cppu::UnoType<bool>::get(), css::beans::PropertyAttribute::READONLY);
+ pDesc[nPos++] = css::beans::Property(PROPERTY_ISCURRENCY, PROPERTY_ID_ISCURRENCY, cppu::UnoType<bool>::get(), css::beans::PropertyAttribute::READONLY);
+ pDesc[nPos++] = css::beans::Property(PROPERTY_ISDEFINITELYWRITABLE, PROPERTY_ID_ISDEFINITELYWRITABLE, cppu::UnoType<bool>::get(), css::beans::PropertyAttribute::READONLY);
+ pDesc[nPos++] = css::beans::Property(PROPERTY_ISNULLABLE, PROPERTY_ID_ISNULLABLE, cppu::UnoType<sal_Int32>::get(), css::beans::PropertyAttribute::READONLY);
+ pDesc[nPos++] = css::beans::Property(PROPERTY_ISREADONLY, PROPERTY_ID_ISREADONLY, cppu::UnoType<bool>::get(), css::beans::PropertyAttribute::READONLY);
+ pDesc[nPos++] = css::beans::Property(PROPERTY_ISROWVERSION, PROPERTY_ID_ISROWVERSION, cppu::UnoType<bool>::get(), css::beans::PropertyAttribute::READONLY);
+ pDesc[nPos++] = css::beans::Property(PROPERTY_ISSEARCHABLE, PROPERTY_ID_ISSEARCHABLE, cppu::UnoType<bool>::get(), css::beans::PropertyAttribute::READONLY);
+ pDesc[nPos++] = css::beans::Property(PROPERTY_ISSIGNED, PROPERTY_ID_ISSIGNED, cppu::UnoType<bool>::get(), css::beans::PropertyAttribute::READONLY);
+ pDesc[nPos++] = css::beans::Property(PROPERTY_ISWRITABLE, PROPERTY_ID_ISWRITABLE, cppu::UnoType<bool>::get(), css::beans::PropertyAttribute::READONLY);
+ pDesc[nPos++] = css::beans::Property(PROPERTY_LABEL, PROPERTY_ID_LABEL, cppu::UnoType<OUString>::get(), css::beans::PropertyAttribute::READONLY);
+ pDesc[nPos++] = css::beans::Property(PROPERTY_NAME, PROPERTY_ID_NAME, cppu::UnoType<OUString>::get(), css::beans::PropertyAttribute::READONLY);
+ pDesc[nPos++] = css::beans::Property(PROPERTY_PRECISION, PROPERTY_ID_PRECISION, cppu::UnoType<sal_Int32>::get(), css::beans::PropertyAttribute::READONLY);
+ pDesc[nPos++] = css::beans::Property(PROPERTY_SCALE, PROPERTY_ID_SCALE, cppu::UnoType<sal_Int32>::get(), css::beans::PropertyAttribute::READONLY);
+ pDesc[nPos++] = css::beans::Property(PROPERTY_SCHEMANAME, PROPERTY_ID_SCHEMANAME, cppu::UnoType<OUString>::get(), css::beans::PropertyAttribute::READONLY);
+ pDesc[nPos++] = css::beans::Property(PROPERTY_SERVICENAME, PROPERTY_ID_SERVICENAME, cppu::UnoType<OUString>::get(), css::beans::PropertyAttribute::READONLY);
+ pDesc[nPos++] = css::beans::Property(PROPERTY_TABLENAME, PROPERTY_ID_TABLENAME, cppu::UnoType<OUString>::get(), css::beans::PropertyAttribute::READONLY);
+ pDesc[nPos++] = css::beans::Property(PROPERTY_TYPE, PROPERTY_ID_TYPE, cppu::UnoType<sal_Int32>::get(), css::beans::PropertyAttribute::READONLY);
+ pDesc[nPos++] = css::beans::Property(PROPERTY_TYPENAME, PROPERTY_ID_TYPENAME, cppu::UnoType<OUString>::get(), css::beans::PropertyAttribute::READONLY);
OSL_ENSURE(nPos == aDescriptor.getLength(), "forgot to adjust the count ?");
return new ::cppu::OPropertyArrayHelper(aDescriptor);
}
diff --git a/dbaccess/source/core/api/resultset.cxx b/dbaccess/source/core/api/resultset.cxx
index 478d476269d7..f545c2e3153d 100644
--- a/dbaccess/source/core/api/resultset.cxx
+++ b/dbaccess/source/core/api/resultset.cxx
@@ -188,12 +188,12 @@ Reference< XPropertySetInfo > OResultSet::getPropertySetInfo()
css::uno::Sequence< css::beans::Property> aDescriptor(6);
css::beans::Property* pDesc = aDescriptor.getArray();
sal_Int32 nPos = 0;
- DECL_PROP_IMPL(CURSORNAME, cppu::UnoType<OUString>::get()) css::beans::PropertyAttribute::READONLY);
- DECL_PROP_IMPL(FETCHDIRECTION, cppu::UnoType<sal_Int32>::get()) 0);
- DECL_PROP_IMPL(FETCHSIZE, cppu::UnoType<sal_Int32>::get()) 0);
- DECL_PROP_IMPL(ISBOOKMARKABLE, cppu::UnoType<bool>::get()) css::beans::PropertyAttribute::READONLY);
- DECL_PROP_IMPL(RESULTSETCONCURRENCY, cppu::UnoType<sal_Int32>::get()) css::beans::PropertyAttribute::READONLY);
- DECL_PROP_IMPL(RESULTSETTYPE, cppu::UnoType<sal_Int32>::get()) css::beans::PropertyAttribute::READONLY);
+ pDesc[nPos++] = css::beans::Property(PROPERTY_CURSORNAME, PROPERTY_ID_CURSORNAME, cppu::UnoType<OUString>::get(), css::beans::PropertyAttribute::READONLY);
+ pDesc[nPos++] = css::beans::Property(PROPERTY_FETCHDIRECTION, PROPERTY_ID_FETCHDIRECTION, cppu::UnoType<sal_Int32>::get(), 0);
+ pDesc[nPos++] = css::beans::Property(PROPERTY_FETCHSIZE, PROPERTY_ID_FETCHSIZE, cppu::UnoType<sal_Int32>::get(), 0);
+ pDesc[nPos++] = css::beans::Property(PROPERTY_ISBOOKMARKABLE, PROPERTY_ID_ISBOOKMARKABLE, cppu::UnoType<bool>::get(), css::beans::PropertyAttribute::READONLY);
+ pDesc[nPos++] = css::beans::Property(PROPERTY_RESULTSETCONCURRENCY, PROPERTY_ID_RESULTSETCONCURRENCY, cppu::UnoType<sal_Int32>::get(), css::beans::PropertyAttribute::READONLY);
+ pDesc[nPos++] = css::beans::Property(PROPERTY_RESULTSETTYPE, PROPERTY_ID_RESULTSETTYPE, cppu::UnoType<sal_Int32>::get(), css::beans::PropertyAttribute::READONLY);
OSL_ENSURE(nPos == aDescriptor.getLength(), "forgot to adjust the count ?");
return new ::cppu::OPropertyArrayHelper(aDescriptor);
}
diff --git a/dbaccess/source/core/api/statement.cxx b/dbaccess/source/core/api/statement.cxx
index 4b8032c9bbae..82236dfe7202 100644
--- a/dbaccess/source/core/api/statement.cxx
+++ b/dbaccess/source/core/api/statement.cxx
@@ -179,16 +179,16 @@ Reference< XPropertySetInfo > OStatementBase::getPropertySetInfo()
css::uno::Sequence< css::beans::Property> aDescriptor(10);
css::beans::Property* pDesc = aDescriptor.getArray();
sal_Int32 nPos = 0;
- DECL_PROP_IMPL(CURSORNAME, cppu::UnoType<OUString>::get()) 0);
- DECL_PROP_IMPL(ESCAPE_PROCESSING, cppu::UnoType<bool>::get()) 0);
- DECL_PROP_IMPL(FETCHDIRECTION, cppu::UnoType<sal_Int32>::get()) 0);
- DECL_PROP_IMPL(FETCHSIZE, cppu::UnoType<sal_Int32>::get()) 0);
- DECL_PROP_IMPL(MAXFIELDSIZE, cppu::UnoType<sal_Int32>::get()) 0);
- DECL_PROP_IMPL(MAXROWS, cppu::UnoType<sal_Int32>::get()) 0);
- DECL_PROP_IMPL(QUERYTIMEOUT, cppu::UnoType<sal_Int32>::get()) 0);
- DECL_PROP_IMPL(RESULTSETCONCURRENCY, cppu::UnoType<sal_Int32>::get()) 0);
- DECL_PROP_IMPL(RESULTSETTYPE, cppu::UnoType<sal_Int32>::get()) 0);
- DECL_PROP_IMPL(USEBOOKMARKS, cppu::UnoType<bool>::get()) 0);
+ pDesc[nPos++] = css::beans::Property(PROPERTY_CURSORNAME, PROPERTY_ID_CURSORNAME, cppu::UnoType<OUString>::get(), 0);
+ pDesc[nPos++] = css::beans::Property(PROPERTY_ESCAPE_PROCESSING, PROPERTY_ID_ESCAPE_PROCESSING, cppu::UnoType<bool>::get(), 0);
+ pDesc[nPos++] = css::beans::Property(PROPERTY_FETCHDIRECTION, PROPERTY_ID_FETCHDIRECTION, cppu::UnoType<sal_Int32>::get(), 0);
+ pDesc[nPos++] = css::beans::Property(PROPERTY_FETCHSIZE, PROPERTY_ID_FETCHSIZE, cppu::UnoType<sal_Int32>::get(), 0);
+ pDesc[nPos++] = css::beans::Property(PROPERTY_MAXFIELDSIZE, PROPERTY_ID_MAXFIELDSIZE, cppu::UnoType<sal_Int32>::get(), 0);
+ pDesc[nPos++] = css::beans::Property(PROPERTY_MAXROWS, PROPERTY_ID_MAXROWS, cppu::UnoType<sal_Int32>::get(), 0);
+ pDesc[nPos++] = css::beans::Property(PROPERTY_QUERYTIMEOUT, PROPERTY_ID_QUERYTIMEOUT, cppu::UnoType<sal_Int32>::get(), 0);
+ pDesc[nPos++] = css::beans::Property(PROPERTY_RESULTSETCONCURRENCY, PROPERTY_ID_RESULTSETCONCURRENCY, cppu::UnoType<sal_Int32>::get(), 0);
+ pDesc[nPos++] = css::beans::Property(PROPERTY_RESULTSETTYPE, PROPERTY_ID_RESULTSETTYPE, cppu::UnoType<sal_Int32>::get(), 0);
+ pDesc[nPos++] = css::beans::Property(PROPERTY_USEBOOKMARKS, PROPERTY_ID_USEBOOKMARKS, cppu::UnoType<bool>::get(), 0);
OSL_ENSURE(nPos == aDescriptor.getLength(), "forgot to adjust the count ?");
return new ::cppu::OPropertyArrayHelper(aDescriptor);
}
diff --git a/dbaccess/source/core/dataaccess/datasource.cxx b/dbaccess/source/core/dataaccess/datasource.cxx
index 4c75363ef158..45ad2e500d8b 100644
--- a/dbaccess/source/core/dataaccess/datasource.cxx
+++ b/dbaccess/source/core/dataaccess/datasource.cxx
@@ -799,19 +799,20 @@ Reference< XPropertySetInfo > ODatabaseSource::getPropertySetInfo()
css::uno::Sequence< css::beans::Property> aDescriptor(13);
css::beans::Property* pDesc = aDescriptor.getArray();
sal_Int32 nPos = 0;
- DECL_PROP_IMPL(INFO, cppu::UnoType<Sequence< PropertyValue >>::get()) css::beans::PropertyAttribute::BOUND);
- DECL_PROP_IMPL(ISPASSWORDREQUIRED, cppu::UnoType<bool>::get()) css::beans::PropertyAttribute::BOUND);
- DECL_PROP_IMPL(ISREADONLY, cppu::UnoType<bool>::get()) css::beans::PropertyAttribute::READONLY);
- DECL_PROP_IMPL(LAYOUTINFORMATION, cppu::UnoType<Sequence< PropertyValue >>::get()) css::beans::PropertyAttribute::BOUND);
- DECL_PROP_IMPL(NAME, cppu::UnoType<OUString>::get()) css::beans::PropertyAttribute::READONLY);
- DECL_PROP_IMPL(NUMBERFORMATSSUPPLIER, cppu::UnoType<XNumberFormatsSupplier>::get()) css::beans::PropertyAttribute::READONLY | css::beans::PropertyAttribute::TRANSIENT);
- DECL_PROP_IMPL(PASSWORD, cppu::UnoType<OUString>::get()) css::beans::PropertyAttribute::TRANSIENT);
- DECL_PROP_IMPL(SETTINGS, cppu::UnoType<XPropertySet>::get()) css::beans::PropertyAttribute::BOUND | css::beans::PropertyAttribute::READONLY);
- DECL_PROP_IMPL(SUPPRESSVERSIONCL, cppu::UnoType<bool>::get()) css::beans::PropertyAttribute::BOUND);
- DECL_PROP_IMPL(TABLEFILTER, cppu::UnoType<Sequence< OUString >>::get()) css::beans::PropertyAttribute::BOUND);
- DECL_PROP_IMPL(TABLETYPEFILTER, cppu::UnoType<Sequence< OUString >>::get()) css::beans::PropertyAttribute::BOUND);
- DECL_PROP_IMPL(URL, cppu::UnoType<OUString>::get()) css::beans::PropertyAttribute::BOUND);
- DECL_PROP_IMPL(USER, cppu::UnoType<OUString>::get()) css::beans::PropertyAttribute::BOUND);
+ pDesc[nPos++] = css::beans::Property(PROPERTY_INFO, PROPERTY_ID_INFO, cppu::UnoType<Sequence< PropertyValue >>::get(), css::beans::PropertyAttribute::BOUND);
+ pDesc[nPos++] = css::beans::Property(PROPERTY_ISPASSWORDREQUIRED, PROPERTY_ID_ISPASSWORDREQUIRED, cppu::UnoType<bool>::get(), css::beans::PropertyAttribute::BOUND);
+ pDesc[nPos++] = css::beans::Property(PROPERTY_ISREADONLY, PROPERTY_ID_ISREADONLY, cppu::UnoType<bool>::get(), css::beans::PropertyAttribute::READONLY);
+ pDesc[nPos++] = css::beans::Property(PROPERTY_LAYOUTINFORMATION, PROPERTY_ID_LAYOUTINFORMATION, cppu::UnoType<Sequence< PropertyValue >>::get(), css::beans::PropertyAttribute::BOUND);
+ pDesc[nPos++] = css::beans::Property(PROPERTY_NAME, PROPERTY_ID_NAME, cppu::UnoType<OUString>::get(), css::beans::PropertyAttribute::READONLY);
+ pDesc[nPos++] = css::beans::Property(PROPERTY_NUMBERFORMATSSUPPLIER, PROPERTY_ID_NUMBERFORMATSSUPPLIER,
+ cppu::UnoType<XNumberFormatsSupplier>::get(), css::beans::PropertyAttribute::READONLY | css::beans::PropertyAttribute::TRANSIENT);
+ pDesc[nPos++] = css::beans::Property(PROPERTY_PASSWORD, PROPERTY_ID_PASSWORD, cppu::UnoType<OUString>::get(), css::beans::PropertyAttribute::TRANSIENT);
+ pDesc[nPos++] = css::beans::Property(PROPERTY_SETTINGS, PROPERTY_ID_SETTINGS, cppu::UnoType<XPropertySet>::get(), css::beans::PropertyAttribute::BOUND | css::beans::PropertyAttribute::READONLY);
+ pDesc[nPos++] = css::beans::Property(PROPERTY_SUPPRESSVERSIONCL, PROPERTY_ID_SUPPRESSVERSIONCL, cppu::UnoType<bool>::get(), css::beans::PropertyAttribute::BOUND);
+ pDesc[nPos++] = css::beans::Property(PROPERTY_TABLEFILTER, PROPERTY_ID_TABLEFILTER, cppu::UnoType<Sequence< OUString >>::get(), css::beans::PropertyAttribute::BOUND);
+ pDesc[nPos++] = css::beans::Property(PROPERTY_TABLETYPEFILTER, PROPERTY_ID_TABLETYPEFILTER, cppu::UnoType<Sequence< OUString >>::get(), css::beans::PropertyAttribute::BOUND);
+ pDesc[nPos++] = css::beans::Property(PROPERTY_URL, PROPERTY_ID_URL, cppu::UnoType<OUString>::get(), css::beans::PropertyAttribute::BOUND);
+ pDesc[nPos++] = css::beans::Property(PROPERTY_USER, PROPERTY_ID_USER, cppu::UnoType<OUString>::get(), css::beans::PropertyAttribute::BOUND);
OSL_ENSURE(nPos == aDescriptor.getLength(), "forgot to adjust the count ?");
return new ::cppu::OPropertyArrayHelper(aDescriptor);
}
diff --git a/dbaccess/source/inc/apitools.hxx b/dbaccess/source/inc/apitools.hxx
index cbfc477673b8..4242019eb404 100644
--- a/dbaccess/source/inc/apitools.hxx
+++ b/dbaccess/source/inc/apitools.hxx
@@ -55,10 +55,6 @@ public:
};
-// helper for implementing the createArrayHelper
-#define DECL_PROP_IMPL(varname, cpputype) \
- pDesc[nPos++] = css::beans::Property(PROPERTY_##varname, PROPERTY_ID_##varname, cpputype,
-
#endif // INCLUDED_DBACCESS_SOURCE_INC_APITOOLS_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/app/AppDetailPageHelper.hxx b/dbaccess/source/ui/app/AppDetailPageHelper.hxx
index 4428bcfc9f2a..25cc3229a2d4 100644
--- a/dbaccess/source/ui/app/AppDetailPageHelper.hxx
+++ b/dbaccess/source/ui/app/AppDetailPageHelper.hxx
@@ -37,8 +37,6 @@ namespace com::sun::star::awt { class XWindow; }
namespace com::sun::star::frame { class XFrame2; }
namespace com::sun::star::io { class XPersist; }
-#define ELEMENT_COUNT size_t(E_ELEMENT_TYPE_COUNT)
-
namespace dbaui
{
class OAppBorderWindow;
@@ -76,7 +74,7 @@ namespace dbaui
// Combines general functionality.
class OAppDetailPageHelper final : public OChildWindow
{
- std::unique_ptr<DBTreeViewBase> m_aLists[ELEMENT_COUNT];
+ std::unique_ptr<DBTreeViewBase> m_aLists[size_t(E_ELEMENT_TYPE_COUNT)];
OAppBorderWindow& m_rBorderWin;
std::unique_ptr<weld::Container> m_xBox;
std::unique_ptr<weld::Widget> m_xFL;
diff --git a/dbaccess/source/ui/app/AppDetailView.cxx b/dbaccess/source/ui/app/AppDetailView.cxx
index 6e995354e4f6..8491ea4a7ef1 100644
--- a/dbaccess/source/ui/app/AppDetailView.cxx
+++ b/dbaccess/source/ui/app/AppDetailView.cxx
@@ -313,7 +313,7 @@ void OApplicationDetailView::impl_fillTaskPaneData(ElementType _eType, TaskPaneD
const TaskPaneData& OApplicationDetailView::impl_getTaskPaneData( ElementType _eType )
{
if ( m_aTaskPaneData.empty() )
- m_aTaskPaneData.resize( ELEMENT_COUNT );
+ m_aTaskPaneData.resize( size_t(E_ELEMENT_TYPE_COUNT) );
OSL_ENSURE( ( _eType >= 0 ) && ( _eType < E_ELEMENT_TYPE_COUNT ), "OApplicationDetailView::impl_getTaskPaneData: illegal element type!" );
TaskPaneData& rData = m_aTaskPaneData[ _eType ];
diff --git a/dbaccess/source/ui/browser/brwctrlr.cxx b/dbaccess/source/ui/browser/brwctrlr.cxx
index 3ae63b6012f4..27de7af7dd39 100644
--- a/dbaccess/source/ui/browser/brwctrlr.cxx
+++ b/dbaccess/source/ui/browser/brwctrlr.cxx
@@ -91,27 +91,6 @@ using namespace ::dbtools;
using namespace ::comphelper;
using namespace ::svt;
-#define HANDLE_SQL_ERRORS( action, successflag, context, message ) \
- try \
- { \
- successflag = false; \
- action; \
- successflag = true; \
- } \
- catch(SQLException& e) \
- { \
- SQLException aError = ::dbtools::prependErrorInfo(e, *this, context); \
- css::sdb::SQLErrorEvent aEvent; \
- aEvent.Reason <<= aError; \
- errorOccured(aEvent); \
- } \
- catch(Exception&) \
- { \
- DBG_UNHANDLED_EXCEPTION("dbaccess"); \
- } \
-
-#define DO_SAFE( action, message ) try { action; } catch(Exception&) { SAL_WARN("dbaccess.ui",message); } ;
-
namespace dbaui
{
@@ -1964,12 +1943,24 @@ void SbaXDataBrowserController::Execute(sal_uInt16 nId, const Sequence< Property
Reference< XSingleSelectQueryComposer > xParser = createParser_nothrow();
const OUString sOldSort = xParser->getOrder();
bool bParserSuccess = false;
- HANDLE_SQL_ERRORS(
- xParser->setOrder(OUString()); xParser->appendOrderByColumn(xField, bSortUp),
- bParserSuccess,
- DBA_RES(SBA_BROWSER_SETTING_ORDER),
- "SbaXDataBrowserController::Execute : caught an exception while composing the new filter !"
- )
+ try
+ {
+ bParserSuccess = false;
+ xParser->setOrder(OUString());
+ xParser->appendOrderByColumn(xField, bSortUp);
+ bParserSuccess = true;
+ }
+ catch(SQLException& e)
+ {
+ SQLException aError = ::dbtools::prependErrorInfo(e, *this, DBA_RES(SBA_BROWSER_SETTING_ORDER));
+ css::sdb::SQLErrorEvent aEvent;
+ aEvent.Reason <<= aError;
+ errorOccured(aEvent);
+ }
+ catch(Exception&)
+ {
+ DBG_UNHANDLED_EXCEPTION("dbaccess", "SbaXDataBrowserController::Execute : caught an exception while composing the new filter !");
+ }
if (bParserSuccess)
applyParserOrder(sOldSort,xParser);
@@ -2001,8 +1992,22 @@ void SbaXDataBrowserController::Execute(sal_uInt16 nId, const Sequence< Property
// -> completely overwrite it, else append one
if (!bApplied)
{
- DO_SAFE( xParser->setFilter( OUString()), "SbaXDataBrowserController::Execute : caught an exception while resetting unapplied filter !" );
- DO_SAFE( xParser->setHavingClause(OUString()), "SbaXDataBrowserController::Execute : caught an exception while resetting unapplied HAVING clause !" );
+ try
+ {
+ xParser->setFilter(OUString());
+ }
+ catch(Exception&)
+ {
+ SAL_WARN("dbaccess.ui", "SbaXDataBrowserController::Execute : caught an exception while resetting unapplied filter !");
+ }
+ try
+ {
+ xParser->setHavingClause(OUString());
+ }
+ catch(Exception&)
+ {
+ SAL_WARN("dbaccess.ui", "SbaXDataBrowserController::Execute : caught an exception while resetting unapplied HAVING clause !");
+ }
}
bool bParserSuccess = false;
@@ -2011,21 +2016,43 @@ void SbaXDataBrowserController::Execute(sal_uInt16 nId, const Sequence< Property
if ( bHaving )
{
- HANDLE_SQL_ERRORS(
- xParser->appendHavingClauseByColumn(xField,true,nOp),
- bParserSuccess,
- DBA_RES(SBA_BROWSER_SETTING_FILTER),
- "SbaXDataBrowserController::Execute : caught an exception while composing the new filter !"
- )
+ try
+ {
+ bParserSuccess = false;
+ xParser->appendHavingClauseByColumn(xField,true,nOp);
+ bParserSuccess = true;
+ }
+ catch(SQLException& e)
+ {
+ SQLException aError = ::dbtools::prependErrorInfo(e, *this, DBA_RES(SBA_BROWSER_SETTING_FILTER));
+ css::sdb::SQLErrorEvent aEvent;
+ aEvent.Reason <<= aError;
+ errorOccured(aEvent);
+ }
+ catch(Exception&)
+ {
+ DBG_UNHANDLED_EXCEPTION("dbaccess", "SbaXDataBrowserController::Execute : caught an exception while composing the new filter !");
+ }
}
else
{
- HANDLE_SQL_ERRORS(
- xParser->appendFilterByColumn(xField,true,nOp),
- bParserSuccess,
- DBA_RES(SBA_BROWSER_SETTING_FILTER),
- "SbaXDataBrowserController::Execute : caught an exception while composing the new filter !"
- )
+ try
+ {
+ bParserSuccess = false;
+ xParser->appendFilterByColumn(xField,true,nOp);
+ bParserSuccess = true;
+ }
+ catch(SQLException& e)
+ {
+ SQLException aError = ::dbtools::prependErrorInfo(e, *this, DBA_RES(SBA_BROWSER_SETTING_FILTER));
+ css::sdb::SQLErrorEvent aEvent;
+ aEvent.Reason <<= aError;
+ errorOccured(aEvent);
+ }
+ catch(Exception&)
+ {
+ DBG_UNHANDLED_EXCEPTION("dbaccess", "SbaXDataBrowserController::Execute : caught an exception while composing the new filter !");
+ }
}
if (bParserSuccess)