1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: createaddresslistdialog.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef _CREATEADDRESSLISTDIALOG_HXX
31 #define _CREATEADDRESSLISTDIALOG_HXX
33 #include <sfx2/basedlgs.hxx>
35 #ifndef _SV_BUTTON_HXX
36 #include <vcl/button.hxx>
38 #include <svtools/stdctrl.hxx>
39 #include <vcl/field.hxx>
40 #include <vcl/lstbox.hxx>
43 class SwAddressControl_Impl
;
44 class SwMailMergeConfigItem
;
45 /*-- 19.04.2004 12:09:46---------------------------------------------------
46 container of the created database
47 -----------------------------------------------------------------------*/
50 ::std::vector
< ::rtl::OUString
> aDBColumnHeaders
;
51 ::std::vector
< ::std::vector
< ::rtl::OUString
> > aDBData
;
53 /*-- 08.04.2004 14:04:39---------------------------------------------------
55 -----------------------------------------------------------------------*/
56 class SwFindEntryDialog
;
57 class SwCreateAddressListDialog
: public SfxModalDialog
59 FixedInfo m_aAddressInformation
;
60 SwAddressControl_Impl
* m_pAddressControl
;
63 PushButton m_aDeletePB
;
65 PushButton m_aCustomizePB
;
67 FixedInfo m_aViewEntriesFI
;
68 PushButton m_aStartPB
;
70 NumericField m_aSetNoNF
;
74 FixedLine m_aSeparatorFL
;
77 CancelButton m_aCancel
;
80 String m_sAddressListFilterName
;
83 SwCSVData
* m_pCSVData
;
84 SwFindEntryDialog
* m_pFindDlg
;
86 DECL_LINK(NewHdl_Impl
, PushButton
*);
87 DECL_LINK(DeleteHdl_Impl
, PushButton
*);
88 DECL_LINK(FindHdl_Impl
, PushButton
*);
89 DECL_LINK(CustomizeHdl_Impl
, PushButton
*);
90 DECL_LINK(OkHdl_Impl
, PushButton
*);
91 DECL_LINK(DBCursorHdl_Impl
, PushButton
*);
92 DECL_LINK(DBNumCursorHdl_Impl
, NumericField
*);
97 SwCreateAddressListDialog(
98 Window
* pParent
, const String
& rURL
, SwMailMergeConfigItem
& rConfig
);
99 ~SwCreateAddressListDialog();
101 const String
& GetURL() const { return m_sURL
; }
102 void Find( const String
& rSearch
, sal_Int32 nColumn
);
104 /*-- 13.04.2004 13:30:21---------------------------------------------------
106 -----------------------------------------------------------------------*/
107 class SwFindEntryDialog
: public ModelessDialog
111 CheckBox m_aFindOnlyCB
;
112 ListBox m_aFindOnlyLB
;
114 PushButton m_aFindPB
;
115 CancelButton m_aCancel
;
118 SwCreateAddressListDialog
* m_pParent
;
120 DECL_LINK(FindHdl_Impl
, PushButton
*);
121 DECL_LINK(FindEnableHdl_Impl
, Edit
*);
122 DECL_LINK(CloseHdl_Impl
, PushButton
*);
125 SwFindEntryDialog(SwCreateAddressListDialog
* pParent
);
126 ~SwFindEntryDialog();
128 ListBox
& GetFieldsListBox(){return m_aFindOnlyLB
;}
129 String
GetFindString() const {return m_aFindED
.GetText();}