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