LibreOffice Module sw (master)  1
fldvar.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
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/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
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 .
18  */
19 #ifndef INCLUDED_SW_SOURCE_UI_FLDUI_FLDVAR_HXX
20 #define INCLUDED_SW_SOURCE_UI_FLDUI_FLDVAR_HXX
21 
22 #include <sfx2/tabdlg.hxx>
23 #include <vcl/fixed.hxx>
24 #include <vcl/lstbox.hxx>
25 #include <vcl/button.hxx>
26 #include <vcl/toolbox.hxx>
27 #include <vcl/edit.hxx>
28 
29 #include "fldpage.hxx"
30 #include <condedit.hxx>
31 #include <numfmtlb.hxx>
32 
33 class SwFieldVarPage;
34 
36 {
37  std::unique_ptr<weld::TreeView> m_xTypeLB;
38  std::unique_ptr<weld::Widget> m_xSelection;
39  std::unique_ptr<weld::TreeView> m_xSelectionLB;
40  std::unique_ptr<weld::Label> m_xNameFT;
41  std::unique_ptr<weld::Entry> m_xNameED;
42  std::unique_ptr<weld::Label> m_xValueFT;
43  std::unique_ptr<ConditionEdit> m_xValueED;
44  std::unique_ptr<weld::Widget> m_xFormat;
45  std::unique_ptr<SwNumFormatTreeView> m_xNumFormatLB;
46  std::unique_ptr<weld::TreeView> m_xFormatLB;
47  std::unique_ptr<weld::Widget> m_xChapterFrame;
48  std::unique_ptr<weld::ComboBox> m_xChapterLevelLB;
49  std::unique_ptr<weld::CheckButton> m_xInvisibleCB;
50  std::unique_ptr<weld::Label> m_xSeparatorFT;
51  std::unique_ptr<weld::Entry> m_xSeparatorED;
52  std::unique_ptr<weld::Button> m_xNewPB;
53  std::unique_ptr<weld::Button> m_xDelPB;
54 
55  OUString sOldValueFT;
56  OUString sOldNameFT;
57 
58  sal_uInt32 nOldFormat;
59  bool bInit;
60 
61  DECL_LINK( TypeHdl, weld::TreeView&, void );
62  DECL_LINK( SubTypeListBoxHdl, weld::TreeView&, void );
63  DECL_LINK( ModifyHdl, weld::Entry&, void );
64  DECL_LINK( TBClickHdl, weld::Button&, void );
65  DECL_LINK( ChapterHdl, weld::ComboBox&, void );
66  DECL_LINK( SeparatorHdl, weld::Entry&, void );
67  DECL_LINK( SubTypeInsertHdl, weld::TreeView&, void );
68  void SubTypeHdl(const weld::TreeView*);
69 
70  void UpdateSubType();
71  void FillFormatLB(sal_uInt16 nTypeId);
72 
73 protected:
74  virtual sal_uInt16 GetGroup() override;
75 
76 public:
78 
79  virtual ~SwFieldVarPage() override;
80 
81  static VclPtr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet* rAttrSet);
82 
83  virtual bool FillItemSet( SfxItemSet* rSet ) override;
84  virtual void Reset( const SfxItemSet* rSet ) override;
85 
86  virtual void FillUserData() override;
87 };
88 
89 #endif
90 
91 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual sal_uInt16 GetGroup() override
Definition: fldvar.cxx:1205
const SfxItemSet * pSet
virtual void Reset(const SfxItemSet *rSet) override
Definition: fldvar.cxx:90
std::unique_ptr< weld::TreeView > m_xTypeLB
Definition: fldvar.hxx:37
virtual void FillUserData() override
Definition: fldvar.cxx:1210
virtual bool FillItemSet(SfxItemSet *rSet) override
Definition: fldvar.cxx:1073
OUString sOldValueFT
Definition: fldvar.hxx:55
std::unique_ptr< weld::Entry > m_xSeparatorED
Definition: fldvar.hxx:51
std::unique_ptr< ConditionEdit > m_xValueED
Definition: fldvar.hxx:43
std::unique_ptr< weld::Label > m_xValueFT
Definition: fldvar.hxx:42
void UpdateSubType()
Definition: fldvar.cxx:556
std::unique_ptr< weld::TreeView > m_xFormatLB
Definition: fldvar.hxx:46
sal_uInt32 nOldFormat
Definition: fldvar.hxx:58
void FillFormatLB(sal_uInt16 nTypeId)
Definition: fldvar.cxx:662
std::unique_ptr< weld::ComboBox > m_xChapterLevelLB
Definition: fldvar.hxx:48
std::unique_ptr< weld::Button > m_xNewPB
Definition: fldvar.hxx:52
virtual ~SwFieldVarPage() override
Definition: fldvar.cxx:85
static VclPtr< SfxTabPage > Create(TabPageParent pParent, const SfxItemSet *rAttrSet)
Definition: fldvar.cxx:1199
std::unique_ptr< weld::Widget > m_xSelection
Definition: fldvar.hxx:38
std::unique_ptr< weld::Label > m_xSeparatorFT
Definition: fldvar.hxx:50
void SubTypeHdl(const weld::TreeView *)
Definition: fldvar.cxx:221
std::unique_ptr< weld::Widget > m_xChapterFrame
Definition: fldvar.hxx:47
std::unique_ptr< weld::TreeView > m_xSelectionLB
Definition: fldvar.hxx:39
std::unique_ptr< SwNumFormatTreeView > m_xNumFormatLB
Definition: fldvar.hxx:45
OUString sOldNameFT
Definition: fldvar.hxx:56
SwFieldVarPage(TabPageParent pParent, const SfxItemSet *pSet)
Definition: fldvar.cxx:42
std::unique_ptr< weld::Widget > m_xFormat
Definition: fldvar.hxx:44
std::unique_ptr< weld::Button > m_xDelPB
Definition: fldvar.hxx:53
std::unique_ptr< weld::Label > m_xNameFT
Definition: fldvar.hxx:40
DECL_LINK(TypeHdl, weld::TreeView &, void)
std::unique_ptr< weld::Entry > m_xNameED
Definition: fldvar.hxx:41
std::unique_ptr< weld::CheckButton > m_xInvisibleCB
Definition: fldvar.hxx:49