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