[PATCH] convert tools/table.hxx usage in to std::map in ScChartPosition class in SC module

Ivan Timofeev timofeev.i.s at gmail.com
Mon Mar 26 23:31:51 PDT 2012


Hi Noel,

On 14.03.2012 17:02, Noel Grandin wrote:
> Note that this is not the nicest patch to review because I'm converting
> complicated nested loops.

Heh - right, *two weeks* have passed. :(

I have reviewed it - some not-equal-to-null conditions got lost 
(ScAddress may be NULL) and

> -                sal_uLong nKey = pFirstCol->GetCurKey();
> -                pCols->First();
> -                while ( (pCol = (Table*) pCols->Next())!=NULL )
> -                    pCol->Insert( nKey, (void*)0 );     // keine Daten
> +                sal_uLong nKey = it1->first;
> +                for (ColumnMap::const_iterator it2 = pCols->begin(); it2 != pCols->end(); ++it2 )
> +                    (*it2->second)[ nKey ] =  NULL;     // keine Daten

this loop should start from begin() + 1 AFAICS and use insert instead of 
operator[], but I am not sure though. Some bits are still unclear to me.

So - I must go off now, but I will push this patch with some corrections 
towards evening, if nobody else will do it.

Thanks for your patches. ;)

Regards,
Ivan


More information about the LibreOffice mailing list