22#include <osl/diagnose.h>
26#include <sfx2/sfxsids.hrc>
59 case SID_STYLE_FAMILY1:
60 case SID_STYLE_FAMILY2:
61 case SID_STYLE_FAMILY3:
62 case SID_STYLE_FAMILY4:
63 case SID_STYLE_FAMILY5:
64 case SID_STYLE_FAMILY6:
66 bool bAvailable = SfxItemState::DEFAULT == eState;
71 DBG_ASSERT(pStateItem !=
nullptr,
"SfxTemplateItem expected");
74 bool bDisable = eState == SfxItemState::DISABLED;
76 sal_uInt16 nFamily = 0;
79 case SID_STYLE_FAMILY1:
81 case SID_STYLE_FAMILY2:
83 case SID_STYLE_FAMILY3:
85 case SID_STYLE_FAMILY4:
87 case SID_STYLE_FAMILY5:
89 case SID_STYLE_FAMILY6:
92 default: OSL_FAIL(
"unknown StyleFamily");
break;
97 case SID_STYLE_WATERCAN:
99 if ( eState == SfxItemState::DISABLED )
101 else if( eState == SfxItemState::DEFAULT )
115 case SID_STYLE_DELETE:
124 case SID_STYLE_NEW_BY_EXAMPLE:
128 case SID_STYLE_UPDATE_BY_EXAMPLE:
138 case SID_STYLE_DRAGHIERARCHIE:
143 case SID_STYLE_FAMILY :
157 nUserEventId =
nullptr;
158 std::unique_ptr<SfxBoolItem> pState;
159 switch(nWaterCanState)
163 pState.reset(
new SfxBoolItem(SID_STYLE_WATERCAN, nWaterCanState != 0));
166 rTemplateDlg.SetWaterCanState(pState.get());
static ImplSVEvent * PostUserEvent(const Link< void *, void > &rLink, void *pCaller=nullptr, bool bReferenceLink=false)
static void RemoveUserEvent(ImplSVEvent *nUserEvent)
sal_uInt16 GetValue() const
void SetFamilyState(sal_uInt16 nSlotId, const SfxTemplateItem *)
void SetFamily(SfxStyleFamily nFamily)
void EnableDel(bool b, const StyleList *rStyleList)
virtual void EnableFamilyItem(sal_uInt16 nId, bool bEnabled)=0
void EnableShow(bool b, const StyleList *rStyleList)
void EnableExample_Impl(sal_uInt16 nId, bool bEnable)
void EnableTreeDrag(bool b)
virtual void EnableEdit(bool b, StyleList *rStyleList)
void EnableHide(bool b, const StyleList *rStyleList)
void EnableNew(bool b, const StyleList *rStyleList)
SfxTemplateControllerItem(sal_uInt16 nId, SfxCommonTemplateDialog_Impl &rDialog, SfxBindings &rBindings)
SfxCommonTemplateDialog_Impl & rTemplateDlg
virtual ~SfxTemplateControllerItem() override
virtual void StateChangedAtToolBoxControl(sal_uInt16, SfxItemState, const SfxPoolItem *pState) override
ImplSVEvent * nUserEventId
#define DBG_ASSERT(sCon, aError)
#define LINK(Instance, Class, Member)
IMPL_LINK_NOARG(SfxTemplateControllerItem, SetWaterCanStateHdl_Impl, void *, void)