bump product version to 4.1.6.2
[LibreOffice.git] / sw / source / ui / fldui / fldvar.hxx
blob3df2573c1a7c7049c7767cfb64884e02ee1c0df6
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 .
19 #ifndef _SWFLDVAR_HXX
20 #define _SWFLDVAR_HXX
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"
34 class SwFldVarPage;
36 class SelectionListBox : public ListBox
38 bool bCallAddSelection;
40 virtual long PreNotify( NotifyEvent& rNEvt );
42 public:
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;
54 FixedText aTypeFT;
55 ListBox aTypeLB;
56 FixedText aSelectionFT;
57 SelectionListBox aSelectionLB;
58 FixedText aNameFT;
59 Edit aNameED;
60 FixedText aValueFT;
61 ConditionEdit aValueED;
62 FixedText aFormatFT;
63 NumFormatListBox aNumFormatLB;
64 ListBox aFormatLB;
65 FixedText aChapterHeaderFT;
66 FixedText aChapterLevelFT;
67 ListBox aChapterLevelLB;
68 CheckBox aInvisibleCB;
69 FixedText aSeparatorFT;
70 Edit aSeparatorED;
71 ToolBox aNewDelTBX;
73 String sOldValueFT;
74 String sOldNameFT;
76 sal_uLong nOldFormat;
77 sal_Bool bInit;
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);
86 void UpdateSubType();
87 sal_uInt16 FillFormatLB(sal_uInt16 nTypeId);
89 protected:
90 virtual sal_uInt16 GetGroup();
92 public:
93 SwFldVarPage(Window* pParent, const SfxItemSet& rSet);
95 ~SwFldVarPage();
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();
106 #endif
108 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */