Update ooo320-m1
[ooovba.git] / sw / source / ui / dbui / addresslistdialog.hxx
blobd680dbc916438e073d4e402e29965477aa04906b
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: addresslistdialog.hxx,v $
10 * $Revision: 1.7 $
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>
37 #endif
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{
45 namespace container{
46 class XNameAccess;
48 namespace sdbc{
49 class XDataSource;
50 class XConnection;
52 namespace sdbcx{
53 class XColumnsSupplier;
55 }}}
56 class SwMailMergeAddressBlockPage;
57 /*-- 08.04.2004 14:04:29---------------------------------------------------
59 -----------------------------------------------------------------------*/
60 class SwAddressListDialog : public SfxModalDialog
62 FixedInfo m_aDescriptionFI;
64 FixedInfo m_aListFT;
65 HeaderBar m_aListHB;
66 SvTabListBox m_aListLB;
68 PushButton m_aLoadListPB;
69 PushButton m_aCreateListPB;
70 PushButton m_aFilterPB;
71 PushButton m_aEditPB;
72 PushButton m_aTablePB;
74 FixedLine m_aSeparatorFL;
76 OKButton m_aOK;
77 CancelButton m_aCancel;
78 HelpButton m_aHelp;
80 String m_sName;
81 String m_sTable;
82 String m_sConnecting;
84 String m_sCreatedURL;
85 SvLBoxEntry* m_pCreatedDataSource;
87 bool m_bInSelectHdl;
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;
95 SwDBData m_aDBData;
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*);
109 public:
110 SwAddressListDialog(SwMailMergeAddressBlockPage* pParent);
111 ~SwAddressListDialog();
113 ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDataSource>
114 GetSource();
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();
124 #endif