Version 7.6.3.2-android, tag libreoffice-7.6.3.2-android
[LibreOffice.git] / sw / source / ui / envelp / envfmt.hxx
blob8b1405492cd8493edd90ea4d22469fc06c9fcc91
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
19 #pragma once
21 #include <sal/config.h>
23 #include <string_view>
25 #include <vcl/weld.hxx>
26 #include <envlop.hxx>
28 class SwTextFormatColl;
30 class SwEnvFormatPage : public SfxTabPage
32 SwEnvDlg* m_pDialog;
33 std::vector<sal_uInt16> m_aIDs;
35 SwEnvPreview m_aPreview;
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;
47 DECL_LINK(ModifyHdl, weld::MetricSpinButton&, void);
48 DECL_LINK(AddrEditHdl, const OUString&, void);
49 DECL_LINK(SendEditHdl, const OUString&, void);
50 DECL_LINK(FormatHdl, weld::ComboBox&, void);
52 void SetMinMax();
54 SfxItemSet* GetCollItemSet(SwTextFormatColl const* pColl, bool bSender);
56 void Edit(std::u16string_view rIdent, bool bSender);
58 SwEnvDlg* GetParentSwEnvDlg() { return m_pDialog; }
60 public:
61 SwEnvFormatPage(weld::Container* pPage, weld::DialogController* pController,
62 const SfxItemSet& rSet);
63 void Init(SwEnvDlg* pDialog);
64 virtual ~SwEnvFormatPage() override;
66 static std::unique_ptr<SfxTabPage>
67 Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rSet);
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;
76 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */