diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2024-04-29 01:31:19 +0500 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2024-04-29 23:15:33 +0200 |
commit | 8755c80018bec656e1b102da25edc450da4eee52 (patch) | |
tree | 2bb7559605c11e18f7e9063f15e4772b438d4582 /connectivity/source/drivers/calc/CDatabaseMetaData.cxx | |
parent | 20070d12c85ae6db8d5b1374a49f92b34137c8b1 (diff) |
Drop uses of css::uno::Sequence::getConstArray in canvas .. connectivity
where it was obsoleted by commits 2484de6728bd11bb7949003d112f1ece2223c7a1
(Remove non-const Sequence::begin()/end() in internal code, 2021-10-15) and
fb3c04bd1930eedacd406874e1a285d62bbf27d9 (Drop non-const Sequence::operator[]
in internal code 2021-11-05).
Change-Id: I9467028fd1a7eeafad7f0dd776a91a9a40770b48
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166816
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'connectivity/source/drivers/calc/CDatabaseMetaData.cxx')
-rw-r--r-- | connectivity/source/drivers/calc/CDatabaseMetaData.cxx | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/connectivity/source/drivers/calc/CDatabaseMetaData.cxx b/connectivity/source/drivers/calc/CDatabaseMetaData.cxx index aad5b4e50193..1b88ab05ff55 100644 --- a/connectivity/source/drivers/calc/CDatabaseMetaData.cxx +++ b/connectivity/source/drivers/calc/CDatabaseMetaData.cxx @@ -134,27 +134,23 @@ Reference< XResultSet > SAL_CALL OCalcDatabaseMetaData::getTables( // check if ORowSetValue type is given // when no types are given then we have to return all tables e.g. TABLE - OUString aTable("TABLE"); + static constexpr OUString aTable(u"TABLE"_ustr); - bool bTableFound = true; - sal_Int32 nLength = types.getLength(); - if(nLength) + if (types.hasElements()) { - bTableFound = false; + bool bTableFound = false; - const OUString* pIter = types.getConstArray(); - const OUString* pEnd = pIter + nLength; - for(;pIter != pEnd;++pIter) + for (auto& type : types) { - if(*pIter == aTable) + if (type == aTable) { bTableFound = true; break; } } + if (!bTableFound) + return pResult; } - if(!bTableFound) - return pResult; // get the sheet names from the document |