summaryrefslogtreecommitdiff
path: root/dbaccess/source/inc
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-05-20 08:43:33 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-05-20 12:11:11 +0200
commit1553d3787cbe0cdababf31382bf3376a3640d8cf (patch)
treeb829cc1f97dac33abdf1e592a636d6fb24497f13 /dbaccess/source/inc
parentc2ead5a142be19cb74127294641ec35da9e0f5c5 (diff)
use for-range on Sequence in d*
and fix bug in GenericClipboard::initialize, where it was looping through the arguments, but always reading the first one. I'm guessing it was never an issue because it is always called with only one argument Change-Id: I8f72b6bce8c77a69c7d75115e34630e2c308261e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94553 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'dbaccess/source/inc')
-rw-r--r--dbaccess/source/inc/apitools.hxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/dbaccess/source/inc/apitools.hxx b/dbaccess/source/inc/apitools.hxx
index 315791bd62be..725cebd0b3db 100644
--- a/dbaccess/source/inc/apitools.hxx
+++ b/dbaccess/source/inc/apitools.hxx
@@ -77,10 +77,9 @@ public:
#define IMPLEMENT_SERVICE_INFO_SUPPORTS(classname) \
sal_Bool SAL_CALL classname::supportsService( const OUString& _rServiceName ) \
{ \
- css::uno::Sequence< OUString > aSupported(getSupportedServiceNames()); \
- const OUString* pSupported = aSupported.getConstArray(); \
- for (sal_Int32 i=0; i<aSupported.getLength(); ++i, ++pSupported) \
- if (*pSupported == _rServiceName) \
+ const css::uno::Sequence< OUString > aSupported(getSupportedServiceNames()); \
+ for (const OUString& s : aSupported) \
+ if (s == _rServiceName) \
return true; \
\
return false; \