Line data Source code
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 _MAILMERGEGREETINGSPAGE_HXX
20 : #define _MAILMERGEGREETINGSPAGE_HXX
21 :
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>
30 :
31 : class SwMailMergeWizard;
32 :
33 0 : class SwGreetingsHandler
34 : {
35 : protected:
36 : CheckBox* m_pGreetingLineCB;
37 :
38 : CheckBox* m_pPersonalizedCB;
39 :
40 : FixedText* m_pFemaleFT;
41 : ListBox* m_pFemaleLB;
42 : PushButton* m_pFemalePB;
43 :
44 : FixedText* m_pMaleFT;
45 : ListBox* m_pMaleLB;
46 : PushButton* m_pMalePB;
47 :
48 : FixedInfo* m_pFemaleFI;
49 : FixedText* m_pFemaleColumnFT;
50 : ListBox* m_pFemaleColumnLB;
51 : FixedText* m_pFemaleFieldFT;
52 : ComboBox* m_pFemaleFieldCB;
53 :
54 : FixedText* m_pNeutralFT;
55 : ComboBox* m_pNeutralCB;
56 :
57 : bool m_bIsTabPage;
58 :
59 : SwMailMergeWizard* m_pWizard;
60 :
61 0 : ~SwGreetingsHandler() {}
62 :
63 : DECL_LINK(IndividualHdl_Impl, void *);
64 : DECL_LINK(GreetingHdl_Impl, PushButton*);
65 :
66 : void Contains(sal_Bool bContainsGreeting);
67 : virtual void UpdatePreview();
68 : };
69 :
70 : class SwMailMergeGreetingsPage : public svt::OWizardPage,
71 : public SwGreetingsHandler
72 : {
73 : SwBoldFixedInfo m_aHeaderFI;
74 :
75 : CheckBox m_aGreetingLineCB;
76 :
77 : CheckBox m_aPersonalizedCB;
78 :
79 : FixedText m_aFemaleFT;
80 : ListBox m_aFemaleLB;
81 : PushButton m_aFemalePB;
82 :
83 : FixedText m_aMaleFT;
84 : ListBox m_aMaleLB;
85 : PushButton m_aMalePB;
86 :
87 : FixedInfo m_aFemaleFI;
88 : FixedText m_aFemaleColumnFT;
89 : ListBox m_aFemaleColumnLB;
90 : FixedText m_aFemaleFieldFT;
91 : ComboBox m_aFemaleFieldCB;
92 :
93 : FixedText m_aNeutralFT;
94 : ComboBox m_aNeutralCB;
95 :
96 : FixedInfo m_aPreviewFI;
97 : SwAddressPreview m_aPreviewWIN;
98 : PushButton m_aAssignPB;
99 : FixedInfo m_aDocumentIndexFI;
100 : ImageButton m_aPrevSetIB;
101 : ImageButton m_aNextSetIB;
102 :
103 : String m_sDocument;
104 :
105 : DECL_LINK(ContainsHdl_Impl, CheckBox*);
106 : DECL_LINK(InsertDataHdl_Impl, ImageButton*);
107 : DECL_LINK(GreetingSelectHdl_Impl, void *);
108 : DECL_LINK(AssignHdl_Impl, PushButton*);
109 :
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();
116 :
117 : };
118 :
119 : class SwMailBodyDialog : public SfxModalDialog, public SwGreetingsHandler
120 : {
121 : CheckBox m_aGreetingLineCB;
122 :
123 : CheckBox m_aPersonalizedCB;
124 :
125 : FixedText m_aFemaleFT;
126 : ListBox m_aFemaleLB;
127 : PushButton m_aFemalePB;
128 :
129 : FixedText m_aMaleFT;
130 : ListBox m_aMaleLB;
131 : PushButton m_aMalePB;
132 :
133 : FixedInfo m_aFemaleFI;
134 : FixedText m_aFemaleColumnFT;
135 : ListBox m_aFemaleColumnLB;
136 : FixedText m_aFemaleFieldFT;
137 : ComboBox m_aFemaleFieldCB;
138 :
139 : FixedText m_aNeutralFT;
140 : ComboBox m_aNeutralCB;
141 :
142 : FixedText m_aBodyFT;
143 : MultiLineEdit m_aBodyMLE;
144 : FixedLine m_aSeparatorFL;
145 :
146 : OKButton m_aOK;
147 : CancelButton m_aCancel;
148 : HelpButton m_aHelp;
149 :
150 : DECL_LINK(ContainsHdl_Impl, CheckBox*);
151 : DECL_LINK(OKHdl, void *);
152 : public:
153 : SwMailBodyDialog(Window* pParent, SwMailMergeWizard* pWizard);
154 : ~SwMailBodyDialog();
155 :
156 0 : void SetBody(const String& rBody ) {m_aBodyMLE.SetText(rBody);}
157 0 : String GetBody() const {return m_aBodyMLE.GetText();}
158 : };
159 : #endif
160 :
161 :
162 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|