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#pragma once
20
21#include <sal/config.h>
22
23#include <string_view>
24
25#include <vcl/weld.hxx>
26#include <envlop.hxx>
27
29
31{
33 std::vector<sal_uInt16> m_aIDs;
34
36 std::unique_ptr<weld::MetricSpinButton> m_xAddrLeftField;
37 std::unique_ptr<weld::MetricSpinButton> m_xAddrTopField;
38 std::unique_ptr<weld::MenuButton> m_xAddrEditButton;
39 std::unique_ptr<weld::MetricSpinButton> m_xSendLeftField;
40 std::unique_ptr<weld::MetricSpinButton> m_xSendTopField;
41 std::unique_ptr<weld::MenuButton> m_xSendEditButton;
42 std::unique_ptr<weld::ComboBox> m_xSizeFormatBox;
43 std::unique_ptr<weld::MetricSpinButton> m_xSizeWidthField;
44 std::unique_ptr<weld::MetricSpinButton> m_xSizeHeightField;
45 std::unique_ptr<weld::CustomWeld> m_xPreview;
46
48 DECL_LINK(AddrEditHdl, const OUString&, void);
49 DECL_LINK(SendEditHdl, const OUString&, void);
50 DECL_LINK(FormatHdl, weld::ComboBox&, void);
51
52 void SetMinMax();
53
54 SfxItemSet* GetCollItemSet(SwTextFormatColl const* pColl, bool bSender);
55
56 void Edit(std::u16string_view rIdent, bool bSender);
57
59
60public:
62 const SfxItemSet& rSet);
63 void Init(SwEnvDlg* pDialog);
64 virtual ~SwEnvFormatPage() override;
65
66 static std::unique_ptr<SfxTabPage>
67 Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rSet);
68
69 virtual void ActivatePage(const SfxItemSet& rSet) override;
70 virtual DeactivateRC DeactivatePage(SfxItemSet* pSet) override;
71 void FillItem(SwEnvItem& rItem);
72 virtual bool FillItemSet(SfxItemSet* rSet) override;
73 virtual void Reset(const SfxItemSet* rSet) override;
74};
75
76/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
std::unique_ptr< weld::MetricSpinButton > m_xAddrTopField
Definition: envfmt.hxx:37
virtual bool FillItemSet(SfxItemSet *rSet) override
Definition: envfmt.cxx:394
SwEnvFormatPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rSet)
Definition: envfmt.cxx:54
std::unique_ptr< weld::MetricSpinButton > m_xSizeWidthField
Definition: envfmt.hxx:43
SfxItemSet * GetCollItemSet(SwTextFormatColl const *pColl, bool bSender)
Definition: envfmt.cxx:261
std::vector< sal_uInt16 > m_aIDs
Definition: envfmt.hxx:33
std::unique_ptr< weld::MetricSpinButton > m_xAddrLeftField
Definition: envfmt.hxx:36
std::unique_ptr< weld::MetricSpinButton > m_xSendTopField
Definition: envfmt.hxx:40
virtual void ActivatePage(const SfxItemSet &rSet) override
Definition: envfmt.cxx:356
DECL_LINK(SendEditHdl, const OUString &, void)
std::unique_ptr< weld::ComboBox > m_xSizeFormatBox
Definition: envfmt.hxx:42
SwEnvDlg * GetParentSwEnvDlg()
Definition: envfmt.hxx:58
std::unique_ptr< weld::MenuButton > m_xAddrEditButton
Definition: envfmt.hxx:38
SwEnvDlg * m_pDialog
Definition: envfmt.hxx:32
std::unique_ptr< weld::MetricSpinButton > m_xSendLeftField
Definition: envfmt.hxx:39
DECL_LINK(FormatHdl, weld::ComboBox &, void)
void Init(SwEnvDlg *pDialog)
Definition: envfmt.cxx:117
virtual DeactivateRC DeactivatePage(SfxItemSet *pSet) override
Definition: envfmt.cxx:363
virtual void Reset(const SfxItemSet *rSet) override
Definition: envfmt.cxx:401
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rSet)
Definition: envfmt.cxx:351
std::unique_ptr< weld::MetricSpinButton > m_xSizeHeightField
Definition: envfmt.hxx:44
void Edit(std::u16string_view rIdent, bool bSender)
Definition: envfmt.cxx:172
DECL_LINK(ModifyHdl, weld::MetricSpinButton &, void)
std::unique_ptr< weld::MenuButton > m_xSendEditButton
Definition: envfmt.hxx:41
std::unique_ptr< weld::CustomWeld > m_xPreview
Definition: envfmt.hxx:45
DECL_LINK(AddrEditHdl, const OUString &, void)
void SetMinMax()
Definition: envfmt.cxx:332
void FillItem(SwEnvItem &rItem)
Definition: envfmt.cxx:370
SwEnvPreview m_aPreview
Definition: envfmt.hxx:35
virtual ~SwEnvFormatPage() override
Definition: envfmt.cxx:123
Represents the style of a paragraph.
Definition: fmtcol.hxx:61
DeactivateRC