[Libreoffice] cppu::OPropertySetHelper ABI backwards compatibility
Lionel Elie Mamane
lionel at mamane.lu
Mon Aug 22 22:48:19 PDT 2011
On Mon, Aug 22, 2011 at 07:06:59PM -0400, Kohei Yoshida wrote:
> On Mon, 2011-08-22 at 18:18 +0200, Lionel Elie Mamane wrote:
>> class OPropertySetHelperFireEventOption : public OPropertySetHelper,
>> public ::com::sun::star::beans::XPropertySetOptions
>> {
>> bool m_bFireEvent;
>> public:
>> (...)
>> virtual void SAL_CALL enableChangeListenerNotification( sal_Bool bEnable )
>> throw(::com::sun::star::uno::RuntimeException);
>> (...)
>> }
> BTW, how do you plan to use that m_bFireEvent data member to decide to
> skip or fire events in OPropertySetHelper::fire() ? The method that
> needs to be influenced by that boolean is still in the
> OPropertySetHelper.
class OPropertySetHelper : public ...
{
(...)
virtual void SAL_CALL fire(
sal_Int32 * pnHandles,
const ::com::sun::star::uno::Any * pNewValues,
const ::com::sun::star::uno::Any * pOldValues,
sal_Int32 nCount,
sal_Bool bVetoable );
(...)
}
class OPropertySetHelper2 : public OPropertySetHelper,
public ::com::sun::star::beans::XPropertySetOptions
{
bool m_bFireEvent;
public:
(...)
virtual void SAL_CALL enableChangeListenerNotification( sal_Bool bEnable )
throw(::com::sun::star::uno::RuntimeException);
(...)
virtual void SAL_CALL fire(
sal_Int32 * pnHandles,
const ::com::sun::star::uno::Any * pNewValues,
const ::com::sun::star::uno::Any * pOldValues,
sal_Int32 nCount,
sal_Bool bVetoable )
{
if (!m_bFireEvent)
return;
::OPropertySetHelper::fire(pnHandles, pNewValues, pOldValues, nCount, bVetoable);
}
}
--
Lionel
More information about the LibreOffice
mailing list