[Libreoffice] SfxItemSet reimplementation (was: va_start without va_end)

Bjoern Michaelsen bjoern.michaelsen at canonical.com
Fri Aug 5 00:24:08 PDT 2011


Hi Norbert, all,

On Thu, 4 Aug 2011 20:47:43 -0500
Norbert Thiebaud <nthiebaud at gmail.com>
wrote:

> The va_end manpage, on linux says:
> "Each invocation of va_start() must be matched by a corresponding
> invocation of va_end() in the _same function_"
>  (emphasis is mine)
>  so it's not just ugly, but also 'wrong'...

FWIW, I tried a clean new from the group up reimplementation of
SfxItemset once in cws new_itemsets:

 http://hg.services.openoffice.org/cws/new_itemsets/file/924a55dab4dc/svl/inc/svl/itemset.hxx
 http://hg.services.openoffice.org/cws/new_itemsets/file/924a55dab4dc/svl/source/items/itemset.cxx

the intention was to be able to optimize on the code (with seemed to be
impossible with the bit-rotten old one) as SfxItemsets pose a major
part of the load/save-instructions. I never got to integrate that cws,
as its performance currently is just on par with the old implementation
(IIRC, ~8% faster on Linux, but a bit slower on Windows). I still
think it would be a much better base for optimization and finetuning
than the current codebase, let alone be more readable (for example it
is doing the same thing in half the LOC).

Maybe somebody is interested in integrating the replacement Itemset? I
added an EasyHack for it:
 https://bugs.freedesktop.org/show_bug.cgi?id=39849
Although that is a truely challenging task, it would also be most
rewarding.

Best,

Bjoern


-- 
https://launchpad.net/~bjoern-michaelsen




More information about the LibreOffice mailing list