inetoptions.cxx (162940de) | inetoptions.cxx (9746bf35) |
---|---|
1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 193 unchanged lines hidden (view full) --- 202 } 203} 204 205//============================================================================ 206void 207SvtInetOptions::Impl::notifyListeners( 208 star::uno::Sequence< rtl::OUString > const & rKeys) 209{ | 1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 193 unchanged lines hidden (view full) --- 202 } 203} 204 205//============================================================================ 206void 207SvtInetOptions::Impl::notifyListeners( 208 star::uno::Sequence< rtl::OUString > const & rKeys) 209{ |
210 typedef 211 std::vector< std::pair< star::uno::Reference< 212 star::beans::XPropertiesChangeListener >, 213 star::uno::Sequence< 214 star::beans::PropertyChangeEvent > > > 215 List; 216 List aNotifications; | 210 typedef std::pair< star::uno::Reference< star::beans::XPropertiesChangeListener >, 211 star::uno::Sequence< star::beans::PropertyChangeEvent > > Listen2EventPair; 212 typedef std::vector< Listen2EventPair > NotificationList; 213 NotificationList aNotifications; |
217 { 218 osl::MutexGuard aGuard(m_aMutex); 219 aNotifications.reserve(m_aListeners.size()); 220 Map::const_iterator aMapEnd(m_aListeners.end()); 221 for (Map::const_iterator aIt(m_aListeners.begin()); aIt != aMapEnd; 222 ++aIt) 223 { 224 const Map::mapped_type &rSet = aIt->second; --- 10 unchanged lines hidden (view full) --- 235 if (rSet.find(aTheKey) != aSetEnd) 236 { 237 aEvents[nCount].PropertyName = aTheKey; 238 aEvents[nCount].PropertyHandle = -1; 239 ++nCount; 240 } 241 } 242 if (nCount > 0) | 214 { 215 osl::MutexGuard aGuard(m_aMutex); 216 aNotifications.reserve(m_aListeners.size()); 217 Map::const_iterator aMapEnd(m_aListeners.end()); 218 for (Map::const_iterator aIt(m_aListeners.begin()); aIt != aMapEnd; 219 ++aIt) 220 { 221 const Map::mapped_type &rSet = aIt->second; --- 10 unchanged lines hidden (view full) --- 232 if (rSet.find(aTheKey) != aSetEnd) 233 { 234 aEvents[nCount].PropertyName = aTheKey; 235 aEvents[nCount].PropertyHandle = -1; 236 ++nCount; 237 } 238 } 239 if (nCount > 0) |
243 { 244 aEvents.realloc(nCount); 245 aNotifications. 246 push_back(std::make_pair< List::value_type::first_type, 247 List::value_type::second_type >( 248 aIt->first, aEvents)); 249 } | 240 aNotifications.push_back( Listen2EventPair( aIt->first, aEvents)); |
250 } 251 } | 241 } 242 } |
252 for (List::size_type i = 0; i < aNotifications.size(); ++i) | 243 for (NotificationList::size_type i = 0; i < aNotifications.size(); ++i) |
253 if (aNotifications[i].first.is()) 254 aNotifications[i].first-> 255 propertiesChange(aNotifications[i].second); 256} 257 258//============================================================================ 259SvtInetOptions::Impl::Impl(): 260 ConfigItem(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Inet/Settings"))) --- 289 unchanged lines hidden --- | 244 if (aNotifications[i].first.is()) 245 aNotifications[i].first-> 246 propertiesChange(aNotifications[i].second); 247} 248 249//============================================================================ 250SvtInetOptions::Impl::Impl(): 251 ConfigItem(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Inet/Settings"))) --- 289 unchanged lines hidden --- |