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: dsselect.hxx,v $
10 * $Revision: 1.8.68.1 $
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 ************************************************************************/
31 #ifndef _DBAUI_DSSELECT_HXX_
32 #define _DBAUI_DSSELECT_HXX_
34 #include "dsntypes.hxx"
35 #include "odbcconfig.hxx"
36 #include "commontypes.hxx"
38 #include <vcl/dialog.hxx>
39 #include <vcl/lstbox.hxx>
40 #include <vcl/button.hxx>
41 #include <vcl/group.hxx>
42 #include <vcl/fixed.hxx>
43 #include <rtl/ustring.hxx>
48 //.........................................................................
51 //.........................................................................
53 //=========================================================================
54 //= ODatasourceSelector
55 //=========================================================================
56 class ODatasourceSelectDialog
: public ModalDialog
59 FixedText m_aDescription
;
60 ListBox m_aDatasource
;
62 CancelButton m_aCancel
;
64 #ifdef HAVE_ODBC_ADMINISTRATION
65 PushButton m_aManageDatasources
;
67 PushButton m_aCreateAdabasDB
;
68 SfxItemSet
* m_pOutputSet
;
69 #ifdef HAVE_ODBC_ADMINISTRATION
70 ::std::auto_ptr
< OOdbcManagement
>
75 ODatasourceSelectDialog( Window
* _pParent
, const StringBag
& _rDatasources
, bool _bAdabas
,SfxItemSet
* _pOutputSet
= NULL
);
76 ~ODatasourceSelectDialog();
78 inline String
GetSelected() const { return m_aDatasource
.GetSelectEntry();}
79 void Select( const String
& _rEntry
) { m_aDatasource
.SelectEntry(_rEntry
); }
84 DECL_LINK( ListDblClickHdl
, ListBox
* );
85 #ifdef HAVE_ODBC_ADMINISTRATION
86 DECL_LINK( ManageClickHdl
, PushButton
* );
87 DECL_LINK( ManageProcessFinished
, void* );
89 DECL_LINK( CreateDBClickHdl
, PushButton
* );
90 void fillListBox(const StringBag
& _rDatasources
);
93 //.........................................................................
95 //.........................................................................
97 #endif // _DBAUI_DSSELECT_HXX_