update dev300-m58
[ooovba.git] / dbaccess / source / ui / inc / WColumnSelect.hxx
blobc87c231dc68aa6fe116b386f59104c7cba09a763
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: WColumnSelect.hxx,v $
10 * $Revision: 1.10 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef DBAUI_WIZ_COLUMNSELECT_HXX
31 #define DBAUI_WIZ_COLUMNSELECT_HXX
33 #include "WTabPage.hxx"
34 #include "WCopyTable.hxx"
36 #ifndef _SV_FIXED_HXX
37 #include <vcl/fixed.hxx>
38 #endif
39 #ifndef _SV_LSTBOX_HXX
40 #include <vcl/lstbox.hxx>
41 #endif
42 #ifndef _SV_BUTTON_HXX
43 #include <vcl/button.hxx>
44 #endif
45 #include <comphelper/stl_types.hxx>
47 namespace dbaui
49 class OFieldDescription;
51 // ========================================================
52 // Wizard Page: OWizColumnSelect
53 // ========================================================
55 class OWizColumnSelect : public OWizardPage
58 FixedLine m_flColumns;
59 MultiListBox m_lbOrgColumnNames; // left side
60 ImageButton m_ibColumn_RH;
61 ImageButton m_ibColumns_RH;
62 ImageButton m_ibColumn_LH;
63 ImageButton m_ibColumns_LH;
64 MultiListBox m_lbNewColumnNames; // right side
67 DECL_LINK( ButtonClickHdl, Button * );
68 DECL_LINK( ListDoubleClickHdl, MultiListBox * );
71 void clearListBox(MultiListBox& _rListBox);
72 void fillColumns( ListBox* pRight,
73 ::std::vector< ::rtl::OUString> &_rRightColumns);
75 void createNewColumn( ListBox* _pListbox,
76 OFieldDescription* _pSrcField,
77 ::std::vector< ::rtl::OUString>& _rRightColumns,
78 const ::rtl::OUString& _sColumnName,
79 const ::rtl::OUString& _sExtraChars,
80 sal_Int32 _nMaxNameLen,
81 const ::comphelper::TStringMixEqualFunctor& _aCase);
83 void moveColumn( ListBox* _pRight,
84 ListBox* _pLeft,
85 ::std::vector< ::rtl::OUString>& _rRightColumns,
86 const ::rtl::OUString& _sColumnName,
87 const ::rtl::OUString& _sExtraChars,
88 sal_Int32 _nMaxNameLen,
89 const ::comphelper::TStringMixEqualFunctor& _aCase);
91 void enableButtons();
94 USHORT adjustColumnPosition(ListBox* _pLeft,
95 const ::rtl::OUString& _sColumnName,
96 ODatabaseExport::TColumnVector::size_type nCurrentPos,
97 const ::comphelper::TStringMixEqualFunctor& _aCase);
99 public:
100 virtual void Reset ( );
101 virtual void ActivatePage();
102 virtual sal_Bool LeavePage();
103 virtual String GetTitle() const ;
105 OWizColumnSelect(Window* pParent);
106 virtual ~OWizColumnSelect();
109 #endif // DBAUI_WIZ_COLUMNSELECT_HXX