diff options
Diffstat (limited to 'configmgr/source/access.cxx')
-rw-r--r-- | configmgr/source/access.cxx | 60 |
1 files changed, 29 insertions, 31 deletions
diff --git a/configmgr/source/access.cxx b/configmgr/source/access.cxx index 3506beb7aeb4..8742dcfcb530 100644 --- a/configmgr/source/access.cxx +++ b/configmgr/source/access.cxx @@ -1689,18 +1689,16 @@ void Access::initBroadcasterAndChanges( assert(broadcaster != nullptr); std::vector< css::beans::PropertyChangeEvent > propChanges; bool collectPropChanges = !propertiesChangeListeners_.empty(); - for (Modifications::Node::Children::const_iterator i( - modifications.children.begin()); - i != modifications.children.end(); ++i) + for (const auto & i : modifications.children) { - rtl::Reference< ChildAccess > child(getChild(i->first)); + rtl::Reference< ChildAccess > child(getChild(i.first)); if (child.is()) { switch (child->getNode()->kind()) { case Node::KIND_LOCALIZED_PROPERTY: - if (!i->second.children.empty()) { + if (!i.second.children.empty()) { if (Components::allLocales(getRootAccess()->getLocale())) { child->initBroadcasterAndChanges( - i->second, broadcaster, allChanges); + i.second, broadcaster, allChanges); //TODO: if allChanges==0, recurse only into children // w/ listeners } else { @@ -1716,12 +1714,12 @@ void Access::initBroadcasterAndChanges( css::container::ContainerEvent( static_cast< cppu::OWeakObject * >( this), - css::uno::makeAny(i->first), + css::uno::makeAny(i.first), css::uno::Any(), css::uno::Any())); //TODO: non-void Element, ReplacedElement } PropertyChangeListeners::iterator j( - propertyChangeListeners_.find(i->first)); + propertyChangeListeners_.find(i.first)); if (j != propertyChangeListeners_.end()) { for (PropertyChangeListenersElement::iterator k( j->second.begin()); @@ -1732,7 +1730,7 @@ void Access::initBroadcasterAndChanges( css::beans::PropertyChangeEvent( static_cast< cppu::OWeakObject * >( this), - i->first, false, -1, css::uno::Any(), + i.first, false, -1, css::uno::Any(), css::uno::Any())); } } @@ -1747,7 +1745,7 @@ void Access::initBroadcasterAndChanges( css::beans::PropertyChangeEvent( static_cast< cppu::OWeakObject * >( this), - i->first, false, -1, css::uno::Any(), + i.first, false, -1, css::uno::Any(), css::uno::Any())); } } @@ -1763,7 +1761,7 @@ void Access::initBroadcasterAndChanges( propChanges.push_back( css::beans::PropertyChangeEvent( static_cast< cppu::OWeakObject * >(this), - i->first, false, -1, css::uno::Any(), + i.first, false, -1, css::uno::Any(), css::uno::Any())); } } @@ -1780,7 +1778,7 @@ void Access::initBroadcasterAndChanges( *j, css::container::ContainerEvent( static_cast< cppu::OWeakObject * >(this), - css::uno::makeAny(i->first), child->asValue(), + css::uno::makeAny(i.first), child->asValue(), css::uno::Any())); //TODO: distinguish add/modify; non-void ReplacedElement } @@ -1804,13 +1802,13 @@ void Access::initBroadcasterAndChanges( *j, css::container::ContainerEvent( static_cast< cppu::OWeakObject * >(this), - css::uno::makeAny(i->first), child->asValue(), + css::uno::makeAny(i.first), child->asValue(), css::uno::Any())); //TODO: distinguish add/remove/modify; non-void // ReplacedElement } PropertyChangeListeners::iterator j( - propertyChangeListeners_.find(i->first)); + propertyChangeListeners_.find(i.first)); if (j != propertyChangeListeners_.end()) { for (PropertyChangeListenersElement::iterator k( j->second.begin()); @@ -1820,7 +1818,7 @@ void Access::initBroadcasterAndChanges( *k, css::beans::PropertyChangeEvent( static_cast< cppu::OWeakObject * >(this), - i->first, false, -1, css::uno::Any(), + i.first, false, -1, css::uno::Any(), css::uno::Any())); } } @@ -1834,7 +1832,7 @@ void Access::initBroadcasterAndChanges( *k, css::beans::PropertyChangeEvent( static_cast< cppu::OWeakObject * >(this), - i->first, false, -1, css::uno::Any(), + i.first, false, -1, css::uno::Any(), css::uno::Any())); } } @@ -1850,14 +1848,14 @@ void Access::initBroadcasterAndChanges( propChanges.push_back( css::beans::PropertyChangeEvent( static_cast< cppu::OWeakObject * >(this), - i->first, false, -1, css::uno::Any(), + i.first, false, -1, css::uno::Any(), css::uno::Any())); } } break; case Node::KIND_GROUP: case Node::KIND_SET: - if (i->second.children.empty()) { + if (i.second.children.empty()) { if (!child->getNode()->getTemplateName().isEmpty()) { for (ContainerListeners::iterator j( containerListeners_.begin()); @@ -1869,7 +1867,7 @@ void Access::initBroadcasterAndChanges( css::container::ContainerEvent( static_cast< cppu::OWeakObject * >( this), - css::uno::makeAny(i->first), + css::uno::makeAny(i.first), child->asValue(), css::uno::Any())); } if (allChanges != nullptr) { @@ -1885,7 +1883,7 @@ void Access::initBroadcasterAndChanges( // change } else { child->initBroadcasterAndChanges( - i->second, broadcaster, allChanges); + i.second, broadcaster, allChanges); //TODO: if allChanges==0, recurse only into children w/ // listeners } @@ -1907,7 +1905,7 @@ void Access::initBroadcasterAndChanges( *j, css::container::ContainerEvent( static_cast< cppu::OWeakObject * >(this), - css::uno::makeAny(i->first), css::uno::Any(), + css::uno::makeAny(i.first), css::uno::Any(), css::uno::Any())); //TODO: non-void ReplacedElement } @@ -1916,7 +1914,7 @@ void Access::initBroadcasterAndChanges( if (!path.isEmpty()) { path.append('/'); } - path.append(Data::createSegment("*", i->first)); + path.append(Data::createSegment("*", i.first)); allChanges->push_back( css::util::ElementChange( css::uno::makeAny(path.makeStringAndClear()), @@ -1936,12 +1934,12 @@ void Access::initBroadcasterAndChanges( *j, css::container::ContainerEvent( static_cast< cppu::OWeakObject * >(this), - css::uno::makeAny(i->first), css::uno::Any(), + css::uno::makeAny(i.first), css::uno::Any(), css::uno::Any())); //TODO: non-void ReplacedElement } PropertyChangeListeners::iterator j( - propertyChangeListeners_.find(i->first)); + propertyChangeListeners_.find(i.first)); if (j != propertyChangeListeners_.end()) { for (PropertyChangeListenersElement::iterator k( j->second.begin()); @@ -1951,7 +1949,7 @@ void Access::initBroadcasterAndChanges( *k, css::beans::PropertyChangeEvent( static_cast< cppu::OWeakObject * >(this), - i->first, false, -1, css::uno::Any(), + i.first, false, -1, css::uno::Any(), css::uno::Any())); } } @@ -1965,7 +1963,7 @@ void Access::initBroadcasterAndChanges( *k, css::beans::PropertyChangeEvent( static_cast< cppu::OWeakObject * >(this), - i->first, false, -1, css::uno::Any(), + i.first, false, -1, css::uno::Any(), css::uno::Any())); } } @@ -1975,7 +1973,7 @@ void Access::initBroadcasterAndChanges( if (!path.isEmpty()) { path.append('/'); } - path.append(i->first); + path.append(i.first); allChanges->push_back( css::util::ElementChange( css::uno::makeAny(path.makeStringAndClear()), @@ -1986,14 +1984,14 @@ void Access::initBroadcasterAndChanges( propChanges.push_back( css::beans::PropertyChangeEvent( static_cast< cppu::OWeakObject * >(this), - i->first, false, -1, css::uno::Any(), + i.first, false, -1, css::uno::Any(), css::uno::Any())); } } break; case Node::KIND_SET: // Removed set member: - if (i->second.children.empty()) { + if (i.second.children.empty()) { for (ContainerListeners::iterator j( containerListeners_.begin()); j != containerListeners_.end(); ++j) @@ -2002,7 +2000,7 @@ void Access::initBroadcasterAndChanges( *j, css::container::ContainerEvent( static_cast< cppu::OWeakObject * >(this), - css::uno::makeAny(i->first), + css::uno::makeAny(i.first), css::uno::Any(), css::uno::Any())); //TODO: non-void ReplacedElement } @@ -2012,7 +2010,7 @@ void Access::initBroadcasterAndChanges( if (!path.isEmpty()) { path.append('/'); } - path.append(Data::createSegment("*", i->first)); + path.append(Data::createSegment("*", i.first)); allChanges->push_back( css::util::ElementChange( css::uno::makeAny(path.makeStringAndClear()), |