[Libreoffice] [PATCH] fdo#38832 Replace ScChangeActionTable with std::map.

Eike Rathke erack at redhat.com
Wed Dec 21 12:00:56 PST 2011

Hi Marcel,

On Wednesday, 2011-12-21 16:18:46 +0100, Marcel Metz wrote:

> I've tested the patch with 'make check', but would like to point out
> that the reviewer should take special care of the change in
> 'sc/source/core/tool/chgtrack.cxx:3140-3160'. From my understanding
> of the code the tools Table does not allow multiple entires with the
> same key so that this assertion for double keys is not required but
> maybe I'm missing something.

The assertion tells if there was a dup, in that case something was going
wrong and memory leaks.

Anyway, aparently you were confused by the two different tables/maps and
mixing iterator from different map, see

Note that instead of map.erase(key) you can use map.erase(iterator) if
you already obtained one and don't access it afterwards, that saves an
internal map.find(key)

Other than that and the correction by Michael Stahl (kudos), good patch!

Btw, did you check if Calc changetracking and accepting/rejecting
actions still works?


LibreOffice Calc developer. Number formatter stricken i18n transpositionizer.
GnuPG key 0x293C05FD : 997A 4C60 CE41 0149 0DB3  9E96 2F1A D073 293C 05FD
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20111221/13edcc0a/attachment.pgp>

More information about the LibreOffice mailing list