Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


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

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.