1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: fldvar.hxx,v $
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 ************************************************************************/
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>
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"
49 /*--------------------------------------------------------------------
51 --------------------------------------------------------------------*/
53 class SelectionListBox
: public ListBox
56 BOOL bCallAddSelection
;
58 virtual long PreNotify( NotifyEvent
& rNEvt
);
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 /*--------------------------------------------------------------------
70 --------------------------------------------------------------------*/
72 class SwFldVarPage
: public SwFldPage
74 friend class SelectionListBox
;
78 FixedText aSelectionFT
;
79 SelectionListBox aSelectionLB
;
83 ConditionEdit aValueED
;
85 NumFormatListBox aNumFormatLB
;
87 FixedText aChapterHeaderFT
;
88 FixedText aChapterLevelFT
;
89 ListBox aChapterLevelLB
;
90 CheckBox aInvisibleCB
;
91 FixedText aSeparatorFT
;
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
);
112 virtual USHORT
GetGroup();
115 SwFldVarPage(Window
* pParent
, const SfxItemSet
& rSet
);
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();