[PUSHED] Re: [PATCH] converts SV_DECL_PTRARR in SVX module

Michael Stahl mstahl at redhat.com
Thu Apr 19 04:32:15 PDT 2012

On 18/04/12 17:27, Noel Grandin wrote:
> These patches convert the usage of  SV_DECL_PTRARR in SVX module to 
> std::set, std::vector and boost::ptr_vector variously.
> Survived a "make svx.check" and a "make subsequentcheck" (at least up 
> until the point at which my Ubuntu box has a problem with one of the 
> smoketest checks).

great, i've pushed them now, with a minor tweak to fix some signed vs.
unsigned comparison warnings in debug assertions.

the one change that had me concerned for a while is this:

> -                    m_arrCurrentSelection.Remove( i - 1, 1 );
> +                    m_arrCurrentSelection.erase( --(it.base()) );

where it is a std::set::reverse_iterator; but it seems like this is
actually correct because the reverse_iterator is a wrapper for an
iterator that points 1 element ahead, such that the --(it.base())
expression will return an iterator that points to the same element as
the reverse_iterator, and furthermore the reverse_iterator is not
actually invalidated by the erase because internally it points one
element ahead.

googling found me this relevant mail:


> License is on file.

we know you by now, no need to write that in every mail :)

More information about the LibreOffice mailing list