1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 #ifndef _SELECTDBTABLEDIALOG_HXX
24 #define _SELECTDBTABLEDIALOG_HXX
25 
26 #include <sfx2/basedlgs.hxx>
27 
28 #ifndef _SV_BUTTON_HXX
29 #include <vcl/button.hxx>
30 #endif
31 #include <vcl/fixed.hxx>
32 #include <svtools/svtabbx.hxx>
33 #include <svtools/headbar.hxx>
34 namespace com{namespace sun{namespace star{
35     namespace sdbc{
36         class XConnection;
37     }
38 }}}
39 
40 /*-- 08.04.2004 14:04:39---------------------------------------------------
41 
42   -----------------------------------------------------------------------*/
43 class SwSelectDBTableDialog : public SfxModalDialog
44 {
45     FixedText       m_aSelectFI;
46     HeaderBar       m_aTableHB;
47     SvTabListBox    m_aTableLB;
48     PushButton      m_aPreviewPB;
49 
50     FixedLine       m_aSeparatorFL;
51 
52     OKButton        m_aOK;
53     CancelButton    m_aCancel;
54     HelpButton      m_aHelp;
55 
56     String          m_sName;
57     String          m_sType;
58     String          m_sTable;
59     String          m_sQuery;
60 
61     ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection> m_xConnection;
62 
63     DECL_LINK(PreviewHdl, PushButton*);
64 public:
65 
66     SwSelectDBTableDialog(Window* pParent,
67         const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>& xConnection
68             );
69     ~SwSelectDBTableDialog();
70 
71     String      GetSelectedTable(bool& bIsTable);
72     void        SetSelectedTable(const String& rTable, bool bIsTable);
73 };
74 #endif
75 
76