LibreOffice Module sw (master) 1
mmgreetingspage.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_DBUI_MMGREETINGSPAGE_HXX
20#define INCLUDED_SW_SOURCE_UI_DBUI_MMGREETINGSPAGE_HXX
21
22#include <vcl/wizardmachine.hxx>
23#include <sfx2/basedlgs.hxx>
24#include <mailmergehelper.hxx>
25#include <vcl/weld.hxx>
26
27#include <mailmergewizard.hxx>
28
30
32{
33protected:
38
39 std::unique_ptr<weld::CheckButton> m_xGreetingLineCB;
40 std::unique_ptr<weld::CheckButton> m_xPersonalizedCB;
41 std::unique_ptr<weld::Label> m_xFemaleFT;
42 std::unique_ptr<weld::ComboBox> m_xFemaleLB;
43 std::unique_ptr<weld::Button> m_xFemalePB;
44 std::unique_ptr<weld::Label> m_xMaleFT;
45 std::unique_ptr<weld::ComboBox> m_xMaleLB;
46 std::unique_ptr<weld::Button> m_xMalePB;
47 std::unique_ptr<weld::Label> m_xFemaleFI;
48 std::unique_ptr<weld::Label> m_xFemaleColumnFT;
49 std::unique_ptr<weld::ComboBox> m_xFemaleColumnLB;
50 std::unique_ptr<weld::Label> m_xFemaleFieldFT;
51 std::unique_ptr<weld::ComboBox> m_xFemaleFieldCB;
52 std::unique_ptr<weld::Label> m_xNeutralFT;
53 std::unique_ptr<weld::ComboBox> m_xNeutralCB;
54
56 : m_pWizard(nullptr)
57 , m_rConfigItem(rConfigItem)
58 , m_bIsTabPage(false)
59 , m_xGreetingLineCB(rBuilder.weld_check_button("greeting"))
60 , m_xPersonalizedCB(rBuilder.weld_check_button("personalized"))
61 , m_xFemaleFT(rBuilder.weld_label("femaleft"))
62 , m_xFemaleLB(rBuilder.weld_combo_box("female"))
63 , m_xFemalePB(rBuilder.weld_button("newfemale"))
64 , m_xMaleFT(rBuilder.weld_label("maleft"))
65 , m_xMaleLB(rBuilder.weld_combo_box("male"))
66 , m_xMalePB(rBuilder.weld_button("newmale"))
67 , m_xFemaleFI(rBuilder.weld_label("femalefi"))
68 , m_xFemaleColumnFT(rBuilder.weld_label("femalecolft"))
69 , m_xFemaleColumnLB(rBuilder.weld_combo_box("femalecol"))
70 , m_xFemaleFieldFT(rBuilder.weld_label("femalefieldft"))
71 , m_xFemaleFieldCB(rBuilder.weld_combo_box("femalefield"))
72 , m_xNeutralFT(rBuilder.weld_label("generalft"))
73 , m_xNeutralCB(rBuilder.weld_combo_box("general"))
74 {
75 }
76
78
79 DECL_LINK(IndividualHdl_Impl, weld::Toggleable&, void);
80 DECL_LINK(GreetingHdl_Impl, weld::Button&, void);
81
82 void Contains(bool bContainsGreeting);
83 virtual void UpdatePreview();
84};
85
87{
88 std::unique_ptr<SwAddressPreview> m_xPreview;
89 std::unique_ptr<weld::Label> m_xPreviewFI;
90 std::unique_ptr<weld::Button> m_xAssignPB;
91 std::unique_ptr<weld::Label> m_xDocumentIndexFI;
92 std::unique_ptr<weld::Button> m_xPrevSetIB;
93 std::unique_ptr<weld::Button> m_xNextSetIB;
94 std::unique_ptr<weld::CustomWeld> m_xPreviewWIN;
95
96 OUString m_sDocument;
97
98 DECL_LINK(ContainsHdl_Impl, weld::Toggleable&, void);
99 DECL_LINK(InsertDataHdl_Impl, weld::Button&, void);
100 DECL_LINK(GreetingSelectComboBoxHdl_Impl, weld::ComboBox&, void);
101 DECL_LINK(GreetingSelectListBoxHdl_Impl, weld::ComboBox&, void);
102 DECL_LINK(AssignHdl_Impl, weld::Button&, void);
103
104 virtual void UpdatePreview() override;
105 virtual void Activate() override;
106 virtual bool commitPage(::vcl::WizardTypes::CommitPageReason _eReason) override;
107
108public:
110 virtual ~SwMailMergeGreetingsPage() override;
111};
112
114{
115 std::unique_ptr<weld::TextView> m_xBodyMLE;
116 std::unique_ptr<weld::Button> m_xOK;
117
118 DECL_LINK(ContainsHdl_Impl, weld::Toggleable&, void);
119 DECL_LINK(OKHdl, weld::Button&, void);
120
121public:
123 virtual ~SwMailBodyDialog() override;
124
125 void SetBody(const OUString& rBody) { m_xBodyMLE->set_text(rBody); }
126 OUString GetBody() const { return m_xBodyMLE->get_text(); }
127};
128#endif
129
130/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
std::unique_ptr< weld::ComboBox > m_xNeutralCB
virtual void UpdatePreview()
std::unique_ptr< weld::Label > m_xFemaleColumnFT
std::unique_ptr< weld::Label > m_xFemaleFI
std::unique_ptr< weld::Button > m_xFemalePB
DECL_LINK(GreetingHdl_Impl, weld::Button &, void)
std::unique_ptr< weld::CheckButton > m_xGreetingLineCB
std::unique_ptr< weld::ComboBox > m_xFemaleColumnLB
DECL_LINK(IndividualHdl_Impl, weld::Toggleable &, void)
std::unique_ptr< weld::Label > m_xFemaleFieldFT
std::unique_ptr< weld::CheckButton > m_xPersonalizedCB
std::unique_ptr< weld::ComboBox > m_xFemaleFieldCB
SwGreetingsHandler(SwMailMergeConfigItem &rConfigItem, weld::Builder &rBuilder)
std::unique_ptr< weld::ComboBox > m_xFemaleLB
SwMailMergeConfigItem & m_rConfigItem
The mail merge state, available even when m_pWizard is nullptr.
std::unique_ptr< weld::Label > m_xNeutralFT
std::unique_ptr< weld::Label > m_xMaleFT
std::unique_ptr< weld::Label > m_xFemaleFT
SwMailMergeWizard * m_pWizard
void Contains(bool bContainsGreeting)
std::unique_ptr< weld::ComboBox > m_xMaleLB
std::unique_ptr< weld::Button > m_xMalePB
virtual ~SwMailBodyDialog() override
void SetBody(const OUString &rBody)
DECL_LINK(OKHdl, weld::Button &, void)
std::unique_ptr< weld::Button > m_xOK
DECL_LINK(ContainsHdl_Impl, weld::Toggleable &, void)
std::unique_ptr< weld::TextView > m_xBodyMLE
SwMailBodyDialog(weld::Window *pParent)
OUString GetBody() const
std::unique_ptr< weld::CustomWeld > m_xPreviewWIN
std::unique_ptr< weld::Button > m_xPrevSetIB
DECL_LINK(AssignHdl_Impl, weld::Button &, void)
virtual ~SwMailMergeGreetingsPage() override
std::unique_ptr< weld::Label > m_xPreviewFI
virtual void Activate() override
std::unique_ptr< weld::Button > m_xAssignPB
std::unique_ptr< SwAddressPreview > m_xPreview
DECL_LINK(ContainsHdl_Impl, weld::Toggleable &, void)
std::unique_ptr< weld::Button > m_xNextSetIB
std::unique_ptr< weld::Label > m_xDocumentIndexFI
DECL_LINK(GreetingSelectListBoxHdl_Impl, weld::ComboBox &, void)
DECL_LINK(GreetingSelectComboBoxHdl_Impl, weld::ComboBox &, void)
virtual void UpdatePreview() override
DECL_LINK(InsertDataHdl_Impl, weld::Button &, void)
SwMailMergeGreetingsPage(weld::Container *pPage, SwMailMergeWizard *pWizard)
virtual bool commitPage(::vcl::WizardTypes::CommitPageReason _eReason) override