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 <sal/config.h>
23 
24 #include <string_view>
25 
26 #include <vcl/weld.hxx>
27 #include <envlop.hxx>
28 
29 class SwTextFormatColl;
30 
32 {
34  std::vector<sal_uInt16> m_aIDs;
35 
37  std::unique_ptr<weld::MetricSpinButton> m_xAddrLeftField;
38  std::unique_ptr<weld::MetricSpinButton> m_xAddrTopField;
39  std::unique_ptr<weld::MenuButton> m_xAddrEditButton;
40  std::unique_ptr<weld::MetricSpinButton> m_xSendLeftField;
41  std::unique_ptr<weld::MetricSpinButton> m_xSendTopField;
42  std::unique_ptr<weld::MenuButton> m_xSendEditButton;
43  std::unique_ptr<weld::ComboBox> m_xSizeFormatBox;
44  std::unique_ptr<weld::MetricSpinButton> m_xSizeWidthField;
45  std::unique_ptr<weld::MetricSpinButton> m_xSizeHeightField;
46  std::unique_ptr<weld::CustomWeld> m_xPreview;
47 
48  DECL_LINK(ModifyHdl, weld::MetricSpinButton&, void);
49  DECL_LINK(AddrEditHdl, const OString&, void);
50  DECL_LINK(SendEditHdl, const OString&, void);
51  DECL_LINK(FormatHdl, weld::ComboBox&, void);
52 
53  void SetMinMax();
54 
55  SfxItemSet* GetCollItemSet(SwTextFormatColl const* pColl, bool bSender);
56 
57  void Edit(std::string_view rIdent, bool bSender);
58 
60 
61 public:
63  const SfxItemSet& rSet);
64  void Init(SwEnvDlg* pDialog);
65  virtual ~SwEnvFormatPage() override;
66 
67  static std::unique_ptr<SfxTabPage>
68  Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rSet);
69 
70  virtual void ActivatePage(const SfxItemSet& rSet) override;
71  virtual DeactivateRC DeactivatePage(SfxItemSet* pSet) override;
72  void FillItem(SwEnvItem& rItem);
73  virtual bool FillItemSet(SfxItemSet* rSet) override;
74  virtual void Reset(const SfxItemSet* rSet) override;
75 };
76 
77 #endif
78 
79 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Represents the style of a paragraph.
Definition: fmtcol.hxx:56
virtual bool FillItemSet(SfxItemSet *rSet) override
Definition: envfmt.cxx:384
std::unique_ptr< weld::ComboBox > m_xSizeFormatBox
Definition: envfmt.hxx:43
const SfxItemSet * pSet
std::unique_ptr< weld::MetricSpinButton > m_xSizeWidthField
Definition: envfmt.hxx:44
SfxItemSet * GetCollItemSet(SwTextFormatColl const *pColl, bool bSender)
Definition: envfmt.cxx:252
std::unique_ptr< weld::MetricSpinButton > m_xAddrLeftField
Definition: envfmt.hxx:37
std::unique_ptr< weld::MetricSpinButton > m_xSendTopField
Definition: envfmt.hxx:41
virtual void Reset(const SfxItemSet *rSet) override
Definition: envfmt.cxx:391
SwEnvDlg * m_pDialog
Definition: envfmt.hxx:33
void Init(SwEnvDlg *pDialog)
Definition: envfmt.cxx:114
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rSet)
Definition: envfmt.cxx:341
std::unique_ptr< weld::MenuButton > m_xAddrEditButton
Definition: envfmt.hxx:39
void FillItem(SwEnvItem &rItem)
Definition: envfmt.cxx:360
std::unique_ptr< weld::MetricSpinButton > m_xSendLeftField
Definition: envfmt.hxx:40
void Edit(std::string_view rIdent, bool bSender)
Definition: envfmt.cxx:169
SwEnvPreview m_aPreview
Definition: envfmt.hxx:36
std::vector< sal_uInt16 > m_aIDs
Definition: envfmt.hxx:34
SwEnvFormatPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rSet)
Definition: envfmt.cxx:51
std::unique_ptr< weld::CustomWeld > m_xPreview
Definition: envfmt.hxx:46
std::unique_ptr< weld::MenuButton > m_xSendEditButton
Definition: envfmt.hxx:42
virtual ~SwEnvFormatPage() override
Definition: envfmt.cxx:120
virtual void ActivatePage(const SfxItemSet &rSet) override
Definition: envfmt.cxx:346
DeactivateRC
std::unique_ptr< weld::MetricSpinButton > m_xSizeHeightField
Definition: envfmt.hxx:45
DECL_LINK(ModifyHdl, weld::MetricSpinButton &, void)
void SetMinMax()
Definition: envfmt.cxx:322
std::unique_ptr< weld::MetricSpinButton > m_xAddrTopField
Definition: envfmt.hxx:38
virtual DeactivateRC DeactivatePage(SfxItemSet *pSet) override
Definition: envfmt.cxx:353
SwEnvDlg * GetParentSwEnvDlg()
Definition: envfmt.hxx:59