[PATCH] Convert SvPtrarr and tools/table.hxx usage in sw module.

Noel Grandin noel at peralex.com
Fri Mar 2 07:47:05 PST 2012


you are correct, I will spin a new patch.

On 2012-03-02 17:42, Ivan Timofeev wrote:
> Hi,
>
> > -DECLARE_TABLE( SwBookmarkNodeTable, SvPtrarr* )
> > +typedef std::multimap<sal_uLong, const ::sw::mark::IMark*> 
> SwBookmarkNodeTable;
> ...
>
> > +    SwBookmarkNodeTable aBkmkNodePos;
> ...
>
> > -    SvPtrarr* pArr = (m_pImpl->pBkmkNodePos) ?
> > -        m_pImpl->pBkmkNodePos->Get( nNd ) : 0;
> > -    if( pArr )
> > +    SwBookmarkNodeTable::const_iterator it = 
> m_pImpl->aBkmkNodePos.find( nNd );
> > +    if( it != m_pImpl->aBkmkNodePos.end() )
> >      {
> >          // there exist some bookmarks, search now all which is in 
> the range
> >          if( !nStt && nEnd == rNd.Len() )
> >              // all
> > -            rArr.Insert( pArr, 0 );
> > +            for( ; it != m_pImpl->aBkmkNodePos.end(); ++it )
> > +                rArr.push_back( it->second );
>
> If SwBookmarkNodeTable is a multimap, then to get all values with the 
> same key you have to use multimap::equal_range, not multimap::find, 
> right?
>
> Sorry, I am completely tired now and can easily produce false 
> conclusions. %-)
>
> Regards,
> Ivan
>

Disclaimer: http://www.peralex.com/disclaimer.html




More information about the LibreOffice mailing list