[Libreoffice] [PATCH] Easy hacks: Remove misuse of SfxItemSet API from libs-core

Theo van Klaveren theo.van.klaveren at gmail.com
Mon Mar 28 04:10:31 PDT 2011


Hello Bjoern,

2011/3/28 Bjoern Michaelsen <bjoern.michaelsen at canonical.com>

> Hi Theo,
>


>  The changes to
>   ChangeFontSizeImpl in editeng/source/editeng/editview.cxx
> however are assuming that aSet.Get( EE_CHAR_FONTHEIGHT_CJK ) returns a
> item with a which-id of EE_CHAR_FONTHEIGHT_CJK, which unfortunately we
> cannot assume currently (we need exactly the changes you are doing now
> everywhere, so that we finally can make that assumption). You would
> need to create a clone from the item you got and set the which-id
> explicitly before putting it in the second set, or leave the code as is
> for now.
>

Hm. I'm not sure -- this covers all callers in editeng, so wouldn't this be
safe? Or is
this done by callers of editing as well?

Better leave them as is for now I think, until all code is converted.


> For the changes to
>   ConvertAndPutItems in editeng/source/editeng/editdoc2.cxx
> it seems to me that there is a "delete pItem" called now when
> eSourceUnit == eDestUnit which has not been there before.
>

Correct, but we also call Clone() now in both cases, so I'd
assume that necessary.

In general, they are looking good, keep them coming!
>


> (*) Actually, the original is totally wrong here, and likely never
> worked as intended.
>
>
Yep, noticed that as well.

Fixed patches coming up.

Kind regards,
 - Theo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20110328/19656b2e/attachment.htm>


More information about the LibreOffice mailing list