1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 #ifndef EXTENSIONS_ABP_ABPFINALPAGE_HXX
29 #define EXTENSIONS_ABP_ABPFINALPAGE_HXX
30 
31 #include "abspage.hxx"
32 #include "abptypes.hxx"
33 
34 #include <svtools/urlcontrol.hxx>
35 #include <svx/databaselocationinput.hxx>
36 #include <vcl/edit.hxx>
37 
38 //.........................................................................
39 namespace abp
40 {
41 //.........................................................................
42 
43 	//=====================================================================
44 	//= FinalPage
45 	//=====================================================================
46 	class FinalPage : public AddressBookSourcePage
47 	{
48 	protected:
49 		FixedText		m_aExplanation;
50 		FixedText		m_aLocationLabel;
51 		::svt::OFileURLControl	m_aLocation;
52 		PushButton		m_aBrowse;
53 		CheckBox		m_aRegisterName;
54 		FixedText		m_aNameLabel;
55 		Edit			m_aName;
56 		FixedText		m_aDuplicateNameError;
57 
58         ::svx::DatabaseLocationInputController
59                         m_aLocationController;
60 
61 		StringBag		m_aInvalidDataSourceNames;
62 
63 	public:
64 		FinalPage( OAddessBookSourcePilot* _pParent );
65 
66 	protected:
67 		// OWizardPage overridables
68 		virtual void		initializePage();
69 		virtual sal_Bool	commitPage( ::svt::WizardTypes::CommitPageReason _eReason );
70 
71 		// TabDialog overridables
72 		virtual void		ActivatePage();
73 		virtual void		DeactivatePage();
74 
75 		// OImportPage overridables
76 		virtual bool        canAdvance() const;
77 
78 	private:
79 		DECL_LINK( OnNameModified, Edit* );
80 		DECL_LINK( OnRegister, CheckBox* );
81 
82 		sal_Bool	isValidName() const;
83 		void		implCheckName();
84 		void		setFields();
85 	};
86 
87 //.........................................................................
88 }	// namespace abp
89 //.........................................................................
90 
91 #endif // EXTENSIONS_ABP_ABPFINALPAGE_HXX
92 
93