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/unodialogs/textconversiondlgs | |
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/unodialogs/textconversiondlgs')
-rw-r--r-- | svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx | 6 | ||||
-rw-r--r-- | svx/source/unodialogs/textconversiondlgs/chinese_translation_unodialog.cxx | 5 |
2 files changed, 4 insertions, 7 deletions
diff --git a/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx b/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx index 8e476a550609..b0046aeeca9d 100644 --- a/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx +++ b/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx @@ -121,16 +121,14 @@ void DictionaryList::refillFromDictionary( sal_Int32 nTextConversionOptions ) return; Sequence< OUString > aLeftList( m_xDictionary->getConversionEntries( linguistic2::ConversionDirection_FROM_LEFT ) ); - sal_Int32 nCount = aLeftList.getLength(); Reference< linguistic2::XConversionPropertyType > xPropertyType( m_xDictionary, uno::UNO_QUERY ); - OUString aLeft, aRight; + OUString aRight; sal_Int16 nConversionPropertyType; - for(sal_Int32 nN=0; nN<nCount; nN++) + for(const OUString& aLeft : aLeftList) { - aLeft = aLeftList[nN]; Sequence< OUString > aRightList( m_xDictionary->getConversions( aLeft, 0, aLeft.getLength() , linguistic2::ConversionDirection_FROM_LEFT, nTextConversionOptions ) ); diff --git a/svx/source/unodialogs/textconversiondlgs/chinese_translation_unodialog.cxx b/svx/source/unodialogs/textconversiondlgs/chinese_translation_unodialog.cxx index 004f5957f9d4..d4231e33174e 100644 --- a/svx/source/unodialogs/textconversiondlgs/chinese_translation_unodialog.cxx +++ b/svx/source/unodialogs/textconversiondlgs/chinese_translation_unodialog.cxx @@ -94,11 +94,10 @@ void SAL_CALL ChineseTranslation_UnoDialog::initialize( const uno::Sequence< uno if( m_bDisposed || m_bInDispose ) return; - const uno::Any* pArguments = aArguments.getConstArray(); - for(sal_Int32 i=0; i<aArguments.getLength(); ++i, ++pArguments) + for(const uno::Any& rArgument : aArguments) { beans::PropertyValue aProperty; - if(*pArguments >>= aProperty) + if(rArgument >>= aProperty) { if( aProperty.Name == "ParentWindow" ) { |