19#ifndef INCLUDED_SFX2_MSG_HXX
20#define INCLUDED_SFX2_MSG_HXX
23#include <rtl/string.hxx>
24#include <rtl/ustring.hxx>
64#define SFX_EXEC_STUB( aShellClass, aExecMethod) \
65 void SfxStub##aShellClass##aExecMethod( \
66 SfxShell *pShell, SfxRequest& rReq) \
68 ::tools::detail::castTo<aShellClass*>(pShell)->aExecMethod( rReq ); \
71#define SFX_STATE_STUB( aShellClass, aStateMethod) \
72 void SfxStub##aShellClass##aStateMethod( \
73 SfxShell *pShell, SfxItemSet& rSet) \
75 static_cast<aShellClass*>(pShell)->aStateMethod( rSet ); \
78#define SFX_STUB_PTR( aShellClass, aMethod ) \
79 &SfxStub##aShellClass##aMethod
81#define SFX_STUB_PTR_EXEC_NONE &SfxShell::EmptyExecStub
83#define SFX_STUB_PTR_STATE_NONE &SfxShell::EmptyStateStub
101 return T::CreateDefault();
122#define SFX_DECL_TYPE(n) struct SfxType##n \
124 std::function<SfxPoolItem* ()> createSfxPoolItemFunc; \
125 const std::type_info* pType; \
126 sal_uInt16 nAttribs; \
127 SfxTypeAttrib aAttrib[n]; \
130#define SFX_TYPE(Class) &a##Class##_Impl
152#define SFX_SLOT_ARG( aShellClass, id, GroupId, ExecMethodPtr, StateMethodPtr, Flags, ItemClass, nArg0, nArgs, Name, Prop ) \
153 { id, GroupId, Flags | Prop, \
157 (const SfxType*) &a##ItemClass##_Impl, \
159 &a##aShellClass##Args_Impl[nArg0], nArgs, SfxDisableFlags::NONE, Name \
162#define SFX_NEW_SLOT_ARG( aShellClass, id, GroupId, pNext, ExecMethodPtr, StateMethodPtr, Flags, DisableFlags, ItemClass, nArg0, nArgs, Prop, UnoName ) \
163 { id, GroupId, Flags | Prop, \
167 (const SfxType*) &a##ItemClass##_Impl, \
169 &a##aShellClass##Args_Impl[nArg0], nArgs, DisableFlags, UnoName \
270 return bool(
nFlags & nMode);
sal_uInt16 GetSlotId() const
const SfxSlot * pNextSlot
const SfxType * GetType() const
SfxGroupId GetGroupId() const
const SfxSlot * GetNextSlot() const
SFX2_DLLPUBLIC OUString GetCommand() const
SfxSlotMode GetMode() const
const SfxFormalArgument & GetFormalArgument(sal_uInt16 nNo) const
const OUString & GetUnoName() const
sal_uInt16 GetFormalArgumentCount() const
SfxStateFunc GetStateFnc() const
SfxDisableFlags nDisableFlags
SfxExecFunc GetExecFnc() const
SfxSlot(sal_uInt16 sId, SfxGroupId gId, SfxSlotMode flags, sal_uInt16 masterSlotId, sal_uInt16 value, SfxExecFunc exec, SfxStateFunc state, const SfxType *type, const SfxSlot *nextSlot, const SfxFormalArgument *firstArgDef, sal_uInt16 argDefCount, SfxDisableFlags disableFlags, const char(&literal)[N])
const SfxFormalArgument * pFirstArgDef
bool IsMode(SfxSlotMode nMode) const
SfxSlotKind GetKind() const
sal_uInt16 GetWhich(const SfxItemPool &rPool) const
SfxPoolItem * createSfxPoolItem()
void(* SfxExecFunc)(SfxShell *, SfxRequest &rReq)
void(* SfxStateFunc)(SfxShell *, SfxItemSet &rSet)
const std::type_info * pType
std::function< SfxPoolItem *()> createSfxPoolItemFunc
const std::type_info * Type() const
const std::type_info * pType
std::function< SfxPoolItem *()> createSfxPoolItemFunc
std::unique_ptr< SfxPoolItem > CreateItem() const
const std::type_info * Type() const