diff options
author | Arkadiy Illarionov <qarkai@gmail.com> | 2019-07-07 16:20:12 +0300 |
---|---|---|
committer | Arkadiy Illarionov <qarkai@gmail.com> | 2019-07-09 17:48:06 +0200 |
commit | 44a6335f49a64ac77207d3aa46c267503c65c5ff (patch) | |
tree | 8ed220967528dc6caa72fa9e753c0955f3de2433 /svx/source/smarttags | |
parent | 4a96a5d862ed46bbcb64d34b32720b5b1b3d7ca8 (diff) |
Simplify Sequence iterations in svx
Use range-based loops, STL and comphelper functions
Change-Id: If6d190cf72b8653c1c3fbe9a6a6e47f10f1a6765
Reviewed-on: https://gerrit.libreoffice.org/75255
Tested-by: Jenkins
Reviewed-by: Arkadiy Illarionov <qarkai@gmail.com>
Diffstat (limited to 'svx/source/smarttags')
-rw-r--r-- | svx/source/smarttags/SmartTagMgr.cxx | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/svx/source/smarttags/SmartTagMgr.cxx b/svx/source/smarttags/SmartTagMgr.cxx index 2c95e074205b..be65e6d0fff7 100644 --- a/svx/source/smarttags/SmartTagMgr.cxx +++ b/svx/source/smarttags/SmartTagMgr.cxx @@ -299,15 +299,13 @@ void SmartTagMgr::changesOccurred( const util::ChangesEvent& rEvent ) { SolarMutexGuard aGuard; - const util::ElementChange* pElementChanges = rEvent.Changes.getConstArray(); - const sal_Int32 nNumberOfChanges = rEvent.Changes.getLength(); bool bExcludedTypes = false; bool bRecognize = false; - for( sal_Int32 i = 0; i < nNumberOfChanges; ++i) + for( const util::ElementChange& rElementChange : rEvent.Changes) { OUString sTemp; - pElementChanges[i].Accessor >>= sTemp; + rElementChange.Accessor >>= sTemp; if ( sTemp == "ExcludedSmartTagTypes" ) bExcludedTypes = true; @@ -433,10 +431,8 @@ void SmartTagMgr::ReadConfiguration( bool bExcludedTypes, bool bRecognize ) Sequence< OUString > aValues; aAny >>= aValues; - const sal_Int32 nValues = aValues.getLength(); - - for ( sal_Int32 nI = 0; nI < nValues; ++nI ) - maDisabledSmartTagTypes.insert( aValues[nI] ); + for ( const auto& rValue : aValues ) + maDisabledSmartTagTypes.insert( rValue ); } if ( bRecognize ) |