summaryrefslogtreecommitdiff
path: root/accessibility
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2018-02-24 10:45:45 +0100
committerJulien Nabet <serval2412@yahoo.fr>2018-02-24 11:46:24 +0100
commit8f2d6e80608b7f8cc931e6d7e7280c043fc92ae8 (patch)
treec971155c14f681821432be2ca727920dc5ef1b1c /accessibility
parent556c2eaffcdb541317ed148d58c6c973fa6fd0e6 (diff)
Modernize a bit accessibility and basctl
by using for range loops + compare end iterator with "!=" instead of "<" Change-Id: I615a8ca417a58fde4976bb6d8d9112dc5d993a88 Reviewed-on: https://gerrit.libreoffice.org/50277 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'accessibility')
-rw-r--r--accessibility/source/extended/accessiblelistbox.cxx5
-rw-r--r--accessibility/source/extended/textwindowaccessibility.cxx5
2 files changed, 4 insertions, 6 deletions
diff --git a/accessibility/source/extended/accessiblelistbox.cxx b/accessibility/source/extended/accessiblelistbox.cxx
index 47c8f9ecd3a5..bd5c81129a1c 100644
--- a/accessibility/source/extended/accessiblelistbox.cxx
+++ b/accessibility/source/extended/accessiblelistbox.cxx
@@ -171,12 +171,11 @@ namespace accessibility
else
{
// NULL means Clear()
- MAP_ENTRY::iterator mi = m_mapEntry.begin();
- for ( ; mi != m_mapEntry.end() ; ++mi)
+ for (auto const& entry : m_mapEntry)
{
uno::Any aNewValue;
uno::Any aOldValue;
- aOldValue <<= mi->second;
+ aOldValue <<= entry.second;
NotifyAccessibleEvent( AccessibleEventId::CHILD, aOldValue, aNewValue );
}
m_mapEntry.clear();
diff --git a/accessibility/source/extended/textwindowaccessibility.cxx b/accessibility/source/extended/textwindowaccessibility.cxx
index 50b472d66371..5183af524492 100644
--- a/accessibility/source/extended/textwindowaccessibility.cxx
+++ b/accessibility/source/extended/textwindowaccessibility.cxx
@@ -2340,11 +2340,10 @@ void Document::handleSelectionChangeNotification()
void Document::disposeParagraphs()
{
- for (Paragraphs::iterator aIt(m_xParagraphs->begin());
- aIt != m_xParagraphs->end(); ++aIt)
+ for (auto const& paragraph : *m_xParagraphs)
{
css::uno::Reference< css::lang::XComponent > xComponent(
- aIt->getParagraph().get(), css::uno::UNO_QUERY);
+ paragraph.getParagraph().get(), css::uno::UNO_QUERY);
if (xComponent.is())
xComponent->dispose();
}