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