1*cdf0e10cSrcweir /************************************************************************* 2*cdf0e10cSrcweir * 3*cdf0e10cSrcweir * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4*cdf0e10cSrcweir * 5*cdf0e10cSrcweir * Copyright 2000, 2010 Oracle and/or its affiliates. 6*cdf0e10cSrcweir * 7*cdf0e10cSrcweir * OpenOffice.org - a multi-platform office productivity suite 8*cdf0e10cSrcweir * 9*cdf0e10cSrcweir * This file is part of OpenOffice.org. 10*cdf0e10cSrcweir * 11*cdf0e10cSrcweir * OpenOffice.org is free software: you can redistribute it and/or modify 12*cdf0e10cSrcweir * it under the terms of the GNU Lesser General Public License version 3 13*cdf0e10cSrcweir * only, as published by the Free Software Foundation. 14*cdf0e10cSrcweir * 15*cdf0e10cSrcweir * OpenOffice.org is distributed in the hope that it will be useful, 16*cdf0e10cSrcweir * but WITHOUT ANY WARRANTY; without even the implied warranty of 17*cdf0e10cSrcweir * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18*cdf0e10cSrcweir * GNU Lesser General Public License version 3 for more details 19*cdf0e10cSrcweir * (a copy is included in the LICENSE file that accompanied this code). 20*cdf0e10cSrcweir * 21*cdf0e10cSrcweir * You should have received a copy of the GNU Lesser General Public License 22*cdf0e10cSrcweir * version 3 along with OpenOffice.org. If not, see 23*cdf0e10cSrcweir * <http://www.openoffice.org/license.html> 24*cdf0e10cSrcweir * for a copy of the LGPLv3 License. 25*cdf0e10cSrcweir * 26*cdf0e10cSrcweir ************************************************************************/ 27*cdf0e10cSrcweir #ifndef _SFX_TEMPDLGI_HXX 28*cdf0e10cSrcweir #define _SFX_TEMPDLGI_HXX 29*cdf0e10cSrcweir 30*cdf0e10cSrcweir class SfxTemplateControllerItem; 31*cdf0e10cSrcweir 32*cdf0e10cSrcweir #ifndef _BUTTON_HXX //autogen 33*cdf0e10cSrcweir #include <vcl/button.hxx> 34*cdf0e10cSrcweir #endif 35*cdf0e10cSrcweir #ifndef _TOOLBOX_HXX //autogen 36*cdf0e10cSrcweir #include <vcl/toolbox.hxx> 37*cdf0e10cSrcweir #endif 38*cdf0e10cSrcweir #ifndef _LSTBOX_HXX //autogen 39*cdf0e10cSrcweir #include <vcl/lstbox.hxx> 40*cdf0e10cSrcweir #endif 41*cdf0e10cSrcweir #include <svl/lstner.hxx> 42*cdf0e10cSrcweir #include <svtools/svtreebx.hxx> 43*cdf0e10cSrcweir #include <svl/eitem.hxx> 44*cdf0e10cSrcweir 45*cdf0e10cSrcweir #define _SVSTDARR_USHORTS 46*cdf0e10cSrcweir #include <svl/svstdarr.hxx> // SvUShorts 47*cdf0e10cSrcweir 48*cdf0e10cSrcweir #include <rsc/rscsfx.hxx> 49*cdf0e10cSrcweir #include <tools/rtti.hxx> 50*cdf0e10cSrcweir 51*cdf0e10cSrcweir #include <sfx2/childwin.hxx> 52*cdf0e10cSrcweir #include <sfx2/templdlg.hxx> 53*cdf0e10cSrcweir 54*cdf0e10cSrcweir class SfxStyleFamilies; 55*cdf0e10cSrcweir class SfxStyleFamilyItem; 56*cdf0e10cSrcweir class SfxTemplateItem; 57*cdf0e10cSrcweir class SfxBindings; 58*cdf0e10cSrcweir class SfxStyleSheetBasePool; 59*cdf0e10cSrcweir class SvTreeListBox ; 60*cdf0e10cSrcweir class StyleTreeListBox_Impl; 61*cdf0e10cSrcweir class SfxTemplateDialog_Impl; 62*cdf0e10cSrcweir class SfxCommonTemplateDialog_Impl; 63*cdf0e10cSrcweir class SfxTemplateDialogWrapper; 64*cdf0e10cSrcweir class SfxDockingWindow; 65*cdf0e10cSrcweir 66*cdf0e10cSrcweir namespace com { namespace sun { namespace star { namespace frame { class XModuleManager; } } } } 67*cdf0e10cSrcweir 68*cdf0e10cSrcweir // class DropListBox_Impl ------------------------------------------------ 69*cdf0e10cSrcweir 70*cdf0e10cSrcweir class DropListBox_Impl : public SvTreeListBox 71*cdf0e10cSrcweir { 72*cdf0e10cSrcweir private: 73*cdf0e10cSrcweir DECL_LINK( OnAsyncExecuteDrop, SvLBoxEntry* ); 74*cdf0e10cSrcweir DECL_LINK( OnAsyncExecuteError, void* ); 75*cdf0e10cSrcweir 76*cdf0e10cSrcweir protected: 77*cdf0e10cSrcweir SfxCommonTemplateDialog_Impl* pDialog; 78*cdf0e10cSrcweir sal_uInt16 nModifier; 79*cdf0e10cSrcweir 80*cdf0e10cSrcweir public: 81*cdf0e10cSrcweir DropListBox_Impl( Window* pParent, const ResId& rId, SfxCommonTemplateDialog_Impl* pD ) : 82*cdf0e10cSrcweir SvTreeListBox( pParent, rId ), pDialog( pD ) {} 83*cdf0e10cSrcweir DropListBox_Impl( Window* pParent, WinBits nWinBits, SfxCommonTemplateDialog_Impl* pD ) : 84*cdf0e10cSrcweir SvTreeListBox( pParent, nWinBits ), pDialog( pD ) {} 85*cdf0e10cSrcweir 86*cdf0e10cSrcweir virtual void MouseButtonDown( const MouseEvent& rMEvt ); 87*cdf0e10cSrcweir virtual sal_Int8 AcceptDrop( const AcceptDropEvent& rEvt ); 88*cdf0e10cSrcweir using SvLBox::ExecuteDrop; 89*cdf0e10cSrcweir virtual sal_Int8 ExecuteDrop( const ExecuteDropEvent& rEvt ); 90*cdf0e10cSrcweir 91*cdf0e10cSrcweir sal_uInt16 GetModifier() const { return nModifier; } 92*cdf0e10cSrcweir 93*cdf0e10cSrcweir virtual long Notify( NotifyEvent& rNEvt ); 94*cdf0e10cSrcweir }; 95*cdf0e10cSrcweir 96*cdf0e10cSrcweir // class SfxActionListBox ------------------------------------------------ 97*cdf0e10cSrcweir 98*cdf0e10cSrcweir class SfxActionListBox : public DropListBox_Impl 99*cdf0e10cSrcweir { 100*cdf0e10cSrcweir protected: 101*cdf0e10cSrcweir public: 102*cdf0e10cSrcweir SfxActionListBox( SfxCommonTemplateDialog_Impl* pParent, WinBits nWinBits ); 103*cdf0e10cSrcweir SfxActionListBox( SfxCommonTemplateDialog_Impl* pParent, const ResId &rResId ); 104*cdf0e10cSrcweir 105*cdf0e10cSrcweir virtual PopupMenu* CreateContextMenu( void ); 106*cdf0e10cSrcweir }; 107*cdf0e10cSrcweir 108*cdf0e10cSrcweir // class SfxCommonTemplateDialog_Impl ------------------------------------ 109*cdf0e10cSrcweir 110*cdf0e10cSrcweir struct Deleted 111*cdf0e10cSrcweir { 112*cdf0e10cSrcweir bool bDead; 113*cdf0e10cSrcweir 114*cdf0e10cSrcweir Deleted() : bDead(false) {} 115*cdf0e10cSrcweir 116*cdf0e10cSrcweir inline bool operator()() { return bDead; } 117*cdf0e10cSrcweir }; 118*cdf0e10cSrcweir 119*cdf0e10cSrcweir class SfxCommonTemplateDialog_Impl : public SfxListener 120*cdf0e10cSrcweir { 121*cdf0e10cSrcweir private: 122*cdf0e10cSrcweir class ISfxTemplateCommon_Impl : public ISfxTemplateCommon 123*cdf0e10cSrcweir { 124*cdf0e10cSrcweir private: 125*cdf0e10cSrcweir SfxCommonTemplateDialog_Impl* pDialog; 126*cdf0e10cSrcweir public: 127*cdf0e10cSrcweir ISfxTemplateCommon_Impl( SfxCommonTemplateDialog_Impl* pDialogP ) : pDialog( pDialogP ) {} 128*cdf0e10cSrcweir virtual SfxStyleFamily GetActualFamily() const { return pDialog->GetActualFamily(); } 129*cdf0e10cSrcweir virtual String GetSelectedEntry() const { return pDialog->GetSelectedEntry(); } 130*cdf0e10cSrcweir }; 131*cdf0e10cSrcweir 132*cdf0e10cSrcweir ISfxTemplateCommon_Impl aISfxTemplateCommon; 133*cdf0e10cSrcweir 134*cdf0e10cSrcweir void ReadResource(); 135*cdf0e10cSrcweir void ClearResource(); 136*cdf0e10cSrcweir 137*cdf0e10cSrcweir protected: 138*cdf0e10cSrcweir #define MAX_FAMILIES 5 139*cdf0e10cSrcweir #define COUNT_BOUND_FUNC 13 140*cdf0e10cSrcweir 141*cdf0e10cSrcweir #define UPDATE_FAMILY_LIST 0x0001 142*cdf0e10cSrcweir #define UPDATE_FAMILY 0x0002 143*cdf0e10cSrcweir 144*cdf0e10cSrcweir friend class DropListBox_Impl; 145*cdf0e10cSrcweir friend class SfxTemplateControllerItem; 146*cdf0e10cSrcweir friend class SfxTemplateDialogWrapper; 147*cdf0e10cSrcweir 148*cdf0e10cSrcweir SfxBindings* pBindings; 149*cdf0e10cSrcweir SfxTemplateControllerItem* pBoundItems[COUNT_BOUND_FUNC]; 150*cdf0e10cSrcweir 151*cdf0e10cSrcweir Window* pWindow; 152*cdf0e10cSrcweir SfxModule* pModule; 153*cdf0e10cSrcweir Timer* pTimer; 154*cdf0e10cSrcweir 155*cdf0e10cSrcweir ResId* m_pStyleFamiliesId; 156*cdf0e10cSrcweir SfxStyleFamilies* pStyleFamilies; 157*cdf0e10cSrcweir SfxTemplateItem* pFamilyState[MAX_FAMILIES]; 158*cdf0e10cSrcweir SfxStyleSheetBasePool* pStyleSheetPool; 159*cdf0e10cSrcweir SvTreeListBox* pTreeBox; 160*cdf0e10cSrcweir SfxObjectShell* pCurObjShell; 161*cdf0e10cSrcweir ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModuleManager > 162*cdf0e10cSrcweir xModuleManager; 163*cdf0e10cSrcweir Deleted* pbDeleted; 164*cdf0e10cSrcweir 165*cdf0e10cSrcweir SfxActionListBox aFmtLb; 166*cdf0e10cSrcweir ListBox aFilterLb; 167*cdf0e10cSrcweir Size aSize; 168*cdf0e10cSrcweir 169*cdf0e10cSrcweir sal_uInt16 nActFamily; // Id in der ToolBox = Position - 1 170*cdf0e10cSrcweir sal_uInt16 nActFilter; // FilterIdx 171*cdf0e10cSrcweir sal_uInt16 nAppFilter; // Filter, den die Applikation gesetzt hat (fuer automatisch) 172*cdf0e10cSrcweir 173*cdf0e10cSrcweir sal_Bool bDontUpdate :1, 174*cdf0e10cSrcweir bIsWater :1, 175*cdf0e10cSrcweir bEnabled :1, 176*cdf0e10cSrcweir bUpdate :1, 177*cdf0e10cSrcweir bUpdateFamily :1, 178*cdf0e10cSrcweir bCanEdit :1, 179*cdf0e10cSrcweir bCanDel :1, 180*cdf0e10cSrcweir bCanNew :1, 181*cdf0e10cSrcweir bWaterDisabled :1, 182*cdf0e10cSrcweir bNewByExampleDisabled :1, 183*cdf0e10cSrcweir bUpdateByExampleDisabled:1, 184*cdf0e10cSrcweir bTreeDrag :1, 185*cdf0e10cSrcweir bHierarchical :1, 186*cdf0e10cSrcweir bBindingUpdate :1; 187*cdf0e10cSrcweir 188*cdf0e10cSrcweir DECL_LINK( FilterSelectHdl, ListBox * ); 189*cdf0e10cSrcweir DECL_LINK( FmtSelectHdl, SvTreeListBox * ); 190*cdf0e10cSrcweir DECL_LINK( ApplyHdl, Control * ); 191*cdf0e10cSrcweir DECL_LINK( DropHdl, StyleTreeListBox_Impl * ); 192*cdf0e10cSrcweir DECL_LINK( TimeOut, Timer * ); 193*cdf0e10cSrcweir 194*cdf0e10cSrcweir 195*cdf0e10cSrcweir virtual void EnableItem( sal_uInt16 /*nMesId*/, sal_Bool /*bCheck*/ = sal_True ) {} 196*cdf0e10cSrcweir virtual void CheckItem( sal_uInt16 /*nMesId*/, sal_Bool /*bCheck*/ = sal_True ) {} 197*cdf0e10cSrcweir virtual sal_Bool IsCheckedItem( sal_uInt16 /*nMesId*/ ) { return sal_True; } 198*cdf0e10cSrcweir virtual void LoadedFamilies() {} 199*cdf0e10cSrcweir virtual void Update() { UpdateStyles_Impl(UPDATE_FAMILY_LIST); } 200*cdf0e10cSrcweir virtual void InvalidateBindings(); 201*cdf0e10cSrcweir virtual void InsertFamilyItem( sal_uInt16 nId, const SfxStyleFamilyItem* pIten ) = 0; 202*cdf0e10cSrcweir virtual void EnableFamilyItem( sal_uInt16 nId, sal_Bool bEnabled = sal_True ) = 0; 203*cdf0e10cSrcweir virtual void ClearFamilyList() = 0; 204*cdf0e10cSrcweir virtual void ReplaceUpdateButtonByMenu(); 205*cdf0e10cSrcweir 206*cdf0e10cSrcweir void NewHdl( void* ); 207*cdf0e10cSrcweir void EditHdl( void* ); 208*cdf0e10cSrcweir void DeleteHdl( void* ); 209*cdf0e10cSrcweir 210*cdf0e10cSrcweir sal_Bool Execute_Impl( sal_uInt16 nId, const String& rStr, const String& rRefStr, 211*cdf0e10cSrcweir sal_uInt16 nFamily, sal_uInt16 nMask = 0, 212*cdf0e10cSrcweir sal_uInt16* pIdx = NULL, const sal_uInt16* pModifier = NULL ); 213*cdf0e10cSrcweir 214*cdf0e10cSrcweir void UpdateStyles_Impl(sal_uInt16 nFlags); 215*cdf0e10cSrcweir const SfxStyleFamilyItem* GetFamilyItem_Impl() const; 216*cdf0e10cSrcweir sal_Bool IsInitialized() { return nActFamily != 0xffff; } 217*cdf0e10cSrcweir void ResetFocus(); 218*cdf0e10cSrcweir void EnableDelete(); 219*cdf0e10cSrcweir void Initialize(); 220*cdf0e10cSrcweir 221*cdf0e10cSrcweir void FilterSelect( sal_uInt16 nFilterIdx, sal_Bool bForce = sal_False ); 222*cdf0e10cSrcweir void SetFamilyState( sal_uInt16 nSlotId, const SfxTemplateItem* ); 223*cdf0e10cSrcweir void SetWaterCanState( const SfxBoolItem* pItem ); 224*cdf0e10cSrcweir 225*cdf0e10cSrcweir void SelectStyle( const String& rStyle ); 226*cdf0e10cSrcweir sal_Bool HasSelectedStyle() const; 227*cdf0e10cSrcweir void FillTreeBox(); 228*cdf0e10cSrcweir void Update_Impl(); 229*cdf0e10cSrcweir void UpdateFamily_Impl(); 230*cdf0e10cSrcweir 231*cdf0e10cSrcweir // In welchem FamilyState muss ich nachsehen, um die Info der i-ten 232*cdf0e10cSrcweir // Family in der pStyleFamilies zu bekommen. 233*cdf0e10cSrcweir sal_uInt16 StyleNrToInfoOffset( sal_uInt16 i ); 234*cdf0e10cSrcweir sal_uInt16 InfoOffsetToStyleNr( sal_uInt16 i ); 235*cdf0e10cSrcweir 236*cdf0e10cSrcweir void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ); 237*cdf0e10cSrcweir 238*cdf0e10cSrcweir void FamilySelect( sal_uInt16 nId ); 239*cdf0e10cSrcweir void SetFamily( sal_uInt16 nId ); 240*cdf0e10cSrcweir void ActionSelect( sal_uInt16 nId ); 241*cdf0e10cSrcweir 242*cdf0e10cSrcweir sal_Int32 LoadFactoryStyleFilter( SfxObjectShell* i_pObjSh ); 243*cdf0e10cSrcweir void SaveFactoryStyleFilter( SfxObjectShell* i_pObjSh, sal_Int32 i_nFilter ); 244*cdf0e10cSrcweir 245*cdf0e10cSrcweir public: 246*cdf0e10cSrcweir TYPEINFO(); 247*cdf0e10cSrcweir 248*cdf0e10cSrcweir SfxCommonTemplateDialog_Impl( SfxBindings* pB, SfxDockingWindow* ); 249*cdf0e10cSrcweir SfxCommonTemplateDialog_Impl( SfxBindings* pB, ModalDialog* ); 250*cdf0e10cSrcweir ~SfxCommonTemplateDialog_Impl(); 251*cdf0e10cSrcweir 252*cdf0e10cSrcweir DECL_LINK( MenuSelectHdl, Menu * ); 253*cdf0e10cSrcweir 254*cdf0e10cSrcweir virtual void EnableEdit( sal_Bool b = sal_True ) { bCanEdit = b; } 255*cdf0e10cSrcweir virtual void EnableDel( sal_Bool b = sal_True ) { bCanDel = b; } 256*cdf0e10cSrcweir virtual void EnableNew( sal_Bool b = sal_True ) { bCanNew = b; } 257*cdf0e10cSrcweir 258*cdf0e10cSrcweir ISfxTemplateCommon* GetISfxTemplateCommon() { return &aISfxTemplateCommon; } 259*cdf0e10cSrcweir Window* GetWindow() { return pWindow; } 260*cdf0e10cSrcweir 261*cdf0e10cSrcweir void EnableTreeDrag( sal_Bool b = sal_True ); 262*cdf0e10cSrcweir void ExecuteContextMenu_Impl( const Point& rPos, Window* pWin ); 263*cdf0e10cSrcweir void EnableExample_Impl( sal_uInt16 nId, sal_Bool bEnable ); 264*cdf0e10cSrcweir SfxStyleFamily GetActualFamily() const; 265*cdf0e10cSrcweir String GetSelectedEntry() const; 266*cdf0e10cSrcweir SfxObjectShell* GetObjectShell() const { return pCurObjShell; } 267*cdf0e10cSrcweir 268*cdf0e10cSrcweir virtual void PrepareDeleteAction(); // disable buttons, change button text, etc. when del is going to happen 269*cdf0e10cSrcweir 270*cdf0e10cSrcweir inline sal_Bool CanEdit( void ) const { return bCanEdit; } 271*cdf0e10cSrcweir inline sal_Bool CanDel( void ) const { return bCanDel; } 272*cdf0e10cSrcweir inline sal_Bool CanNew( void ) const { return bCanNew; } 273*cdf0e10cSrcweir 274*cdf0e10cSrcweir // normaly for derivates from SvTreeListBoxes, but in this case the dialog handles context menus 275*cdf0e10cSrcweir virtual PopupMenu* CreateContextMenu( void ); 276*cdf0e10cSrcweir 277*cdf0e10cSrcweir // Rechnet von den SFX_STYLE_FAMILY Ids auf 1-5 um 278*cdf0e10cSrcweir static sal_uInt16 SfxFamilyIdToNId( SfxStyleFamily nFamily ); 279*cdf0e10cSrcweir 280*cdf0e10cSrcweir void SetAutomaticFilter(); 281*cdf0e10cSrcweir }; 282*cdf0e10cSrcweir /* -----------------10.12.2003 11:42----------------- 283*cdf0e10cSrcweir 284*cdf0e10cSrcweir --------------------------------------------------*/ 285*cdf0e10cSrcweir 286*cdf0e10cSrcweir class DropToolBox_Impl : public ToolBox, public DropTargetHelper 287*cdf0e10cSrcweir { 288*cdf0e10cSrcweir SfxTemplateDialog_Impl& rParent; 289*cdf0e10cSrcweir protected: 290*cdf0e10cSrcweir virtual sal_Int8 AcceptDrop( const AcceptDropEvent& rEvt ); 291*cdf0e10cSrcweir virtual sal_Int8 ExecuteDrop( const ExecuteDropEvent& rEvt ); 292*cdf0e10cSrcweir public: 293*cdf0e10cSrcweir DropToolBox_Impl(Window* pParent, SfxTemplateDialog_Impl* pTemplateDialog); 294*cdf0e10cSrcweir ~DropToolBox_Impl(); 295*cdf0e10cSrcweir }; 296*cdf0e10cSrcweir // class SfxTemplateDialog_Impl ------------------------------------------ 297*cdf0e10cSrcweir 298*cdf0e10cSrcweir class SfxTemplateDialog_Impl : public SfxCommonTemplateDialog_Impl 299*cdf0e10cSrcweir { 300*cdf0e10cSrcweir private: 301*cdf0e10cSrcweir friend class SfxTemplateControllerItem; 302*cdf0e10cSrcweir friend class SfxTemplateDialogWrapper; 303*cdf0e10cSrcweir friend class DropToolBox_Impl; 304*cdf0e10cSrcweir 305*cdf0e10cSrcweir SfxTemplateDialog* m_pFloat; 306*cdf0e10cSrcweir sal_Bool m_bZoomIn; 307*cdf0e10cSrcweir DropToolBox_Impl m_aActionTbL; 308*cdf0e10cSrcweir ToolBox m_aActionTbR; 309*cdf0e10cSrcweir 310*cdf0e10cSrcweir DECL_LINK( ToolBoxLSelect, ToolBox * ); 311*cdf0e10cSrcweir DECL_LINK( ToolBoxRSelect, ToolBox * ); 312*cdf0e10cSrcweir DECL_LINK( ToolBoxRClick, ToolBox * ); 313*cdf0e10cSrcweir DECL_LINK( MenuSelectHdl, Menu* ); 314*cdf0e10cSrcweir 315*cdf0e10cSrcweir protected: 316*cdf0e10cSrcweir virtual void Command( const CommandEvent& rMEvt ); 317*cdf0e10cSrcweir virtual void EnableEdit( sal_Bool = sal_True ); 318*cdf0e10cSrcweir virtual void EnableItem( sal_uInt16 nMesId, sal_Bool bCheck = sal_True ); 319*cdf0e10cSrcweir virtual void CheckItem( sal_uInt16 nMesId, sal_Bool bCheck = sal_True ); 320*cdf0e10cSrcweir virtual sal_Bool IsCheckedItem( sal_uInt16 nMesId ); 321*cdf0e10cSrcweir virtual void LoadedFamilies(); 322*cdf0e10cSrcweir virtual void InsertFamilyItem( sal_uInt16 nId, const SfxStyleFamilyItem* pIten ); 323*cdf0e10cSrcweir virtual void EnableFamilyItem( sal_uInt16 nId, sal_Bool bEnabled = sal_True ); 324*cdf0e10cSrcweir virtual void ClearFamilyList(); 325*cdf0e10cSrcweir virtual void ReplaceUpdateButtonByMenu(); 326*cdf0e10cSrcweir 327*cdf0e10cSrcweir void Resize(); 328*cdf0e10cSrcweir Size GetMinOutputSizePixel(); 329*cdf0e10cSrcweir 330*cdf0e10cSrcweir void updateFamilyImages(); 331*cdf0e10cSrcweir void updateNonFamilyImages(); 332*cdf0e10cSrcweir 333*cdf0e10cSrcweir public: 334*cdf0e10cSrcweir friend class SfxTemplateDialog; 335*cdf0e10cSrcweir TYPEINFO(); 336*cdf0e10cSrcweir 337*cdf0e10cSrcweir SfxTemplateDialog_Impl( Window* pParent, SfxBindings*, SfxTemplateDialog* pWindow ); 338*cdf0e10cSrcweir ~SfxTemplateDialog_Impl(); 339*cdf0e10cSrcweir }; 340*cdf0e10cSrcweir 341*cdf0e10cSrcweir // class SfxTemplateCatalog_Impl ----------------------------------------- 342*cdf0e10cSrcweir 343*cdf0e10cSrcweir class SfxTemplateCatalog_Impl : public SfxCommonTemplateDialog_Impl 344*cdf0e10cSrcweir { 345*cdf0e10cSrcweir private: 346*cdf0e10cSrcweir friend class SfxTemplateControllerItem; 347*cdf0e10cSrcweir friend class SfxCommonTemplateDialog_Impl; 348*cdf0e10cSrcweir 349*cdf0e10cSrcweir ListBox aFamList; 350*cdf0e10cSrcweir OKButton aOkBtn; 351*cdf0e10cSrcweir CancelButton aCancelBtn; 352*cdf0e10cSrcweir PushButton aNewBtn; 353*cdf0e10cSrcweir PushButton aChangeBtn; 354*cdf0e10cSrcweir PushButton aDelBtn; 355*cdf0e10cSrcweir PushButton aOrgBtn; 356*cdf0e10cSrcweir HelpButton aHelpBtn; 357*cdf0e10cSrcweir 358*cdf0e10cSrcweir SfxTemplateCatalog* pReal; 359*cdf0e10cSrcweir SvUShorts aFamIds; 360*cdf0e10cSrcweir SfxModalDefParentHelper aHelper; 361*cdf0e10cSrcweir 362*cdf0e10cSrcweir protected: 363*cdf0e10cSrcweir virtual void EnableItem( sal_uInt16 nMesId, sal_Bool bCheck = sal_True ); 364*cdf0e10cSrcweir virtual void CheckItem( sal_uInt16 nMesId, sal_Bool bCheck = sal_True ); 365*cdf0e10cSrcweir virtual sal_Bool IsCheckedItem( sal_uInt16 nMesId ); 366*cdf0e10cSrcweir virtual void InsertFamilyItem( sal_uInt16 nId, const SfxStyleFamilyItem* pIten ); 367*cdf0e10cSrcweir virtual void EnableFamilyItem( sal_uInt16 nId, sal_Bool bEnabled = sal_True ); 368*cdf0e10cSrcweir virtual void ClearFamilyList(); 369*cdf0e10cSrcweir virtual void EnableEdit( sal_Bool = sal_True ); 370*cdf0e10cSrcweir virtual void EnableDel( sal_Bool = sal_True ); 371*cdf0e10cSrcweir virtual void EnableNew( sal_Bool = sal_True ); 372*cdf0e10cSrcweir 373*cdf0e10cSrcweir using SfxCommonTemplateDialog_Impl::NewHdl; 374*cdf0e10cSrcweir DECL_LINK( FamListSelect, ListBox * ); 375*cdf0e10cSrcweir DECL_LINK( OkHdl, Button * ); 376*cdf0e10cSrcweir DECL_LINK( CancelHdl, Button * ); 377*cdf0e10cSrcweir DECL_LINK( NewHdl, Button * ); 378*cdf0e10cSrcweir DECL_LINK( ChangeHdl, Button * ); 379*cdf0e10cSrcweir DECL_LINK( DelHdl, Button * ); 380*cdf0e10cSrcweir DECL_LINK( OrgHdl, Button * ); 381*cdf0e10cSrcweir 382*cdf0e10cSrcweir public: 383*cdf0e10cSrcweir TYPEINFO(); 384*cdf0e10cSrcweir SfxTemplateCatalog_Impl( Window* pParent, SfxBindings*, SfxTemplateCatalog* pWindow ); 385*cdf0e10cSrcweir ~SfxTemplateCatalog_Impl(); 386*cdf0e10cSrcweir 387*cdf0e10cSrcweir friend class SfxTemplateCatalog; 388*cdf0e10cSrcweir 389*cdf0e10cSrcweir virtual void PrepareDeleteAction(); 390*cdf0e10cSrcweir }; 391*cdf0e10cSrcweir 392*cdf0e10cSrcweir #endif // #ifndef _SFX_TEMPDLGI_HXX 393*cdf0e10cSrcweir 394*cdf0e10cSrcweir 395