summaryrefslogtreecommitdiff
path: root/dbaccess/source/core/api/resultset.cxx
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2022-02-19 11:00:59 +0100
committerJulien Nabet <serval2412@yahoo.fr>2022-02-19 11:51:59 +0100
commitec41dcdddb47f39ede581ce00dc20ecd4fe3458b (patch)
tree7c4c5cb09137e80f9ead390e4b0d7e9b3d17ec26 /dbaccess/source/core/api/resultset.cxx
parente984de7855659fe96d37c533e4d5a8ba370f4b31 (diff)
Simplify sequence of Property in dbaccess
Change-Id: I270702ad4b4878ee5c1942be3c45eae370f37f8b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130189 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'dbaccess/source/core/api/resultset.cxx')
-rw-r--r--dbaccess/source/core/api/resultset.cxx22
1 files changed, 11 insertions, 11 deletions
diff --git a/dbaccess/source/core/api/resultset.cxx b/dbaccess/source/core/api/resultset.cxx
index dd5833fcd523..2fe6cf35504c 100644
--- a/dbaccess/source/core/api/resultset.cxx
+++ b/dbaccess/source/core/api/resultset.cxx
@@ -186,17 +186,17 @@ Reference< XPropertySetInfo > OResultSet::getPropertySetInfo()
// comphelper::OPropertyArrayUsageHelper
::cppu::IPropertyArrayHelper* OResultSet::createArrayHelper( ) const
{
- css::uno::Sequence< css::beans::Property> aDescriptor(6);
- css::beans::Property* pDesc = aDescriptor.getArray();
- sal_Int32 nPos = 0;
- 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);
+ return new ::cppu::OPropertyArrayHelper
+ {
+ {
+ { PROPERTY_CURSORNAME, PROPERTY_ID_CURSORNAME, cppu::UnoType<OUString>::get(), css::beans::PropertyAttribute::READONLY },
+ { PROPERTY_FETCHDIRECTION, PROPERTY_ID_FETCHDIRECTION, cppu::UnoType<sal_Int32>::get(), 0 },
+ { PROPERTY_FETCHSIZE, PROPERTY_ID_FETCHSIZE, cppu::UnoType<sal_Int32>::get(), 0 },
+ { PROPERTY_ISBOOKMARKABLE, PROPERTY_ID_ISBOOKMARKABLE, cppu::UnoType<bool>::get(), css::beans::PropertyAttribute::READONLY },
+ { PROPERTY_RESULTSETCONCURRENCY, PROPERTY_ID_RESULTSETCONCURRENCY, cppu::UnoType<sal_Int32>::get(), css::beans::PropertyAttribute::READONLY },
+ { PROPERTY_RESULTSETTYPE, PROPERTY_ID_RESULTSETTYPE, cppu::UnoType<sal_Int32>::get(), css::beans::PropertyAttribute::READONLY }
+ }
+ };
}
// cppu::OPropertySetHelper