[PATCH] convert tools/table.hxx to std::map in ScEEParser class in SC module
Noel Grandin
noel at peralex.com
Wed Mar 14 05:02:23 PDT 2012
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. Maybe
>
> iterator 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Convert-tools-table.hxx-to-std-map-in-ScEEParser-cla.patch
Type: application/mbox
Size: 5801 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20120314/ef992fe2/attachment.bin>
More information about the LibreOffice
mailing list