diff options
author | Arkadiy Illarionov <qarkai@gmail.com> | 2018-11-18 13:43:28 +0300 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-11-18 17:36:54 +0100 |
commit | 587ef41f75b8ea0bcd03366178d42a324dcf481c (patch) | |
tree | a672c557221d4fec8abbaf83568ed9e7242323a5 /svx/source/smarttags/SmartTagMgr.cxx | |
parent | 8b83659bb8f3368a1df949d5bc84d7b2dd0370b4 (diff) |
Simplify containers iterations in svx/source/[s-u]*
Use range-based loop or replace with STL functions
Change-Id: I2ec3e58cc46c9286ef863c732912ca7a729bab62
Reviewed-on: https://gerrit.libreoffice.org/63522
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx/source/smarttags/SmartTagMgr.cxx')
-rw-r--r-- | svx/source/smarttags/SmartTagMgr.cxx | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/svx/source/smarttags/SmartTagMgr.cxx b/svx/source/smarttags/SmartTagMgr.cxx index b6c1d7f90c2d..2c95e074205b 100644 --- a/svx/source/smarttags/SmartTagMgr.cxx +++ b/svx/source/smarttags/SmartTagMgr.cxx @@ -42,6 +42,7 @@ #include <com/sun/star/util/XChangesBatch.hpp> #include <com/sun/star/util/XChangesNotifier.hpp> #include <comphelper/processfactory.hxx> +#include <comphelper/sequence.hxx> #include <rtl/ustring.hxx> #include <com/sun/star/text/XTextRange.hpp> @@ -227,13 +228,7 @@ void SmartTagMgr::WriteConfiguration( const bool* pIsLabelTextWithSmartTags, if ( pDisabledTypes ) { - const sal_Int32 nNumberOfDisabledSmartTagTypes = pDisabledTypes->size(); - Sequence< OUString > aTypes( nNumberOfDisabledSmartTagTypes ); - - std::vector< OUString >::const_iterator aIter; - sal_Int32 nCount = 0; - for ( aIter = pDisabledTypes->begin(); aIter != pDisabledTypes->end(); ++aIter ) - aTypes[ nCount++ ] = *aIter; + Sequence< OUString > aTypes = comphelper::containerToSequence(*pDisabledTypes); const Any aNewTypes = makeAny( aTypes ); |