LibreOffice Module sw (master)  1
envfmt.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_ENVELP_ENVFMT_HXX
20 #define INCLUDED_SW_SOURCE_UI_ENVELP_ENVFMT_HXX
21 
22 #include <vcl/weld.hxx>
23 #include <envlop.hxx>
24 
25 class SwTextFormatColl;
26 
28 {
30  std::vector<sal_uInt16> m_aIDs;
31 
33  std::unique_ptr<weld::MetricSpinButton> m_xAddrLeftField;
34  std::unique_ptr<weld::MetricSpinButton> m_xAddrTopField;
35  std::unique_ptr<weld::MenuButton> m_xAddrEditButton;
36  std::unique_ptr<weld::MetricSpinButton> m_xSendLeftField;
37  std::unique_ptr<weld::MetricSpinButton> m_xSendTopField;
38  std::unique_ptr<weld::MenuButton> m_xSendEditButton;
39  std::unique_ptr<weld::ComboBox> m_xSizeFormatBox;
40  std::unique_ptr<weld::MetricSpinButton> m_xSizeWidthField;
41  std::unique_ptr<weld::MetricSpinButton> m_xSizeHeightField;
42  std::unique_ptr<weld::CustomWeld> m_xPreview;
43 
44  DECL_LINK(ModifyHdl, weld::MetricSpinButton&, void);
45  DECL_LINK(AddrEditHdl, const OString&, void);
46  DECL_LINK(SendEditHdl, const OString&, void);
47  DECL_LINK(FormatHdl, weld::ComboBox&, void);
48 
49  void SetMinMax();
50 
51  SfxItemSet *GetCollItemSet(SwTextFormatColl const * pColl, bool bSender);
52 
53  void Edit(const OString& rIdent, bool bSender);
54 
56 
59 
60 public:
61  SwEnvFormatPage(TabPageParent pParent, const SfxItemSet& rSet);
62  void Init(SwEnvDlg* pDialog);
63  virtual ~SwEnvFormatPage() override;
64 
65  static VclPtr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet* rSet);
66 
67  virtual void ActivatePage(const SfxItemSet& rSet) override;
68  virtual DeactivateRC DeactivatePage(SfxItemSet* pSet) override;
69  void FillItem(SwEnvItem& rItem);
70  virtual bool FillItemSet(SfxItemSet* rSet) override;
71  virtual void Reset(const SfxItemSet* rSet) override;
72 };
73 
74 #endif
75 
76 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Represents the style of a paragraph.
Definition: fmtcol.hxx:55
virtual bool FillItemSet(SfxItemSet *rSet) override
Definition: envfmt.cxx:459
std::unique_ptr< weld::ComboBox > m_xSizeFormatBox
Definition: envfmt.hxx:39
const SfxItemSet * pSet
std::unique_ptr< weld::MetricSpinButton > m_xSizeWidthField
Definition: envfmt.hxx:40
SfxItemSet * GetCollItemSet(SwTextFormatColl const *pColl, bool bSender)
Definition: envfmt.cxx:321
std::unique_ptr< weld::MetricSpinButton > m_xAddrLeftField
Definition: envfmt.hxx:33
std::unique_ptr< weld::MetricSpinButton > m_xSendTopField
Definition: envfmt.hxx:37
virtual void Reset(const SfxItemSet *rSet) override
Definition: envfmt.cxx:466
SwEnvDlg * m_pDialog
Definition: envfmt.hxx:29
void Edit(const OString &rIdent, bool bSender)
Definition: envfmt.cxx:238
static VclPtr< SfxTabPage > Create(TabPageParent pParent, const SfxItemSet *rSet)
Definition: envfmt.cxx:416
void Init(SwEnvDlg *pDialog)
Definition: envfmt.cxx:182
std::unique_ptr< weld::MenuButton > m_xAddrEditButton
Definition: envfmt.hxx:35
void FillItem(SwEnvItem &rItem)
Definition: envfmt.cxx:435
virtual void ActivatePage()
std::unique_ptr< weld::MetricSpinButton > m_xSendLeftField
Definition: envfmt.hxx:36
SwEnvPreview m_aPreview
Definition: envfmt.hxx:32
std::vector< sal_uInt16 > m_aIDs
Definition: envfmt.hxx:30
SwEnvFormatPage(TabPageParent pParent, const SfxItemSet &rSet)
Definition: envfmt.cxx:119
std::unique_ptr< weld::CustomWeld > m_xPreview
Definition: envfmt.hxx:42
std::unique_ptr< weld::MenuButton > m_xSendEditButton
Definition: envfmt.hxx:38
virtual ~SwEnvFormatPage() override
Definition: envfmt.cxx:188
virtual void ActivatePage(const SfxItemSet &rSet) override
Definition: envfmt.cxx:421
DeactivateRC
virtual void DeactivatePage()
std::unique_ptr< weld::MetricSpinButton > m_xSizeHeightField
Definition: envfmt.hxx:41
DECL_LINK(ModifyHdl, weld::MetricSpinButton &, void)
void SetMinMax()
Definition: envfmt.cxx:397
std::unique_ptr< weld::MetricSpinButton > m_xAddrTopField
Definition: envfmt.hxx:34
virtual DeactivateRC DeactivatePage(SfxItemSet *pSet) override
Definition: envfmt.cxx:428
SwEnvDlg * GetParentSwEnvDlg()
Definition: envfmt.hxx:55