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: AdabasNewDb.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 ************************************************************************/
31 #ifndef ADABASUI_ADABAS_CREATEDB_HXX
32 #define ADABASUI_ADABAS_CREATEDB_HXX
35 #ifndef _SV_DIALOG_HXX
36 #include <vcl/dialog.hxx>
40 #include <vcl/fixed.hxx>
42 #ifndef _SV_BUTTON_HXX
43 #include <vcl/button.hxx>
46 #include <vcl/field.hxx>
49 #include <vcl/edit.hxx>
51 #ifndef _COM_SUN_STAR_SDBCX_XCREATECATALOG_HPP_
52 #include <com/sun/star/sdbcx/XCreateCatalog.hpp>
54 #ifndef _COM_SUN_STAR_LANG_XMULTISERVICEFACTORY_HPP_
55 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
57 #ifndef _FILEDLGHELPER_HXX
58 #include <sfx2/filedlghelper.hxx>
61 #include "ASQLNameEdit.hxx"
67 class ODatabaseCreator
;
68 //========================================================================
69 // ADABAS for new db; is called from typepage
70 //========================================================================
71 class OAdabasNewDbDlg
: public ModalDialog
74 FixedText m_FT_DATABASENAME
;
75 OSQLNameEdit m_ET_DATABASENAME
;
78 FixedText m_FT_SYSUSR
;
79 FixedText m_FT_CONUSR
;
80 FixedText m_FT_DOMAIN_USR
;
82 OSQLNameEdit m_ET_SYSUSR
;
83 PushButton m_PB_SYSPWD
;
84 OSQLNameEdit m_ET_CONUSR
;
85 PushButton m_PB_CONPWD
;
86 OSQLNameEdit m_ET_DOMAIN_USR
;
87 PushButton m_PB_DOMAINPWD
;
91 FixedImage m_BMP_DOMAIN
;
93 FixedText m_FT_RESTORE
;
95 PushButton m_PB_RESTORE
;
97 FixedLine m_FL_DBSETTINGS
;
98 FixedText m_FT_SYSDEVSPACE
;
99 FixedText m_FT_TRANSACTIONLOG
;
100 FixedText m_FT_DATADEVSPACE
;
101 Edit m_ET_SYSDEVSPACE
;
102 PushButton m_PB_SYSDEVSPACE
;
103 Edit m_ET_TRANSACTIONLOG
;
104 PushButton m_PB_TRANSACTIONLOG
;
105 Edit m_ET_DATADEVSPACE
;
106 PushButton m_PB_DATADEVSPACE
;
108 FixedText m_FT_TRANSACTIONLOG_SIZE
;
109 NumericField m_NF_TRANSACTIONLOG_SIZE
;
110 FixedText m_FT_DATADEVSPACE_SIZE
;
111 NumericField m_NF_DATADEVSPACE_SIZE
;
112 FixedText m_FT_CACHE_SIZE
;
113 NumericField m_NF_CACHE_SIZE
;
118 CancelButton m_PB_CANCEL
;
120 String m_SYSDEV_File
;
121 String m_TRANSDEV_File
;
122 String m_DATADEV_File
;
123 String m_Backup_File
;
130 ::com::sun::star::uno::Reference
< ::com::sun::star::sdbcx::XCreateCatalog
> m_xCreateCatalog
;
131 com::sun::star::uno::Reference
< com::sun::star::lang::XMultiServiceFactory
> m_xORB
;
135 ::std::auto_ptr
<WaitObject
> m_aCreatorWait
;
136 ::std::auto_ptr
<ODatabaseCreator
> m_aCreatorThread
;
138 DECL_LINK( LoadButtonClickHdl
, Button
* );
139 DECL_LINK( ButtonClickHdl
, Button
* );
140 DECL_LINK( PwdClickHdl
, Button
* );
141 DECL_LINK( ImplOKHdl
, OKButton
* );
142 DECL_LINK( LoseFocusHdl
, Edit
* );
143 DECL_LINK( TerminateHdl
, void * );
147 DECL_LINK(OnError
, void*);
148 DECL_LINK(OnNoDefaultPath
, void*);
149 DECL_LINK(OnNoAccessRights
, void*);
151 sal_Bool
fillEnvironmentVariable(const ::rtl::OUString
& _sVariableName
,String
& _rsValue
);
153 OAdabasNewDbDlg(Window
* pParent
,
154 const ::com::sun::star::uno::Reference
< ::com::sun::star::sdbcx::XCreateCatalog
>& _rxCreateCatalog
,
155 const com::sun::star::uno::Reference
< com::sun::star::lang::XMultiServiceFactory
>& _rxORB
,
156 BOOL _bRestore
=FALSE
);
157 virtual ~OAdabasNewDbDlg();
159 ::rtl::OUString
GetDatabaseName() const { return m_ET_DATABASENAME
.GetText(); }
160 ::rtl::OUString
GetControlUser() const { return m_ET_CONUSR
.GetText(); }
161 ::rtl::OUString
GetControlPassword() const { return m_ConPwd
; }
162 ::rtl::OUString
GetUser() const { return m_ET_SYSUSR
.GetText(); }
163 ::rtl::OUString
GetUserPassword() const { return m_SysPwd
; }
164 sal_Int32
GetCacheSize() const { return static_cast<sal_Int32
>(m_NF_CACHE_SIZE
.GetValue()); }
167 #endif // adabasui_ADABAS_CREATEDB_HXX