[PUSHED] Replace SV_DECL_PTRARR_DEL by ptr_vector in ww8par2.cxx

Stephan Bergmann sbergman at redhat.com
Wed Mar 21 04:42:55 PDT 2012


On 03/18/2012 11:02 AM, Arnaud Versini wrote:
> This patch replace SV_DECL_PTRARR_DEL by a simple ptr_vector in
> sw/source/filter/ww8/ww8par2.cxx. I will continue on the same way in
> this folder if there is no issue with this patch.

Patch looks good.  (At least, taking 
<https://bugs.freedesktop.org/attachment.cgi?id=46663> 
new_merged_cells.odt attached to 
<https://bugs.freedesktop.org/show_bug.cgi?id=37161> "FILESAVE RTF: 
Vertical cell merging in tables not exported correctly," saving it as 
"Microsoft Word 97/2000/XP/2003 (.doc)" format, and then loading that 
results in the same broken table layout as without the patch.)

I noticed a few things I addressed with follow up 
<http://cgit.freedesktop.org/libreoffice/core/commit/?id=2406745e4e78e0346b1b303870abd0a85e861405> 
"Further clean up of previous patch," however:

* FindMergeGroup crams WW8MergeGroups::size_type into short. 
Redesigning FindMergeGroups to directly return a pointer to the found 
element eliminates that completely.

* begin()-to-end()-iteration should use idiomatic "i != end()" (rather 
than "i < end()") and "++i" (rather than "i++").

* "die aktuell untersuchte Gruppe" was a comment pertaining to the 
following declaration, which has been removed.

> I noticed with the RTF spec (doc file) a memory error (not due to this
> patch) :
>
> ==5526== Invalid read of size 1
> ==5526==    at 0x24F492F4: SVBT16ToShort(unsigned char const*) (solar.h:88)

Maybe you should turn that into an issue, so it does not get lost.

Stephan


More information about the LibreOffice mailing list