LibreOffice Module svx (master)  1
hdft.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_SVX_HDFT_HXX
20 #define INCLUDED_SVX_HDFT_HXX
21 
22 #include <sfx2/tabdlg.hxx>
23 
24 #include <vcl/weld.hxx>
25 
26 #include <svx/pagectrl.hxx>
27 #include <svx/svxdllapi.h>
28 #include <memory>
29 
30 namespace weld { class CustomWeld; }
31 
32 namespace svx
33 {
35 }
36 
38 {
39 public:
40 
41  virtual bool FillItemSet( SfxItemSet* rOutSet ) override;
42  virtual void Reset( const SfxItemSet* rSet ) override;
43 
44  virtual ~SvxHFPage() override;
45 
46  void DisableDeleteQueryBox() { mbDisableQueryBox = true; }
47 
48  virtual void PageCreated(const SfxAllItemSet&) override;
49 
50  void EnableDynamicSpacing();
51 
52 protected:
53  static const sal_uInt16 pRanges[];
54 
55  virtual void ActivatePage( const SfxItemSet& rSet ) override;
56  virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
57 
58  SvxHFPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet, sal_uInt16 nSetId);
59 
60  sal_uInt16 nId;
61  std::unique_ptr<SfxItemSet> pBBSet;
62  bool mbDisableQueryBox : 1;
63  bool mbEnableDrawingLayerFillStyles : 1;
64 
66  std::unique_ptr<weld::Label> m_xPageLbl;
67  std::unique_ptr<weld::CheckButton> m_xTurnOnBox;
68  std::unique_ptr<weld::CheckButton> m_xCntSharedBox;
69  std::unique_ptr<weld::CheckButton> m_xCntSharedFirstBox;
70  std::unique_ptr<weld::Label> m_xLMLbl;
71  std::unique_ptr<weld::MetricSpinButton>m_xLMEdit;
72  std::unique_ptr<weld::Label> m_xRMLbl;
73  std::unique_ptr<weld::MetricSpinButton> m_xRMEdit;
74  std::unique_ptr<weld::Label> m_xDistFT;
75  std::unique_ptr<weld::MetricSpinButton> m_xDistEdit;
76  std::unique_ptr<weld::CheckButton> m_xDynSpacingCB;
77  std::unique_ptr<weld::Label> m_xHeightFT;
78  std::unique_ptr<weld::MetricSpinButton> m_xHeightEdit;
79  std::unique_ptr<weld::CheckButton> m_xHeightDynBtn;
80  std::unique_ptr<weld::Button> m_xBackgroundBtn;
81  std::unique_ptr<weld::CustomWeld> m_xBspWin;
82 
83  void InitHandler();
84  void TurnOn(const weld::ToggleButton* pButton);
85  DECL_LINK(TurnOnHdl, weld::ToggleButton&, void);
86  DECL_LINK(BackgroundHdl, weld::Button&, void);
87  DECL_LINK(ValueChangeHdl, weld::MetricSpinButton&, void);
88  void RangeHdl();
89  void UpdateExample();
90 
91 private:
92  SVX_DLLPRIVATE void ResetBackground_Impl( const SfxItemSet& rSet );
93 };
94 
96 {
97 public:
98  static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rSet );
99  // returns the Which values to the range
100  static const sal_uInt16* GetRanges() { return pRanges; }
102 };
103 
105 {
106 public:
107  static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rSet );
108  static const sal_uInt16* GetRanges() { return pRanges; }
110 };
111 
113 {
114 public:
116  : MessageDialogController(pParent, "svx/ui/deleteheaderdialog.ui",
117  "DeleteHeaderDialog")
118  {
119  }
120 };
121 
123 {
124 public:
126  : MessageDialogController(pParent, "svx/ui/deletefooterdialog.ui",
127  "DeleteFooterDialog")
128  {
129  }
130 };
131 
132 #endif
133 
134 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
std::unique_ptr< weld::MetricSpinButton > m_xHeightEdit
Definition: hdft.hxx:78
void DisableDeleteQueryBox()
Definition: hdft.hxx:46
virtual void PageCreated(const SfxAllItemSet &aSet)
void Create(SwFormatVertOrient &rItem, SvStream &rStrm, sal_uInt16 nVersionAbusedAsSize)
SvxPageWindow m_aBspWin
Definition: hdft.hxx:65
virtual void ActivatePage(const SfxItemSet &)
#define SVX_DLLPUBLIC
Definition: svxdllapi.h:28
virtual DeactivateRC DeactivatePage(SfxItemSet *pSet)
virtual bool FillItemSet(SfxItemSet *)
std::unique_ptr< weld::MetricSpinButton > m_xLMEdit
Definition: hdft.hxx:71
bool ShowBorderBackgroundDlg(weld::Window *pParent, SfxItemSet *pBBSet)
Definition: hdft.cxx:82
virtual void Reset(const SfxItemSet *)
static const sal_uInt16 * GetRanges()
Definition: hdft.hxx:100
std::unique_ptr< weld::MetricSpinButton > m_xRMEdit
Definition: hdft.hxx:73
std::unique_ptr< weld::CheckButton > m_xTurnOnBox
Definition: hdft.hxx:67
static const sal_uInt16 * GetRanges()
Definition: hdft.hxx:108
std::unique_ptr< weld::Label > m_xDistFT
Definition: hdft.hxx:74
std::unique_ptr< weld::CheckButton > m_xHeightDynBtn
Definition: hdft.hxx:79
std::unique_ptr< weld::CheckButton > m_xCntSharedBox
Definition: hdft.hxx:68
std::unique_ptr< SfxItemSet > pBBSet
Definition: hdft.hxx:61
sal_uInt16 nId
Definition: hdft.hxx:60
std::unique_ptr< weld::Label > m_xHeightFT
Definition: hdft.hxx:77
std::unique_ptr< weld::CustomWeld > m_xBspWin
Definition: hdft.hxx:81
DeleteHeaderDialog(weld::Widget *pParent)
Definition: hdft.hxx:115
std::unique_ptr< weld::Button > m_xBackgroundBtn
Definition: hdft.hxx:80
DeleteFooterDialog(weld::Widget *pParent)
Definition: hdft.hxx:125
std::unique_ptr< weld::Label > m_xRMLbl
Definition: hdft.hxx:72
DeactivateRC
std::unique_ptr< weld::CheckButton > m_xCntSharedFirstBox
Definition: hdft.hxx:69
#define SVX_DLLPRIVATE
Definition: svxdllapi.h:30
std::unique_ptr< weld::CheckButton > m_xDynSpacingCB
Definition: hdft.hxx:76
std::unique_ptr< weld::MetricSpinButton > m_xDistEdit
Definition: hdft.hxx:75
static const sal_uInt16 pRanges[]
Definition: hdft.hxx:53
std::unique_ptr< weld::Label > m_xLMLbl
Definition: hdft.hxx:70
std::unique_ptr< weld::Label > m_xPageLbl
Definition: hdft.hxx:66