diff options
author | Noel Grandin <noel@peralex.com> | 2016-05-11 09:53:05 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-05-12 07:12:21 +0000 |
commit | 875984617cfd6c773eb93f339929eb3fabd3e97b (patch) | |
tree | abb092c1b0d995d55f2f4508801df23377c9cc6d /svx/source/dialog | |
parent | 6bc3c2bdc5279314881b7e950d76d4d813470d11 (diff) |
clang-tidy modernize-loop-convert in svx
Change-Id: I09e5243e5dff46ceccef1a707e648ee9cb0c37c5
Reviewed-on: https://gerrit.libreoffice.org/24875
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'svx/source/dialog')
-rw-r--r-- | svx/source/dialog/fontwork.cxx | 4 | ||||
-rw-r--r-- | svx/source/dialog/imapdlg.cxx | 12 | ||||
-rw-r--r-- | svx/source/dialog/imapwnd.cxx | 4 | ||||
-rwxr-xr-x | svx/source/dialog/srchdlg.cxx | 6 | ||||
-rw-r--r-- | svx/source/dialog/svxruler.cxx | 6 |
5 files changed, 16 insertions, 16 deletions
diff --git a/svx/source/dialog/fontwork.cxx b/svx/source/dialog/fontwork.cxx index a7cc7e914962..77bf6dfd9913 100644 --- a/svx/source/dialog/fontwork.cxx +++ b/svx/source/dialog/fontwork.cxx @@ -279,8 +279,8 @@ SvxFontWorkDialog::~SvxFontWorkDialog() void SvxFontWorkDialog::dispose() { - for (sal_uInt16 i = 0; i < CONTROLLER_COUNT; i++) - pCtrlItems[i]->dispose(); + for (SvxFontWorkControllerItem* pCtrlItem : pCtrlItems) + pCtrlItem->dispose(); m_pTbxStyle.clear(); m_pTbxAdjust.clear(); m_pFbDistance.clear(); diff --git a/svx/source/dialog/imapdlg.cxx b/svx/source/dialog/imapdlg.cxx index 4cd862a3f138..983d90fffa84 100644 --- a/svx/source/dialog/imapdlg.cxx +++ b/svx/source/dialog/imapdlg.cxx @@ -155,8 +155,8 @@ SvxIMapDlg::SvxIMapDlg(SfxBindings *_pBindings, SfxChildWindow *pCW, vcl::Window //as entries are added later on TargetList aTmpList; SfxFrame::GetDefaultTargetList(aTmpList); - for (size_t i = 0, n = aTmpList.size(); i < n; ++i) - m_pCbbTarget->InsertEntry(aTmpList[i]); + for (const OUString & s : aTmpList) + m_pCbbTarget->InsertEntry(s); Size aPrefSize(m_pCbbTarget->get_preferred_size()); m_pCbbTarget->set_width_request(aPrefSize.Width()); m_pCbbTarget->Clear(); @@ -301,8 +301,8 @@ void SvxIMapDlg::SetTargetList( const TargetList& rTargetList ) m_pCbbTarget->Clear(); - for ( size_t i = 0, n = aNewList.size(); i < n; ++i ) - m_pCbbTarget->InsertEntry( aNewList[ i ] ); + for (const OUString & s : aNewList) + m_pCbbTarget->InsertEntry( s ); } void SvxIMapDlg::UpdateLink( const Graphic& rGraphic, const ImageMap* pImageMap, @@ -328,8 +328,8 @@ void SvxIMapDlg::UpdateLink( const Graphic& rGraphic, const ImageMap* pImageMap, { TargetList aTargetList( *pTargetList ); - for ( size_t i = 0, n = aTargetList.size(); i < n; ++i ) - pOwnData->aUpdateTargetList.push_back( aTargetList[ i ] ); + for (const OUString & s : aTargetList) + pOwnData->aUpdateTargetList.push_back( s ); } pOwnData->aIdle.Start(); diff --git a/svx/source/dialog/imapwnd.cxx b/svx/source/dialog/imapwnd.cxx index 59e25e6c1ade..3adfe2828d3c 100644 --- a/svx/source/dialog/imapwnd.cxx +++ b/svx/source/dialog/imapwnd.cxx @@ -175,8 +175,8 @@ void IMapWindow::SetTargetList( TargetList& rTargetList ) aTargetList.clear(); // Fill with the provided list - for( size_t i = 0, n = rTargetList.size(); i < n; ++i ) - aTargetList.push_back( rTargetList[ i ] ); + for(const OUString & s : rTargetList) + aTargetList.push_back( s ); pModel->SetChanged( false ); } diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx index 1c390e9dcd81..426d8e79e502 100755 --- a/svx/source/dialog/srchdlg.cxx +++ b/svx/source/dialog/srchdlg.cxx @@ -143,10 +143,10 @@ void ListToStrArr_Impl( sal_uInt16 nId, std::vector<OUString>& rStrLst, ComboBox { std::vector<OUString> aLst = pSrchItem->GetList(); - for ( size_t i = 0; i < aLst.size(); ++i ) + for (const OUString & s : aLst) { - rStrLst.push_back(aLst[i]); - rCBox.InsertEntry(aLst[i]); + rStrLst.push_back(s); + rCBox.InsertEntry(s); } } } diff --git a/svx/source/dialog/svxruler.cxx b/svx/source/dialog/svxruler.cxx index bdbfa8658f2d..38d59412bee6 100644 --- a/svx/source/dialog/svxruler.cxx +++ b/svx/source/dialog/svxruler.cxx @@ -290,10 +290,10 @@ SvxRuler::SvxRuler( mpIndents.resize(5 + INDENT_GAP); - for(size_t nIn = 0; nIn < mpIndents.size(); nIn++) + for(RulerIndent & rIndent : mpIndents) { - mpIndents[nIn].nPos = 0; - mpIndents[nIn].nStyle = RulerIndentStyle::Top; + rIndent.nPos = 0; + rIndent.nStyle = RulerIndentStyle::Top; } mpIndents[0].nStyle = RulerIndentStyle::Top; |