From 44a6335f49a64ac77207d3aa46c267503c65c5ff Mon Sep 17 00:00:00 2001 From: Arkadiy Illarionov Date: Sun, 7 Jul 2019 16:20:12 +0300 Subject: 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 --- .../unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx | 6 ++---- .../unodialogs/textconversiondlgs/chinese_translation_unodialog.cxx | 5 ++--- 2 files changed, 4 insertions(+), 7 deletions(-) (limited to 'svx/source/unodialogs/textconversiondlgs') 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 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>= aProperty) + if(rArgument >>= aProperty) { if( aProperty.Name == "ParentWindow" ) { -- cgit