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 INCLUDED_SW_SOURCE_UI_DBUI_MMGREETINGSPAGE_HXX
20 : #define INCLUDED_SW_SOURCE_UI_DBUI_MMGREETINGSPAGE_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 : FixedText* 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(bool bContainsGreeting);
67 : virtual void UpdatePreview();
68 : };
69 :
70 : class SwMailMergeGreetingsPage : public svt::OWizardPage,
71 : public SwGreetingsHandler
72 : {
73 : FixedText* m_pPreviewFI;
74 : SwAddressPreview* m_pPreviewWIN;
75 : PushButton* m_pAssignPB;
76 : FixedText* m_pDocumentIndexFI;
77 : PushButton* m_pPrevSetIB;
78 : PushButton* m_pNextSetIB;
79 :
80 : OUString m_sDocument;
81 :
82 : DECL_LINK(ContainsHdl_Impl, CheckBox*);
83 : DECL_LINK(InsertDataHdl_Impl, ImageButton*);
84 : DECL_LINK(GreetingSelectHdl_Impl, void *);
85 : DECL_LINK(AssignHdl_Impl, PushButton*);
86 :
87 : virtual void UpdatePreview() SAL_OVERRIDE;
88 : virtual void ActivatePage() SAL_OVERRIDE;
89 : virtual bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason ) SAL_OVERRIDE;
90 : public:
91 : SwMailMergeGreetingsPage( SwMailMergeWizard* _pParent);
92 : virtual ~SwMailMergeGreetingsPage();
93 :
94 : };
95 :
96 : class SwMailBodyDialog : public SfxModalDialog, public SwGreetingsHandler
97 : {
98 : FixedText *m_pBodyFT;
99 : VclMultiLineEdit *m_pBodyMLE;
100 :
101 : OKButton *m_pOK;
102 :
103 : DECL_LINK(ContainsHdl_Impl, CheckBox*);
104 : DECL_LINK(OKHdl, void *);
105 : public:
106 : SwMailBodyDialog(vcl::Window* pParent, SwMailMergeWizard* pWizard);
107 : virtual ~SwMailBodyDialog();
108 :
109 0 : void SetBody(const OUString& rBody ) {m_pBodyMLE->SetText(rBody);}
110 0 : OUString GetBody() const {return m_pBodyMLE->GetText();}
111 : };
112 : #endif
113 :
114 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|