update credits
[LibreOffice.git] / sw / source / ui / dbui / mmgreetingspage.hxx
blob7738463c9ce0d9f71ed5be027bb98f34c8bf03f9
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 #ifndef _MAILMERGEGREETINGSPAGE_HXX
20 #define _MAILMERGEGREETINGSPAGE_HXX
22 #include <svtools/wizardmachine.hxx>
23 #include <sfx2/basedlgs.hxx>
24 #include <vcl/button.hxx>
25 #include <vcl/lstbox.hxx>
26 #include <vcl/combobox.hxx>
27 #include <svtools/stdctrl.hxx>
28 #include <mailmergehelper.hxx>
29 #include <svtools/svmedit.hxx>
31 class SwMailMergeWizard;
33 class SwGreetingsHandler
35 protected:
36 CheckBox* m_pGreetingLineCB;
38 CheckBox* m_pPersonalizedCB;
40 FixedText* m_pFemaleFT;
41 ListBox* m_pFemaleLB;
42 PushButton* m_pFemalePB;
44 FixedText* m_pMaleFT;
45 ListBox* m_pMaleLB;
46 PushButton* m_pMalePB;
48 FixedInfo* m_pFemaleFI;
49 FixedText* m_pFemaleColumnFT;
50 ListBox* m_pFemaleColumnLB;
51 FixedText* m_pFemaleFieldFT;
52 ComboBox* m_pFemaleFieldCB;
54 FixedText* m_pNeutralFT;
55 ComboBox* m_pNeutralCB;
57 bool m_bIsTabPage;
59 SwMailMergeWizard* m_pWizard;
61 ~SwGreetingsHandler() {}
63 DECL_LINK(IndividualHdl_Impl, void *);
64 DECL_LINK(GreetingHdl_Impl, PushButton*);
66 void Contains(sal_Bool bContainsGreeting);
67 virtual void UpdatePreview();
70 class SwMailMergeGreetingsPage : public svt::OWizardPage,
71 public SwGreetingsHandler
73 SwBoldFixedInfo m_aHeaderFI;
75 CheckBox m_aGreetingLineCB;
77 CheckBox m_aPersonalizedCB;
79 FixedText m_aFemaleFT;
80 ListBox m_aFemaleLB;
81 PushButton m_aFemalePB;
83 FixedText m_aMaleFT;
84 ListBox m_aMaleLB;
85 PushButton m_aMalePB;
87 FixedInfo m_aFemaleFI;
88 FixedText m_aFemaleColumnFT;
89 ListBox m_aFemaleColumnLB;
90 FixedText m_aFemaleFieldFT;
91 ComboBox m_aFemaleFieldCB;
93 FixedText m_aNeutralFT;
94 ComboBox m_aNeutralCB;
96 FixedInfo m_aPreviewFI;
97 SwAddressPreview m_aPreviewWIN;
98 PushButton m_aAssignPB;
99 FixedInfo m_aDocumentIndexFI;
100 ImageButton m_aPrevSetIB;
101 ImageButton m_aNextSetIB;
103 String m_sDocument;
105 DECL_LINK(ContainsHdl_Impl, CheckBox*);
106 DECL_LINK(InsertDataHdl_Impl, ImageButton*);
107 DECL_LINK(GreetingSelectHdl_Impl, void *);
108 DECL_LINK(AssignHdl_Impl, PushButton*);
110 virtual void UpdatePreview();
111 virtual void ActivatePage();
112 virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason );
113 public:
114 SwMailMergeGreetingsPage( SwMailMergeWizard* _pParent);
115 ~SwMailMergeGreetingsPage();
119 class SwMailBodyDialog : public SfxModalDialog, public SwGreetingsHandler
121 CheckBox m_aGreetingLineCB;
123 CheckBox m_aPersonalizedCB;
125 FixedText m_aFemaleFT;
126 ListBox m_aFemaleLB;
127 PushButton m_aFemalePB;
129 FixedText m_aMaleFT;
130 ListBox m_aMaleLB;
131 PushButton m_aMalePB;
133 FixedInfo m_aFemaleFI;
134 FixedText m_aFemaleColumnFT;
135 ListBox m_aFemaleColumnLB;
136 FixedText m_aFemaleFieldFT;
137 ComboBox m_aFemaleFieldCB;
139 FixedText m_aNeutralFT;
140 ComboBox m_aNeutralCB;
142 FixedText m_aBodyFT;
143 MultiLineEdit m_aBodyMLE;
144 FixedLine m_aSeparatorFL;
146 OKButton m_aOK;
147 CancelButton m_aCancel;
148 HelpButton m_aHelp;
150 DECL_LINK(ContainsHdl_Impl, CheckBox*);
151 DECL_LINK(OKHdl, void *);
152 public:
153 SwMailBodyDialog(Window* pParent, SwMailMergeWizard* pWizard);
154 ~SwMailBodyDialog();
156 void SetBody(const String& rBody ) {m_aBodyMLE.SetText(rBody);}
157 String GetBody() const {return m_aBodyMLE.GetText();}
159 #endif
162 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */