merge the formfield patch from ooo-build
[ooovba.git] / dbaccess / source / ext / adabas / AdabasNewDb.hxx
blob1a947e1558ab5edbb3df9da2fce2e93304eb14b9
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: AdabasNewDb.hxx,v $
10 * $Revision: 1.5 $
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>
37 #endif
39 #ifndef _SV_FIXED_HXX
40 #include <vcl/fixed.hxx>
41 #endif
42 #ifndef _SV_BUTTON_HXX
43 #include <vcl/button.hxx>
44 #endif
45 #ifndef _SV_FIELD_HXX
46 #include <vcl/field.hxx>
47 #endif
48 #ifndef _SV_EDIT_HXX
49 #include <vcl/edit.hxx>
50 #endif
51 #ifndef _COM_SUN_STAR_SDBCX_XCREATECATALOG_HPP_
52 #include <com/sun/star/sdbcx/XCreateCatalog.hpp>
53 #endif
54 #ifndef _COM_SUN_STAR_LANG_XMULTISERVICEFACTORY_HPP_
55 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
56 #endif
57 #ifndef _FILEDLGHELPER_HXX
58 #include <sfx2/filedlghelper.hxx>
59 #endif
60 #include <memory>
61 #include "ASQLNameEdit.hxx"
63 class WaitObject;
65 namespace adabasui
67 class ODatabaseCreator;
68 //========================================================================
69 // ADABAS for new db; is called from typepage
70 //========================================================================
71 class OAdabasNewDbDlg : public ModalDialog
73 private:
74 FixedText m_FT_DATABASENAME;
75 OSQLNameEdit m_ET_DATABASENAME;
77 FixedLine m_FL_USER;
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;
89 FixedImage m_BMP_CON;
90 FixedImage m_BMP_SYS;
91 FixedImage m_BMP_DOMAIN;
93 FixedText m_FT_RESTORE;
94 Edit m_ET_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;
115 FixedLine m_FL_END;
117 OKButton m_PB_OK;
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;
124 String m_ConPwd;
125 String m_SysPwd;
126 String m_DomainPwd;
127 String m_DBName;
128 String m_sDbWork;
129 String m_sDbConfig;
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;
132 BOOL m_bRestore;
133 INT8 m_nSetBitmap;
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 * );
145 void CheckBitmaps();
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);
152 public:
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