diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2017-12-17 23:00:24 +0300 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-12-18 07:36:32 +0100 |
commit | 4e144751f12a06e358e4f7efa7c8f13954e6cfd7 (patch) | |
tree | c6df66d58d02ecaf5caa437a944665fe83959402 /dbaccess/source/ui/browser/formadapter.cxx | |
parent | convert EEHorizontalTextDirection to scoped enum (diff) | |
download | core-4e144751f12a06e358e4f7efa7c8f13954e6cfd7.tar.gz core-4e144751f12a06e358e4f7efa7c8f13954e6cfd7.zip |
loplugin:unusedindex
Change-Id: I256a807dd2a4c81126b5a76f3d472e31b8224146
Reviewed-on: https://gerrit.libreoffice.org/46652
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'dbaccess/source/ui/browser/formadapter.cxx')
-rw-r--r-- | dbaccess/source/ui/browser/formadapter.cxx | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/dbaccess/source/ui/browser/formadapter.cxx b/dbaccess/source/ui/browser/formadapter.cxx index 7fd72dbd7464..1fd7948ceafc 100644 --- a/dbaccess/source/ui/browser/formadapter.cxx +++ b/dbaccess/source/ui/browser/formadapter.cxx @@ -1206,14 +1206,11 @@ Reference< css::beans::XPropertySetInfo > SAL_CALL SbaXFormAdapter::getPropertyS if (-1 == m_nNamePropHandle) { // we need to determine the handle for the NAME property - Sequence< css::beans::Property> aProps = xReturn->getProperties(); - const css::beans::Property* pProps = aProps.getConstArray(); - - for (sal_Int32 i=0; i<aProps.getLength(); ++i, ++pProps) + for (const css::beans::Property& rProp : xReturn->getProperties()) { - if (pProps->Name == PROPERTY_NAME) + if (rProp.Name == PROPERTY_NAME) { - m_nNamePropHandle = pProps->Handle; + m_nNamePropHandle = rProp.Handle; break; } } @@ -1234,16 +1231,14 @@ Sequence< Any > SAL_CALL SbaXFormAdapter::getPropertyValues(const Sequence< OUSt if (!xSet.is()) return Sequence< Any>(aPropertyNames.getLength()); - Sequence< Any> aReturn = xSet->getPropertyValues(aPropertyNames); + Sequence< Any> aReturn = xSet->getPropertyValues(aPropertyNames); // search for (and fake) the NAME property - const OUString* pNames = aPropertyNames.getConstArray(); - Any* pValues = aReturn.getArray(); OSL_ENSURE(aReturn.getLength() == aPropertyNames.getLength(), "SAL_CALL SbaXFormAdapter::getPropertyValues : the main form returned an invalid-length sequence !"); - for (sal_Int32 i=0; i<aPropertyNames.getLength(); ++i, ++pNames, ++pValues) - if (*pNames == PROPERTY_NAME) + for (sal_Int32 i=0; i<aPropertyNames.getLength(); ++i) + if (aPropertyNames[i] == PROPERTY_NAME) { - (*pValues) <<= m_sName; + aReturn[i] <<= m_sName; break; } @@ -1336,9 +1331,8 @@ Sequence< css::beans::PropertyState> SAL_CALL SbaXFormAdapter::getPropertyStates // set them all to DEFAULT Sequence< css::beans::PropertyState> aReturn(aPropertyName.getLength()); - css::beans::PropertyState* pStates = aReturn.getArray(); - for (sal_Int32 i=0; i<aPropertyName.getLength(); ++i, ++pStates) - *pStates = css::beans::PropertyState_DEFAULT_VALUE; + for (css::beans::PropertyState& rState : aReturn) + rState = css::beans::PropertyState_DEFAULT_VALUE; return aReturn; } |