Bug 34465 - get rid of all calls to virtual const SfxPoolItem* Put( const SfxPoolItem&, USHORT nWhich)

Bjoern Michaelsen bjoern.michaelsen at canonical.com
Wed Nov 7 09:09:15 PST 2012


Hi Maciej,

On Wed, Nov 07, 2012 at 04:41:04PM +0100, Maciej Rumianowski wrote:
> I've started to work on the *Bug
> 34465*<https://bugs.freedesktop.org/show_bug.cgi?id=34465>i

awesome!

> and I have some questions:
> 
> 1) What do you suggest to find all places where Put( const SfxPoolItem&,
> USHORT nWhich) is used?
>     I came up with idea to make function private and fix all places where
> g++ gives error. Do you have better idea?

Thats how I would go about it, yes.

> 2) Is it a good idea to make a special clone method in SfxPoolItem, such as
> 
> virtual SfxPoolItem*     CloneAtWhich( sal_uInt16 nNewWhich, SfxItemPool
> > *pPool = 0 ) const
> >                              { SfxPoolItem *pItem = Clone( pPool );
> > pItem->SetWhich( nNewWhich );
> >                                  return pItem; }

Great idea! Sounds good to me, go ahead, IIRC there are quite a lot of those in
editeng for example.

Best,

Bjoern


More information about the LibreOffice mailing list