1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
22 #include <sfx2/tabdlg.hxx>
23 #include <vcl/fixed.hxx>
24 #include <vcl/lstbox.hxx>
25 #include <vcl/button.hxx>
26 #include <vcl/group.hxx>
27 #include <vcl/toolbox.hxx>
28 #include <vcl/edit.hxx>
30 #include "fldpage.hxx"
31 #include "condedit.hxx"
32 #include "numfmtlb.hxx"
36 class SelectionListBox
: public ListBox
38 bool bCallAddSelection
;
40 virtual long PreNotify( NotifyEvent
& rNEvt
);
43 SelectionListBox( SwFldVarPage
* pDialog
, const ResId
& rResId
);
45 // detect selection via Ctrl or Alt and evaluate with SelectHdl
46 bool IsCallAddSelection() const {return bCallAddSelection
;}
47 void ResetCallAddSelection() {bCallAddSelection
= false;}
50 class SwFldVarPage
: public SwFldPage
52 friend class SelectionListBox
;
56 FixedText aSelectionFT
;
57 SelectionListBox aSelectionLB
;
61 ConditionEdit aValueED
;
63 NumFormatListBox aNumFormatLB
;
65 FixedText aChapterHeaderFT
;
66 FixedText aChapterLevelFT
;
67 ListBox aChapterLevelLB
;
68 CheckBox aInvisibleCB
;
69 FixedText aSeparatorFT
;
79 DECL_LINK(TypeHdl
, void *);
80 DECL_LINK( SubTypeHdl
, ListBox
* pLB
= 0 );
81 DECL_LINK(ModifyHdl
, void * = 0);
82 DECL_LINK( TBClickHdl
, ToolBox
*pTB
= 0);
83 DECL_LINK(ChapterHdl
, void * = 0);
84 DECL_LINK(SeparatorHdl
, void * = 0);
87 sal_uInt16
FillFormatLB(sal_uInt16 nTypeId
);
90 virtual sal_uInt16
GetGroup();
93 SwFldVarPage(Window
* pParent
, const SfxItemSet
& rSet
);
97 static SfxTabPage
* Create(Window
* pParent
, const SfxItemSet
& rAttrSet
);
99 virtual sal_Bool
FillItemSet( SfxItemSet
& rSet
);
100 virtual void Reset( const SfxItemSet
& rSet
);
102 virtual void FillUserData();
108 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */