Kaydet (Commit) c191f2cb authored tarafından Herbert Dürr's avatar Herbert Dürr

fix type-problem of pair (needed when move semantics are involved) and add a…

fix type-problem of pair (needed when move semantics are involved) and add a NotificationList type to simplify things
üst 931f9852
...@@ -207,13 +207,10 @@ void ...@@ -207,13 +207,10 @@ void
SvtInetOptions::Impl::notifyListeners( SvtInetOptions::Impl::notifyListeners(
star::uno::Sequence< rtl::OUString > const & rKeys) star::uno::Sequence< rtl::OUString > const & rKeys)
{ {
typedef typedef std::pair< star::uno::Reference< star::beans::XPropertiesChangeListener >,
std::vector< std::pair< star::uno::Reference< star::uno::Sequence< star::beans::PropertyChangeEvent > > Listen2EventPair;
star::beans::XPropertiesChangeListener >, typedef std::vector< Listen2EventPair > NotificationList;
star::uno::Sequence< NotificationList aNotifications;
star::beans::PropertyChangeEvent > > >
List;
List aNotifications;
{ {
osl::MutexGuard aGuard(m_aMutex); osl::MutexGuard aGuard(m_aMutex);
aNotifications.reserve(m_aListeners.size()); aNotifications.reserve(m_aListeners.size());
...@@ -240,16 +237,10 @@ SvtInetOptions::Impl::notifyListeners( ...@@ -240,16 +237,10 @@ SvtInetOptions::Impl::notifyListeners(
} }
} }
if (nCount > 0) if (nCount > 0)
{ aNotifications.push_back( Listen2EventPair( aIt->first, aEvents));
aEvents.realloc(nCount);
aNotifications.
push_back(std::make_pair< List::value_type::first_type,
List::value_type::second_type >(
aIt->first, aEvents));
}
} }
} }
for (List::size_type i = 0; i < aNotifications.size(); ++i) for (NotificationList::size_type i = 0; i < aNotifications.size(); ++i)
if (aNotifications[i].first.is()) if (aNotifications[i].first.is())
aNotifications[i].first-> aNotifications[i].first->
propertiesChange(aNotifications[i].second); propertiesChange(aNotifications[i].second);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment