Bump version to 5.0-14
[LibreOffice.git] / dbaccess / source / ui / inc / WColumnSelect.hxx
blob0c179f2367fb977335b3f94395a728503fd938a1
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef INCLUDED_DBACCESS_SOURCE_UI_INC_WCOLUMNSELECT_HXX
20 #define INCLUDED_DBACCESS_SOURCE_UI_INC_WCOLUMNSELECT_HXX
22 #include "WTabPage.hxx"
23 #include "WCopyTable.hxx"
25 #include <vcl/fixed.hxx>
26 #include <vcl/lstbox.hxx>
27 #include <vcl/button.hxx>
28 #include <comphelper/stl_types.hxx>
30 namespace dbaui
32 class OFieldDescription;
34 // Wizard Page: OWizColumnSelect
36 class OWizColumnSelect : public OWizardPage
38 VclPtr<ListBox> m_pOrgColumnNames; // left side
39 VclPtr<PushButton> m_pColumn_RH;
40 VclPtr<PushButton> m_pColumns_RH;
41 VclPtr<PushButton> m_pColumn_LH;
42 VclPtr<PushButton> m_pColumns_LH;
43 VclPtr<ListBox> m_pNewColumnNames; // right side
45 DECL_LINK( ButtonClickHdl, Button * );
46 DECL_LINK( ListDoubleClickHdl, ListBox * );
48 static void clearListBox(ListBox& _rListBox);
49 static void fillColumns( ListBox* pRight,
50 ::std::vector< OUString> &_rRightColumns);
52 void createNewColumn( ListBox* _pListbox,
53 OFieldDescription* _pSrcField,
54 ::std::vector< OUString>& _rRightColumns,
55 const OUString& _sColumnName,
56 const OUString& _sExtraChars,
57 sal_Int32 _nMaxNameLen,
58 const ::comphelper::UStringMixEqual& _aCase);
60 void moveColumn( ListBox* _pRight,
61 ListBox* _pLeft,
62 ::std::vector< OUString>& _rRightColumns,
63 const OUString& _sColumnName,
64 const OUString& _sExtraChars,
65 sal_Int32 _nMaxNameLen,
66 const ::comphelper::UStringMixEqual& _aCase);
68 void enableButtons();
70 sal_uInt16 adjustColumnPosition(ListBox* _pLeft,
71 const OUString& _sColumnName,
72 ODatabaseExport::TColumnVector::size_type nCurrentPos,
73 const ::comphelper::UStringMixEqual& _aCase);
75 public:
76 virtual void Reset ( ) SAL_OVERRIDE;
77 virtual void ActivatePage() SAL_OVERRIDE;
78 virtual bool LeavePage() SAL_OVERRIDE;
79 virtual OUString GetTitle() const SAL_OVERRIDE ;
81 OWizColumnSelect(vcl::Window* pParent);
82 virtual ~OWizColumnSelect();
83 virtual void dispose() SAL_OVERRIDE;
86 #endif // INCLUDED_DBACCESS_SOURCE_UI_INC_WCOLUMNSELECT_HXX
88 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */