Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*************************************************************************
3 : : *
4 : : * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 : : *
6 : : * Copyright 2000, 2010 Oracle and/or its affiliates.
7 : : *
8 : : * OpenOffice.org - a multi-platform office productivity suite
9 : : *
10 : : * This file is part of OpenOffice.org.
11 : : *
12 : : * OpenOffice.org is free software: you can redistribute it and/or modify
13 : : * it under the terms of the GNU Lesser General Public License version 3
14 : : * only, as published by the Free Software Foundation.
15 : : *
16 : : * OpenOffice.org is distributed in the hope that it will be useful,
17 : : * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 : : * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 : : * GNU Lesser General Public License version 3 for more details
20 : : * (a copy is included in the LICENSE file that accompanied this code).
21 : : *
22 : : * You should have received a copy of the GNU Lesser General Public License
23 : : * version 3 along with OpenOffice.org. If not, see
24 : : * <http://www.openoffice.org/license.html>
25 : : * for a copy of the LGPLv3 License.
26 : : *
27 : : ************************************************************************/
28 : : #ifndef _MAILMERGEGREETINGSPAGE_HXX
29 : : #define _MAILMERGEGREETINGSPAGE_HXX
30 : :
31 : : #include <svtools/wizardmachine.hxx>
32 : : #include <sfx2/basedlgs.hxx>
33 : : #include <vcl/button.hxx>
34 : : #include <vcl/lstbox.hxx>
35 : : #include <vcl/combobox.hxx>
36 : : #include <svtools/stdctrl.hxx>
37 : : #include <mailmergehelper.hxx>
38 : : #include <svtools/svmedit.hxx>
39 : :
40 : : class SwMailMergeWizard;
41 : :
42 : 0 : class SwGreetingsHandler
43 : : {
44 : : protected:
45 : : CheckBox* m_pGreetingLineCB;
46 : :
47 : : CheckBox* m_pPersonalizedCB;
48 : :
49 : : FixedText* m_pFemaleFT;
50 : : ListBox* m_pFemaleLB;
51 : : PushButton* m_pFemalePB;
52 : :
53 : : FixedText* m_pMaleFT;
54 : : ListBox* m_pMaleLB;
55 : : PushButton* m_pMalePB;
56 : :
57 : : FixedInfo* m_pFemaleFI;
58 : : FixedText* m_pFemaleColumnFT;
59 : : ListBox* m_pFemaleColumnLB;
60 : : FixedText* m_pFemaleFieldFT;
61 : : ComboBox* m_pFemaleFieldCB;
62 : :
63 : : FixedText* m_pNeutralFT;
64 : : ComboBox* m_pNeutralCB;
65 : :
66 : : bool m_bIsTabPage;
67 : :
68 : : SwMailMergeWizard* m_pWizard;
69 : :
70 : 0 : ~SwGreetingsHandler() {}
71 : :
72 : : DECL_LINK(IndividualHdl_Impl, void *);
73 : : DECL_LINK(GreetingHdl_Impl, PushButton*);
74 : :
75 : : void Contains(sal_Bool bContainsGreeting);
76 : : virtual void UpdatePreview();
77 : : };
78 : :
79 : : class SwMailMergeGreetingsPage : public svt::OWizardPage,
80 : : public SwGreetingsHandler
81 : : {
82 : : SwBoldFixedInfo m_aHeaderFI;
83 : :
84 : : CheckBox m_aGreetingLineCB;
85 : :
86 : : CheckBox m_aPersonalizedCB;
87 : :
88 : : FixedText m_aFemaleFT;
89 : : ListBox m_aFemaleLB;
90 : : PushButton m_aFemalePB;
91 : :
92 : : FixedText m_aMaleFT;
93 : : ListBox m_aMaleLB;
94 : : PushButton m_aMalePB;
95 : :
96 : : FixedInfo m_aFemaleFI;
97 : : FixedText m_aFemaleColumnFT;
98 : : ListBox m_aFemaleColumnLB;
99 : : FixedText m_aFemaleFieldFT;
100 : : ComboBox m_aFemaleFieldCB;
101 : :
102 : : FixedText m_aNeutralFT;
103 : : ComboBox m_aNeutralCB;
104 : :
105 : : FixedInfo m_aPreviewFI;
106 : : SwAddressPreview m_aPreviewWIN;
107 : : PushButton m_aAssignPB;
108 : : FixedInfo m_aDocumentIndexFI;
109 : : ImageButton m_aPrevSetIB;
110 : : ImageButton m_aNextSetIB;
111 : :
112 : : String m_sDocument;
113 : :
114 : : DECL_LINK(ContainsHdl_Impl, CheckBox*);
115 : : DECL_LINK(InsertDataHdl_Impl, ImageButton*);
116 : : DECL_LINK(GreetingSelectHdl_Impl, void *);
117 : : DECL_LINK(AssignHdl_Impl, PushButton*);
118 : :
119 : : virtual void UpdatePreview();
120 : : virtual void ActivatePage();
121 : : virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason );
122 : : public:
123 : : SwMailMergeGreetingsPage( SwMailMergeWizard* _pParent);
124 : : ~SwMailMergeGreetingsPage();
125 : :
126 : : };
127 : :
128 : : class SwMailBodyDialog : public SfxModalDialog, public SwGreetingsHandler
129 : : {
130 : : CheckBox m_aGreetingLineCB;
131 : :
132 : : CheckBox m_aPersonalizedCB;
133 : :
134 : : FixedText m_aFemaleFT;
135 : : ListBox m_aFemaleLB;
136 : : PushButton m_aFemalePB;
137 : :
138 : : FixedText m_aMaleFT;
139 : : ListBox m_aMaleLB;
140 : : PushButton m_aMalePB;
141 : :
142 : : FixedInfo m_aFemaleFI;
143 : : FixedText m_aFemaleColumnFT;
144 : : ListBox m_aFemaleColumnLB;
145 : : FixedText m_aFemaleFieldFT;
146 : : ComboBox m_aFemaleFieldCB;
147 : :
148 : : FixedText m_aNeutralFT;
149 : : ComboBox m_aNeutralCB;
150 : :
151 : : FixedText m_aBodyFT;
152 : : MultiLineEdit m_aBodyMLE;
153 : : FixedLine m_aSeparatorFL;
154 : :
155 : : OKButton m_aOK;
156 : : CancelButton m_aCancel;
157 : : HelpButton m_aHelp;
158 : :
159 : : DECL_LINK(ContainsHdl_Impl, CheckBox*);
160 : : DECL_LINK(OKHdl, void *);
161 : : public:
162 : : SwMailBodyDialog(Window* pParent, SwMailMergeWizard* pWizard);
163 : : ~SwMailBodyDialog();
164 : :
165 : 0 : void SetBody(const String& rBody ) {m_aBodyMLE.SetText(rBody);}
166 : 0 : String GetBody() const {return m_aBodyMLE.GetText();}
167 : : };
168 : : #endif
169 : :
170 : :
171 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|