Version 5.2.6.1, tag libreoffice-5.2.6.1
[LibreOffice.git] / dbaccess / source / ui / inc / WColumnSelect.hxx
blob8346438e1c0ececbd449ffc6ed8162dec34b3c59
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_TYPED( ButtonClickHdl, Button *, void );
46 DECL_LINK_TYPED( ListDoubleClickHdl, ListBox&, void );
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_Int32 adjustColumnPosition(ListBox* _pLeft,
71 const OUString& _sColumnName,
72 ODatabaseExport::TColumnVector::size_type nCurrentPos,
73 const ::comphelper::UStringMixEqual& _aCase);
75 public:
76 virtual void Reset ( ) override;
77 virtual void ActivatePage() override;
78 virtual bool LeavePage() override;
79 virtual OUString GetTitle() const override ;
81 OWizColumnSelect(vcl::Window* pParent);
82 virtual ~OWizColumnSelect();
83 virtual void dispose() override;
86 #endif // INCLUDED_DBACCESS_SOURCE_UI_INC_WCOLUMNSELECT_HXX
88 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */