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: addresslistdialog.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 _ADDRESSLISTDIALOG_HXX
31 #define _ADDRESSLISTDIALOG_HXX
33 #include <sfx2/basedlgs.hxx>
34 #include <svtools/stdctrl.hxx>
35 #ifndef _SV_BUTTON_HXX
36 #include <vcl/button.hxx>
38 #include <svtools/svtabbx.hxx>
39 #include <svtools/headbar.hxx>
40 #include <swdbdata.hxx>
41 #include "sharedconnection.hxx"
44 namespace com
{namespace sun
{namespace star
{
53 class XColumnsSupplier
;
56 class SwMailMergeAddressBlockPage
;
57 /*-- 08.04.2004 14:04:29---------------------------------------------------
59 -----------------------------------------------------------------------*/
60 class SwAddressListDialog
: public SfxModalDialog
62 FixedInfo m_aDescriptionFI
;
66 SvTabListBox m_aListLB
;
68 PushButton m_aLoadListPB
;
69 PushButton m_aCreateListPB
;
70 PushButton m_aFilterPB
;
72 PushButton m_aTablePB
;
74 FixedLine m_aSeparatorFL
;
77 CancelButton m_aCancel
;
85 SvLBoxEntry
* m_pCreatedDataSource
;
89 SwMailMergeAddressBlockPage
* m_pAddressPage
;
91 ::com::sun::star::uno::Reference
< ::com::sun::star::container::XNameAccess
> m_xDBContext
;
92 // ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDataSource> m_xSource;
93 // ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection> m_xConnection;
94 // ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XColumnsSupplier> m_xColumnsSupplier;
97 void DetectTablesAndQueries(SvLBoxEntry
* pSelect
, bool bWidthDialog
);
99 DECL_LINK(FilterHdl_Impl
, PushButton
*);
100 DECL_LINK(LoadHdl_Impl
, PushButton
*);
101 DECL_LINK(CreateHdl_Impl
, PushButton
*);
102 DECL_LINK(ListBoxSelectHdl_Impl
, SvTabListBox
*);
103 DECL_LINK(EditHdl_Impl
, PushButton
*);
104 DECL_LINK(TableSelectHdl_Impl
, PushButton
*);
105 DECL_LINK(OKHdl_Impl
, PushButton
*);
107 DECL_STATIC_LINK(SwAddressListDialog
, StaticListBoxSelectHdl_Impl
, SvLBoxEntry
*);
110 SwAddressListDialog(SwMailMergeAddressBlockPage
* pParent
);
111 ~SwAddressListDialog();
113 ::com::sun::star::uno::Reference
< ::com::sun::star::sdbc::XDataSource
>
116 SharedConnection
GetConnection();
118 ::com::sun::star::uno::Reference
< ::com::sun::star::sdbcx::XColumnsSupplier
>
119 GetColumnsSupplier();
121 const SwDBData
& GetDBData() const {return m_aDBData
;}
122 ::rtl::OUString
GetFilter();