diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2017-12-20 05:32:49 +0200 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2017-12-20 09:28:25 +0100 |
commit | 7f0241c4bb85bf9a3794d5a8f8e918a92adbd3f1 (patch) | |
tree | 011329432df2ec9bd3768d0e02fa5da43ee9b718 | |
parent | 416f7578d6332b5b5a4445f26307d73925188e41 (diff) |
loplugin:unusedindex
Change-Id: I30a49d9d9f9badadab3afcbaa6cee011b7af4bd0
Reviewed-on: https://gerrit.libreoffice.org/46830
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
-rw-r--r-- | fpicker/source/office/fpsmartcontent.cxx | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/fpicker/source/office/fpsmartcontent.cxx b/fpicker/source/office/fpsmartcontent.cxx index 1f176efcf0ef..d5aead5af3fc 100644 --- a/fpicker/source/office/fpsmartcontent.cxx +++ b/fpicker/source/office/fpsmartcontent.cxx @@ -264,13 +264,10 @@ namespace svt bool bRet = false; try { - Sequence< ContentInfo > aInfo = m_pContent->queryCreatableContentsInfo(); - const ContentInfo* pInfo = aInfo.getConstArray(); - sal_Int32 nCount = aInfo.getLength(); - for ( sal_Int32 i = 0; i < nCount; ++i, ++pInfo ) + for ( auto const& rInfo : m_pContent->queryCreatableContentsInfo() ) { // Simply look for the first KIND_FOLDER... - if ( pInfo->Attributes & ContentInfoAttribute::KIND_FOLDER ) + if ( rInfo.Attributes & ContentInfoAttribute::KIND_FOLDER ) { bRet = true; break; @@ -295,15 +292,12 @@ namespace svt { OUString sFolderType; - Sequence< ContentInfo > aInfo = m_pContent->queryCreatableContentsInfo(); - const ContentInfo* pInfo = aInfo.getConstArray(); - sal_Int32 nCount = aInfo.getLength(); - for ( sal_Int32 i = 0; i < nCount; ++i, ++pInfo ) + for ( auto const& rInfo : m_pContent->queryCreatableContentsInfo() ) { // Simply look for the first KIND_FOLDER... - if ( pInfo->Attributes & ContentInfoAttribute::KIND_FOLDER ) + if ( rInfo.Attributes & ContentInfoAttribute::KIND_FOLDER ) { - sFolderType = pInfo->Type; + sFolderType = rInfo.Type; break; } } @@ -312,9 +306,7 @@ namespace svt { ucbhelper::Content aCreated; Sequence< OUString > aNames { "Title" }; - Sequence< Any > aValues( 1 ); - Any* pValues = aValues.getArray(); - pValues[0] <<= _rTitle; + Sequence< Any > aValues { Any(_rTitle) }; m_pContent->insertNewContent( sFolderType, aNames, aValues, aCreated ); aCreatedUrl = aCreated.getURL(); |