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 EXTENSIONS_ABP_ABPFINALPAGE_HXX
25 #define EXTENSIONS_ABP_ABPFINALPAGE_HXX
26 
27 #include "abspage.hxx"
28 #include "abptypes.hxx"
29 
30 #include <svtools/urlcontrol.hxx>
31 #include <svx/databaselocationinput.hxx>
32 #include <vcl/edit.hxx>
33 
34 //.........................................................................
35 namespace abp
36 {
37 //.........................................................................
38 
39 	//=====================================================================
40 	//= FinalPage
41 	//=====================================================================
42 	class FinalPage : public AddressBookSourcePage
43 	{
44 	protected:
45 		FixedText		m_aExplanation;
46 		FixedText		m_aLocationLabel;
47 		::svt::OFileURLControl	m_aLocation;
48 		PushButton		m_aBrowse;
49 		CheckBox		m_aRegisterName;
50 		FixedText		m_aNameLabel;
51 		Edit			m_aName;
52 		FixedText		m_aDuplicateNameError;
53 
54         ::svx::DatabaseLocationInputController
55                         m_aLocationController;
56 
57 		StringBag		m_aInvalidDataSourceNames;
58 
59 	public:
60 		FinalPage( OAddessBookSourcePilot* _pParent );
61 
62 	protected:
63 		// OWizardPage overridables
64 		virtual void		initializePage();
65 		virtual sal_Bool	commitPage( ::svt::WizardTypes::CommitPageReason _eReason );
66 
67 		// TabDialog overridables
68 		virtual void		ActivatePage();
69 		virtual void		DeactivatePage();
70 
71 		// OImportPage overridables
72 		virtual bool        canAdvance() const;
73 
74 	private:
75 		DECL_LINK( OnNameModified, Edit* );
76 		DECL_LINK( OnRegister, CheckBox* );
77 
78 		sal_Bool	isValidName() const;
79 		void		implCheckName();
80 		void		setFields();
81 	};
82 
83 //.........................................................................
84 }	// namespace abp
85 //.........................................................................
86 
87 #endif // EXTENSIONS_ABP_ABPFINALPAGE_HXX
88 
89