[PATCH] Convert SvPtrarr and tools/table.hxx usage in sw module.
Ivan Timofeev
timofeev.i.s at gmail.com
Fri Mar 2 07:42:35 PST 2012
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
More information about the LibreOffice
mailing list