diff --git a/ucb/source/core/ucb.cxx b/ucb/source/core/ucb.cxx index fec9972a2e2d..64a412b778b7 100644 --- a/ucb/source/core/ucb.cxx +++ b/ucb/source/core/ucb.cxx @@ -399,7 +399,7 @@ UniversalContentBroker::registerContentProvider( { osl::MutexGuard aGuard(m_aMutex); - ProviderMap_Impl::iterator aIt(m_aProviders.end()); + ProviderMap_Impl::iterator aIt; try { aIt = m_aProviders.find(Scheme); @@ -445,7 +445,7 @@ void SAL_CALL UniversalContentBroker::deregisterContentProvider( { osl::MutexGuard aGuard(m_aMutex); - ProviderMap_Impl::iterator aMapIt(m_aProviders.end()); + ProviderMap_Impl::iterator aMapIt; try { aMapIt = m_aProviders.find(Scheme); diff --git a/ucb/source/inc/regexpmap.hxx b/ucb/source/inc/regexpmap.hxx index e02363362a60..717a077a9e0f 100644 --- a/ucb/source/inc/regexpmap.hxx +++ b/ucb/source/inc/regexpmap.hxx @@ -101,6 +101,8 @@ class RegexpMapIter: public RegexpMapConstIter< Val > friend class RegexpMap< Val >; // to access ctor public: + RegexpMapIter() {} + RegexpMapIter & operator ++(); RegexpMapIter operator ++(int); diff --git a/ucb/source/inc/regexpmap.tpt b/ucb/source/inc/regexpmap.tpt index 64abc37bf8fd..b4e274ae94ed 100644 --- a/ucb/source/inc/regexpmap.tpt +++ b/ucb/source/inc/regexpmap.tpt @@ -74,11 +74,19 @@ public: typedef RegexpMapImpl< Val > MapImpl; typedef typename List< Val >::iterator ListIterator; + // Solaris needs these for the ctor... + + inline RegexpMapIterImpl(); + inline RegexpMapIterImpl(MapImpl * pTheMap, int nTheList, ListIterator aTheIndex); RegexpMapIterImpl(RegexpMapImpl< Val > * pTheMap, bool bBegin); + RegexpMapIterImpl(RegexpMapIterImpl const & rOther); + + RegexpMapIterImpl & operator =(RegexpMapIterImpl const & rOther); + bool operator ==(RegexpMapIterImpl const & rOther) const; RegexpMapImpl< Val > const * getMap() const { return m_pMap; } @@ -92,8 +100,6 @@ public: RegexpMapEntry< Val > & get(); private: - RegexpMapIterImpl(); // not implemented - mutable RegexpMapEntry< Val > m_aEntry; typename List< Val >::iterator m_aIndex; RegexpMapImpl< Val > * m_pMap; @@ -105,6 +111,14 @@ private: } +template< typename Val > +inline RegexpMapIterImpl< Val >::RegexpMapIterImpl(): + m_aEntry(rtl::OUString(), 0), + m_pMap(0), + m_nList(-1), + m_bEntrySet(false) +{} + template< typename Val > inline RegexpMapIterImpl< Val >::RegexpMapIterImpl(MapImpl * pTheMap, int nTheList, @@ -134,11 +148,10 @@ void RegexpMapIterImpl< Val >::setEntry() const //============================================================================ template< typename Val > RegexpMapIterImpl< Val >::RegexpMapIterImpl(RegexpMapImpl< Val > * pTheMap, - bool bBegin) - : m_aEntry(rtl::OUString(), 0) - , m_aIndex(pTheMap->m_aList[Regexp::KIND_DOMAIN].end()) - , m_pMap(pTheMap) - , m_bEntrySet(false) + bool bBegin): + m_aEntry(rtl::OUString(), 0), + m_pMap(pTheMap), + m_bEntrySet(false) { if (bBegin) { @@ -149,9 +162,39 @@ RegexpMapIterImpl< Val >::RegexpMapIterImpl(RegexpMapImpl< Val > * pTheMap, else { m_nList = Regexp::KIND_DOMAIN; + m_aIndex = m_pMap->m_aList[Regexp::KIND_DOMAIN].end(); } } +//============================================================================ +template< typename Val > +RegexpMapIterImpl< Val >::RegexpMapIterImpl(RegexpMapIterImpl const & rOther): + m_aEntry(rOther.m_aEntry), m_pMap(rOther.m_pMap), m_nList(rOther.m_nList), + m_bEntrySet(rOther.m_bEntrySet) +{ + if (m_nList != -1) + m_aIndex = rOther.m_aIndex; +} + +//============================================================================ +template< typename Val > +RegexpMapIterImpl< Val > & RegexpMapIterImpl< Val >::operator =( + RegexpMapIterImpl const & rOther) +{ + if (this != &rOther) + { + m_aEntry = rOther.m_aEntry; + m_pMap = rOther.m_pMap; + m_nList = rOther.m_nList; + m_bEntrySet = rOther.m_bEntrySet; + if (m_nList == -1) + m_aIndex = typename List< Val >::iterator(); + else + m_aIndex = rOther.m_aIndex; + } + return *this; +} + //============================================================================ template< typename Val > bool RegexpMapIterImpl< Val >::operator ==(RegexpMapIterImpl const & rOther) @@ -159,7 +202,7 @@ bool RegexpMapIterImpl< Val >::operator ==(RegexpMapIterImpl const & rOther) { return m_pMap == rOther.m_pMap && m_nList == rOther.m_nList - && m_aIndex == rOther.m_aIndex; + && (m_nList == -1 || m_aIndex == rOther.m_aIndex); } //============================================================================