xref: /aoo4110/main/dbaccess/source/ui/inc/dlgsave.hxx (revision b1cdbd2c)
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 
24 #ifndef DBAUI_DLGSAVE_HXX
25 #define DBAUI_DLGSAVE_HXX
26 
27 #ifndef _DBASHARED_APITOOLS_HXX_
28 #include "apitools.hxx"
29 #endif
30 #ifndef _DIALOG_HXX //autogen
31 #include <vcl/dialog.hxx>
32 #endif
33 #ifndef _COM_SUN_STAR_LANG_XMULTISERVICEFACTORY_HPP_
34 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
35 #endif
36 #ifndef _SV_MSGBOX_HXX
37 #include <vcl/msgbox.hxx>
38 #endif
39 
40 namespace com { namespace sun { namespace star {
41 	namespace container {
42 		class XNameAccess;
43 		class XHierarchicalNameAccess;
44 	}
45 	namespace sdbc {
46 		class XDatabaseMetaData;
47 		class XConnection;
48 	}
49 }}}
50 
51 
52 #define	SAD_DEFAULT					0x0000
53 #define SAD_ADDITIONAL_DESCRIPTION	0x0001
54 
55 #define SAD_TITLE_STORE_AS			0x0000
56 #define SAD_TITLE_PASTE_AS			0x0100
57 #define SAD_TITLE_RENAME			0x0200
58 
59 class Button;
60 class Edit;
61 namespace dbaui
62 {
63 	class OSaveAsDlgImpl;
64     class IObjectNameCheck;
65 	class OSaveAsDlg : public ModalDialog
66 	{
67 	private:
68 		OSaveAsDlgImpl* m_pImpl;
69         ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >    m_xORB;
70 	public:
71 		OSaveAsDlg(	Window * pParent,const sal_Int32& _rType,
72                     const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB,
73 					const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>& _xConnection,
74 					const String& rDefault,
75                     const IObjectNameCheck& _rObjectNameCheck,
76 					sal_Int32 _nFlags = SAD_DEFAULT | SAD_TITLE_STORE_AS);
77 
78         OSaveAsDlg(	Window* _pParent,
79                     const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB,
80 					const String& _rDefault,
81 					const String& _sLabel,
82                     const IObjectNameCheck& _rObjectNameCheck,
83 					sal_Int32 _nFlags = SAD_DEFAULT | SAD_TITLE_STORE_AS);
84 		virtual ~OSaveAsDlg();
85 
86 		String getName() const;
87 		String getCatalog() const;
88 		String getSchema() const;
89 	private:
90 		DECL_LINK(ButtonClickHdl, Button *);
91 		DECL_LINK(EditModifyHdl,  Edit * );
92 
93 		void implInitOnlyTitle(const String& _rLabel);
94 		void implInit();
95 	};
96 }
97 
98 #endif // DBAUI_DLGSAVE_HXX
99 
100 
101 
102