Hi Updated patch attached. Thanks, Noel Grandin On 2012-03-12 14:33, Ivan Timofeev wrote:
Hi Noel,for ( SCCOL nCol = nStartCol; nCol <= nEndCol; nCol++ ) { - sal_uInt16 nWidth = (sal_uInt16)(sal_uLong) pColWidths->Get( nCol ); + sal_uInt16 nWidth = 0; + if ( rColWidths.find( nCol ) != rColWidths.end() ) + nWidth = rColWidths[ nCol ];so this code performs a search twice - firstly 'find', then 'operator[]'. And it is in the loop. And it is an import filter. Maybeiterator it = rColWidths.find( nCol ); if ( it != rColWidths.end() ) nWidth = it->second; is better? Or I am missing smth.? Regards, Ivan
Disclaimer: http://www.peralex.com/disclaimer.html
Attachment:
0001-Convert-tools-table.hxx-to-std-map-in-ScEEParser-cla.patch
Description: application/mbox