Kaydet (Commit) 55982a9b authored tarafından Rüdiger Timm's avatar Rüdiger Timm

INTEGRATION: CWS oj30 (1.27.90); FILE MERGED

2008/01/10 14:27:04 oj 1.27.90.1: #i85085# add std
üst be6f7274
...@@ -4,9 +4,9 @@ ...@@ -4,9 +4,9 @@
* *
* $RCSfile: InterfaceContainer.cxx,v $ * $RCSfile: InterfaceContainer.cxx,v $
* *
* $Revision: 1.27 $ * $Revision: 1.28 $
* *
* last change: $Author: rt $ $Date: 2006-12-01 16:55:25 $ * last change: $Author: rt $ $Date: 2008-01-29 17:06:59 $
* *
* The Contents of this file are made available subject to * The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1. * the terms of GNU Lesser General Public License Version 2.1.
...@@ -594,13 +594,13 @@ throw (::com::sun::star::uno::RuntimeException) { ...@@ -594,13 +594,13 @@ throw (::com::sun::star::uno::RuntimeException) {
if (evt.PropertyName == PROPERTY_NAME) if (evt.PropertyName == PROPERTY_NAME)
{ {
::osl::MutexGuard aGuard( m_rMutex ); ::osl::MutexGuard aGuard( m_rMutex );
OInterfaceMap::iterator i = find(m_aMap.begin(), m_aMap.end(), OInterfaceMap::iterator i = ::std::find(m_aMap.begin(), m_aMap.end(),
pair<const ::rtl::OUString, InterfaceRef >(::comphelper::getString(evt.OldValue),evt.Source)); ::std::pair<const ::rtl::OUString, InterfaceRef >(::comphelper::getString(evt.OldValue),evt.Source));
if (i != m_aMap.end()) if (i != m_aMap.end())
{ {
InterfaceRef xCorrectType((*i).second); InterfaceRef xCorrectType((*i).second);
m_aMap.erase(i); m_aMap.erase(i);
m_aMap.insert(pair<const ::rtl::OUString, InterfaceRef >(::comphelper::getString(evt.NewValue),xCorrectType)); m_aMap.insert(::std::pair<const ::rtl::OUString, InterfaceRef >(::comphelper::getString(evt.NewValue),xCorrectType));
} }
} }
} }
...@@ -630,7 +630,7 @@ Reference<XEnumeration> SAL_CALL OInterfaceContainer::createEnumeration() throw( ...@@ -630,7 +630,7 @@ Reference<XEnumeration> SAL_CALL OInterfaceContainer::createEnumeration() throw(
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
Any SAL_CALL OInterfaceContainer::getByName( const ::rtl::OUString& _rName ) throw(NoSuchElementException, WrappedTargetException, RuntimeException) Any SAL_CALL OInterfaceContainer::getByName( const ::rtl::OUString& _rName ) throw(NoSuchElementException, WrappedTargetException, RuntimeException)
{ {
pair <OInterfaceMap::iterator, ::std::pair <OInterfaceMap::iterator,
OInterfaceMap::iterator> aPair = m_aMap.equal_range(_rName); OInterfaceMap::iterator> aPair = m_aMap.equal_range(_rName);
if (aPair.first == aPair.second) if (aPair.first == aPair.second)
...@@ -655,7 +655,7 @@ StringSequence SAL_CALL OInterfaceContainer::getElementNames() throw(RuntimeExce ...@@ -655,7 +655,7 @@ StringSequence SAL_CALL OInterfaceContainer::getElementNames() throw(RuntimeExce
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
sal_Bool SAL_CALL OInterfaceContainer::hasByName( const ::rtl::OUString& _rName ) throw(RuntimeException) sal_Bool SAL_CALL OInterfaceContainer::hasByName( const ::rtl::OUString& _rName ) throw(RuntimeException)
{ {
pair <OInterfaceMap::iterator, ::std::pair <OInterfaceMap::iterator,
OInterfaceMap::iterator> aPair = m_aMap.equal_range(_rName); OInterfaceMap::iterator> aPair = m_aMap.equal_range(_rName);
return aPair.first != aPair.second; return aPair.first != aPair.second;
} }
...@@ -762,7 +762,7 @@ void OInterfaceContainer::implInsert(sal_Int32 _nIndex, const Reference< XProper ...@@ -762,7 +762,7 @@ void OInterfaceContainer::implInsert(sal_Int32 _nIndex, const Reference< XProper
else else
m_aItems.insert( m_aItems.begin() + _nIndex, pElementMetaData->xInterface ); m_aItems.insert( m_aItems.begin() + _nIndex, pElementMetaData->xInterface );
m_aMap.insert( pair< const ::rtl::OUString, InterfaceRef >( sName, pElementMetaData->xInterface ) ); m_aMap.insert( ::std::pair< const ::rtl::OUString, InterfaceRef >( sName, pElementMetaData->xInterface ) );
// announce ourself as parent to the new element // announce ourself as parent to the new element
{ {
...@@ -877,7 +877,7 @@ void OInterfaceContainer::implReplaceByIndex( const sal_Int32 _nIndex, const Any ...@@ -877,7 +877,7 @@ void OInterfaceContainer::implReplaceByIndex( const sal_Int32 _nIndex, const Any
aElementMetaData.get()->xPropertySet->addPropertyChangeListener(PROPERTY_NAME, this); aElementMetaData.get()->xPropertySet->addPropertyChangeListener(PROPERTY_NAME, this);
// insert the new one // insert the new one
m_aMap.insert( pair<const ::rtl::OUString, InterfaceRef >( sName, aElementMetaData.get()->xInterface ) ); m_aMap.insert( ::std::pair<const ::rtl::OUString, InterfaceRef >( sName, aElementMetaData.get()->xInterface ) );
m_aItems[ _nIndex ] = aElementMetaData.get()->xInterface; m_aItems[ _nIndex ] = aElementMetaData.get()->xInterface;
aElementMetaData.get()->xChild->setParent(static_cast<XContainer*>(this)); aElementMetaData.get()->xChild->setParent(static_cast<XContainer*>(this));
...@@ -1012,7 +1012,7 @@ void SAL_CALL OInterfaceContainer::insertByName(const ::rtl::OUString& _rName, c ...@@ -1012,7 +1012,7 @@ void SAL_CALL OInterfaceContainer::insertByName(const ::rtl::OUString& _rName, c
void SAL_CALL OInterfaceContainer::replaceByName(const ::rtl::OUString& Name, const Any& Element) throw( IllegalArgumentException, NoSuchElementException, WrappedTargetException, RuntimeException ) void SAL_CALL OInterfaceContainer::replaceByName(const ::rtl::OUString& Name, const Any& Element) throw( IllegalArgumentException, NoSuchElementException, WrappedTargetException, RuntimeException )
{ {
::osl::ClearableMutexGuard aGuard( m_rMutex ); ::osl::ClearableMutexGuard aGuard( m_rMutex );
pair <OInterfaceMap::iterator, ::std::pair <OInterfaceMap::iterator,
OInterfaceMap::iterator> aPair = m_aMap.equal_range(Name); OInterfaceMap::iterator> aPair = m_aMap.equal_range(Name);
if (aPair.first == aPair.second) if (aPair.first == aPair.second)
throw NoSuchElementException(); throw NoSuchElementException();
...@@ -1031,7 +1031,7 @@ void SAL_CALL OInterfaceContainer::replaceByName(const ::rtl::OUString& Name, co ...@@ -1031,7 +1031,7 @@ void SAL_CALL OInterfaceContainer::replaceByName(const ::rtl::OUString& Name, co
} }
// determine the element pos // determine the element pos
sal_Int32 nPos = find(m_aItems.begin(), m_aItems.end(), (*aPair.first).second) - m_aItems.begin(); sal_Int32 nPos = ::std::find(m_aItems.begin(), m_aItems.end(), (*aPair.first).second) - m_aItems.begin();
implReplaceByIndex( nPos, Element, aGuard ); implReplaceByIndex( nPos, Element, aGuard );
} }
...@@ -1040,12 +1040,12 @@ void SAL_CALL OInterfaceContainer::replaceByName(const ::rtl::OUString& Name, co ...@@ -1040,12 +1040,12 @@ void SAL_CALL OInterfaceContainer::replaceByName(const ::rtl::OUString& Name, co
void SAL_CALL OInterfaceContainer::removeByName(const ::rtl::OUString& Name) throw( NoSuchElementException, WrappedTargetException, RuntimeException ) void SAL_CALL OInterfaceContainer::removeByName(const ::rtl::OUString& Name) throw( NoSuchElementException, WrappedTargetException, RuntimeException )
{ {
::osl::MutexGuard aGuard( m_rMutex ); ::osl::MutexGuard aGuard( m_rMutex );
pair <OInterfaceMap::iterator, ::std::pair <OInterfaceMap::iterator,
OInterfaceMap::iterator> aPair = m_aMap.equal_range(Name); OInterfaceMap::iterator> aPair = m_aMap.equal_range(Name);
if (aPair.first == aPair.second) if (aPair.first == aPair.second)
throw NoSuchElementException(); throw NoSuchElementException();
sal_Int32 nPos = find(m_aItems.begin(), m_aItems.end(), (*aPair.first).second) - m_aItems.begin(); sal_Int32 nPos = ::std::find(m_aItems.begin(), m_aItems.end(), (*aPair.first).second) - m_aItems.begin();
removeByIndex(nPos); removeByIndex(nPos);
} }
......
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