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/smarttags | |
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/smarttags')
-rw-r--r-- | svx/source/smarttags/SmartTagMgr.cxx | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/svx/source/smarttags/SmartTagMgr.cxx b/svx/source/smarttags/SmartTagMgr.cxx index ee99934ecdc1..81f22238c536 100644 --- a/svx/source/smarttags/SmartTagMgr.cxx +++ b/svx/source/smarttags/SmartTagMgr.cxx @@ -91,9 +91,9 @@ void SmartTagMgr::RecognizeString( const OUString& rText, const lang::Locale& rLocale, sal_uInt32 nStart, sal_uInt32 nLen ) const { - for ( size_t i = 0; i < maRecognizerList.size(); i++ ) + for (const auto & i : maRecognizerList) { - Reference < smarttags::XSmartTagRecognizer > xRecognizer = maRecognizerList[i]; + Reference < smarttags::XSmartTagRecognizer > xRecognizer = i; // if all smart tag types supported by this recognizer have been // disabled, we do not have to call the recognizer: @@ -109,7 +109,7 @@ void SmartTagMgr::RecognizeString( const OUString& rText, if ( bCallRecognizer ) { CreateBreakIterator(); - maRecognizerList[i]->recognize( rText, nStart, nLen, + i->recognize( rText, nStart, nLen, smarttags::SmartTagRecognizerMode_PARAGRAPH, rLocale, xMarkup, maApplicationName, xController, mxBreakIter ); @@ -121,10 +121,8 @@ void SmartTagMgr::RecognizeTextRange(const Reference< text::XTextRange>& xRange, const Reference< text::XTextMarkup >& xMarkup, const Reference< frame::XController >& xController) const { - for ( size_t i = 0; i < maRecognizerList.size(); i++ ) + for (const Reference<smarttags::XSmartTagRecognizer>& xRecognizer : maRecognizerList) { - Reference < smarttags::XSmartTagRecognizer > xRecognizer = maRecognizerList[i]; - Reference< smarttags::XRangeBasedSmartTagRecognizer > xRangeBasedRecognizer( xRecognizer, UNO_QUERY); if (!xRangeBasedRecognizer.is()) continue; |