[Libreoffice] [PATCH] Easyhack fdo#38831 - Convert some SvStrings to std::vector

Jan Holesovsky kendy at suse.cz
Fri Dec 30 07:53:53 PST 2011

Hi Brad,

On 2011-12-28 at 16:47 +1300, Brad Sowden wrote:

> > Attached are 2 patches to covert come SvStrings to std::vector.
> I realised I missed some size_t conversions and attached is an updated
> version of the second patch (the first patch is fine).

Great stuff, pushed both, thank you! :-)


I've only read the code, because I was unable to locate the affected
functionality - can you please point me to where exactly should I click
to execute this functionality? ;-)

I did a small modification in the 2nd patch, changed m_vPathArr to
m_aPathArr; we are not _that_ much into the hungarian notation, and the
general 'a' for 'something more complex' is perfectly fine there.

Other than that, aren't we leaking strings in pInsertedArr->erase(it) in
the first patch?  But it seems to me that it we were leaking even with
the old code, so I applied that anyway :-) - but would be great if you
can double-check / fix.

> Any comments on the size_t changes/best practice welcomed.

I am not a particular friend of the sal_uInt16 kind of types, but
changing all that to size_t where the size() of the vector might be
returned is counter-productive too, so I think you did the right thing -
casted where necessary.

Thank you,

More information about the LibreOffice mailing list