1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 #ifndef _MAILMERGEGREETINGSPAGE_HXX 24 #define _MAILMERGEGREETINGSPAGE_HXX 25 26 #include <svtools/wizardmachine.hxx> 27 #include <sfx2/basedlgs.hxx> 28 #ifndef _SV_BUTTON_HXX 29 #include <vcl/button.hxx> 30 #endif 31 #include <vcl/lstbox.hxx> 32 #include <vcl/combobox.hxx> 33 #include <svtools/stdctrl.hxx> 34 #include <mailmergehelper.hxx> 35 #include <svtools/svmedit.hxx> 36 37 class SwMailMergeWizard; 38 /*-- 17.05.2004 14:51:45--------------------------------------------------- 39 40 -----------------------------------------------------------------------*/ 41 class SwGreetingsHandler 42 { 43 friend class SwMailBodyDialog; 44 friend class SwMailMergeGreetingsPage; 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 DECL_LINK(IndividualHdl_Impl, CheckBox*); 71 DECL_LINK(GreetingHdl_Impl, PushButton*); 72 73 void Contains(sal_Bool bContainsGreeting); 74 virtual void UpdatePreview(); 75 }; 76 /*-- 02.04.2004 09:21:06--------------------------------------------------- 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, ListBox*); 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 /*-- 17.05.2004 14:45:43--------------------------------------------------- 128 129 -----------------------------------------------------------------------*/ 130 class SwMailBodyDialog : public SfxModalDialog, public SwGreetingsHandler 131 { 132 CheckBox m_aGreetingLineCB; 133 134 CheckBox m_aPersonalizedCB; 135 136 FixedText m_aFemaleFT; 137 ListBox m_aFemaleLB; 138 PushButton m_aFemalePB; 139 140 FixedText m_aMaleFT; 141 ListBox m_aMaleLB; 142 PushButton m_aMalePB; 143 144 FixedInfo m_aFemaleFI; 145 FixedText m_aFemaleColumnFT; 146 ListBox m_aFemaleColumnLB; 147 FixedText m_aFemaleFieldFT; 148 ComboBox m_aFemaleFieldCB; 149 150 FixedText m_aNeutralFT; 151 ComboBox m_aNeutralCB; 152 153 FixedText m_aBodyFT; 154 MultiLineEdit m_aBodyMLE; 155 FixedLine m_aSeparatorFL; 156 157 OKButton m_aOK; 158 CancelButton m_aCancel; 159 HelpButton m_aHelp; 160 161 DECL_LINK(ContainsHdl_Impl, CheckBox*); 162 DECL_LINK(OKHdl, PushButton*); 163 public: 164 SwMailBodyDialog(Window* pParent, SwMailMergeWizard* pWizard); 165 ~SwMailBodyDialog(); 166 SetBody(const String & rBody)167 void SetBody(const String& rBody ) {m_aBodyMLE.SetText(rBody);} GetBody() const168 String GetBody() const {return m_aBodyMLE.GetText();} 169 }; 170 #endif 171 172 173