Update ooo320-m1
[ooovba.git] / sw / source / ui / dbui / mmgreetingspage.hxx
blob9ca2b4d5cff229b57e30df648ea778d4683d7cdb
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: mmgreetingspage.hxx,v $
10 * $Revision: 1.6 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef _MAILMERGEGREETINGSPAGE_HXX
31 #define _MAILMERGEGREETINGSPAGE_HXX
33 #include <svtools/wizardmachine.hxx>
34 #include <sfx2/basedlgs.hxx>
35 #ifndef _SV_BUTTON_HXX
36 #include <vcl/button.hxx>
37 #endif
38 #include <vcl/lstbox.hxx>
39 #include <vcl/combobox.hxx>
40 #include <svtools/stdctrl.hxx>
41 #include <mailmergehelper.hxx>
42 #include <svtools/svmedit.hxx>
44 class SwMailMergeWizard;
45 /*-- 17.05.2004 14:51:45---------------------------------------------------
47 -----------------------------------------------------------------------*/
48 class SwGreetingsHandler
50 friend class SwMailBodyDialog;
51 friend class SwMailMergeGreetingsPage;
52 CheckBox* m_pGreetingLineCB;
54 CheckBox* m_pPersonalizedCB;
56 FixedText* m_pFemaleFT;
57 ListBox* m_pFemaleLB;
58 PushButton* m_pFemalePB;
60 FixedText* m_pMaleFT;
61 ListBox* m_pMaleLB;
62 PushButton* m_pMalePB;
64 FixedInfo* m_pFemaleFI;
65 FixedText* m_pFemaleColumnFT;
66 ListBox* m_pFemaleColumnLB;
67 FixedText* m_pFemaleFieldFT;
68 ComboBox* m_pFemaleFieldCB;
70 FixedText* m_pNeutralFT;
71 ComboBox* m_pNeutralCB;
73 bool m_bIsTabPage;
75 SwMailMergeWizard* m_pWizard;
77 DECL_LINK(IndividualHdl_Impl, CheckBox*);
78 DECL_LINK(GreetingHdl_Impl, PushButton*);
80 void Contains(sal_Bool bContainsGreeting);
81 virtual void UpdatePreview();
82 };
83 /*-- 02.04.2004 09:21:06---------------------------------------------------
85 -----------------------------------------------------------------------*/
86 class SwMailMergeGreetingsPage : public svt::OWizardPage,
87 public SwGreetingsHandler
89 SwBoldFixedInfo m_aHeaderFI;
91 CheckBox m_aGreetingLineCB;
93 CheckBox m_aPersonalizedCB;
95 FixedText m_aFemaleFT;
96 ListBox m_aFemaleLB;
97 PushButton m_aFemalePB;
99 FixedText m_aMaleFT;
100 ListBox m_aMaleLB;
101 PushButton m_aMalePB;
103 FixedInfo m_aFemaleFI;
104 FixedText m_aFemaleColumnFT;
105 ListBox m_aFemaleColumnLB;
106 FixedText m_aFemaleFieldFT;
107 ComboBox m_aFemaleFieldCB;
109 FixedText m_aNeutralFT;
110 ComboBox m_aNeutralCB;
112 FixedInfo m_aPreviewFI;
113 SwAddressPreview m_aPreviewWIN;
114 PushButton m_aAssignPB;
115 FixedInfo m_aDocumentIndexFI;
116 ImageButton m_aPrevSetIB;
117 ImageButton m_aNextSetIB;
119 String m_sDocument;
121 DECL_LINK(ContainsHdl_Impl, CheckBox*);
122 DECL_LINK(InsertDataHdl_Impl, ImageButton*);
123 DECL_LINK(GreetingSelectHdl_Impl, ListBox*);
124 DECL_LINK(AssignHdl_Impl, PushButton*);
126 virtual void UpdatePreview();
127 virtual void ActivatePage();
128 virtual sal_Bool commitPage( CommitPageReason _eReason );
129 public:
130 SwMailMergeGreetingsPage( SwMailMergeWizard* _pParent);
131 ~SwMailMergeGreetingsPage();
134 /*-- 17.05.2004 14:45:43---------------------------------------------------
136 -----------------------------------------------------------------------*/
137 class SwMailBodyDialog : public SfxModalDialog, public SwGreetingsHandler
139 CheckBox m_aGreetingLineCB;
141 CheckBox m_aPersonalizedCB;
143 FixedText m_aFemaleFT;
144 ListBox m_aFemaleLB;
145 PushButton m_aFemalePB;
147 FixedText m_aMaleFT;
148 ListBox m_aMaleLB;
149 PushButton m_aMalePB;
151 FixedInfo m_aFemaleFI;
152 FixedText m_aFemaleColumnFT;
153 ListBox m_aFemaleColumnLB;
154 FixedText m_aFemaleFieldFT;
155 ComboBox m_aFemaleFieldCB;
157 FixedText m_aNeutralFT;
158 ComboBox m_aNeutralCB;
160 FixedText m_aBodyFT;
161 MultiLineEdit m_aBodyMLE;
162 FixedLine m_aSeparatorFL;
164 OKButton m_aOK;
165 CancelButton m_aCancel;
166 HelpButton m_aHelp;
168 DECL_LINK(ContainsHdl_Impl, CheckBox*);
169 DECL_LINK(OKHdl, PushButton*);
170 public:
171 SwMailBodyDialog(Window* pParent, SwMailMergeWizard* pWizard);
172 ~SwMailBodyDialog();
174 void SetBody(const String& rBody ) {m_aBodyMLE.SetText(rBody);}
175 String GetBody() const {return m_aBodyMLE.GetText();}
177 #endif