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 #ifndef DBAUI_WIZ_NAMEMATCHING_HXX
28 #define DBAUI_WIZ_NAMEMATCHING_HXX
29 
30 #ifndef DBAUI_WIZ_TABBPAGE_HXX
31 #include "WTabPage.hxx"
32 #endif
33 #ifndef _DBAUI_MARKTREE_HXX_
34 #include "marktree.hxx"
35 #endif
36 #ifndef DBAUI_DATABASEEXPORT_HXX
37 #include "DExport.hxx"
38 #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 DBAUI_WIZ_COPYTABLEDIALOG_HXX
46 #include "WCopyTable.hxx"
47 #endif
48 
49 namespace dbaui
50 {
51 	// ========================================================
52 	// columns are at root only no children
53 	// ========================================================
54 	class OColumnTreeBox : public OMarkableTreeListBox
55 	{
56 		sal_Bool m_bReadOnly;
57 	protected:
58 		virtual void InitEntry(SvLBoxEntry* pEntry, const String& rStr, const Image& rImg1, const Image& rImg2, SvLBoxButtonKind eButtonKind);
59 
60 	public:
61 		OColumnTreeBox( Window* pParent, const ResId& rResId );
62 
63 		void FillListBox( const ODatabaseExport::TColumnVector& _rList);
64 		void SetReadOnly(sal_Bool _bRo=sal_True) { m_bReadOnly = _bRo; }
65 		virtual sal_Bool Select( SvLBoxEntry* pEntry, sal_Bool bSelect=sal_True );
66 
67     private:
68         using OMarkableTreeListBox::Select;
69 	};
70 
71 	// ========================================================
72 	// Wizard Page: OWizNameMatching
73 	// Name matching for data appending
74 	// ========================================================
75 	class OWizNameMatching : public OWizardPage
76 	{
77 		FixedText			m_FT_TABLE_LEFT;
78 		FixedText			m_FT_TABLE_RIGHT;
79 		OColumnTreeBox		m_CTRL_LEFT;	// left side
80 		OColumnTreeBox		m_CTRL_RIGHT;	// right side
81         ImageButton         m_ibColumn_up;
82         ImageButton         m_ibColumn_down;
83         ImageButton         m_ibColumn_up_right;
84         ImageButton         m_ibColumn_down_right;
85 		PushButton			m_pbAll;
86 		PushButton			m_pbNone;
87 		String				m_sSourceText;
88 		String				m_sDestText;
89 
90 		sal_Bool			m_bAttrsChanged;
91 
92 		DECL_LINK( ButtonClickHdl, Button * );
93 		DECL_LINK( RightButtonClickHdl, Button * );
94 		DECL_LINK( AllNoneClickHdl, Button * );
95 		DECL_LINK( TableListClickHdl, void* );
96 		DECL_LINK( TableListRightSelectHdl, void* );
97 
98 	public:
99 		virtual	void			Reset ( );
100 		virtual void			ActivatePage();
101 		virtual sal_Bool		LeavePage();
102 		virtual String			GetTitle() const ;
103 
104 		OWizNameMatching(Window* pParent);
105 		virtual ~OWizNameMatching();
106 
107 	};
108 }
109 #endif // DBAUI_WIZ_NAMEMATCHING_HXX
110 
111 
112 
113