LibreOffice Module dbaccess (master) 1
WColumnSelect.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19#pragma once
20
21#include "WTabPage.hxx"
22#include "WCopyTable.hxx"
23
25
26namespace dbaui
27{
28 class OFieldDescription;
29
30 // Wizard Page: OWizColumnSelect
31
33 {
34 std::unique_ptr<weld::TreeView> m_xOrgColumnNames; // left side
35 std::unique_ptr<weld::Button> m_xColumn_RH;
36 std::unique_ptr<weld::Button> m_xColumns_RH;
37 std::unique_ptr<weld::Button> m_xColumn_LH;
38 std::unique_ptr<weld::Button> m_xColumns_LH;
39 std::unique_ptr<weld::TreeView> m_xNewColumnNames; // right side
40
41 DECL_LINK( ButtonClickHdl, weld::Button&, void );
42 DECL_LINK( ListDoubleClickHdl, weld::TreeView&, bool );
43
44 static void clearListBox(weld::TreeView& _rListBox);
45 static void fillColumns(weld::TreeView const * pRight,
46 std::vector< OUString> &_rRightColumns);
47
48 void createNewColumn( weld::TreeView* _pListbox,
49 OFieldDescription const * _pSrcField,
50 std::vector< OUString>& _rRightColumns,
51 const OUString& _sColumnName,
52 std::u16string_view _sExtraChars,
53 sal_Int32 _nMaxNameLen,
54 const ::comphelper::UStringMixEqual& _aCase);
55
56 void moveColumn( weld::TreeView* _pRight,
57 weld::TreeView const * _pLeft,
58 std::vector< OUString>& _rRightColumns,
59 const OUString& _sColumnName,
60 std::u16string_view _sExtraChars,
61 sal_Int32 _nMaxNameLen,
62 const ::comphelper::UStringMixEqual& _aCase);
63
64 void enableButtons();
65
66 sal_Int32 adjustColumnPosition(weld::TreeView const * _pLeft,
67 std::u16string_view _sColumnName,
68 ODatabaseExport::TColumnVector::size_type nCurrentPos,
69 const ::comphelper::UStringMixEqual& _aCase);
70
71 public:
72 virtual void Reset ( ) override;
73 virtual void Activate() override;
74 virtual bool LeavePage() override;
75 virtual OUString GetTitle() const override ;
76
78 virtual ~OWizColumnSelect() override;
79 };
80}
81
82/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual OUString GetTitle() const override
std::unique_ptr< weld::TreeView > m_xOrgColumnNames
virtual void Activate() override
std::unique_ptr< weld::Button > m_xColumn_RH
std::unique_ptr< weld::Button > m_xColumns_RH
void createNewColumn(weld::TreeView *_pListbox, OFieldDescription const *_pSrcField, std::vector< OUString > &_rRightColumns, const OUString &_sColumnName, std::u16string_view _sExtraChars, sal_Int32 _nMaxNameLen, const ::comphelper::UStringMixEqual &_aCase)
DECL_LINK(ListDoubleClickHdl, weld::TreeView &, bool)
virtual void Reset() override
virtual ~OWizColumnSelect() override
void moveColumn(weld::TreeView *_pRight, weld::TreeView const *_pLeft, std::vector< OUString > &_rRightColumns, const OUString &_sColumnName, std::u16string_view _sExtraChars, sal_Int32 _nMaxNameLen, const ::comphelper::UStringMixEqual &_aCase)
virtual bool LeavePage() override
sal_Int32 adjustColumnPosition(weld::TreeView const *_pLeft, std::u16string_view _sColumnName, ODatabaseExport::TColumnVector::size_type nCurrentPos, const ::comphelper::UStringMixEqual &_aCase)
std::unique_ptr< weld::Button > m_xColumns_LH
DECL_LINK(ButtonClickHdl, weld::Button &, void)
static void clearListBox(weld::TreeView &_rListBox)
std::unique_ptr< weld::Button > m_xColumn_LH
std::unique_ptr< weld::TreeView > m_xNewColumnNames
static void fillColumns(weld::TreeView const *pRight, std::vector< OUString > &_rRightColumns)
OWizColumnSelect(weld::Container *pParent, OCopyTableWizard *pWizard)