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 _CREATEADDRESSLISTDIALOG_HXX 28 #define _CREATEADDRESSLISTDIALOG_HXX 29 30 #include <sfx2/basedlgs.hxx> 31 32 #ifndef _SV_BUTTON_HXX 33 #include <vcl/button.hxx> 34 #endif 35 #include <svtools/stdctrl.hxx> 36 #include <vcl/field.hxx> 37 #include <vcl/lstbox.hxx> 38 #include <vector> 39 40 class SwAddressControl_Impl; 41 class SwMailMergeConfigItem; 42 /*-- 19.04.2004 12:09:46--------------------------------------------------- 43 container of the created database 44 -----------------------------------------------------------------------*/ 45 struct SwCSVData 46 { 47 ::std::vector< ::rtl::OUString > aDBColumnHeaders; 48 ::std::vector< ::std::vector< ::rtl::OUString> > aDBData; 49 }; 50 /*-- 08.04.2004 14:04:39--------------------------------------------------- 51 52 -----------------------------------------------------------------------*/ 53 class SwFindEntryDialog; 54 class SwCreateAddressListDialog : public SfxModalDialog 55 { 56 FixedInfo m_aAddressInformation; 57 SwAddressControl_Impl* m_pAddressControl; 58 59 PushButton m_aNewPB; 60 PushButton m_aDeletePB; 61 PushButton m_aFindPB; 62 PushButton m_aCustomizePB; 63 64 FixedInfo m_aViewEntriesFI; 65 PushButton m_aStartPB; 66 PushButton m_aPrevPB; 67 NumericField m_aSetNoNF; 68 PushButton m_aNextPB; 69 PushButton m_aEndPB; 70 71 FixedLine m_aSeparatorFL; 72 73 OKButton m_aOK; 74 CancelButton m_aCancel; 75 HelpButton m_aHelp; 76 77 String m_sAddressListFilterName; 78 String m_sURL; 79 80 SwCSVData* m_pCSVData; 81 SwFindEntryDialog* m_pFindDlg; 82 83 DECL_LINK(NewHdl_Impl, PushButton*); 84 DECL_LINK(DeleteHdl_Impl, PushButton*); 85 DECL_LINK(FindHdl_Impl, PushButton*); 86 DECL_LINK(CustomizeHdl_Impl, PushButton*); 87 DECL_LINK(OkHdl_Impl, PushButton*); 88 DECL_LINK(DBCursorHdl_Impl, PushButton*); 89 DECL_LINK(DBNumCursorHdl_Impl, NumericField*); 90 91 void UpdateButtons(); 92 93 public: 94 SwCreateAddressListDialog( 95 Window* pParent, const String& rURL, SwMailMergeConfigItem& rConfig); 96 ~SwCreateAddressListDialog(); 97 98 const String& GetURL() const { return m_sURL; } 99 void Find( const String& rSearch, sal_Int32 nColumn); 100 }; 101 /*-- 13.04.2004 13:30:21--------------------------------------------------- 102 103 -----------------------------------------------------------------------*/ 104 class SwFindEntryDialog : public ModelessDialog 105 { 106 FixedText m_aFindFT; 107 Edit m_aFindED; 108 CheckBox m_aFindOnlyCB; 109 ListBox m_aFindOnlyLB; 110 111 PushButton m_aFindPB; 112 CancelButton m_aCancel; 113 HelpButton m_aHelp; 114 115 SwCreateAddressListDialog* m_pParent; 116 117 DECL_LINK(FindHdl_Impl, PushButton*); 118 DECL_LINK(FindEnableHdl_Impl, Edit*); 119 DECL_LINK(CloseHdl_Impl, PushButton*); 120 121 public: 122 SwFindEntryDialog(SwCreateAddressListDialog* pParent); 123 ~SwFindEntryDialog(); 124 125 ListBox& GetFieldsListBox(){return m_aFindOnlyLB;} 126 String GetFindString() const {return m_aFindED.GetText();} 127 }; 128 129 #endif 130 131