On Mon, Aug 22, 2011 at 08:35:11PM -0400, Kohei Yoshida wrote:
On Mon, 2011-08-22 at 19:06 -0400, Kohei Yoshida wrote:
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.
Actually, if this becomes problematic we probably *could* move this
boolean into OPropertySetHelper::Impl* m_pReserved. That member is a
protected member, so the derived class should have access to it.
The problem of m_bFireEvent is solved, but I don't know what to do
with queryInterface; since it is not virtual, I cannot override it in
OPropertySetHelper2. The best I could come up with is something like (in
OPropertySetHelper):
Any OPropertySetHelper::queryInterface( const ::com::sun::star::uno::Type & rType )
throw (RuntimeException)
{
if ( rType == ::com::sun::star::beans::XPropertySetOption::static_type() )
{
XPropertySetOption * tmp = dynamic_cast< XPropertySetOption * >( this );
if ( tmp )
return Any( &tmp, rType );
else
return Any();
}
else
return ::cppu::queryInterface(
rType,
static_cast< XPropertySet * >( this ),
static_cast< XMultiPropertySet * >( this ),
static_cast< XFastPropertySet * >( this ) )
}
But that is very ugly, since OPropertySetHelper has to know about
*all* the interfaces implemented by its derivatives!
Any better idea?
--
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.