Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


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

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.