summaryrefslogtreecommitdiff
path: root/sfx2/source/appl/newhelp.cxx
diff options
context:
space:
mode:
authorArkadiy Illarionov <qarkai@gmail.com>2019-07-21 19:39:26 +0300
committerArkadiy Illarionov <qarkai@gmail.com>2019-07-29 18:44:33 +0200
commit25b200ff79c71c831bc7e6fe8b1ec0b5315e96d6 (patch)
treeb8e7cc15bfe82b677fb1bfc791b3f2f5a50fdc79 /sfx2/source/appl/newhelp.cxx
parentc762e3859973355b31f6676a8e697c5fd78c9970 (diff)
Simplify Sequence iterations in sfx2
Use range-based loops, STL and comphelper functions Change-Id: I6a0d18493db7a25e8b41925f2d45cb221b5065a7 Reviewed-on: https://gerrit.libreoffice.org/76074 Tested-by: Jenkins Reviewed-by: Arkadiy Illarionov <qarkai@gmail.com>
Diffstat (limited to 'sfx2/source/appl/newhelp.cxx')
-rw-r--r--sfx2/source/appl/newhelp.cxx12
1 files changed, 5 insertions, 7 deletions
diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx
index 6dbd7b82f6eb..a491d3ec02a2 100644
--- a/sfx2/source/appl/newhelp.cxx
+++ b/sfx2/source/appl/newhelp.cxx
@@ -656,10 +656,10 @@ void IndexTabPage_Impl::InitializeIndex()
sal_uInt32 nRefListLen = aRefList.getLength();
- DBG_ASSERT( aAnchorList.getLength(), "*IndexTabPage_Impl::InitializeIndex(): AnchorList is empty!" );
+ DBG_ASSERT( aAnchorList.hasElements(), "*IndexTabPage_Impl::InitializeIndex(): AnchorList is empty!" );
DBG_ASSERT( nRefListLen, "*IndexTabPage_Impl::InitializeIndex(): RefList is empty!" );
- if ( aAnchorList.getLength() && nRefListLen )
+ if ( aAnchorList.hasElements() && nRefListLen )
{
if ( aAnchorList[0].getLength() > 0 )
{
@@ -1121,9 +1121,8 @@ static void GetBookmarkEntry_Impl
OUString& rURL
)
{
- for ( int i = 0; i < aBookmarkEntry.getLength(); i++ )
+ for ( const PropertyValue& aValue : aBookmarkEntry )
{
- PropertyValue aValue = aBookmarkEntry[i];
if ( aValue.Name == HISTORY_PROPERTYNAME_URL )
aValue.Value >>= rURL;
else if ( aValue.Name == HISTORY_PROPERTYNAME_TITLE )
@@ -1279,10 +1278,9 @@ BookmarksTabPage_Impl::BookmarksTabPage_Impl(vcl::Window* pParent, SfxHelpIndexW
OUString aTitle;
OUString aURL;
- sal_uInt32 i, nCount = aBookmarkSeq.getLength();
- for ( i = 0; i < nCount; ++i )
+ for ( auto& rBookmark : aBookmarkSeq )
{
- GetBookmarkEntry_Impl( aBookmarkSeq[i], aTitle, aURL );
+ GetBookmarkEntry_Impl( rBookmark, aTitle, aURL );
AddBookmarks( aTitle, aURL );
}
}