update dev300-m58
[ooovba.git] / sw / source / ui / fldui / fldvar.hxx
blob0bae413b09290a6c2cb4b1a5f1941c10e0bf12df
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: fldvar.hxx,v $
10 * $Revision: 1.3 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef _SWFLDVAR_HXX
31 #define _SWFLDVAR_HXX
33 #include <sfx2/tabdlg.hxx>
34 #include <vcl/fixed.hxx>
35 #include <vcl/lstbox.hxx>
36 #ifndef _SV_BUTTON_HXX //autogen
37 #include <vcl/button.hxx>
38 #endif
39 #include <vcl/group.hxx>
40 #include <vcl/toolbox.hxx>
41 #include <vcl/edit.hxx>
43 #include "fldpage.hxx"
44 #include "condedit.hxx"
45 #include "numfmtlb.hxx"
47 class SwFldVarPage;
49 /*--------------------------------------------------------------------
50 Beschreibung:
51 --------------------------------------------------------------------*/
53 class SelectionListBox : public ListBox
55 SwFldVarPage* pDlg;
56 BOOL bCallAddSelection;
58 virtual long PreNotify( NotifyEvent& rNEvt );
60 public:
61 SelectionListBox( SwFldVarPage* pDialog, const ResId& rResId );
63 // Selektieren per Ctrl oder Alt erkennen und mit SelectHdl auswerten
64 BOOL IsCallAddSelection() const {return bCallAddSelection;}
65 void ResetCallAddSelection() {bCallAddSelection = FALSE;}
68 /*--------------------------------------------------------------------
69 Beschreibung:
70 --------------------------------------------------------------------*/
72 class SwFldVarPage : public SwFldPage
74 friend class SelectionListBox;
76 FixedText aTypeFT;
77 ListBox aTypeLB;
78 FixedText aSelectionFT;
79 SelectionListBox aSelectionLB;
80 FixedText aNameFT;
81 Edit aNameED;
82 FixedText aValueFT;
83 ConditionEdit aValueED;
84 FixedText aFormatFT;
85 NumFormatListBox aNumFormatLB;
86 ListBox aFormatLB;
87 FixedText aChapterHeaderFT;
88 FixedText aChapterLevelFT;
89 ListBox aChapterLevelLB;
90 CheckBox aInvisibleCB;
91 FixedText aSeparatorFT;
92 Edit aSeparatorED;
93 ToolBox aNewDelTBX;
95 String sOldValueFT;
96 String sOldNameFT;
98 ULONG nOldFormat;
99 BOOL bInit;
101 DECL_LINK( TypeHdl, ListBox* pLB = 0 );
102 DECL_LINK( SubTypeHdl, ListBox* pLB = 0 );
103 DECL_LINK( ModifyHdl, Edit *pED = 0 );
104 DECL_LINK( TBClickHdl, ToolBox *pTB = 0);
105 DECL_LINK( ChapterHdl, ListBox *pLB = 0);
106 DECL_LINK( SeparatorHdl, Edit *pED = 0 );
108 void UpdateSubType();
109 USHORT FillFormatLB(USHORT nTypeId);
111 protected:
112 virtual USHORT GetGroup();
114 public:
115 SwFldVarPage(Window* pParent, const SfxItemSet& rSet);
117 ~SwFldVarPage();
119 static SfxTabPage* Create(Window* pParent, const SfxItemSet& rAttrSet);
121 virtual BOOL FillItemSet( SfxItemSet& rSet );
122 virtual void Reset( const SfxItemSet& rSet );
124 virtual void FillUserData();
128 #endif