make SvDetachedEventDescriptor::hasByName return bool
Also, since this is a utility method, and it does not override a method from an UNO interface, it does not need to be virtual. Change-Id: I2dd90331e8ff49572bdfcb6ea2e2e3ed2fd95051
This commit is contained in:
parent
f5a4280122
commit
532acfde02
@ -290,11 +290,11 @@ protected:
|
|||||||
::com::sun::star::uno::RuntimeException) SAL_OVERRIDE;
|
::com::sun::star::uno::RuntimeException) SAL_OVERRIDE;
|
||||||
|
|
||||||
/// do we have an event?
|
/// do we have an event?
|
||||||
/// return sal_True: we have a macro for the event
|
/// return true: we have a macro for the event
|
||||||
/// return sal_False: no macro; getByName() will return an empty macro
|
/// return false: no macro; getByName() will return an empty macro
|
||||||
/// IllegalArgumentException: the event is not supported
|
/// IllegalArgumentException: the event is not supported
|
||||||
using SvBaseEventDescriptor::hasByName;
|
using SvBaseEventDescriptor::hasByName;
|
||||||
virtual sal_Bool hasByName(
|
bool hasByName(
|
||||||
const sal_uInt16 nEvent ) const /// item ID of event
|
const sal_uInt16 nEvent ) const /// item ID of event
|
||||||
throw(
|
throw(
|
||||||
::com::sun::star::lang::IllegalArgumentException);
|
::com::sun::star::lang::IllegalArgumentException);
|
||||||
|
@ -497,7 +497,7 @@ void SvDetachedEventDescriptor::getByName(
|
|||||||
rMacro = (*aMacros[nIndex]);
|
rMacro = (*aMacros[nIndex]);
|
||||||
}
|
}
|
||||||
|
|
||||||
sal_Bool SvDetachedEventDescriptor::hasByName(
|
bool SvDetachedEventDescriptor::hasByName(
|
||||||
const sal_uInt16 nEvent ) const /// item ID of event
|
const sal_uInt16 nEvent ) const /// item ID of event
|
||||||
throw(IllegalArgumentException)
|
throw(IllegalArgumentException)
|
||||||
{
|
{
|
||||||
@ -505,7 +505,7 @@ sal_Bool SvDetachedEventDescriptor::hasByName(
|
|||||||
if (-1 == nIndex)
|
if (-1 == nIndex)
|
||||||
throw IllegalArgumentException();
|
throw IllegalArgumentException();
|
||||||
|
|
||||||
return (NULL == aMacros[nIndex]) ? sal_False : aMacros[nIndex]->HasMacro();
|
return (NULL != aMacros[nIndex]) && aMacros[nIndex]->HasMacro();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user