[Libreoffice-commits] core.git: mysqlc/source
Julien Nabet
serval2412 at yahoo.fr
Sun May 11 13:53:02 PDT 2014
mysqlc/source/mysqlc_propertyids.hxx | 15 ---------------
mysqlc/source/mysqlc_resultset.cxx | 13 ++++++++-----
mysqlc/source/mysqlc_statement.cxx | 20 ++++++++++----------
3 files changed, 18 insertions(+), 30 deletions(-)
New commits:
commit aa214079b4e9df493b57fbf815460b7164225f2b
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Sun May 11 22:50:37 2014 +0200
Kill DECL_PROP1IMPL and related
See http://nabble.documentfoundation.org/About-removing-macros-td4106620.html
Change-Id: Ib934eb3f27b656b5b2f8488c2103e8eee73f9623
diff --git a/mysqlc/source/mysqlc_propertyids.hxx b/mysqlc/source/mysqlc_propertyids.hxx
index 4e7ac46..35e5502 100644
--- a/mysqlc/source/mysqlc_propertyids.hxx
+++ b/mysqlc/source/mysqlc_propertyids.hxx
@@ -130,21 +130,6 @@ enum
}/* mysqlc */
}/* connectivity */
-
-#define DECL_PROP1IMPL(varname, type) \
-pProperties[nPos++] = Property(OPropertyMap::getPropMap().getNameByIndex(PROPERTY_ID_##varname), PROPERTY_ID_##varname, ::getCppuType(static_cast< type*>(0)),
-
-#define DECL_PROP0(varname, type) \
- DECL_PROP1IMPL(varname, type) 0)
-
-#define DECL_BOOL_PROP1IMPL(varname) \
- pProperties[nPos++] = Property(OPropertyMap::getPropMap().getNameByIndex(PROPERTY_ID_##varname), PROPERTY_ID_##varname, ::getBooleanCppuType(),
-
-#define DECL_BOOL_PROP0(varname) \
- DECL_BOOL_PROP1IMPL(varname) 0)
-
-
-
#endif // INCLUDED_MYSQLC_SOURCE_MYSQLC_PROPERTYIDS_HXX
diff --git a/mysqlc/source/mysqlc_resultset.cxx b/mysqlc/source/mysqlc_resultset.cxx
index aa602f6..5942ae7 100644
--- a/mysqlc/source/mysqlc_resultset.cxx
+++ b/mysqlc/source/mysqlc_resultset.cxx
@@ -1269,11 +1269,14 @@ IPropertyArrayHelper * OResultSet::createArrayHelper() const
Sequence< Property > aProps(5);
Property* pProperties = aProps.getArray();
sal_Int32 nPos = 0;
- DECL_PROP0(FETCHDIRECTION, sal_Int32);
- DECL_PROP0(FETCHSIZE, sal_Int32);
- DECL_BOOL_PROP1IMPL(ISBOOKMARKABLE) PropertyAttribute::READONLY);
- DECL_PROP1IMPL(RESULTSETCONCURRENCY,sal_Int32) PropertyAttribute::READONLY);
- DECL_PROP1IMPL(RESULTSETTYPE, sal_Int32) PropertyAttribute::READONLY);
+ pProperties[nPos++] = Property(OPropertyMap::getPropMap().getNameByIndex(PROPERTY_ID_FETCHDIRECTION), PROPERTY_ID_FETCHDIRECTION, cppu::UnoType<sal_Int32>::get(), 0);
+ pProperties[nPos++] = Property(OPropertyMap::getPropMap().getNameByIndex(PROPERTY_ID_FETCHSIZE), PROPERTY_ID_FETCHSIZE, cppu::UnoType<sal_Int32>::get(), 0);
+ pProperties[nPos++] = Property(OPropertyMap::getPropMap().getNameByIndex(PROPERTY_ID_ISBOOKMARKABLE),
+ PROPERTY_ID_ISBOOKMARKABLE, ::getBooleanCppuType(), PropertyAttribute::READONLY);
+ pProperties[nPos++] = Property(OPropertyMap::getPropMap().getNameByIndex(PROPERTY_ID_RESULTSETCONCURRENCY),
+ PROPERTY_ID_RESULTSETCONCURRENCY, cppu::UnoType<sal_Int32>::get(), PropertyAttribute::READONLY);
+ pProperties[nPos++] = Property(OPropertyMap::getPropMap().getNameByIndex(PROPERTY_ID_RESULTSETTYPE),
+ PROPERTY_ID_RESULTSETTYPE, cppu::UnoType<sal_Int32>::get(), PropertyAttribute::READONLY);
return new OPropertyArrayHelper(aProps);
}
diff --git a/mysqlc/source/mysqlc_statement.cxx b/mysqlc/source/mysqlc_statement.cxx
index ca7dd9f..57b051e 100644
--- a/mysqlc/source/mysqlc_statement.cxx
+++ b/mysqlc/source/mysqlc_statement.cxx
@@ -369,16 +369,16 @@ void SAL_CALL OCommonStatement::clearWarnings()
Sequence< Property > aProps(10);
Property* pProperties = aProps.getArray();
sal_Int32 nPos = 0;
- DECL_PROP0(CURSORNAME, OUString);
- DECL_BOOL_PROP0(ESCAPEPROCESSING);
- DECL_PROP0(FETCHDIRECTION,sal_Int32);
- DECL_PROP0(FETCHSIZE, sal_Int32);
- DECL_PROP0(MAXFIELDSIZE,sal_Int32);
- DECL_PROP0(MAXROWS, sal_Int32);
- DECL_PROP0(QUERYTIMEOUT,sal_Int32);
- DECL_PROP0(RESULTSETCONCURRENCY,sal_Int32);
- DECL_PROP0(RESULTSETTYPE,sal_Int32);
- DECL_BOOL_PROP0(USEBOOKMARKS);
+ pProperties[nPos++] = Property(OPropertyMap::getPropMap().getNameByIndex(PROPERTY_ID_CURSORNAME), PROPERTY_ID_CURSORNAME, cppu::UnoType<OUString>::get(), 0);
+ pProperties[nPos++] = Property(OPropertyMap::getPropMap().getNameByIndex(PROPERTY_ID_ESCAPEPROCESSING), PROPERTY_ID_ESCAPEPROCESSING, ::getBooleanCppuType(), 0);
+ pProperties[nPos++] = Property(OPropertyMap::getPropMap().getNameByIndex(PROPERTY_ID_FETCHDIRECTION), PROPERTY_ID_FETCHDIRECTION, cppu::UnoType<sal_Int32>::get(), 0);
+ pProperties[nPos++] = Property(OPropertyMap::getPropMap().getNameByIndex(PROPERTY_ID_FETCHSIZE), PROPERTY_ID_FETCHSIZE, cppu::UnoType<sal_Int32>::get(), 0);
+ pProperties[nPos++] = Property(OPropertyMap::getPropMap().getNameByIndex(PROPERTY_ID_MAXFIELDSIZE), PROPERTY_ID_MAXFIELDSIZE, cppu::UnoType<sal_Int32>::get(), 0);
+ pProperties[nPos++] = Property(OPropertyMap::getPropMap().getNameByIndex(PROPERTY_ID_MAXROWS), PROPERTY_ID_MAXROWS, cppu::UnoType<sal_Int32>::get(), 0);
+ pProperties[nPos++] = Property(OPropertyMap::getPropMap().getNameByIndex(PROPERTY_ID_QUERYTIMEOUT), PROPERTY_ID_QUERYTIMEOUT, cppu::UnoType<sal_Int32>::get(), 0);
+ pProperties[nPos++] = Property(OPropertyMap::getPropMap().getNameByIndex(PROPERTY_ID_RESULTSETCONCURRENCY), PROPERTY_ID_RESULTSETCONCURRENCY, cppu::UnoType<sal_Int32>::get(), 0);
+ pProperties[nPos++] = Property(OPropertyMap::getPropMap().getNameByIndex(PROPERTY_ID_RESULTSETTYPE), PROPERTY_ID_RESULTSETTYPE, cppu::UnoType<sal_Int32>::get(), 0);
+ pProperties[nPos++] = Property(OPropertyMap::getPropMap().getNameByIndex(PROPERTY_ID_USEBOOKMARKS), PROPERTY_ID_USEBOOKMARKS, ::getBooleanCppuType(), 0);
return new ::cppu::OPropertyArrayHelper(aProps);
}
More information about the Libreoffice-commits
mailing list