[PATCH] convert table.hxx use in editeng/source/editeng/editdoc.hxx
Noel Grandin
noel at peralex.com
Sun Feb 12 23:20:43 PST 2012
Hi.
Sounds like a good idea. I'll spin another patch.
-- Noel Grandin
On 2012-02-12 18:20, Ivan Timofeev wrote:
> Hi Noel,
>
> On 10.02.2012 13:42, Noel Grandin wrote:
>> Convert tools/table.hxx usage in editeng/source/editeng/editdoc.hxx to
>> boost::ptr_map
>
> Your patch looks good to me. But... let's look at the usages of the
> SvxFontTable class. All of them are in
> editeng/source/editeng/impedit4.cxx.
> ImpEditEngine::WriteRTF:
>
> SvxFontTable aFontTable;
> aFontTable.Insert( 0, ... );
> aFontTable.Insert( 1, ... );
> aFontTable.Insert( 2, ... );
>
> Ok, keys are 0, 1, 2.
>
> aFontTable.Insert( aFontTable.Count(), ... );
>
> Keys will be 3, 4, 5 and so on. And there are no other calls of
> Insert. Thus, no real need of a map, we can use a vector, and treat
> positions of elements as ex-keys. So, I'd suggest to remove
> SvxFontTable wrapper, directly replacing it with vector.
>
> Have you something against? :)
>
> Best Regards,
> Ivan
>
Disclaimer: http://www.peralex.com/disclaimer.html
More information about the LibreOffice
mailing list